Updating heuristic order

This commit is contained in:
Arfon Smith
2015-01-23 13:22:45 -06:00
parent 6ad6984fe7
commit 4d2b6ee99e

View File

@@ -160,11 +160,17 @@ module Linguist
end
end
disambiguate "M", "Matlab", "Mathematica", "Mercury", "Objective-C" do |data|
if (/^[ \t]*@(interface|class|protocol|property|end|synchronised|selector|implementation)\b/.match(data))
disambiguate "M", "Mathematica", "Matlab", "Mercury", "Objective-C" do |data|
if /^[ \t]*@(interface|class|protocol|property|end|synchronised|selector|implementation)\b/.match(data)
Language["Objective-C"]
# TODO add matchers for "M", "Matlab", "Mathematica", "Mercury"
elsif data.include?(":- module")
Language["Mercury"]
elsif /^\s*;/.match(data)
Language["M"]
elsif /^\s*\(\*/.match(data)
Language["Mathematica"]
elsif /^\s*%/.match(data)
Language["Matlab"]
end
end