intellij-syntax-highlighting icon indicating copy to clipboard operation
intellij-syntax-highlighting copied to clipboard

Syntax error indicated for negative rule prioities

Open robsdedude opened this issue 4 years ago • 1 comments

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.

robsdedude avatar Feb 25 '21 08:02 robsdedude

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)

ornariece avatar Sep 13 '21 15:09 ornariece