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

Javascript: migrate prototypical DFA objects to es6 classes #2746

Merged
merged 11 commits into from
Feb 12, 2020

Conversation

carocad
Copy link
Contributor

@carocad carocad commented Feb 11, 2020

This PR is a follow up on #2742 to refactor the DFA object declarations to:

  • use es6 classes/inheritance instead of direct prototype manipulation. Es6 class declarations are really just syntactic sugar over prototype inheritance so this change should have no effect on the runtime itself.
  • use const/let on variable declarations to improve variable scoping
  • refactor comments to be JsDoc compatible which most IDEs can leverage to provide better developer feedback

@ericvergnaud
Copy link
Contributor

ericvergnaud commented Feb 12, 2020

@carocad no comment, thanks for this
@parrt approved (the failing travis build is due to php, js target passes)

@parrt parrt merged commit 530c5fa into antlr:master Feb 12, 2020
@carocad carocad deleted the dfa-classes branch February 12, 2020 17:17
@parrt parrt added this to the 4.9 milestone Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants