Interface FormatVisitor

All Known Implementing Classes:
DefaultFormatter

public interface FormatVisitor
A Visitor interface used to format expressions; a concrete expression calls the appropriate method of the Visitor passing a reference to itself.
  • Method Details

    • visitExpression

      String visitExpression(Expression e)
      Called by an expression when no other method is compatible.
      Parameters:
      e - The calling expression.
      Returns:
      The formatted expression.
    • visitBinaryExpression

      String visitBinaryExpression(BinaryExpression e)
      Called by a binary expression.
      Parameters:
      e - The calling expression.
      Returns:
      The formatted expression.
    • visitBrackets

      String visitBrackets(Brackets e)
      Called by a bracket expression.
      Parameters:
      e - The calling expression.
      Returns:
      The formatted expression.
    • visitConstant

      String visitConstant(Constant e)
      Called by a constant.
      Parameters:
      e - The calling expression.
      Returns:
      The formatted expression.
    • visitFunctionCall

      String visitFunctionCall(FunctionCall e)
      Called by a function call expression.
      Parameters:
      e - The calling expression.
      Returns:
      The formatted expression.
    • visitUnaryExpression

      String visitUnaryExpression(UnaryExpression e)
      Called by an unary expression.
      Parameters:
      e - The calling expression.
      Returns:
      The formatted expression.
    • visitVariable

      String visitVariable(Variable e)
      Called by a variable reference.
      Parameters:
      e - The calling expression.
      Returns:
      The formatted expression.