Added detection for the new M (aka MUMPS) language.

This commit is contained in:
Laurent Parenteau
2012-03-27 11:47:52 -04:00
parent 3b7b2020d2
commit e0190a5a6e
4 changed files with 20 additions and 0 deletions

View File

@@ -457,6 +457,9 @@ module Linguist
# * Leading function keyword
# * "%" comments
#
# M heuristics:
# * ";" comments
#
# Returns a Language.
def guess_m_language
# Objective-C keywords
@@ -471,6 +474,10 @@ module Linguist
elsif lines.grep(/^%/).any?
Language['Matlab']
# M comment
elsif lines.grep(/^[ \t]*;/).any?
Language['M']
# Fallback to Objective-C, don't want any Matlab false positives
else
Language['Objective-C']

View File

@@ -627,6 +627,14 @@ Lua:
- .lua
- .nse
M:
type: programming
lexer: Text only
aliases:
- mumps
extensions:
- .m
Makefile:
extensions:
- .mak