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

Side by Side Diff: pkg/analyzer/lib/src/dart/ast/ast.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 | « no previous file | pkg/analyzer/lib/src/dart/constant/utilities.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.ast.ast; 5 library analyzer.src.dart.ast.ast;
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/syntactic_entity.dart'; 10 import 'package:analyzer/dart/ast/syntactic_entity.dart';
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 @override 277 @override
278 void set constructorName(SimpleIdentifier name) { 278 void set constructorName(SimpleIdentifier name) {
279 _constructorName = _becomeParentOf(name as AstNodeImpl); 279 _constructorName = _becomeParentOf(name as AstNodeImpl);
280 } 280 }
281 281
282 @override 282 @override
283 Element get element { 283 Element get element {
284 if (_element != null) { 284 if (_element != null) {
285 return _element; 285 return _element;
286 } else if (_name != null) { 286 } else if (_constructorName == null && _name != null) {
287 return _name.staticElement; 287 return _name.staticElement;
288 } 288 }
289 return null; 289 return null;
290 } 290 }
291 291
292 @override 292 @override
293 void set element(Element element) { 293 void set element(Element element) {
294 _element = element; 294 _element = element;
295 } 295 }
296 296
(...skipping 10830 matching lines...) Expand 10 before | Expand all | Expand 10 after
11127 11127
11128 @override 11128 @override
11129 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => 11129 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
11130 visitor.visitYieldStatement(this); 11130 visitor.visitYieldStatement(this);
11131 11131
11132 @override 11132 @override
11133 void visitChildren(AstVisitor visitor) { 11133 void visitChildren(AstVisitor visitor) {
11134 _expression?.accept(visitor); 11134 _expression?.accept(visitor);
11135 } 11135 }
11136 } 11136 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/constant/utilities.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698