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

Emitters #355

Merged
merged 56 commits into from
Mar 2, 2024
Merged

Emitters #355

merged 56 commits into from
Mar 2, 2024

Conversation

MichalMarsalek
Copy link
Collaborator

This is based on #343 to prevent conflicts, that should be reviewed and merged first.

  • Changes PathFragment to always be an object. "consequent" is changed to {prop: "consequent"}
  • Defines a $ object for short PathFragment construction.
  • Refactors emitters. Emitter transforms a Node to a string, there's no separate Detokenizer defined on the Language. Defines several abstract emitters on top of that. All languages emitters are rewritten using an emitter that uses a sort of visitor pattern approach.

I'm not 100% happy with the minPrecForNoParens method on PrecedenceVisitorEmitter, ideally, that should be abstracted away / calculated automatically.

@MichalMarsalek MichalMarsalek merged commit 10f0396 into main Mar 2, 2024
1 check passed
@MichalMarsalek MichalMarsalek deleted the emitters branch March 2, 2024 13:40
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

Successfully merging this pull request may close these issues.

2 participants