Add detection for the Coq language - fixes #116

This commit is contained in:
Abe Voelker
2012-02-17 10:49:05 -06:00
parent 4ad921f176
commit daef609f5f
6 changed files with 535 additions and 0 deletions

View File

@@ -509,6 +509,17 @@ module Linguist
end
end
# Internal: Guess language of .v files.
#
# Returns a Language
def guess_v_language
if lines.grep(/^(\/\*|\/\/|module|parameter|input|output|wire|reg|always|initial|begin|\`)/).any?
Language['Verilog']
else
Language['Coq']
end
end
# Internal: Guess language of .gsp files.
#
# Returns a Language.