OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |