< prev index next >

test/langtools/tools/javac/parser/extend/TrialParser.java

Print this page

        

*** 173,183 **** default: JCModifiers mods = modifiersOpt(pmods); if (token.kind == CLASS || token.kind == INTERFACE || token.kind == ENUM) { ! return List.<JCTree>of(classOrInterfaceOrEnumDeclaration(mods, dc)); } else { int pos = token.pos; List<JCTypeParameter> typarams = typeParametersOpt(); // if there are type parameters but no modifiers, save the start // position of the method in the modifiers. --- 173,183 ---- default: JCModifiers mods = modifiersOpt(pmods); if (token.kind == CLASS || token.kind == INTERFACE || token.kind == ENUM) { ! return List.<JCTree>of(classOrRecordOrInterfaceOrEnumDeclaration(mods, dc)); } else { int pos = token.pos; List<JCTypeParameter> typarams = typeParametersOpt(); // if there are type parameters but no modifiers, save the start // position of the method in the modifiers.
*** 218,228 **** if (token.kind == LPAREN) { // method declaration //mods.flags |= Flags.STATIC; return List.of(methodDeclaratorRest( pos, mods, t, name, typarams, ! false, isVoid, dc)); } else if (!isVoid && typarams.isEmpty()) { // variable declaration //mods.flags |= Flags.STATIC; List<JCTree> defs = variableDeclaratorsRest(pos, mods, t, name, false, dc, --- 218,228 ---- if (token.kind == LPAREN) { // method declaration //mods.flags |= Flags.STATIC; return List.of(methodDeclaratorRest( pos, mods, t, name, typarams, ! false, isVoid, false, dc)); } else if (!isVoid && typarams.isEmpty()) { // variable declaration //mods.flags |= Flags.STATIC; List<JCTree> defs = variableDeclaratorsRest(pos, mods, t, name, false, dc,
< prev index next >