13 comments
Comment actions Permalink
testing with
0
Comment actions Permalink
suggests that .children does not recurse down in the ast, but the ancestor does?
0
Comment actions Permalink
Yes, sounds like .anchestors is the operation you are looking for. The children operation return's the children of the node but not children of children etc.
0
Comment actions Permalink
that's not nice :stuck_out_tongue:
0
Comment actions Permalink
Would you like to have the same behaviour for ancestors and children? What would you like to archive?
0
Comment actions Permalink
the level 2 children of a concept need to be updated by a listener
0
Comment actions Permalink
the listener has to find these children and update their properties
0
Comment actions Permalink
So something like . children<type>.select(it.children)
0
Comment actions Permalink
yes, but that's only two levels deep
0
Comment actions Permalink
There is .descendants
0
Comment actions Permalink
my bad! I mixed up ancestors and descendants:man-facepalming:
0
Comment actions Permalink
children = 1 level descendants = all levels I guess if you explicitly need children of the 2nd level, you have to implement a dedicated method or base language extension.
0
Comment actions Permalink
This is auto-generated question from the MPS Community Slack Workspace. If you want to comment on the question, do it from the Slack workspace
0

Post is closed for comments.