mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Updating heuristic order
This commit is contained in:
		@@ -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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user