Skip to main content

Module const_declaration

Module const_declaration 

Source
Expand description

Constant declaration parser (CONST).

Handles the CONST keyword, which introduces an immutable binding. Mirrors the variable declaration syntax but produces C* type annotation variants and StatementKind::ConstantDeclaration / StatementKind::ConstantArray.

CONST int X = 42
CONST array[int] XS = [1, 2, 3]
CONST (int, string) P = (1, "hi")
CONST int X, string Y = (1, "hi")