macro¶
fun macro::block(): blockbuilderReturns a new block builder.
fun macro::call(): exprbuilderReturns a new call builder.
fun macro::list(): exprbuilderReturns a new list builder.
fun macro::map(): exprbuilderReturns a new list builder.
fun macro::tuple(): exprbuilderReturns a new list builder.
fun macro::value(Value: any): exprReturns a new value expression.
type block::builderUtility object for building a block expression.
meth (Builder: block::builder):do(Exprᵢ: expr, ...): blockbuilderAdds each expression
Exprᵢto a block.meth (Builder: block::builder):end: exprFinishes a block and returns it as an expression.
meth (Builder: block::builder):let(Name: string, Expr: expr): blockbuilderAdds a
let-declaration to a block with initializerExpr.meth (Builder: block::builder):var(Name: string): blockbuilderAdds a
var-declaration to a block.meth (Builder: block::builder):var(Name: string, Expr: expr): blockbuilderAdds a
var-declaration to a block with initializerExpr.type exprAn expression value used by the compiler to implement macros.
fun macro::subst(Expr: expr): macroReturns a new macro which substitutes its arguments into
Expr.meth (Expr: expr):scoped(Definitions: map): exprReturns a new expression which wraps
Exprwith the constant definitions fromDefinitions.meth (Expr: expr):scoped(Module: module): exprReturns a new expression which wraps
Exprwith the exports fromModule.meth (Expr: expr):scoped(Name₁ is Value₁, ...): exprReturns a new expression which wraps
Exprwith the constant definitions fromNamesandValues.meth (Expr: expr):scoped(Module: type): exprReturns a new expression which wraps
Exprwith the exports fromModule.meth (Expr: expr):subst(Names: list, Subs: list): exprReturns a new expression which substitutes macro references to
:$Nameᵢwith the corresponding expressionsSubᵢ.meth (Expr: expr):subst(Subs: map, ...): exprReturns a new expression which substitutes macro references to
:$Nameᵢwith the corresponding expressionSubᵢ.meth (Expr: expr):subst(Name₁ is Sub₁, ...): exprReturns a new expression which substitutes macro references to
:$Nameᵢwith the corresponding expressionSubᵢ.type expr::builderUtility object for building a block expression.
meth (Builder: expr::builder):add(Expr: expr, ...): blockbuilderAdds the expression
Exprto a block.meth (Builder: expr::builder):add(Name₁ is Expr...₁, Arg₃: expr): blockbuilderAdds the expression
Exprto a block.meth (Builder: expr::builder):end: exprFinishes a block and returns it as an expression.
type macroA macro.
fun macro(Function: function): macroReturns a new macro which applies
Functionwhen compiled.Functionshould have the following signature:Function(Expr₁: expr, Expr₂: expr, ...): expr.fun macro::fun(Params: map, Arg₂: expr): exprReturns a new function expression.
fun macro::ident(Name: string): exprReturns a new identifier expression.