use of lombok.javac.CommentInfo in project lombok by rzwitserloot.
the class CommentCollectingParser method parseCompilationUnit.
public JCCompilationUnit parseCompilationUnit() {
JCCompilationUnit result = super.parseCompilationUnit();
if (lexer instanceof CommentCollectingScanner) {
List<CommentInfo> comments = ((CommentCollectingScanner) lexer).getComments();
JCCompilationUnit_comments.set(result, comments);
}
return result;
}
use of lombok.javac.CommentInfo in project lombok by rzwitserloot.
the class CommentCollectingScanner method processComment.
@Override
protected void processComment(CommentStyle style) {
int prevEndPos = Math.max(prevEndPos(), endComment);
int pos = pos();
int endPos = endPos();
endComment = endPos;
String content = new String(getRawCharacters(pos, endPos));
StartConnection start = determineStartConnection(prevEndPos, pos);
EndConnection end = determineEndConnection(endPos);
CommentInfo comment = new CommentInfo(prevEndPos, pos, endPos, content, start, end);
comments.append(comment);
super.processComment(style);
}
use of lombok.javac.CommentInfo in project lombok by rzwitserloot.
the class CommentCollectingParser method parseCompilationUnit.
public JCCompilationUnit parseCompilationUnit() {
JCCompilationUnit result = super.parseCompilationUnit();
if (lexer instanceof CommentCollectingScanner) {
List<CommentInfo> comments = ((CommentCollectingScanner) lexer).getComments();
JCCompilationUnit_comments.set(result, comments);
}
return result;
}
use of lombok.javac.CommentInfo in project lombok by rzwitserloot.
the class CommentCollectingTokenizer method processComment.
@Override
protected Comment processComment(int pos, int endPos, CommentStyle style) {
int prevEndPos = Math.max(prevEndPosition, endComment);
endComment = endPos;
String content = new String(reader.getRawCharacters(pos, endPos));
StartConnection start = determineStartConnection(prevEndPos, pos);
EndConnection end = determineEndConnection(endPos);
CommentInfo comment = new CommentInfo(prevEndPos, pos, endPos, content, start, end);
comments.append(comment);
return super.processComment(pos, endPos, style);
}
Aggregations