mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Added detection for the new M (aka MUMPS) language.
This commit is contained in:
@@ -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']
|
||||
|
||||
@@ -627,6 +627,14 @@ Lua:
|
||||
- .lua
|
||||
- .nse
|
||||
|
||||
M:
|
||||
type: programming
|
||||
lexer: Text only
|
||||
aliases:
|
||||
- mumps
|
||||
extensions:
|
||||
- .m
|
||||
|
||||
Makefile:
|
||||
extensions:
|
||||
- .mak
|
||||
|
||||
Reference in New Issue
Block a user