Parts for "combiners". Combiners are custom user-defined macros for our
notation/format/language.
Combiner | A macro function, bound to an operator sub-form, which is called with the
operands sub-form(s) to determine what should be substituted for the whole
form. The OperativeRef and ApplicativeRef type parameters determine the
types used to refer to the functions.
|
ApFn | The type of "applicative" functions. First argument is the "operator"
sub-form as a Datum ; and the second argument is the "operands" sub-forms
as a Datum::List containing the recursively parsed operands as separate
Datum s, or it is a Datum::EmptyList if the operands text was empty; and
the third argument is the Parser 's DatumAllocator . See
combiner::Result for the description of the return
value.
|
OpFn | The type of "operative" functions. First argument is the "operator"
sub-form as a Datum ; and the second argument is the "operands" sub-form as
the Text type containing the unparsed operands text; and the third
argument is the Parser 's DatumAllocator . See
combiner::Result for the description of the return
value.
|
Result | The type returned by "operative" and "applicative" functions. For a
successful Some return, the returned Datum is substituted for the
original form by the parser in the AST it yields. For a successful None
return, the original form is removed from the AST. An
Error is returned if the combiner fails for any
reason.
|