commentNode = parentNode.addNode(ClassFileSequencerLexicon.COMMENT, ClassFileSequencerLexicon.COMMENT); if (comment.isBlockComment()) { commentType = ClassFileSequencerLexicon.CommentType.BLOCK.toString(); } else if (comment.isLineComment()) {
commentNode = parentNode.addNode(ClassFileSequencerLexicon.COMMENT, ClassFileSequencerLexicon.COMMENT); if (comment.isBlockComment()) { commentType = ClassFileSequencerLexicon.CommentType.BLOCK.toString(); } else if (comment.isLineComment()) {
@Override public boolean visit(CompilationUnit node) { comments.clear(); this.astRoot = node; for (Comment comment : getCommentList(astRoot)) { comments.add(Pair.of(new SourceLocation(comment), comment)); } for (Comment comment : getCommentList(astRoot)) { if (comment.isBlockComment()) { final BlockComment bc = (BlockComment) comment; bc.accept(this); } else if (comment.isLineComment()) { final LineComment lc = (LineComment) comment; lc.accept(this); } else if (comment.isDocComment()) { final Javadoc jc = (Javadoc) comment; jc.accept(this); } else { throw new NotImplementedException(comment); } } return VISIT_SUBTREE; }