| 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 5506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5517 | 5517 |
| 5518 /** | 5518 /** |
| 5519 * Return `true` if this label is associated with a `switch` statement. | 5519 * Return `true` if this label is associated with a `switch` statement. |
| 5520 */ | 5520 */ |
| 5521 bool get isOnSwitchStatement => _onSwitchStatement; | 5521 bool get isOnSwitchStatement => _onSwitchStatement; |
| 5522 | 5522 |
| 5523 @override | 5523 @override |
| 5524 ElementKind get kind => ElementKind.LABEL; | 5524 ElementKind get kind => ElementKind.LABEL; |
| 5525 | 5525 |
| 5526 @override | 5526 @override |
| 5527 T accept<T>(ElementVisitor<T> visitor) => throw new UnimplementedError(); | 5527 T accept<T>(ElementVisitor<T> visitor) => visitor.visitLabelElement(this); |
| 5528 } | 5528 } |
| 5529 | 5529 |
| 5530 /** | 5530 /** |
| 5531 * A concrete implementation of a [LibraryElement]. | 5531 * A concrete implementation of a [LibraryElement]. |
| 5532 */ | 5532 */ |
| 5533 class LibraryElementImpl extends ElementImpl implements LibraryElement { | 5533 class LibraryElementImpl extends ElementImpl implements LibraryElement { |
| 5534 /** | 5534 /** |
| 5535 * The analysis context in which this library is defined. | 5535 * The analysis context in which this library is defined. |
| 5536 */ | 5536 */ |
| 5537 final AnalysisContext context; | 5537 final AnalysisContext context; |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6319 return new SourceRange( | 6319 return new SourceRange( |
| 6320 _unlinkedVariable.visibleOffset, _unlinkedVariable.visibleLength); | 6320 _unlinkedVariable.visibleOffset, _unlinkedVariable.visibleLength); |
| 6321 } | 6321 } |
| 6322 if (_visibleRangeLength < 0) { | 6322 if (_visibleRangeLength < 0) { |
| 6323 return null; | 6323 return null; |
| 6324 } | 6324 } |
| 6325 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); | 6325 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); |
| 6326 } | 6326 } |
| 6327 | 6327 |
| 6328 @override | 6328 @override |
| 6329 T accept<T>(ElementVisitor<T> visitor) => throw new UnimplementedError(); | 6329 T accept<T>(ElementVisitor<T> visitor) => |
| 6330 visitor.visitLocalVariableElement(this); |
| 6330 | 6331 |
| 6331 @override | 6332 @override |
| 6332 void appendTo(StringBuffer buffer) { | 6333 void appendTo(StringBuffer buffer) { |
| 6333 buffer.write(type); | 6334 buffer.write(type); |
| 6334 buffer.write(" "); | 6335 buffer.write(" "); |
| 6335 buffer.write(displayName); | 6336 buffer.write(displayName); |
| 6336 } | 6337 } |
| 6337 | 6338 |
| 6338 @override | 6339 @override |
| 6339 Declaration computeNode() => getNodeMatching( | 6340 Declaration computeNode() => getNodeMatching( |
| (...skipping 2537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8877 | 8878 |
| 8878 @override | 8879 @override |
| 8879 DartObject computeConstantValue() => null; | 8880 DartObject computeConstantValue() => null; |
| 8880 | 8881 |
| 8881 @override | 8882 @override |
| 8882 void visitChildren(ElementVisitor visitor) { | 8883 void visitChildren(ElementVisitor visitor) { |
| 8883 super.visitChildren(visitor); | 8884 super.visitChildren(visitor); |
| 8884 _initializer?.accept(visitor); | 8885 _initializer?.accept(visitor); |
| 8885 } | 8886 } |
| 8886 } | 8887 } |
| OLD | NEW |