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

Remove dependency on desugarer from core/ForkMergeParser.java #162

Open
paulgazz opened this issue Dec 19, 2021 · 0 comments
Open

Remove dependency on desugarer from core/ForkMergeParser.java #162

paulgazz opened this issue Dec 19, 2021 · 0 comments

Comments

@paulgazz
Copy link
Member

paulgazz commented Dec 19, 2021

Currently, the parser has a dependency on superc.cdesugarer.CContext for some static state in that class. The core/ directory is grammar-independent and the grammars depend on it creating a circular dependency. Using static state also breaks idempotency of the desugarer.

This can be improved by collecting parser error conditions as an instance field on the parser itself (when enabled by a set...() method, e.g., setNewErrorHandling()), and having the desugarer query the parser instance's state instead.

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

No branches or pull requests

1 participant