You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see. Thanks for the update. This looks like it needs a bigger refactoring the parser codegen, and I don't think it should block this PR/fix.
So, for the time being, WDYT of adding a similar EdgeLabel::MISSING for now, so that we don't mislabel them as root in the meantime?
For nodes, we use TerminalKind::MISSING during error recovery. This is because in many cases, we don't know the exact node that will should be in the tree (for example, when an Enum() combinator fails to parse all alternatives).
But that is not the case for labels, where (all?) parsers know in advance which label the child will eventually have. So, if possible, we should look into deprecating EdgeLabel::MISSING in the future, and using the correct label in the tree. It will help users better identify WHAT is missing.
The text was updated successfully, but these errors were encountered:
Originally posted by @OmarTawfik in #1205 (comment)
Context
For nodes, we use
TerminalKind::MISSING
during error recovery. This is because in many cases, we don't know the exact node that will should be in the tree (for example, when anEnum()
combinator fails to parse all alternatives).But that is not the case for labels, where (all?) parsers know in advance which label the child will eventually have. So, if possible, we should look into deprecating
EdgeLabel::MISSING
in the future, and using the correct label in the tree. It will help users better identify WHAT is missing.The text was updated successfully, but these errors were encountered: