how 'deep' does .children go for a concept?...
This is an auto-generated question from the MPS Slack community: how 'deep' does .children go for a concept?
13 comments
Sort by
Date
Votes
testing with
suggests that .children does not recurse down in the ast, but the ancestor does?
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.
that's not nice :stuck_out_tongue:
Would you like to have the same behaviour for ancestors and children? What would you like to archive?
the level 2 children of a concept need to be updated by a listener
the listener has to find these children and update their properties
So something like . children<type>.select(it.children)
yes, but that's only two levels deep
There is .descendants
my bad! I mixed up ancestors and descendants:man-facepalming:
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.
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
Post is closed for comments.