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 part of resolution; | 5 part of resolution; |
6 | 6 |
7 class ResolverTask extends CompilerTask { | 7 class ResolverTask extends CompilerTask { |
8 final ConstantCompiler constantCompiler; | 8 final ConstantCompiler constantCompiler; |
9 | 9 |
10 ResolverTask(Compiler compiler, this.constantCompiler) : super(compiler); | 10 ResolverTask(Compiler compiler, this.constantCompiler) : super(compiler); |
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 R visit(Node node) => (node == null) ? null : node.accept(this); | 976 R visit(Node node) => (node == null) ? null : node.accept(this); |
977 | 977 |
978 void error(Spannable node, MessageKind kind, [Map arguments = const {}]) { | 978 void error(Spannable node, MessageKind kind, [Map arguments = const {}]) { |
979 compiler.reportError(node, kind, arguments); | 979 compiler.reportError(node, kind, arguments); |
980 } | 980 } |
981 | 981 |
982 void warning(Spannable node, MessageKind kind, [Map arguments = const {}]) { | 982 void warning(Spannable node, MessageKind kind, [Map arguments = const {}]) { |
983 compiler.reportWarning(node, kind, arguments); | 983 compiler.reportWarning(node, kind, arguments); |
984 } | 984 } |
985 | 985 |
986 internalError(Spannable node, message) { | 986 void internalError(Spannable node, message) { |
987 compiler.internalError(node, message); | 987 compiler.internalError(node, message); |
988 } | 988 } |
989 | 989 |
990 void addDeferredAction(Element element, DeferredAction action) { | 990 void addDeferredAction(Element element, DeferredAction action) { |
991 compiler.enqueuer.resolution.addDeferredAction(element, action); | 991 compiler.enqueuer.resolution.addDeferredAction(element, action); |
992 } | 992 } |
993 } | 993 } |
994 | 994 |
995 /** | 995 /** |
996 * Common supertype for resolver visitors that record resolutions in a | 996 * Common supertype for resolver visitors that record resolutions in a |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 | 1042 |
1043 void reportDuplicateDefinition(String name, | 1043 void reportDuplicateDefinition(String name, |
1044 Spannable definition, | 1044 Spannable definition, |
1045 Spannable existing) { | 1045 Spannable existing) { |
1046 compiler.reportError(definition, | 1046 compiler.reportError(definition, |
1047 MessageKind.DUPLICATE_DEFINITION, {'name': name}); | 1047 MessageKind.DUPLICATE_DEFINITION, {'name': name}); |
1048 compiler.reportInfo(existing, | 1048 compiler.reportInfo(existing, |
1049 MessageKind.EXISTING_DEFINITION, {'name': name}); | 1049 MessageKind.EXISTING_DEFINITION, {'name': name}); |
1050 } | 1050 } |
1051 } | 1051 } |
OLD | NEW |