@@ -170,6 +170,14 @@ repository:
170170 match : ' \]'
171171 name : punctuation.squarebracket.close.ql
172172
173+ open-angle :
174+ match : ' <'
175+ name : punctuation.anglebracket.open.ql
176+
177+ close-angle :
178+ match : ' >'
179+ name : punctuation.anglebracket.close.ql
180+
173181 operator-or-punctuation :
174182 patterns :
175183 - include : ' #relational-operator'
@@ -186,6 +194,8 @@ repository:
186194 - include : ' #close-brace'
187195 - include : ' #open-bracket'
188196 - include : ' #close-bracket'
197+ - include : ' #open-angle'
198+ - include : ' #close-angle'
189199
190200# Keywords
191201 dont-care :
@@ -651,6 +661,15 @@ repository:
651661 - include : ' #non-context-sensitive'
652662 - include : ' #annotation'
653663
664+ instantiation-arguments :
665+ beginPattern : ' #open-angle'
666+ end : ' #close-angle'
667+ patterns :
668+ - include : ' #potential-instantiation'
669+
670+ potential-instantiation :
671+ matches : ' (?#simple-id) (?#instantiation-arguments)?'
672+
654673 # An `import` directive. Note that we parse the optional `as` clause as a separate top-level
655674 # directive, because otherwise it's too hard to figure out where the `import` directive ends.
656675 import-directive :
@@ -664,7 +683,7 @@ repository:
664683 name : meta.block.import-directive.ql
665684 patterns :
666685 - include : ' #non-context-sensitive'
667- - match : ' (?#simple-id )'
686+ - match : ' (?#potential-instantiation )'
668687 name : entity.name.type.namespace.ql
669688
670689 # The end pattern for an `as` clause, whether on an `import` directive, in an aggregate, or on a
@@ -703,7 +722,6 @@ repository:
703722 - match : ' (?#simple-id)|(?#at-lower-id)'
704723 name : entity.name.type.ql
705724
706-
707725 # A `module` declaration, whether a module definition or an alias declaration.
708726 module-declaration :
709727 # Starts with the `module` keyword.
0 commit comments