Closed alexanderpann closed 9 months ago
Some costraints can only be evaluated after a node is created. "can be parent" needs the parent node which doesn't exist yet. Maybe we can do some hack and provide a custom SNode implementation for the non-existing node.
In a videocall with @alexanderpann, we concluded that the exact problem lies in the can be ancestor
constraint:
If a concept constrains a chilld using the can be ancestor
constraint, restricting the concept(!) of children, plain MPS will use the concept to filter the available children in the auto-complete menu, but when grammar cells is uised, this is not the case.
Example: concept
Argument
with childtype
and editorwrap % type %
and a constraintcan be parent
that restricts the type. The type can be substituted despite the constraint. The node substitution condition of the wrapper cell has to duplicate the logic of the constraint. I am not sure if it is worth implementing.