mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Update heuristics.rb
Added the iostream headers and std:: to the C++ heuristics. This covers issues 1250.
This commit is contained in:
		| @@ -40,8 +40,8 @@ module Linguist | ||||
|       if (/@(interface|class|protocol|synchronised|selector|implementation)/.match(data)) | ||||
|         matches << Language["Objective-C"] | ||||
|       end | ||||
|       if (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>/.match(data) or | ||||
|           /^\s*template\s*</.match(data) or /^[^@]class\s+\w+/.match(data) or /^[^@](private|public|protected):$/.match(data)) | ||||
|       if (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set|(i|o|io)stream)>/.match(data) or | ||||
|           /^\s*template\s*</.match(data) or /^[^@]class\s+\w+/.match(data) or /^[^@](private|public|protected):$/.match(data) or /std::.+$/.match(data)) | ||||
|         matches << Language["C++"] | ||||
|       end | ||||
|       matches | ||||
|   | ||||
		Reference in New Issue
	
	Block a user