Skip to content

Commit

Permalink
[language-c] Scope template delimiters properly in C++
Browse files Browse the repository at this point in the history
  • Loading branch information
savetheclocktower committed Sep 19, 2024
1 parent 22a23ed commit 4d35045
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/language-c/grammars/tree-sitter-cpp/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,6 @@
["&" "|" "^" "~" "<<" ">>"]
@keyword.operator.bitwise.cpp)

(binary_expression
["<" ">"] @keyword.operator.comparison.cpp)

(binary_expression
["+" "-" "*" "/" "%"] @keyword.operator.arithmetic.cpp)

Expand Down Expand Up @@ -534,6 +531,14 @@
")" @punctuation.definition.expression.end.bracket.round.cpp
(#set! capture.final true)))

(template_argument_list
"<" @punctuation.definition.parameters.begin.bracket.angle.cpp
">" @punctuation.definition.parameters.end.bracket.angle.cpp)

(template_parameter_list
"<" @punctuation.definition.parameters.begin.bracket.angle.cpp
">" @punctuation.definition.parameters.end.bracket.angle.cpp)

"{" @punctuation.definition.block.begin.bracket.curly.cpp
"}" @punctuation.definition.block.end.bracket.curly.cpp
"(" @punctuation.definition.begin.bracket.round.cpp
Expand Down

0 comments on commit 4d35045

Please sign in to comment.