-
Notifications
You must be signed in to change notification settings - Fork 0
Sub bodies
Benedict Albrecht edited this page May 20, 2026
·
4 revisions
Sub-bodies define where child objects can appear within a parent object, creating hierarchical nesting.
graph TD
subgraph "<---> Default Sub-body"
CLASS1["<b>class</b>"] <-->|"both-sided<br/>dependency"| FUNC1["<b>function</b>"]
end
subgraph "<-function-> Typed Sub-body"
CLASS2["<b>class</b>"] ---|"no dependency<br/>on child"| FUNC2["<b>function</b>"]
FUNC2 -->|"depends on<br/>parent"| CLASS2
end
style CLASS1 fill:#4a90d9,color:#fff
style FUNC1 fill:#7b68ee,color:#fff
style CLASS2 fill:#4a90d9,color:#fff
style FUNC2 fill:#7b68ee,color:#fff
Accepts any child object. Creates a both-sided dependency between parent and child.
<*{}*> { <---> } <*>
<:class:> class <<name>> () { <---> } <:>
Accepts only the named object type. Only the child depends on the parent — not the other way around.
<:class:> class <<name>> () { <-function-> } <:>
<:function:> function <<name>> () { <---> } <:>
This allows loosely coupled structures — e.g., functions within a class where the class doesn't depend on its functions.
| Sub-body | Accepts | Parent → Child | Child → Parent |
|---|---|---|---|
<---> |
Any object | ✅ | ✅ |
<-name-> |
Named type only | ❌ | ✅ |
Next: References — Substituting objects into other definitions.
- Getting Started
- Sign-Up
- Home Screen
- Creating Your First Template
- Template Editor
- Application Navigation
- Syntax Overview
- Workflow: End-to-End
- Workflow: Test with simpleDemo
- Workflow: Build Template from angularTemp
- Demo Repositories
- Template
- Workbench
- GitHub Integration
- GitHub App Installation
- GitHub Repository Setup
- GitHub Re-linking
- Settings
- Overview
- Declarations
- Types
- Scoping