@Test public void testSetOrExpression() throws IOException { Optional<ASTSetOrExpression> result = parser.parse_StringSetOrExpression("setor a"); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); ASTSetOrExpression ast = result.get(); String output = prettyPrinter.prettyprint(ast); result = parser.parse_StringSetOrExpression(output); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); assertTrue(ast.deepEquals(result.get())); }
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();  }