| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package com.google.dart.compiler.ast; | 5 package com.google.dart.compiler.ast; |
| 6 | 6 |
| 7 import com.google.dart.compiler.common.HasSymbol; | 7 import com.google.dart.compiler.common.HasSymbol; |
| 8 import com.google.dart.compiler.common.Symbol; | 8 import com.google.dart.compiler.common.Symbol; |
| 9 import com.google.dart.compiler.resolver.ClassElement; | 9 import com.google.dart.compiler.resolver.ClassElement; |
| 10 | 10 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 @Override | 162 @Override |
| 163 public void setSymbol(Symbol symbol) { | 163 public void setSymbol(Symbol symbol) { |
| 164 this.element = (ClassElement) symbol; | 164 this.element = (ClassElement) symbol; |
| 165 } | 165 } |
| 166 | 166 |
| 167 public DartStringLiteral getNativeName() { | 167 public DartStringLiteral getNativeName() { |
| 168 return nativeName; | 168 return nativeName; |
| 169 } | 169 } |
| 170 | 170 |
| 171 @Override | 171 @Override |
| 172 public void traverse(DartVisitor v, DartContext ctx) { | 172 public void visitChildren(ASTVisitor<?> visitor) { |
| 173 if (v.visit(this, ctx)) { | |
| 174 if (superclass != null) { | |
| 175 superclass = becomeParentOf(v.accept(superclass)); | |
| 176 } | |
| 177 v.acceptWithInsertRemove(this, getMembers()); | |
| 178 if (getTypeParameters() != null) { | |
| 179 v.acceptWithInsertRemove(this, getTypeParameters()); | |
| 180 } | |
| 181 if (getInterfaces() != null) { | |
| 182 v.acceptWithInsertRemove(this, getInterfaces()); | |
| 183 } | |
| 184 if (defaultClass != null) { | |
| 185 defaultClass = becomeParentOf(v.accept(defaultClass)); | |
| 186 } | |
| 187 } | |
| 188 v.endVisit(this, ctx); | |
| 189 } | |
| 190 | |
| 191 @Override | |
| 192 public void visitChildren(DartPlainVisitor<?> visitor) { | |
| 193 visitor.visit(typeParameters); | 173 visitor.visit(typeParameters); |
| 194 if (superclass != null) { | 174 if (superclass != null) { |
| 195 superclass.accept(visitor); | 175 superclass.accept(visitor); |
| 196 } | 176 } |
| 197 visitor.visit(interfaces); | 177 visitor.visit(interfaces); |
| 198 if (defaultClass != null) { | 178 if (defaultClass != null) { |
| 199 defaultClass.accept(visitor); | 179 defaultClass.accept(visitor); |
| 200 } | 180 } |
| 201 visitor.visit(members); | 181 visitor.visit(members); |
| 202 } | 182 } |
| 203 | 183 |
| 204 @Override | 184 @Override |
| 205 public <R> R accept(DartPlainVisitor<R> visitor) { | 185 public <R> R accept(ASTVisitor<R> visitor) { |
| 206 return visitor.visitClass(this); | 186 return visitor.visitClass(this); |
| 207 } | 187 } |
| 208 } | 188 } |
| OLD | NEW |