Maat supports the following statement prefixes:
lazydomaStatement prefixes are keywords preceding statements that changes their default behavoir. Internally, this changes the way the Maat compiler compiles Maat code and thus generates different type of opcodes for the intention of the statement prefix to take effect during bytecode execution.
do FILENAME
do { CODE }
do if ...
do for ...
do with ...
the do statement prefix treats statements as expressions and returns the value of the last evaluation in the statement of concern.
Given the following maat code
var x = do { 2 ** 4 } + 14
var y = 12 + do if True { 2 } else { 3 }
Here the Maat compiler compiles the do statment and at execution, it puts the result of the last evaluated
expression of that statement in the required register to serve as operand for the arithmetic addition operation.
var x = 10
var m = do for ^5 -> w { x += 1 }
-- output: a{11 12 13 14 15}
m.say
lazy gather ...
ma for ...