20 lines
794 B
Plaintext
20 lines
794 B
Plaintext
workspace Tree id "workspace:tree" revision "workspace:tree@1" commit "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" {
|
|||
|
|
import interface TreeData;
|
||
|
|
import package TreeRuntime;
|
||
|
|
atom Node id "tree:node";
|
||
|
|
conform Node as TreeData id "tree:node:data" {
|
||
|
|
private edge Parent id "tree:parent-edge" {
|
||
|
|
atom Node projection parent id "tree:parent-projection" optional-one;
|
||
|
|
interface TreeData projection children id "tree:children-projection" many;
|
||
|
|
}
|
||
|
|
bind parent.resolve to edge Parent.parent.resolve;
|
||
|
|
bind children.resolve to edge Parent.children.resolve;
|
||
|
|
bind reparent.call to package TreeRuntime.reparent with {
|
||
|
|
parent to edge Parent.parent;
|
||
|
|
} accept with {
|
||
|
|
current to edge Parent.parent;
|
||
|
|
ancestors to interface TreeData from input;
|
||
|
|
};
|
||
|
|
}
|
||
|
|
}
|