Class ExpressionTemplateParser
java.lang.Object
ch.andre601.expressionparser.parsers.ExpressionTemplateParser
Class used to parse a list of Tokens into a single
ExpressionTemplate
.-
Constructor Summary
ConstructorsConstructorDescriptionExpressionTemplateParser
(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 of Tokens and their Operators and also the provided list of ValueReaders. -
Method Summary
Modifier and TypeMethodDescriptionparse
(List<Token> tokens, ParseWarnCollector collector) Takes a list of Tokens 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 of Tokens and their Operators and also the provided list of ValueReaders.- Parameters:
operators
- ImmutableMap of Tokens and their Operators.valueReaders
- ImmutableList of ValueReaders.
-
-
Method Details
-
parse
Takes a list of Tokens 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.
-