@Test public void testLeftShiftExpression() throws IOException { Optional<ASTExpression> result = parser.parse_StringExpression("a<<b"); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); assertTrue(result.isPresent()); ASTExpression ast = result.get(); String output = prettyPrinter.prettyprint(ast); result = parser.parse_StringExpression(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(); }
BitExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements BitExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } }
BitExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements BitExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } BitExpressionsPrettyPrinter(IndentPrinter printer); }
BitExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements BitExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } BitExpressionsPrettyPrinter(IndentPrinter printer); @Override void handle(ASTLeftShiftExpression node); @Override void handle(ASTRightShiftExpression node); @Override void handle(ASTLogicalRightShiftExpression node); @Override void handle(ASTBinaryAndExpression node); @Override void handle(ASTBinaryXorExpression node); @Override void handle(ASTBinaryOrOpExpression node); IndentPrinter getPrinter(); String prettyprint(ASTExpression node); @Override void setRealThis(BitExpressionsVisitor realThis); @Override BitExpressionsVisitor getRealThis(); }
BitExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements BitExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } BitExpressionsPrettyPrinter(IndentPrinter printer); @Override void handle(ASTLeftShiftExpression node); @Override void handle(ASTRightShiftExpression node); @Override void handle(ASTLogicalRightShiftExpression node); @Override void handle(ASTBinaryAndExpression node); @Override void handle(ASTBinaryXorExpression node); @Override void handle(ASTBinaryOrOpExpression node); IndentPrinter getPrinter(); String prettyprint(ASTExpression node); @Override void setRealThis(BitExpressionsVisitor realThis); @Override BitExpressionsVisitor getRealThis();  }