| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library elements.modelx; | 5 library elements.modelx; |
| 6 | 6 |
| 7 import 'elements.dart'; | 7 import 'elements.dart'; |
| 8 import '../tree/tree.dart'; | 8 import '../tree/tree.dart'; |
| 9 import '../util/util.dart'; | 9 import '../util/util.dart'; |
| 10 import '../resolution/resolution.dart'; | 10 import '../resolution/resolution.dart'; |
| (...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 } | 1009 } |
| 1010 | 1010 |
| 1011 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); | 1011 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); |
| 1012 } | 1012 } |
| 1013 | 1013 |
| 1014 class PrefixElementX extends ElementX implements PrefixElement { | 1014 class PrefixElementX extends ElementX implements PrefixElement { |
| 1015 Token firstPosition; | 1015 Token firstPosition; |
| 1016 | 1016 |
| 1017 final ImportScope importScope = new ImportScope(); | 1017 final ImportScope importScope = new ImportScope(); |
| 1018 | 1018 |
| 1019 bool isDeferred = false; |
| 1020 |
| 1019 PrefixElementX(String prefix, Element enclosing, this.firstPosition) | 1021 PrefixElementX(String prefix, Element enclosing, this.firstPosition) |
| 1020 : super(prefix, ElementKind.PREFIX, enclosing); | 1022 : super(prefix, ElementKind.PREFIX, enclosing); |
| 1021 | 1023 |
| 1022 Element lookupLocalMember(String memberName) => importScope[memberName]; | 1024 Element lookupLocalMember(String memberName) => importScope[memberName]; |
| 1023 | 1025 |
| 1024 DartType computeType(Compiler compiler) => compiler.types.dynamicType; | 1026 DartType computeType(Compiler compiler) => compiler.types.dynamicType; |
| 1025 | 1027 |
| 1026 Token position() => firstPosition; | 1028 Token position() => firstPosition; |
| 1027 | 1029 |
| 1028 void addImport(Element element, Import import, DiagnosticListener listener) { | 1030 void addImport(Element element, Import import, DiagnosticListener listener) { |
| 1029 importScope.addImport(this, element, import, listener); | 1031 importScope.addImport(this, element, import, listener); |
| 1030 } | 1032 } |
| 1031 | 1033 |
| 1032 accept(ElementVisitor visitor) => visitor.visitPrefixElement(this); | 1034 accept(ElementVisitor visitor) => visitor.visitPrefixElement(this); |
| 1035 |
| 1036 void markAsDeferred() { |
| 1037 isDeferred = true; |
| 1038 } |
| 1033 } | 1039 } |
| 1034 | 1040 |
| 1035 class TypedefElementX extends ElementX implements TypedefElement { | 1041 class TypedefElementX extends ElementX implements TypedefElement { |
| 1036 Typedef cachedNode; | 1042 Typedef cachedNode; |
| 1037 | 1043 |
| 1038 /** | 1044 /** |
| 1039 * The type of this typedef in which the type arguments are the type | 1045 * The type of this typedef in which the type arguments are the type |
| 1040 * variables. | 1046 * variables. |
| 1041 * | 1047 * |
| 1042 * This resembles the [ClassElement.thisType] though a typedef has no notion | 1048 * This resembles the [ClassElement.thisType] though a typedef has no notion |
| (...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2540 final Metadata metadata; | 2546 final Metadata metadata; |
| 2541 | 2547 |
| 2542 ParameterMetadataAnnotation(Metadata this.metadata); | 2548 ParameterMetadataAnnotation(Metadata this.metadata); |
| 2543 | 2549 |
| 2544 Node parseNode(DiagnosticListener listener) => metadata.expression; | 2550 Node parseNode(DiagnosticListener listener) => metadata.expression; |
| 2545 | 2551 |
| 2546 Token get beginToken => metadata.getBeginToken(); | 2552 Token get beginToken => metadata.getBeginToken(); |
| 2547 | 2553 |
| 2548 Token get endToken => metadata.getEndToken(); | 2554 Token get endToken => metadata.getEndToken(); |
| 2549 } | 2555 } |
| OLD | NEW |