| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // TODO(johnniwinther): Temporarily copied from analyzer2dart. Merge when | 5 // TODO(johnniwinther): Temporarily copied from analyzer2dart. Merge when |
| 6 // we shared code with the analyzer and this semantic visitor is complete. | 6 // we shared code with the analyzer and this semantic visitor is complete. |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Code for classifying the semantics of identifiers appearing in a Dart file. | 9 * Code for classifying the semantics of identifiers appearing in a Dart file. |
| 10 */ | 10 */ |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 final CompoundAccessKind compoundAccessKind; | 300 final CompoundAccessKind compoundAccessKind; |
| 301 final Element getter; | 301 final Element getter; |
| 302 final Element setter; | 302 final Element setter; |
| 303 | 303 |
| 304 CompoundAccessSemantics(this.compoundAccessKind, | 304 CompoundAccessSemantics(this.compoundAccessKind, |
| 305 this.getter, | 305 this.getter, |
| 306 this.setter) | 306 this.setter) |
| 307 : super._(AccessKind.COMPOUND); | 307 : super._(AccessKind.COMPOUND); |
| 308 | 308 |
| 309 Element get element => setter; | 309 Element get element => setter; |
| 310 |
| 311 String toString() { |
| 312 StringBuffer sb = new StringBuffer(); |
| 313 sb.write('CompoundAccessSemantics['); |
| 314 sb.write('kind=$compoundAccessKind'); |
| 315 if (getter != null) { |
| 316 sb.write(',getter='); |
| 317 sb.write('${getter}'); |
| 318 } |
| 319 if (setter != null) { |
| 320 sb.write(',setter='); |
| 321 sb.write('${setter}'); |
| 322 } |
| 323 sb.write(']'); |
| 324 return sb.toString(); |
| 325 } |
| 310 } | 326 } |
| 311 | 327 |
| 312 /// Enum representing the different kinds of destinations which a constructor | 328 /// Enum representing the different kinds of destinations which a constructor |
| 313 /// invocation might refer to. | 329 /// invocation might refer to. |
| 314 enum ConstructorAccessKind { | 330 enum ConstructorAccessKind { |
| 315 /// An invocation of a generative constructor. | 331 /// An invocation of a generative constructor. |
| 316 /// | 332 /// |
| 317 /// For instance | 333 /// For instance |
| 318 /// class C { | 334 /// class C { |
| 319 /// C(); | 335 /// C(); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 | 438 |
| 423 RedirectingFactoryConstructorAccessSemantics( | 439 RedirectingFactoryConstructorAccessSemantics( |
| 424 ConstructorAccessKind kind, | 440 ConstructorAccessKind kind, |
| 425 Element element, | 441 Element element, |
| 426 DartType type, | 442 DartType type, |
| 427 this.effectiveTargetSemantics) | 443 this.effectiveTargetSemantics) |
| 428 : super(kind, element, type); | 444 : super(kind, element, type); |
| 429 } | 445 } |
| 430 | 446 |
| 431 | 447 |
| OLD | NEW |