@Test public void checkMultiplicationNestedParse() { final String EXPECTED_RESULT = "((1 * 2) * 3)"; QLParser parser = ASTBuilder.getQlParser("1*2*3"); Multiplication expression = (Multiplication) ASTBuilder.getExpression(parser); assertEquals(EXPECTED_RESULT, expression.toString()); }
@Override public String toString() { return "(" + getLeft() + " * " + getRight() + ")"; }
Multiplication extends BinaryOperation { @Override public String toString() { return "(" + getLeft() + " * " + getRight() + ")"; } }
Multiplication extends BinaryOperation { @Override public String toString() { return "(" + getLeft() + " * " + getRight() + ")"; } Multiplication(Expression left, Expression right, int line, int charPositionInLine); }
Multiplication extends BinaryOperation { @Override public String toString() { return "(" + getLeft() + " * " + getRight() + ")"; } Multiplication(Expression left, Expression right, int line, int charPositionInLine); @Override String toString(); @Override T accept(ExpressionVisitor<T, C> visitor, C context); }
Multiplication extends BinaryOperation { @Override public String toString() { return "(" + getLeft() + " * " + getRight() + ")"; } Multiplication(Expression left, Expression right, int line, int charPositionInLine); @Override String toString(); @Override T accept(ExpressionVisitor<T, C> visitor, C context);  }