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 3174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3185 if (_inFieldContext) { | 3185 if (_inFieldContext) { |
3186 (variable as FieldElementImpl).static = _matches( | 3186 (variable as FieldElementImpl).static = _matches( |
3187 (node.parent.parent as FieldDeclaration).staticKeyword, | 3187 (node.parent.parent as FieldDeclaration).staticKeyword, |
3188 sc.Keyword.STATIC); | 3188 sc.Keyword.STATIC); |
3189 } | 3189 } |
3190 PropertyAccessorElementImpl getter = | 3190 PropertyAccessorElementImpl getter = |
3191 new PropertyAccessorElementImpl.forVariable(variable); | 3191 new PropertyAccessorElementImpl.forVariable(variable); |
3192 getter.getter = true; | 3192 getter.getter = true; |
3193 _currentHolder.addAccessor(getter); | 3193 _currentHolder.addAccessor(getter); |
3194 variable.getter = getter; | 3194 variable.getter = getter; |
3195 if (!isFinal) { | 3195 if (!isConst && !isFinal) { |
3196 PropertyAccessorElementImpl setter = | 3196 PropertyAccessorElementImpl setter = |
3197 new PropertyAccessorElementImpl.forVariable(variable); | 3197 new PropertyAccessorElementImpl.forVariable(variable); |
3198 setter.setter = true; | 3198 setter.setter = true; |
3199 ParameterElementImpl parameter = | 3199 ParameterElementImpl parameter = |
3200 new ParameterElementImpl("_${variable.name}", variable.nameOffset); | 3200 new ParameterElementImpl("_${variable.name}", variable.nameOffset); |
3201 parameter.synthetic = true; | 3201 parameter.synthetic = true; |
3202 parameter.parameterKind = ParameterKind.REQUIRED; | 3202 parameter.parameterKind = ParameterKind.REQUIRED; |
3203 setter.parameters = <ParameterElement>[parameter]; | 3203 setter.parameters = <ParameterElement>[parameter]; |
3204 _currentHolder.addAccessor(setter); | 3204 _currentHolder.addAccessor(setter); |
3205 variable.setter = setter; | 3205 variable.setter = setter; |
(...skipping 12468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15674 * library. | 15674 * library. |
15675 */ | 15675 */ |
15676 final HashSet<String> members = new HashSet<String>(); | 15676 final HashSet<String> members = new HashSet<String>(); |
15677 | 15677 |
15678 /** | 15678 /** |
15679 * Names of resolved or unresolved class members that are read in the | 15679 * Names of resolved or unresolved class members that are read in the |
15680 * library. | 15680 * library. |
15681 */ | 15681 */ |
15682 final HashSet<String> readMembers = new HashSet<String>(); | 15682 final HashSet<String> readMembers = new HashSet<String>(); |
15683 } | 15683 } |
OLD | NEW |