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 grammar, _value, toJSON() from nodes #368

Merged
merged 3 commits into from
Mar 1, 2022
Merged

Remove grammar, _value, toJSON() from nodes #368

merged 3 commits into from
Mar 1, 2022

Conversation

pdubroy
Copy link
Contributor

@pdubroy pdubroy commented Mar 1, 2022

  • grammar only needs to be on the root node. Removing it from the other nodes saves memory.
  • ctorName becomes a getter defined in the nodes classes, rather than a per-instance property.
  • The primitiveValue property of wrappers was already deprecated; this PR removes it entirely. The _value property of TerminalNodes is also removed.
  • Remove the toJSON() method on nodes, which was only used for experimental features in the
    Ohm Editor.

…m nodes

- grammar only needs to be on the root node
- ctorName becomes a getter defined in the nodes classes
- _value on TerminalNodes was already deprecated — this removes it
  totally
- remove toJSON as it was only used for experimental features in the
  Ohm Editor.
@pdubroy pdubroy merged commit 1a518b2 into master Mar 1, 2022
@pdubroy pdubroy deleted the node-cleanup branch March 1, 2022 09: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.

None yet

1 participant