diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2019-09-25 01:19:55 +0200 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2019-09-25 01:19:55 +0200 |
commit | 69011b90d8e9d15dbf45479df2f4f08658970a16 (patch) | |
tree | 7fda0f5c5f70428740801cd4e18a71e1a6fd8324 /src/utils/lombok/javac/java8/CommentCollectingParser.java | |
parent | 230cd667657ab5c1e07819b18294c698bf17f9a5 (diff) | |
download | lombok-69011b90d8e9d15dbf45479df2f4f08658970a16.tar.gz lombok-69011b90d8e9d15dbf45479df2f4f08658970a16.tar.bz2 lombok-69011b90d8e9d15dbf45479df2f4f08658970a16.zip |
[jdk13] Added support for printing text blocks (triple quoted strings) in text block form
Diffstat (limited to 'src/utils/lombok/javac/java8/CommentCollectingParser.java')
-rw-r--r-- | src/utils/lombok/javac/java8/CommentCollectingParser.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/utils/lombok/javac/java8/CommentCollectingParser.java b/src/utils/lombok/javac/java8/CommentCollectingParser.java index b49312cb..c1dc2f7e 100644 --- a/src/utils/lombok/javac/java8/CommentCollectingParser.java +++ b/src/utils/lombok/javac/java8/CommentCollectingParser.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2014 The Project Lombok Authors. + * Copyright (C) 2013-2019 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -22,10 +22,7 @@ package lombok.javac.java8; import static lombok.javac.CommentCatcher.JCCompilationUnit_comments; - -import java.util.List; - -import lombok.javac.CommentInfo; +import static lombok.javac.CommentCatcher.JCCompilationUnit_textBlockStarts; import com.sun.tools.javac.parser.JavacParser; import com.sun.tools.javac.parser.Lexer; @@ -44,8 +41,8 @@ class CommentCollectingParser extends JavacParser { public JCCompilationUnit parseCompilationUnit() { JCCompilationUnit result = super.parseCompilationUnit(); if (lexer instanceof CommentCollectingScanner) { - List<CommentInfo> comments = ((CommentCollectingScanner)lexer).getComments(); - JCCompilationUnit_comments.set(result, comments); + JCCompilationUnit_comments.set(result, ((CommentCollectingScanner) lexer).getComments()); + JCCompilationUnit_textBlockStarts.set(result, ((CommentCollectingScanner) lexer).getTextBlockStarts()); } return result; } |