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

Side by Side Diff: packages/analyzer/lib/src/dart/ast/resolution_map.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 import 'package:analyzer/dart/ast/ast.dart';
6 import 'package:analyzer/dart/ast/resolution_map.dart';
7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/dart/element/type.dart';
9
10 /**
11 * Concrete implementation of [ResolutionMap] based on the standard AST
12 * implementation.
13 */
14 class ResolutionMapImpl implements ResolutionMap {
15 @override
16 ExecutableElement bestElementForFunctionExpressionInvocation(
17 FunctionExpressionInvocation node) =>
18 node.bestElement;
19
20 @override
21 Element bestElementForIdentifier(Identifier node) => node.bestElement;
22
23 @override
24 MethodElement bestElementForMethodReference(MethodReferenceExpression node) =>
25 node.bestElement;
26
27 @override
28 ParameterElement bestParameterElementForExpression(Expression node) =>
29 node.bestParameterElement;
30
31 @override
32 DartType bestTypeForExpression(Expression node) => node.bestType;
33
34 @override
35 ElementAnnotation elementAnnotationForAnnotation(Annotation node) =>
36 node.elementAnnotation;
37
38 @override
39 ClassElement elementDeclaredByClassDeclaration(ClassDeclaration node) =>
40 node.element;
41
42 @override
43 CompilationUnitElement elementDeclaredByCompilationUnit(
44 CompilationUnit node) =>
45 node.element;
46
47 @override
48 ConstructorElement elementDeclaredByConstructorDeclaration(
49 ConstructorDeclaration node) =>
50 node.element;
51
52 @override
53 Element elementDeclaredByDeclaration(Declaration node) => node.element;
54
55 @override
56 LocalVariableElement elementDeclaredByDeclaredIdentifier(
57 DeclaredIdentifier node) =>
58 node.element;
59
60 @override
61 Element elementDeclaredByDirective(Directive node) => node.element;
62
63 @override
64 ClassElement elementDeclaredByEnumDeclaration(EnumDeclaration node) =>
65 node.element;
66
67 @override
68 ParameterElement elementDeclaredByFormalParameter(FormalParameter node) =>
69 node.element;
70
71 @override
72 ExecutableElement elementDeclaredByFunctionDeclaration(
73 FunctionDeclaration node) =>
74 node.element;
75
76 @override
77 ExecutableElement elementDeclaredByFunctionExpression(
78 FunctionExpression node) =>
79 node.element;
80
81 @override
82 ExecutableElement elementDeclaredByMethodDeclaration(
83 MethodDeclaration node) =>
84 node.element;
85
86 @override
87 VariableElement elementDeclaredByVariableDeclaration(
88 VariableDeclaration node) =>
89 node.element;
90
91 @override
92 Element elementForAnnotation(Annotation node) => node.element;
93
94 @override
95 ParameterElement elementForNamedExpression(NamedExpression node) =>
96 node.element;
97
98 @override
99 List<ParameterElement> parameterElementsForFormalParameterList(
100 FormalParameterList node) =>
101 node.parameterElements;
102
103 @override
104 ExecutableElement propagatedElementForFunctionExpressionInvocation(
105 FunctionExpressionInvocation node) =>
106 node.propagatedElement;
107
108 @override
109 Element propagatedElementForIdentifier(Identifier node) =>
110 node.propagatedElement;
111
112 @override
113 MethodElement propagatedElementForMethodReference(
114 MethodReferenceExpression node) =>
115 node.propagatedElement;
116
117 @override
118 ParameterElement propagatedParameterElementForExpression(Expression node) =>
119 node.propagatedParameterElement;
120
121 @override
122 DartType propagatedTypeForExpression(Expression node) => node.propagatedType;
123
124 @override
125 ConstructorElement staticElementForConstructorReference(
126 ConstructorReferenceNode node) =>
127 node.staticElement;
128
129 @override
130 ExecutableElement staticElementForFunctionExpressionInvocation(
131 FunctionExpressionInvocation node) =>
132 node.staticElement;
133
134 @override
135 Element staticElementForIdentifier(Identifier node) => node.staticElement;
136
137 @override
138 MethodElement staticElementForMethodReference(
139 MethodReferenceExpression node) =>
140 node.staticElement;
141
142 @override
143 DartType staticInvokeTypeForInvocationExpression(InvocationExpression node) =>
144 node.staticInvokeType;
145
146 @override
147 ParameterElement staticParameterElementForExpression(Expression node) =>
148 node.staticParameterElement;
149
150 @override
151 DartType staticTypeForExpression(Expression node) => node.staticType;
152
153 @override
154 DartType typeForTypeName(TypeName node) => node.type;
155
156 @override
157 Element uriElementForDirective(UriBasedDirective node) => node.uriElement;
158 }
OLDNEW
« 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