-
Notifications
You must be signed in to change notification settings - Fork 0
Objects
Objects are the fundamental building blocks of a Crodox grammar. Every pattern you define — a class, a function, a comment — is an object. There are two types: visible and hidden.
graph LR
subgraph "Visible Objects <: :>"
V1["Can be referenced"]
V2["Appear in dependency graph"]
V3["Support sub-bodies & references"]
end
subgraph "Hidden Objects <* *>"
H1["Cannot be referenced"]
H2["Not in dependency graph"]
H3["Structural / organizational"]
end
style V1 fill:#7b68ee,color:#fff
style V2 fill:#7b68ee,color:#fff
style V3 fill:#7b68ee,color:#fff
style H1 fill:#888,color:#fff
style H2 fill:#888,color:#fff
style H3 fill:#888,color:#fff
Visible objects can be referenced by other objects and appear in the dependency graph. Use them for named language constructs.
<:class:> class <<name>> () { <---> } <:>
<:function:> function <<name>> () { <---> } <:>
Key properties:
- Have a name between
<:and:> - Can contain sub-bodies, references, variables, and all other elements
- Participate in the dependency structure
- Can be used as references in other objects:
<-{class}->
Hidden objects are structural — they define patterns the parser needs to recognize but don't participate in the dependency graph.
<*comment*> // -->> \n <*>
<*()*> ( <---> ) <*>
Key properties:
- Have a name between
<*and*> - Not shown in the dependency graph
- Ideal for: comments, delimiters, structural brackets
Note: The distinction between visible and hidden objects is not yet fully implemented. Currently, all objects behave like visible objects. This will change in a future version.
| Feature | Visible <: :>
|
Hidden <* *>
|
|---|---|---|
| Named | ✅ | ✅ |
| Referenceable | ✅ | ✅ * |
| In dependency graph | ✅ | ❌ |
| Sub-bodies | ✅ | ✅ |
| Variables | ✅ | ✅ |
| Use case | Language constructs | Structural patterns |
* Currently all objects behave as visible. The distinction will be enforced in a future version.
Next: Sub-bodies — Nesting child objects inside parents.
- 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