Package quickparse.grammar.symbol
Interface Symbol.Function<R,C>
- Type Parameters:
R- the return type of the functionC- the type of context that is used to compute the function
- All Superinterfaces:
Symbol.ConstructFunction<R,C>,Symbol.TokenFunction<R,C>
- Enclosing class:
- Symbol
public static interface Symbol.Function<R,C> extends Symbol.ConstructFunction<R,C>, Symbol.TokenFunction<R,C>
Represents a function that can be computed on a
ConstructSymbol or, alternatively,
on a TokenSymbol. This class implements the SyntaxTreeVisitor design pattern by extending
the Symbol.ConstructFunction and the Symbol.TokenFunction classes.-
Method Summary
Modifier and Type Method Description Rapply(C context, ConstructSymbol symbol)Implements thefunctionRapply(C context, TokenSymbol symbol)Implements thefunction
-
Method Details
-
apply
Description copied from interface:Symbol.TokenFunctionImplements thefunction- Specified by:
applyin interfaceSymbol.TokenFunction<R,C>- Parameters:
context- the context used to compute the function resultsymbol- the inputTokenSymbolfor the function- Returns:
- the result of the function
-
apply
Description copied from interface:Symbol.ConstructFunctionImplements thefunction- Specified by:
applyin interfaceSymbol.ConstructFunction<R,C>- Parameters:
context- the context used to compute the function resultsymbol- the inputConstructSymbolfor the function- Returns:
- the result of the function
-