< prev index next >

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

Print this page

        

@@ -236,11 +236,14 @@
     }
 
     @DefinedBy(Api.COMPILER_TREE)
     public JCTree visitIdentifier(IdentifierTree node, P p) {
         JCIdent t = (JCIdent) node;
-        return M.at(t.pos).Ident(t.name);
+        JCIdent ident = M.at(t.pos).Ident(t.name);
+        if (t.isQuestioned())
+            ident.setQuestioned();
+        return ident;
     }
 
     @DefinedBy(Api.COMPILER_TREE)
     public JCTree visitIf(IfTree node, P p) {
         JCIf t = (JCIf) node;

@@ -352,11 +355,15 @@
 
     @DefinedBy(Api.COMPILER_TREE)
     public JCTree visitMemberSelect(MemberSelectTree node, P p) {
         JCFieldAccess t = (JCFieldAccess) node;
         JCExpression selected = copy(t.selected, p);
-        return M.at(t.pos).Select(selected, t.name);
+        JCFieldAccess select = M.at(t.pos).Select(selected, t.name);
+        if (t.isQuestioned()) {
+            select.setQuestioned();
+        }
+        return select;
     }
 
     @DefinedBy(Api.COMPILER_TREE)
     public JCTree visitMemberReference(MemberReferenceTree node, P p) {
         JCMemberReference t = (JCMemberReference) node;

@@ -515,10 +522,18 @@
         JCExpression cond = copy(t.cond, p);
         return M.at(t.pos).WhileLoop(cond, body);
     }
 
     @DefinedBy(Api.COMPILER_TREE)
+    public JCTree visitWithField(WithFieldTree node, P p) {
+        JCWithField t = (JCWithField) node;
+        JCExpression field = copy(t.field, p);
+        JCExpression value = copy(t.value, p);
+        return M.at(t.pos).WithField(field, value);
+    }
+
+    @DefinedBy(Api.COMPILER_TREE)
     public JCTree visitWildcard(WildcardTree node, P p) {
         JCWildcard t = (JCWildcard) node;
         TypeBoundKind kind = M.at(t.kind.pos).TypeBoundKind(t.kind.kind);
         JCTree inner = copy(t.inner, p);
         return M.at(t.pos).Wildcard(kind, inner);
< prev index next >