[−][src]Type Definition kul_core::premade::inmem::Parser
type Parser<'input, 'alloc, 'funs, 'bind, Extra = (), CombinerError = ()> = ParserStruct<CharClassifier, DatumAllocator<'input, 'alloc, Extra>, OperatorBindings<'input, 'alloc, 'funs, 'bind, Extra, CombinerError>>;
A Parser
for parsing inputs that are in-memory strings, as &str
s
wrapped by this module's Text
type, that is suitable for no-heap
constrained applications that only use the stack, and that uses: the default
characters as delimiters, slices to allocate the Datum
s in ASTs returned
from parsing, and slices of pairs (2-tuples) to bind operator sub-forms to
Combiner
macro functions.
The AST values returned from parsing are zero-copy with regard to the input parts they refer to, achieved by borrowing sub-slices of the input slice.
You must decide which types you want to use in the Datum::Extra
variant
and for any errors returned by your macro/"combiner" functions in the
Error::FailedCombiner
variant. If unsure, the ()
type is suitable for
either or both, and this is their default.