Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Data Declarations

Sydrogen supports the Data keyword for declaring structured types.

Example:

Data Person
{
    Int Age;
    Weld Name;
}

A Data declaration contains typed fields.

The Data declaration can use a visibility modifier:

Open Data Point
{
    Int X;
    Int Y;
}

Data declarations are currently parsed and represented in the AST.

The current backend does not generate executable code for Data declarations.


← Previous Next →