You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, `haschildren(x)` was a terrible name because it's not
testing the same thing as `numchildren(x) == 0`!
In our ASTs
* Leaves of the tree correspond to tokens in the source text
* Internal nodes are containers for a range of tokens or other internal
nodes.
Occasionally we can have internal nodes which have no tokens and thus
have `numchildren(node) == 0`. These are, however, still "internal
nodes" and we have `haschildren(node) === true` for these which makes no
sense!
0 commit comments