@Test public void testRegularAssignmentPipeEqualsExpression() 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()); ASTAssignmentExpression result = AssignmentExpressionsMill.assignmentExpressionBuilder() .setLeft(a.get()) .setRight(b.get()) .setOperator(PIPEEQUALS) .build(); String output = prettyPrinter.prettyprint(result); assertEquals("a|=b", output); }
public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); }
AssignmentExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements AssignmentExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } }
AssignmentExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements AssignmentExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } AssignmentExpressionsPrettyPrinter(IndentPrinter printer); }
AssignmentExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements AssignmentExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } AssignmentExpressionsPrettyPrinter(IndentPrinter printer); @Override void handle(ASTIncSuffixExpression node); @Override void handle(ASTDecSuffixExpression node); @Override void handle(ASTIncPrefixExpression node); @Override void handle(ASTDecPrefixExpression node); @Override void handle(ASTAssignmentExpression node); IndentPrinter getPrinter(); String prettyprint(ASTExpression node); @Override void setRealThis(AssignmentExpressionsVisitor realThis); @Override AssignmentExpressionsVisitor getRealThis(); }
AssignmentExpressionsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements AssignmentExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } AssignmentExpressionsPrettyPrinter(IndentPrinter printer); @Override void handle(ASTIncSuffixExpression node); @Override void handle(ASTDecSuffixExpression node); @Override void handle(ASTIncPrefixExpression node); @Override void handle(ASTDecPrefixExpression node); @Override void handle(ASTAssignmentExpression node); IndentPrinter getPrinter(); String prettyprint(ASTExpression node); @Override void setRealThis(AssignmentExpressionsVisitor realThis); @Override AssignmentExpressionsVisitor getRealThis();  }