src/share/classes/com/sun/tools/javac/parser/DocCommentParser.java

changeset 1704
ed918a442b83
parent 1529
950d8195a5a4
child 2204
a78f51d6bd5e
     1.1 --- a/src/share/classes/com/sun/tools/javac/parser/DocCommentParser.java	Wed Apr 17 10:31:01 2013 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/parser/DocCommentParser.java	Wed Apr 17 15:54:24 2013 +0200
     1.3 @@ -41,6 +41,7 @@
     1.4  import com.sun.tools.javac.tree.DCTree.DCAttribute;
     1.5  import com.sun.tools.javac.tree.DCTree.DCDocComment;
     1.6  import com.sun.tools.javac.tree.DCTree.DCEndElement;
     1.7 +import com.sun.tools.javac.tree.DCTree.DCEndPosTree;
     1.8  import com.sun.tools.javac.tree.DCTree.DCErroneous;
     1.9  import com.sun.tools.javac.tree.DCTree.DCIdentifier;
    1.10  import com.sun.tools.javac.tree.DCTree.DCReference;
    1.11 @@ -336,12 +337,12 @@
    1.12                      DCTree text = inlineText();
    1.13                      if (text != null) {
    1.14                          nextChar();
    1.15 -                        return m.at(p).UnknownInlineTag(name, List.of(text));
    1.16 +                        return m.at(p).UnknownInlineTag(name, List.of(text)).setEndPos(bp);
    1.17                      }
    1.18                  } else if (tp.getKind() == TagParser.Kind.INLINE) {
    1.19 -                    DCTree tree =  tp.parse(p);
    1.20 +                    DCEndPosTree<?> tree = (DCEndPosTree<?>) tp.parse(p);
    1.21                      if (tree != null) {
    1.22 -                        return tree;
    1.23 +                        return tree.setEndPos(bp);
    1.24                      }
    1.25                  } else {
    1.26                      inlineText(); // skip content
    1.27 @@ -509,7 +510,7 @@
    1.28              fac.log.popDiagnosticHandler(deferredDiagnosticHandler);
    1.29          }
    1.30  
    1.31 -        return m.at(pos).Reference(sig, qualExpr, member, paramTypes);
    1.32 +        return m.at(pos).Reference(sig, qualExpr, member, paramTypes).setEndPos(bp);
    1.33      }
    1.34  
    1.35      JCTree parseType(String s) throws ParseException {
    1.36 @@ -741,7 +742,7 @@
    1.37                  }
    1.38                  if (ch == '>') {
    1.39                      nextChar();
    1.40 -                    return m.at(p).StartElement(name, attrs, selfClosing);
    1.41 +                    return m.at(p).StartElement(name, attrs, selfClosing).setEndPos(bp);
    1.42                  }
    1.43              }
    1.44          } else if (ch == '/') {

mercurial