Expression Nodes
Literals (Lit)
Direct representation of values:
Variables (Var)
Named storage locations:
Functions
Function declarations with type signatures:
Declarations
Variable and constant declarations:
Assignment
Value assignment operations:
Function Calls (Call)
Invoking functions:
Conditional Expressions (If)
Branching logic:
Loops
While (loop)
Frost supports loop constructs for iteration:
From (range)
Iterating over a range of values, by step:
Block Expressions (Block)
Grouped statements:
Control Flow
Return
Frost supports implicit and explicit return statements. The ret
keyword is used for explicit return.
The last expression in a function is implicitly returned, without the need for a ret
statement.
Break and Continue
Frost supports break and continue statements for control flow:
Unary Expressions (Postfix)
Operations after the operand:
Unary Expressions (Prefix)
Operations before the operand:
Operators (Op)
Binary operations, including arithmetic, bitwise, and logical operators:
Structure Access (StructAccess)
Member access in structures:
Array Access
Array indexing:
Type Casting (Cast)
Explicit type conversions:
Remember that Frost's expression syntax is designed to be clear and unambiguous, with a focus on readability while maintaining low-level control when needed. The language uses a consistent style across different expression types to make code easier to understand and maintain.
Last updated