Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

identify which nodes are missing using labels #1215

Open
OmarTawfik opened this issue Jan 7, 2025 · 0 comments
Open

identify which nodes are missing using labels #1215

OmarTawfik opened this issue Jan 7, 2025 · 0 comments

Comments

@OmarTawfik
Copy link
Contributor

OmarTawfik commented Jan 7, 2025

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?

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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant