Disambiguate between OCaml and Standard ML

Fix #2208
This commit is contained in:
Thomas Gazagnaire
2015-03-13 15:03:48 +00:00
parent b5472ab753
commit e79607372b
9 changed files with 5252 additions and 0 deletions

View File

@@ -261,5 +261,14 @@ module Linguist
Language["Makefile"]
end
end
disambiguate "OCaml", "Standard ML" do |data|
if /module|let rec |match\s+(\S+\s)+with/.match(data)
Language["OCaml"]
elsif /=> |case\s+(\S+\s)+of/.match(data)
Language["Standard ML"]
end
end
end
end