Metatables like the NodeVisitor, Token and soon the Tree use specific indices internally to function such as:
.line
.char
.value
This creates conflicts whenever we try to store something under a key of the same name on a table that inherits those properties.
For that reason, internal values used only by the metatables and their metamethods should be prepended with an underscore (_).
Metatables like the
NodeVisitor
,Token
and soon theTree
use specific indices internally to function such as:.line
.char
.value
This creates conflicts whenever we try to store something under a key of the same name on a table that inherits those properties. For that reason, internal values used only by the metatables and their metamethods should be prepended with an underscore (
_
).