Class ExpressionTemplateParser
java.lang.Object
ch.andre601.expressionparser.parsers.ExpressionTemplateParser
Class used to parse a list of
Tokens
into a single ExpressionTemplate
.-
Constructor Summary
ConstructorDescriptionExpressionTemplateParser
(com.google.common.collect.ImmutableMap<Token, Operator> operators, com.google.common.collect.ImmutableList<ValueReader> valueReaders) Creates a new instance of this class which uses the provided Map ofTokens
and theirOperators
and also the provided list ofValueReaders
. -
Method Summary
Modifier and TypeMethodDescriptionparse
(List<Token> tokens, ParseWarnCollector collector) Takes a list ofTokens
and converts them into aExpressionTemplate
instance.
-
Constructor Details
-
ExpressionTemplateParser
public ExpressionTemplateParser(com.google.common.collect.ImmutableMap<Token, Operator> operators, com.google.common.collect.ImmutableList<ValueReader> valueReaders) Creates a new instance of this class which uses the provided Map ofTokens
and theirOperators
and also the provided list ofValueReaders
.- Parameters:
operators
- ImmutableMap of Tokens and their Operators.valueReaders
- ImmutableList of ValueReaders.
-
-
Method Details
-
parse
Takes a list ofTokens
and converts them into aExpressionTemplate
instance.- Parameters:
tokens
- List of Tokens to convert.collector
-ParseWarnCollector
instance to use.- Returns:
- ExpressionTemplate instance created from the List of Tokens.
-