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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 /// Compound access where read and write access different elements. | 110 /// Compound access where read and write access different elements. |
111 /// See [CompoundAccessKind]. | 111 /// See [CompoundAccessKind]. |
112 COMPOUND, | 112 COMPOUND, |
113 | 113 |
114 /// The destination of the access is a compile-time constant. | 114 /// The destination of the access is a compile-time constant. |
115 CONSTANT, | 115 CONSTANT, |
116 | 116 |
117 /// The destination of the access is unresolved in a static context. | 117 /// The destination of the access is unresolved in a static context. |
118 UNRESOLVED, | 118 UNRESOLVED, |
| 119 |
| 120 /// The destination of the access is unresolved super access. |
| 121 UNRESOLVED_SUPER, |
119 } | 122 } |
120 | 123 |
121 enum CompoundAccessKind { | 124 enum CompoundAccessKind { |
122 /// Read from a static getter and write to static setter. | 125 /// Read from a static getter and write to static setter. |
123 STATIC_GETTER_SETTER, | 126 STATIC_GETTER_SETTER, |
124 /// Read from a static method (closurize) and write to static setter. | 127 /// Read from a static method (closurize) and write to static setter. |
125 STATIC_METHOD_SETTER, | 128 STATIC_METHOD_SETTER, |
126 | 129 |
127 /// Read from a top level getter and write to a top level setter. | 130 /// Read from a top level getter and write to a top level setter. |
128 TOPLEVEL_GETTER_SETTER, | 131 TOPLEVEL_GETTER_SETTER, |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 : super._(AccessKind.TOPLEVEL_METHOD); | 290 : super._(AccessKind.TOPLEVEL_METHOD); |
288 | 291 |
289 StaticAccess.topLevelGetter(MethodElement this.element) | 292 StaticAccess.topLevelGetter(MethodElement this.element) |
290 : super._(AccessKind.TOPLEVEL_GETTER); | 293 : super._(AccessKind.TOPLEVEL_GETTER); |
291 | 294 |
292 StaticAccess.topLevelSetter(MethodElement this.element) | 295 StaticAccess.topLevelSetter(MethodElement this.element) |
293 : super._(AccessKind.TOPLEVEL_SETTER); | 296 : super._(AccessKind.TOPLEVEL_SETTER); |
294 | 297 |
295 StaticAccess.unresolved(this.element) | 298 StaticAccess.unresolved(this.element) |
296 : super._(AccessKind.UNRESOLVED); | 299 : super._(AccessKind.UNRESOLVED); |
| 300 |
| 301 StaticAccess.unresolvedSuper(this.element) |
| 302 : super._(AccessKind.UNRESOLVED_SUPER); |
297 } | 303 } |
298 | 304 |
299 class CompoundAccessSemantics extends AccessSemantics { | 305 class CompoundAccessSemantics extends AccessSemantics { |
300 final CompoundAccessKind compoundAccessKind; | 306 final CompoundAccessKind compoundAccessKind; |
301 final Element getter; | 307 final Element getter; |
302 final Element setter; | 308 final Element setter; |
303 | 309 |
304 CompoundAccessSemantics(this.compoundAccessKind, | 310 CompoundAccessSemantics(this.compoundAccessKind, |
305 this.getter, | 311 this.getter, |
306 this.setter) | 312 this.setter) |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 | 444 |
439 RedirectingFactoryConstructorAccessSemantics( | 445 RedirectingFactoryConstructorAccessSemantics( |
440 ConstructorAccessKind kind, | 446 ConstructorAccessKind kind, |
441 Element element, | 447 Element element, |
442 DartType type, | 448 DartType type, |
443 this.effectiveTargetSemantics) | 449 this.effectiveTargetSemantics) |
444 : super(kind, element, type); | 450 : super(kind, element, type); |
445 } | 451 } |
446 | 452 |
447 | 453 |
OLD | NEW |