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/java9 | |
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/java9')
-rw-r--r-- | src/utils/lombok/javac/java9/CommentCollectingParser.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/utils/lombok/javac/java9/CommentCollectingParser.java b/src/utils/lombok/javac/java9/CommentCollectingParser.java index 307be405..034b6705 100644 --- a/src/utils/lombok/javac/java9/CommentCollectingParser.java +++ b/src/utils/lombok/javac/java9/CommentCollectingParser.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2017 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,8 @@ package lombok.javac.java9; import static lombok.javac.CommentCatcher.JCCompilationUnit_comments; +import static lombok.javac.CommentCatcher.JCCompilationUnit_textBlockStarts; -import java.util.List; - -import lombok.javac.CommentInfo; import lombok.javac.java8.CommentCollectingScanner; import com.sun.tools.javac.parser.JavacParser; @@ -45,8 +43,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; } |