@Test public void testSetInExpression() throws IOException { Optional<ASTExpression> a = parser.parse_StringExpression("a"); Optional<ASTExpression> b = parser.parse_StringExpression("b"); assertFalse(parser.hasErrors()); assertTrue(a.isPresent()); assertTrue(b.isPresent()); ASTSetInExpression result = SetExpressionsMill.setInExpressionBuilder() .setElem(a.get()) .setOperator("in") .setSet(b.get()) .build(); String output = prettyPrinter.prettyprint(result); assertEquals("a in b", output); }
public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); }
SetExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements SetExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } }
SetExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements SetExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } SetExpressionsPrettyPrinter(IndentPrinter printer); }
SetExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements SetExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } SetExpressionsPrettyPrinter(IndentPrinter printer); @Override void handle(ASTIsInExpression node); @Override void handle(ASTSetInExpression node); @Override void handle(ASTUnionExpressionInfix node); @Override void handle(ASTIntersectionExpressionInfix node); @Override void handle(ASTSetAndExpression node); @Override void handle(ASTSetOrExpression node); @Override void handle(ASTUnionExpressionPrefix node); @Override void handle(ASTIntersectionExpressionPrefix node); IndentPrinter getPrinter(); String prettyprint(ASTExpression node); @Override void setRealThis(SetExpressionsVisitor realThis); @Override SetExpressionsVisitor getRealThis(); }
SetExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements SetExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } SetExpressionsPrettyPrinter(IndentPrinter printer); @Override void handle(ASTIsInExpression node); @Override void handle(ASTSetInExpression node); @Override void handle(ASTUnionExpressionInfix node); @Override void handle(ASTIntersectionExpressionInfix node); @Override void handle(ASTSetAndExpression node); @Override void handle(ASTSetOrExpression node); @Override void handle(ASTUnionExpressionPrefix node); @Override void handle(ASTIntersectionExpressionPrefix node); IndentPrinter getPrinter(); String prettyprint(ASTExpression node); @Override void setRealThis(SetExpressionsVisitor realThis); @Override SetExpressionsVisitor getRealThis();  }