Why Would This Resolve as a BinaryExpression in Validation? #1259
Unanswered
ballcoach12
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Actually chevrotain is complaining about your rule. See playground console log:
In particular the I've just tried reproducing the issue on the latest version of Langium (2.1.0), but on my end the validation for a |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Given the grammar and example shown here, the variable declaration (
var x:string[] = ["a", 1];
) is presented as aBinaryExpression
to my validation routines, and subsequently as aVariableDeclaration
to my validation routines. But in the AST it is aVariableDeclaration
, which is correct.I can maybe see why it might look like a
BinaryExpression
given the array initializer, but I cannot figure out why it would appear as both to validation. I've checked my dependency injection code to make sure that I'm mapping the correct AstNode to the correct validation routine, and Chevrotain is not complaining about ambiguous rules or paths.I'm not sure what is going on here.
Beta Was this translation helpful? Give feedback.
All reactions