mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add DTrace and Makefile dependency includes.
Sample file mpq.d by Georg Lukas; license GPL 2. Sample file counts.d by Kate Turner; public domain. Sample file javascript-race.d by unknown; license MPL 1.1/GPL 2.0/LGPL 2.1. Sample file probes.d by momjian; license TBD.
This commit is contained in:
@@ -229,5 +229,15 @@ module Linguist
|
||||
Language["Text"]
|
||||
end
|
||||
end
|
||||
|
||||
disambiguate "D", "DTrace", "Makefile" do |data|
|
||||
if /^module /.match(data)
|
||||
Language["D"]
|
||||
elsif /^((dtrace:::)?BEGIN|provider |#pragma (D (option|attributes)|ident)\s)/.match(data)
|
||||
Language["DTrace"]
|
||||
elsif /(\/.*:( .* \\)$| : \\$|^ : |: \\$)/.match(data)
|
||||
Language["Makefile"]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user