Update heuristics.rb

Added the iostream headers and std:: to the C++ heuristics. This covers issues 1250.
This commit is contained in:
Rachel Mant
2014-06-05 10:37:23 +01:00
parent 492aa12cad
commit 614a61b0b0

View File

@@ -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