Skip to content

Objects

Benedict Albrecht edited this page May 20, 2026 · 6 revisions

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.


At a Glance

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
Loading

Visible Objects <: :>

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:


Hidden Objects <* *>

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 *>
  • Cannot be referenced by other objects
  • Not shown in the dependency graph
  • Ideal for: comments, delimiters, structural brackets

Comparison

Feature Visible <: :> Hidden <* *>
Named
Referenceable
In dependency graph
Sub-bodies
Variables
Use case Language constructs Structural patterns

Next: Sub-bodies — Nesting child objects inside parents.

Clone this wiki locally