| 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.element.element; | 5 library analyzer.src.dart.element.element; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:math' show min; | 8 import 'dart:math' show min; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2501 * [FieldElement] associated with the parameter. | 2501 * [FieldElement] associated with the parameter. |
| 2502 */ | 2502 */ |
| 2503 class FieldFormalParameterElementImpl extends ParameterElementImpl | 2503 class FieldFormalParameterElementImpl extends ParameterElementImpl |
| 2504 implements FieldFormalParameterElement { | 2504 implements FieldFormalParameterElement { |
| 2505 /** | 2505 /** |
| 2506 * The field associated with this field formal parameter. | 2506 * The field associated with this field formal parameter. |
| 2507 */ | 2507 */ |
| 2508 FieldElement field; | 2508 FieldElement field; |
| 2509 | 2509 |
| 2510 /** | 2510 /** |
| 2511 * Initialize a newly created parameter element to have the given [name] and |
| 2512 * [offset]. |
| 2513 */ |
| 2514 FieldFormalParameterElementImpl.forNameAndOffset(String name, int nameOffset) |
| 2515 : super(name, nameOffset); |
| 2516 |
| 2517 /** |
| 2511 * Initialize a newly created parameter element to have the given [name]. | 2518 * Initialize a newly created parameter element to have the given [name]. |
| 2512 */ | 2519 */ |
| 2513 FieldFormalParameterElementImpl(Identifier name) : super.forNode(name); | 2520 FieldFormalParameterElementImpl(Identifier name) : super.forNode(name); |
| 2514 | 2521 |
| 2515 @override | 2522 @override |
| 2516 bool get isInitializingFormal => true; | 2523 bool get isInitializingFormal => true; |
| 2517 | 2524 |
| 2518 @override | 2525 @override |
| 2519 accept(ElementVisitor visitor) => | 2526 accept(ElementVisitor visitor) => |
| 2520 visitor.visitFieldFormalParameterElement(this); | 2527 visitor.visitFieldFormalParameterElement(this); |
| (...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4588 | 4595 |
| 4589 @override | 4596 @override |
| 4590 void visitElement(Element element) { | 4597 void visitElement(Element element) { |
| 4591 int offset = element.nameOffset; | 4598 int offset = element.nameOffset; |
| 4592 if (offset != -1) { | 4599 if (offset != -1) { |
| 4593 map[offset] = element; | 4600 map[offset] = element; |
| 4594 } | 4601 } |
| 4595 super.visitElement(element); | 4602 super.visitElement(element); |
| 4596 } | 4603 } |
| 4597 } | 4604 } |
| OLD | NEW |