Declarations
Syntax
Declaration :
VarDecl | FuncDecl
Variable Declarations
Syntax
VarDecl :
let
Mutability IDENTIFIER (:
Type )?:=
ExpressionMutability :
mut
|const
Variables can be declared as either mut
or const
. const
variables can not be assigned a value after they are declared.
Function Declarations
Syntax
FuncDecl :
let
func
IDENTIFIER:=
(
FuncDeclArgs?)
=>
ExpressionFuncDeclArgs :
FuncDeclArg (,
FuncDeclArg )*FuncDeclArg :
IDENTIFIER:
TYPE_IDENTIFIER