Конструкции языка
Block = "{" StatementList "}" .
StatementList = { Statement newline } .
Statement = ReturnStmt | IfStmt | Expression | WhileStmt | VarDeclaration | ForStmt |
LocalDecl | BreakStmt | ContinueStmt | SwitchStmt | GoStmt | TryStmt |
RecoverStmt | RetryStmtОпределение переменной
VarDeclaration = VarAssign | VarList
VarList = TypeName ["?"] IdentifierList
VarAssign = TypeName ["?"] identifier "=" | "&=" VarInitint x y myVal
int z = myFunc(x) + y + 10
arr a &= bfunc mul(int i) int {
int ? j = 10
return i*j
}
run int {
return mul(7) + mul(5, j: 5) // 70+25
}Конструкция if
Конструкция while
Конструкция for
Конструкция switch
Локальные функции local
Конструкция return
Конструкция break
Конструкция continue
Last updated
Was this helpful?