An AST object is a structured node in an abstract syntax tree. Its concept label identifies its kind, while settings hold contained AST objects, references, arrays, or simple values. section 3.3.1
Generic processing visits an AST object as a whole, inspects its settings, recursively traverses contained objects and array items, follows reference targets without traversing them, and backtracks after descendants finish. section 3.3.1
AST objects support projection and editing through their structure:
- A projection first recognizes an AST object, then dispatches on its concept label to render a focused result. section 4.2
- A containing object performs structural edits for its containees because a contained object does not know its property, siblings, or position. section 6.3.1
- New objects can be added as record attributes or as initial values, including Attribute Reference and Number objects. section 6.1
Deleting an initial value
When a selected initial-value object receives Backspace or Delete, its containing attribute supplies a replacement action that removes settings["initial value"]. The deletion callback is passed through Projection to AstObjectUiWrapper, which handles the keyboard event. section 6.3.1
Figure 3.15 Traversing an AST generically
Use the traversal diagram to follow containment relations, array order, reference targets, and backtracking around an AST object. section 3.3.1
