I would Like to exchange a node in an baseLanguage AST with an empty node that is allowed in the former nodes position. I will call those two Nodes OriginalNode and ExchangeNode.
Just accessing the OriginalNode's concept and creat a new instance of it doesn't do me much good. Because it restricts me to one Concept. Also the Concept of the OriginalNode might be a subconcept of the allowed concept at this position, or even worse, there are multiple distinct Concepts allowed.
What i would like to do is to access the parent of the OriginalNode and look what concepts are allowed by looking up the concepts of the children defined in the parent. With this information I would like to give the user a possibility to choose the concept. Beside the fact that I dont know yet how to give the user the possibilty to choose, my real problem is that I dont know how to access the Information in the parent of the OriginalNode.
If someone could give me a hint how to do that, I would appreciate it.