420 |
420 |
421 public JCTree visitVariable(VariableTree node, P p) { |
421 public JCTree visitVariable(VariableTree node, P p) { |
422 JCVariableDecl t = (JCVariableDecl) node; |
422 JCVariableDecl t = (JCVariableDecl) node; |
423 JCModifiers mods = copy(t.mods, p); |
423 JCModifiers mods = copy(t.mods, p); |
424 JCExpression vartype = copy(t.vartype, p); |
424 JCExpression vartype = copy(t.vartype, p); |
425 JCExpression init = copy(t.init, p); |
425 if (t.nameexpr == null) { |
426 return M.at(t.pos).VarDef(mods, t.name, vartype, init); |
426 JCExpression init = copy(t.init, p); |
|
427 return M.at(t.pos).VarDef(mods, t.name, vartype, init); |
|
428 } else { |
|
429 JCExpression nameexpr = copy(t.nameexpr, p); |
|
430 return M.at(t.pos).ReceiverVarDef(mods, nameexpr, vartype); |
|
431 } |
427 } |
432 } |
428 |
433 |
429 public JCTree visitWhileLoop(WhileLoopTree node, P p) { |
434 public JCTree visitWhileLoop(WhileLoopTree node, P p) { |
430 JCWhileLoop t = (JCWhileLoop) node; |
435 JCWhileLoop t = (JCWhileLoop) node; |
431 JCStatement body = copy(t.body, p); |
436 JCStatement body = copy(t.body, p); |