Skip to content

Commit

Permalink
Merge pull request #125 from abevoelker/detect-coq-language
Browse files Browse the repository at this point in the history
Add detection for the Coq language - fixes #116
  • Loading branch information
josh committed Mar 5, 2012
2 parents 5ff5cab + daef609 commit d80ee60
Show file tree
Hide file tree
Showing 6 changed files with 535 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/linguist/blob_helper.rb
Expand Up @@ -511,6 +511,17 @@ def guess_t_language
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.
Expand Down
8 changes: 8 additions & 0 deletions lib/linguist/languages.yml
Expand Up @@ -220,6 +220,12 @@ Common Lisp:
- .lisp
- .ny

Coq:
type: programming
lexer: Coq
extensions:
- .v

Cpp-ObjDump:
type: data
lexer: cpp-objdump
Expand Down Expand Up @@ -1063,6 +1069,8 @@ Vala:
Verilog:
type: programming
lexer: verilog
overrides:
- .v
extensions:
- .v

Expand Down

0 comments on commit d80ee60

Please sign in to comment.