Interface ReducerFactory.Constructor1<D,A1,R>

Type Parameters:
D - the type of source document identifiers
A1 - the type of the (first) parsed argument value
R - the type of resulting AST nodes
All Superinterfaces:
ReducerFactory.Constructor
Enclosing class:
ReducerFactory
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ReducerFactory.Constructor1<D,A1,R> extends ReducerFactory.Constructor
Functional interface for AST node constructors with one parsed argument.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(ReducerFactory.Context<D,R> context, A1 val1)
    Creates a new AST node with one parsed argument.
    default <T> Parser<D,T>
    parse(Fragment<D,T,? extends A1> arg1)
    Returns the effective parser for the argument fragment.
  • Method Details

    • parse

      default <T> Parser<D,T> parse(Fragment<D,T,? extends A1> arg1)
      Returns the effective parser for the argument fragment.
      Type Parameters:
      T - the type of token types
      Parameters:
      arg1 - the (first) argument fragment
      Returns:
      the effective parser for the argument fragment
    • apply

      R apply(ReducerFactory.Context<D,R> context, A1 val1) throws ReducerFactory.Abort
      Creates a new AST node with one parsed argument.
      Parameters:
      context - the context of reduction
      val1 - the (first) parsed argument value
      Returns:
      a new AST node
      Throws:
      ReducerFactory.Abort - if a semantic error has been detected