issues
search
ohmjs
/
ohm
A library and language for building parsers, interpreters, compilers, etc.
MIT License
5.01k
stars
217
forks
source link
Remove grammar, _value, toJSON() from nodes
#368
Closed
pdubroy
closed
2 years ago
pdubroy
commented
2 years ago
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.
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.primitiveValue
property of wrappers was already deprecated; this PR removes it entirely. The_value
property of TerminalNodes is also removed.toJSON()
method on nodes, which was only used for experimental features in the Ohm Editor.