opwvhk commented on a change in pull request #1377:
URL: https://github.com/apache/avro/pull/1377#discussion_r755802160
##########
File path:
lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj
##########
@@ -95,12 +95,57 @@ public class Idl implements Closeable {
String namespace;
Map<String,Schema> names = new LinkedHashMap<String,Schema>();
- private static final ThreadLocal<String> DOC = new ThreadLocal<String>();
- static void setDoc(String doc) { DOC.set(doc.trim()); }
+ private static class DocComment {
+ private String text;
+ private int line;
+ private int column;
+ DocComment(Token token) {
+ // The token is everything after the initial '/**', including all
whitespace and the ending '*/'
+ int tokenLength = token.image.length();
+ this.text = token.image.substring(0, tokenLength-2)./*replaceAll("[
\\t]*(\\r|\\r\\n|\\n)[ \\t]*\\*?[ \\t]*", "$1").*/trim();
Review comment:
The commented out bit is the answer to Martins [comment in PR
#1407](https://github.com/apache/avro/pull/1407#discussion_r754204005):
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]