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

Object Instantiation

Instances of Data types use object declaration syntax.

Example:

Person Den
{
    Age = 14;
    Name = "Den";
}

Members can also be separated using commas:

Person Den { Age = 14, Name = "Den"; }

Nested member paths are supported by the parser:

Person Den { Address.City = "Den", Age = 14; }

Object declarations are represented as Statement::ObjectDecl.

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

They are currently checked for structural validity.


← Previous Next →