How to create validation error for parent AST node? #1703
Unanswered
durianwaffle
asked this question in
Q&A
Replies: 2 comments
-
Hello, if you remove the property attribute the entire statement will be on error: if (leftType !== rightType) {
accept('error', `Can’t assign ${rightType} type to variable with type ${leftType} in assignment.`,
{ node: assignemntStatement });
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello @durianwaffle, you can use nearly any |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Langium community,
I can only create validation error for node's children property not its parents.
Is there any way to create validation error for a node's parent property?
For example, if the operands have different types in assignment statement, show error line for the entire line not just on
left/op/right
And I am also wondering how to debug for validator since there is no output.
Beta Was this translation helpful? Give feedback.
All reactions