Closed dlvandenberg closed 1 month ago
Currently the only way to get the parser work with the following Angular syntax:
@if (someCondition) { <an-element/> } @else { <some-other-element/> }
is to use token(prec(2, '} @')) in my grammar. This means that in order to highlight the brackets correctly in e.g. nvim-treesitter, I have to apply the highlight group to "} @" (as it is a token).
token(prec(2, '} @'))
"} @"
There should be a better way of handling this.
Currently the only way to get the parser work with the following Angular syntax:
is to use
token(prec(2, '} @'))
in my grammar. This means that in order to highlight the brackets correctly in e.g. nvim-treesitter, I have to apply the highlight group to"} @"
(as it is a token).There should be a better way of handling this.