Type Aliases

The following type aliases are available globally.

  • A tuple with the variable metadata and its value

    Declaration

    Swift

    internal typealias VariableValue = (metadata: VariableProtocol, value: String)

    Parameters

    metadata

    Name, options, mapping information

    value

    The value of the variable

  • MatcherBlock is used by Matcher and Function classes when the matched expression should be processed in a custom way. It should return a strongly typed object after the evaluations. The first parameter contains the values of every matched Variable instance. The second parameter is the evaluator. If there is a need to process the value of the variable further, creators of this block can use this evaluator, whose value is always the interpreter currently in use In its last parameter if provides information about the context, and therefore allows access to read or modify the context variables.

    Declaration

    Swift

    public typealias MatcherBlock<T, E> = (_ body: PatternBody<E>) -> T? where E : Evaluator

    Parameters

    body

    Struct containing the matched variables, an interpreter, and a context

    Return Value

    The converted value