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

Side by Side Diff: pkg/analyzer/lib/src/dart/constant/utilities.dart

Issue 2391783002: Further cleanups to annotation elements now that #25706 is fixed. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.src.dart.constant.utilities; 5 library analyzer.src.dart.constant.utilities;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/visitor.dart'; 10 import 'package:analyzer/dart/ast/visitor.dart';
(...skipping 28 matching lines...) Expand all
39 ConstantAstCloner() : super(true); 39 ConstantAstCloner() : super(true);
40 40
41 @override 41 @override
42 ConstructorName visitConstructorName(ConstructorName node) { 42 ConstructorName visitConstructorName(ConstructorName node) {
43 ConstructorName name = super.visitConstructorName(node); 43 ConstructorName name = super.visitConstructorName(node);
44 name.staticElement = node.staticElement; 44 name.staticElement = node.staticElement;
45 return name; 45 return name;
46 } 46 }
47 47
48 @override 48 @override
49 Annotation visitAnnotation(Annotation node) {
50 Annotation annotation = super.visitAnnotation(node);
51 annotation.element = node.element;
52 return annotation;
53 }
54
55 @override
49 FunctionExpression visitFunctionExpression(FunctionExpression node) { 56 FunctionExpression visitFunctionExpression(FunctionExpression node) {
50 FunctionExpression expression = super.visitFunctionExpression(node); 57 FunctionExpression expression = super.visitFunctionExpression(node);
51 expression.element = node.element; 58 expression.element = node.element;
52 return expression; 59 return expression;
53 } 60 }
54 61
55 @override 62 @override
56 InstanceCreationExpression visitInstanceCreationExpression( 63 InstanceCreationExpression visitInstanceCreationExpression(
57 InstanceCreationExpression node) { 64 InstanceCreationExpression node) {
58 InstanceCreationExpression expression = 65 InstanceCreationExpression expression =
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 @override 311 @override
305 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) { 312 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
306 super.visitSuperConstructorInvocation(node); 313 super.visitSuperConstructorInvocation(node);
307 ConstructorElement constructor = getConstructorImpl(node.staticElement); 314 ConstructorElement constructor = getConstructorImpl(node.staticElement);
308 if (constructor != null) { 315 if (constructor != null) {
309 _callback(constructor); 316 _callback(constructor);
310 } 317 }
311 return null; 318 return null;
312 } 319 }
313 } 320 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698