Declarations
Use declaration
This declaration starts with the keyword use.
use_decl := 'use' IDENTIFIER | STRING ('as' STRING)?After the keyword, we allow an identifier or a string as a module name. And optional as postfix makes alias.
Var declaration
This declaration starts with the keyword var.
var_decl := 'var' IDENTIFIER ('=' expr)?The identifier becomes the name of variable. If = follows behind, we have an initializer value.
Class declaration
// todo
Func declaration
// todo
Last updated
Was this helpful?