intellij-syntax-highlighting
intellij-syntax-highlighting copied to clipboard
Syntax error indicated for negative rule prioities
Given this grammar:
start : a start | a_multi
a.-1 : "a"
a_multi : /a+/
The plugin indicates a syntax error at - in the second line:
LarkTokenType.NUMBER expected, got '-'
This is a valid grammar, however.
this error will be encountered more often now that lark's default token priority is 0 and not 1 (meaning that negative priorities will be used to give lower priorities than the default one)