lib/rouge/lexers/cpp.rb in rouge-3.20.0 vs lib/rouge/lexers/cpp.rb in rouge-3.21.0
- old
+ new
@@ -73,18 +73,19 @@
state :classname do
rule id, Name::Class, :pop!
# template specification
- rule %r/\s*(?=>)/m, Text, :pop!
- rule %r/[.]{3}/, Operator
mixin :whitespace
+ rule %r/[.]{3}/, Operator
+ rule %r/,/, Punctuation, :pop!
+ rule(//) { pop! }
end
state :template do
- rule %r/>/, Punctuation, :pop!
+ rule %r/[>;]/, Punctuation, :pop!
rule %r/typename\b/, Keyword, :classname
- mixin :root
+ mixin :statements
end
state :case do
rule %r/:(?!:)/, Punctuation, :pop!
mixin :statements