-
Notifications
You must be signed in to change notification settings - Fork 0
Variables
Benedict Albrecht edited this page Jun 2, 2026
·
3 revisions
Variables capture tokens from parsed source code and are the foundation of Crodox's dependency resolution system. How a variable is declared determines its type, scope, and behavior.
graph TB
GLOBAL["🌐 :global<br/>Visible everywhere"]
UP["⬆️ :up<br/>Parent objects"]
SIBLINGS["↔️ :siblings<br/>All siblings"]
FOLLOWING["➡️ :following<br/>Following siblings<br/><i>(default)</i>"]
DOWN["⬇️ :down<br/>Child objects"]
HOOK["🪝 :hook<br/>Hooked object"]
CURRENT(("Current<br/>Object"))
CURRENT --> UP
CURRENT --> DOWN
CURRENT --> SIBLINGS
CURRENT --> FOLLOWING
CURRENT --> GLOBAL
CURRENT --> HOOK
style CURRENT fill:#e67e22,color:#fff
style FOLLOWING fill:#27ae60,color:#fff
style GLOBAL fill:#4a90d9,color:#fff
| Syntax | Type | Creates Dependency | Overwrites |
|---|---|---|---|
<< var >> |
Standard | ✅ | ✅ |
<< "path" >> |
Path | - | - |
<< 'var' >> |
Reference | ✅ | ❌ |
<< VAR >> |
Uppercase | ❌ | ✅ |
| Scope | Direction | Description |
|---|---|---|
:following |
Forward | Visible to siblings that come after this object (default) |
:up |
Upward | Visible to parent objects |
:down |
Downward | Visible to child objects |
:siblings |
Lateral | Visible to all siblings (before and after) |
:global |
Everywhere | Visible to all objects in the grammar |
:hook |
Targeted | Visible to a specifically hooked object |
Types:
- Path Variables
<<"path">> - Reference Variables
<<'name'>> - Uppercase Variables
<<NAME>> - Variable Declarations
Scoping:
Next: Variable Declarations - How variables are declared in grammar 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