void endNode(final AstNode node) { assert node == containerStack.peek(); final AstNode position = positionStack.pop(); assert position == null || position.getParent() == node; writeSpecials(position, null); containerStack.pop(); formatter.endNode(node); }
void endNode(final AstNode node) { assert node == containerStack.peek(); final AstNode position = positionStack.pop(); assert position == null || position.getParent() == node; writeSpecials(position, null); containerStack.pop(); formatter.endNode(node); }
void endNode(final AstNode node) { assert node == containerStack.peek(); final AstNode position = positionStack.pop(); assert position == null || position.getParent() == node; writeSpecials(position, null); containerStack.pop(); formatter.endNode(node); }
@Override public Void visitNewLine(final NewLineNode node, final Void ignored) { formatter.startNode(node); formatter.newLine(); formatter.endNode(node); return null; }
@Override public Void visitNewLine(final NewLineNode node, final Void ignored) { formatter.startNode(node); formatter.newLine(); formatter.endNode(node); return null; }
@Override public Void visitNewLine(final NewLineNode node, final Void ignored) { formatter.startNode(node); formatter.newLine(); formatter.endNode(node); return null; }
@Override public Void visitComment(final Comment comment, final Void ignored) { if (lastWritten == LastWritten.Division) { formatter.space(); } formatter.startNode(comment); formatter.writeComment(comment.getCommentType(), comment.getContent()); formatter.endNode(comment); lastWritten = LastWritten.Whitespace; return null; }
@Override public Void visitComment(final Comment comment, final Void ignored) { if (lastWritten == LastWritten.Division) { formatter.space(); } formatter.startNode(comment); formatter.writeComment(comment.getCommentType(), comment.getContent()); formatter.endNode(comment); lastWritten = LastWritten.Whitespace; return null; }
@Override public Void visitComment(final Comment comment, final Void ignored) { if (lastWritten == LastWritten.Division) { formatter.space(); } formatter.startNode(comment); formatter.writeComment(comment.getCommentType(), comment.getContent()); formatter.endNode(comment); lastWritten = LastWritten.Whitespace; return null; }