1.1 --- a/src/share/classes/com/sun/tools/javac/parser/JavacParser.java Tue Nov 01 15:49:45 2011 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/parser/JavacParser.java Fri Nov 04 12:36:40 2011 +0000 1.3 @@ -29,6 +29,7 @@ 1.4 1.5 import com.sun.tools.javac.code.*; 1.6 import com.sun.tools.javac.parser.Tokens.*; 1.7 +import com.sun.tools.javac.parser.Tokens.Comment.CommentStyle; 1.8 import com.sun.tools.javac.tree.*; 1.9 import com.sun.tools.javac.tree.JCTree.*; 1.10 import com.sun.tools.javac.util.*; 1.11 @@ -1584,7 +1585,7 @@ 1.12 break; 1.13 case MONKEYS_AT: 1.14 case FINAL: { 1.15 - String dc = token.docComment; 1.16 + String dc = token.comment(CommentStyle.JAVADOC); 1.17 JCModifiers mods = modifiersOpt(); 1.18 if (token.kind == INTERFACE || 1.19 token.kind == CLASS || 1.20 @@ -1601,21 +1602,21 @@ 1.21 break; 1.22 } 1.23 case ABSTRACT: case STRICTFP: { 1.24 - String dc = token.docComment; 1.25 + String dc = token.comment(CommentStyle.JAVADOC); 1.26 JCModifiers mods = modifiersOpt(); 1.27 stats.append(classOrInterfaceOrEnumDeclaration(mods, dc)); 1.28 break; 1.29 } 1.30 case INTERFACE: 1.31 case CLASS: 1.32 - String dc = token.docComment; 1.33 + String dc = token.comment(CommentStyle.JAVADOC); 1.34 stats.append(classOrInterfaceOrEnumDeclaration(modifiersOpt(), dc)); 1.35 break; 1.36 case ENUM: 1.37 case ASSERT: 1.38 if (allowEnums && token.kind == ENUM) { 1.39 error(token.pos, "local.enum"); 1.40 - dc = token.docComment; 1.41 + dc = token.comment(CommentStyle.JAVADOC); 1.42 stats.append(classOrInterfaceOrEnumDeclaration(modifiersOpt(), dc)); 1.43 break; 1.44 } else if (allowAsserts && token.kind == ASSERT) { 1.45 @@ -1991,7 +1992,7 @@ 1.46 annotations.appendList(partial.annotations); 1.47 pos = partial.pos; 1.48 } 1.49 - if (token.deprecatedFlag) { 1.50 + if (token.deprecatedFlag()) { 1.51 flags |= Flags.DEPRECATED; 1.52 } 1.53 int lastPos = Position.NOPOS; 1.54 @@ -2271,9 +2272,9 @@ 1.55 seenImport = true; 1.56 defs.append(importDeclaration()); 1.57 } else { 1.58 - String docComment = token.docComment; 1.59 + String docComment = token.comment(CommentStyle.JAVADOC); 1.60 if (firstTypeDecl && !seenImport && !seenPackage) { 1.61 - docComment = firstToken.docComment; 1.62 + docComment = firstToken.comment(CommentStyle.JAVADOC); 1.63 consumedToplevelDoc = true; 1.64 } 1.65 JCTree def = typeDeclaration(mods, docComment); 1.66 @@ -2288,7 +2289,7 @@ 1.67 } 1.68 JCTree.JCCompilationUnit toplevel = F.at(firstToken.pos).TopLevel(packageAnnotations, pid, defs.toList()); 1.69 if (!consumedToplevelDoc) 1.70 - attach(toplevel, firstToken.docComment); 1.71 + attach(toplevel, firstToken.comment(CommentStyle.JAVADOC)); 1.72 if (defs.elems.isEmpty()) 1.73 storeEnd(toplevel, S.prevToken().endPos); 1.74 if (keepDocComments) 1.75 @@ -2498,9 +2499,9 @@ 1.76 /** EnumeratorDeclaration = AnnotationsOpt [TypeArguments] IDENTIFIER [ Arguments ] [ "{" ClassBody "}" ] 1.77 */ 1.78 JCTree enumeratorDeclaration(Name enumName) { 1.79 - String dc = token.docComment; 1.80 + String dc = token.comment(CommentStyle.JAVADOC); 1.81 int flags = Flags.PUBLIC|Flags.STATIC|Flags.FINAL|Flags.ENUM; 1.82 - if (token.deprecatedFlag) { 1.83 + if (token.deprecatedFlag()) { 1.84 flags |= Flags.DEPRECATED; 1.85 } 1.86 int pos = token.pos; 1.87 @@ -2587,7 +2588,7 @@ 1.88 nextToken(); 1.89 return List.<JCTree>nil(); 1.90 } else { 1.91 - String dc = token.docComment; 1.92 + String dc = token.comment(CommentStyle.JAVADOC); 1.93 int pos = token.pos; 1.94 JCModifiers mods = modifiersOpt(); 1.95 if (token.kind == CLASS ||