From 28103ee25b041a14d1ec49a709665e5a6805c2ac Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Mon, 25 May 2015 10:17:58 +0200 Subject: [PATCH] Add .ms to GAS. --- lib/linguist/heuristics.rb | 10 +++++++++- lib/linguist/languages.yml | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 88e973fc..1b2c2a5b 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -295,7 +295,7 @@ module Linguist Language["Common Lisp"] elsif /^(%[%{}]xs|<.*>)/.match(data) Language["Lex"] - elsif /^\.[a-z][a-z](\s|$)/.match(data) + elsif /^\.[a-z][a-z](\s|$)/i.match(data) Language["Groff"] end end @@ -307,5 +307,13 @@ module Linguist Language["Nemerle"] end end + + disambiguate "GAS", "Groff" do |data| + if /^[.'][a-z][a-z](\s|$)/i.match(data) + Language["Groff"] + elsif /((^|\s)move?[. ])|\.(include|globa?l)\s/.match(data) + Language["GAS"] + end + end end end diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4beaa7aa..c1598bff 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1041,6 +1041,7 @@ GAS: group: Assembly extensions: - .s + - .ms tm_scope: source.asm.x86 ace_mode: assembly_x86