compiler.let_bindings_parser()
Return a parser for let
bindings.
The following program adds a new control strcuture to Slogan, similar to let
expression.
The form is: doit <expression> where (<bindings>)
. The expression
will be evaluated in a context
where the variables introduced by bindings
are visible. For parsing bindings
the let_bindings_parser
function is used, instead of writing a custom parser.
declare macro
doit $body where $bindings
=> compiler.let_($bindings, $body),
[$bindings:compiler.let_bindings_parser]
doit a + b where (a = 100, b = 200)
// 300