- Iterate on named children
- I decided not to include names with
each_named_children
iterator for two main reasons:- It's consitent with
each_children
- It
field_name
has nothing to do withnamed_children
. It looks like a named children is one that has a named rule in the grammar, and a field is a literal field in the AST, so you can get into situations where you ask forfield_name
for anamed_child(x)
, and it will benull
. For both those reasons, and to avoid further confusion, we'll keep it this way.
- It's consitent with
- I decided not to include names with
- Pattern-matching:
- deconstruct for
children
- deconstruct for
named_children
- deconstruct for