Sym
Used to register new symbols in the current scope.
sym entry...
entry
is one of:
name<id>:ty<type>
(name<id>:ty<type>)
(name<id> init)
(name<id>:ty<type> init)
Registers symbols under the given name in the current scope.
In 1., 2., and 4., the type of symbol will be ty
. In 3., it will be the type of init
.
In 1. and 2., the symbol will be zero-initialized and ty
must not be a constant type. In 4., init
will be implicitly cast into ty
.
There must not be a function, macro, special form, type, or symbol in the same scope with the same. The name must not be one of cn
, *
, or []
.
ty
must not be an undefined type.
sym i:i32
(f:f32)
(b true)
(u:u64 1);
::evaluated
on name
will result in an evaluated symbol being registered.
::noZero
on name
in 1. and 2. allows the compiler to omit zero-initialization of the symbol.