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
Node implements Iterable allowing iteration over its children.
The problem is that the functionality seems to be only implemented in very few of AstNode``s children. It works for list-like ones (e.g.,Block) but doesn't for many others (e.g.IfStatement). It makes navigating over the AST very difficult. Yes,Visitor` helps to some degree, but it forces programming in a certain style.
Is this behavior intended?
Considering the children are already identified by the Visitor, couldn't they also be exposed through the iterator (or maybe a separate iterator)?
Thanks!
The text was updated successfully, but these errors were encountered:
Node
implementsIterable
allowing iteration over its children.The problem is that the functionality seems to be only implemented in very few of
AstNode``s children. It works for list-like ones (e.g.,
Block) but doesn't for many others (e.g.
IfStatement). It makes navigating over the AST very difficult. Yes,
Visitor` helps to some degree, but it forces programming in a certain style.Is this behavior intended?
Considering the children are already identified by the
Visitor
, couldn't they also be exposed through the iterator (or maybe a separate iterator)?Thanks!
The text was updated successfully, but these errors were encountered: