mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-01-26 19:26:01 +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))
|
if (/@(interface|class|protocol|synchronised|selector|implementation)/.match(data))
|
||||||
matches << Language["Objective-C"]
|
matches << Language["Objective-C"]
|
||||||
end
|
end
|
||||||
if (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>/.match(data) or
|
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))
|
/^\s*template\s*</.match(data) or /^[^@]class\s+\w+/.match(data) or /^[^@](private|public|protected):$/.match(data) or /std::.+$/.match(data))
|
||||||
matches << Language["C++"]
|
matches << Language["C++"]
|
||||||
end
|
end
|
||||||
matches
|
matches
|
||||||
|
|||||||
Reference in New Issue
Block a user