Statements
Block statement
blockStmt := '{' decl* '}'
A block is a list of declarations, so you can declare variables in side this statement. We put it between two curly braces.
Return statement
returnStmt := 'return' ( '\n' | expr )
If a newline occurs after "return", that means the function returns none. Otherwise, requires an expression.
While statement
whileStmt := 'while' expr blockStmt
Last updated
Was this helpful?