The following identifiers are reserved words:
task, give, when, other, while, repeat, get, escape, skip, model, init, self, hidden, shown, extends, out, in, try, catch, throw, use, to, true, false, nil.
+, -, *, /, %==, !=, <, <=, >, >=and, or, not (!)=, +=, -=, *=, /=., []|, =>') or double (") quoted.true, falsenilProgram consists of a sequence of statements.
program ::= statement*
statement ::= declaration | expression_stmt | control_flow
declaration ::= var_decl | task_decl | model_decl
EZ uses when for conditionals.
when condition {
body
} other when condition2 {
body
} other {
body
}
Loops include while, repeat, and get.
# Standard While
while condition { ... }
# Range Loop (inclusive)
repeat var = start to end { ... }
# Collection Iterator
get item in collection { ... }
Declared with task. Implicit returns are not supported; use give.
task name(p1, p2) {
...
give value
}
Declared with model.
model Name extends Parent {
hidden privateVar
shown publicVar
init(args) { ... }
task method() { ... }
}
EZ is dynamically typed. Value types include:
Nil: Represents absence of value.BooleanNumberStringArray: Dynamic size, mixed types.Dictionary: String keys, mixed values.Function: First-class callable.Class: Blueprint for instances.Instance: Object created from a class.Future: Handle for an asynchronous operation.