Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: packages/analyzer/lib/src/dart/ast/resolution_map.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/analyzer/lib/src/dart/ast/ast_factory.dart ('k') | packages/analyzer/lib/src/dart/ast/token.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/analyzer/lib/src/dart/ast/resolution_map.dart
diff --git a/packages/analyzer/lib/src/dart/ast/resolution_map.dart b/packages/analyzer/lib/src/dart/ast/resolution_map.dart
new file mode 100644
index 0000000000000000000000000000000000000000..975f97d291aea1a1bdfcf77e5c4f40cd96aa2f58
--- /dev/null
+++ b/packages/analyzer/lib/src/dart/ast/resolution_map.dart
@@ -0,0 +1,158 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/resolution_map.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+
+/**
+ * Concrete implementation of [ResolutionMap] based on the standard AST
+ * implementation.
+ */
+class ResolutionMapImpl implements ResolutionMap {
+ @override
+ ExecutableElement bestElementForFunctionExpressionInvocation(
+ FunctionExpressionInvocation node) =>
+ node.bestElement;
+
+ @override
+ Element bestElementForIdentifier(Identifier node) => node.bestElement;
+
+ @override
+ MethodElement bestElementForMethodReference(MethodReferenceExpression node) =>
+ node.bestElement;
+
+ @override
+ ParameterElement bestParameterElementForExpression(Expression node) =>
+ node.bestParameterElement;
+
+ @override
+ DartType bestTypeForExpression(Expression node) => node.bestType;
+
+ @override
+ ElementAnnotation elementAnnotationForAnnotation(Annotation node) =>
+ node.elementAnnotation;
+
+ @override
+ ClassElement elementDeclaredByClassDeclaration(ClassDeclaration node) =>
+ node.element;
+
+ @override
+ CompilationUnitElement elementDeclaredByCompilationUnit(
+ CompilationUnit node) =>
+ node.element;
+
+ @override
+ ConstructorElement elementDeclaredByConstructorDeclaration(
+ ConstructorDeclaration node) =>
+ node.element;
+
+ @override
+ Element elementDeclaredByDeclaration(Declaration node) => node.element;
+
+ @override
+ LocalVariableElement elementDeclaredByDeclaredIdentifier(
+ DeclaredIdentifier node) =>
+ node.element;
+
+ @override
+ Element elementDeclaredByDirective(Directive node) => node.element;
+
+ @override
+ ClassElement elementDeclaredByEnumDeclaration(EnumDeclaration node) =>
+ node.element;
+
+ @override
+ ParameterElement elementDeclaredByFormalParameter(FormalParameter node) =>
+ node.element;
+
+ @override
+ ExecutableElement elementDeclaredByFunctionDeclaration(
+ FunctionDeclaration node) =>
+ node.element;
+
+ @override
+ ExecutableElement elementDeclaredByFunctionExpression(
+ FunctionExpression node) =>
+ node.element;
+
+ @override
+ ExecutableElement elementDeclaredByMethodDeclaration(
+ MethodDeclaration node) =>
+ node.element;
+
+ @override
+ VariableElement elementDeclaredByVariableDeclaration(
+ VariableDeclaration node) =>
+ node.element;
+
+ @override
+ Element elementForAnnotation(Annotation node) => node.element;
+
+ @override
+ ParameterElement elementForNamedExpression(NamedExpression node) =>
+ node.element;
+
+ @override
+ List<ParameterElement> parameterElementsForFormalParameterList(
+ FormalParameterList node) =>
+ node.parameterElements;
+
+ @override
+ ExecutableElement propagatedElementForFunctionExpressionInvocation(
+ FunctionExpressionInvocation node) =>
+ node.propagatedElement;
+
+ @override
+ Element propagatedElementForIdentifier(Identifier node) =>
+ node.propagatedElement;
+
+ @override
+ MethodElement propagatedElementForMethodReference(
+ MethodReferenceExpression node) =>
+ node.propagatedElement;
+
+ @override
+ ParameterElement propagatedParameterElementForExpression(Expression node) =>
+ node.propagatedParameterElement;
+
+ @override
+ DartType propagatedTypeForExpression(Expression node) => node.propagatedType;
+
+ @override
+ ConstructorElement staticElementForConstructorReference(
+ ConstructorReferenceNode node) =>
+ node.staticElement;
+
+ @override
+ ExecutableElement staticElementForFunctionExpressionInvocation(
+ FunctionExpressionInvocation node) =>
+ node.staticElement;
+
+ @override
+ Element staticElementForIdentifier(Identifier node) => node.staticElement;
+
+ @override
+ MethodElement staticElementForMethodReference(
+ MethodReferenceExpression node) =>
+ node.staticElement;
+
+ @override
+ DartType staticInvokeTypeForInvocationExpression(InvocationExpression node) =>
+ node.staticInvokeType;
+
+ @override
+ ParameterElement staticParameterElementForExpression(Expression node) =>
+ node.staticParameterElement;
+
+ @override
+ DartType staticTypeForExpression(Expression node) => node.staticType;
+
+ @override
+ DartType typeForTypeName(TypeName node) => node.type;
+
+ @override
+ Element uriElementForDirective(UriBasedDirective node) => node.uriElement;
+}
« no previous file with comments | « packages/analyzer/lib/src/dart/ast/ast_factory.dart ('k') | packages/analyzer/lib/src/dart/ast/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698