Class ExpressionParser

java.lang.Object
io.pebbletemplates.pebble.parser.ExpressionParser

public class ExpressionParser extends Object
Parses expressions.
  • Constructor Details

    • ExpressionParser

      public ExpressionParser(Parser parser, Map<String,BinaryOperator> binaryOperators, Map<String,UnaryOperator> unaryOperators, ParserOptions parserOptions)
      Constructor
      Parameters:
      parser - A reference to the main parser
      binaryOperators - All the binary operators
      unaryOperators - All the unary operators
  • Method Details

    • parseExpression

      public Expression<?> parseExpression()
      The public entry point for parsing an expression.
      Returns:
      NodeExpression the expression that has been parsed.
    • parseFilterInvocationExpression

      public FilterInvocationExpression parseFilterInvocationExpression()
    • parseArguments

      public ArgumentsNode parseArguments(boolean isMacroDefinition)
    • parseNewVariableName

      public String parseNewVariableName()
      Parses a new variable that will need to be initialized in the Java code. This is used for the set tag, the for loop, and in named arguments.
      Returns:
      A variable name