| 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 engine.resolver; | 5 library engine.resolver; |
| 6 | 6 |
| 7 import "dart:math" as math; | 7 import "dart:math" as math; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/utilities_collection.dart'; | 10 import 'package:analyzer/src/generated/utilities_collection.dart'; |
| (...skipping 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2599 } | 2599 } |
| 2600 if (body.isGenerator) { | 2600 if (body.isGenerator) { |
| 2601 element.generator = true; | 2601 element.generator = true; |
| 2602 } | 2602 } |
| 2603 _currentHolder.addConstructor(element); | 2603 _currentHolder.addConstructor(element); |
| 2604 node.element = element; | 2604 node.element = element; |
| 2605 if (constructorName == null) { | 2605 if (constructorName == null) { |
| 2606 Identifier returnType = node.returnType; | 2606 Identifier returnType = node.returnType; |
| 2607 if (returnType != null) { | 2607 if (returnType != null) { |
| 2608 element.nameOffset = returnType.offset; | 2608 element.nameOffset = returnType.offset; |
| 2609 element.nameEnd = returnType.end; |
| 2609 } | 2610 } |
| 2610 } else { | 2611 } else { |
| 2611 constructorName.staticElement = element; | 2612 constructorName.staticElement = element; |
| 2613 element.periodOffset = node.period.offset; |
| 2614 element.nameEnd = constructorName.end; |
| 2612 } | 2615 } |
| 2613 holder.validate(); | 2616 holder.validate(); |
| 2614 return null; | 2617 return null; |
| 2615 } | 2618 } |
| 2616 | 2619 |
| 2617 @override | 2620 @override |
| 2618 Object visitDeclaredIdentifier(DeclaredIdentifier node) { | 2621 Object visitDeclaredIdentifier(DeclaredIdentifier node) { |
| 2619 SimpleIdentifier variableName = node.identifier; | 2622 SimpleIdentifier variableName = node.identifier; |
| 2620 sc.Token keyword = node.keyword; | 2623 sc.Token keyword = node.keyword; |
| 2621 LocalVariableElementImpl element = | 2624 LocalVariableElementImpl element = |
| (...skipping 13071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15693 * library. | 15696 * library. |
| 15694 */ | 15697 */ |
| 15695 final HashSet<String> members = new HashSet<String>(); | 15698 final HashSet<String> members = new HashSet<String>(); |
| 15696 | 15699 |
| 15697 /** | 15700 /** |
| 15698 * Names of resolved or unresolved class members that are read in the | 15701 * Names of resolved or unresolved class members that are read in the |
| 15699 * library. | 15702 * library. |
| 15700 */ | 15703 */ |
| 15701 final HashSet<String> readMembers = new HashSet<String>(); | 15704 final HashSet<String> readMembers = new HashSet<String>(); |
| 15702 } | 15705 } |
| OLD | NEW |