Standadrd Semantic Tree
ANode implements INode - Abstract Node, an abstract super-class of all nodes (a root of node hierarchy), implements INode interface, which provides information about the node (it's name, types and others attributes of it's properties), allows symbolic access to values, provides service code for notifications on properties changing, tree walking and so on. It also has interface for nodes' versioning (open the node for editing, reverting and commiting changes, getting specific version of a node), which by default does nothing. Each ANode instance knows it's parent and a slot to which it's attached.
- ASTNode - Abstract Semantic nodes, which are used to code programs. ASTNode implements versioning interface of ANode, so a node instance is cloned before editing. All open for edition and created ASTNode-s are registered in Transaction objects, which can be used to revert or commit changes - undo/redo implementation in editor is done via these transactions. Also, ASTNode provides interfaces which allows to substitute one node with another node or with a result of executed closure.
- SNode - Service/Syntax nodes, are used as code helpers. For example, these are FileUnit nodes (source files), or Import nodes (which controls resolving of names and display of short/qualified named), various Comment-s (code notes, documentation) and so on.
- DNode (implements ISymbol)- Declaration/Definition nodes, are used for all kinds of declarations - types, methods, variables. labels in code and so on.
- ENode (implements ISymbolRef)- Execution/Expression nodes, are used for all kinds of execution nodes - variable/type name references, unary/binary operators, method calls, statements and so on.
- Symbol implements ISymbol - a symbol (that is - a name) declaration in program, and an interface ISymbol for it. The interface specifies a text for this symbol and allows to get a DNode to which this symbol is attached. Some DNode-s are implementing ISymbol interface itself, so Symbol nodes are used mostly as aliases or names of external nodes (which are not loaded yet).
- SymbolRef implements ISymbolRef - a reference to symbol and symbol reference interface. ISymbolRef interface is used to specify a name of symbols to link to (to resolve), and to get ISymbol and DNode to which it's linked. Once an instance of ISymbolRef was linked to a ISymbol, all changes in the ISymbol are automatically change the linked ISymbolRef text. All ENode-s implement ISymbolRef - variable names has name of a variable declaration to link to, binary/unary operations use the symbol name to resolve an actual operation and so on.
- SNode - Service/Syntax nodes, are used as code helpers. For example, these are FileUnit nodes (source files), or Import nodes (which controls resolving of names and display of short/qualified named), various Comment-s (code notes, documentation) and so on.