< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java

Print this page

        

*** 488,497 **** --- 488,501 ---- return node.pos; } else { return getStartPos(node.vartype); } } + case BINDINGPATTERN: { + JCBindingPattern node = (JCBindingPattern)tree; + return getStartPos(node.vartype); + } case ERRONEOUS: { JCErroneous node = (JCErroneous)tree; if (node.errs != null && node.errs.nonEmpty()) return getStartPos(node.errs.head); }
*** 572,582 **** case WILDCARD: return getEndPos(((JCWildcard) tree).inner, endPosTable); case TYPECAST: return getEndPos(((JCTypeCast) tree).expr, endPosTable); case TYPETEST: ! return getEndPos(((JCInstanceOf) tree).clazz, endPosTable); case WHILELOOP: return getEndPos(((JCWhileLoop) tree).body, endPosTable); case ANNOTATED_TYPE: return getEndPos(((JCAnnotatedType) tree).underlyingType, endPosTable); case ERRONEOUS: { --- 576,586 ---- case WILDCARD: return getEndPos(((JCWildcard) tree).inner, endPosTable); case TYPECAST: return getEndPos(((JCTypeCast) tree).expr, endPosTable); case TYPETEST: ! return getEndPos(((JCInstanceOf) tree).pattern, endPosTable); case WHILELOOP: return getEndPos(((JCWhileLoop) tree).body, endPosTable); case ANNOTATED_TYPE: return getEndPos(((JCAnnotatedType) tree).underlyingType, endPosTable); case ERRONEOUS: {
*** 845,854 **** --- 849,860 ---- case TYPE_ANNOTATION: case TYPEPARAMETER: if (node.type != null) return node.type.tsym; return null; + case BINDINGPATTERN: + return ((JCBindingPattern) node).symbol; default: return null; } }
*** 1223,1228 **** --- 1229,1235 ---- } public static boolean isPackageInfo(JCCompilationUnit tree) { return tree.sourcefile.isNameCompatible("package-info", JavaFileObject.Kind.SOURCE); } + }
< prev index next >