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 2515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2526 | 2526 |
2527 /** | 2527 /** |
2528 * The element representing the field, variable, or constructor being used as | 2528 * The element representing the field, variable, or constructor being used as |
2529 * an annotation. | 2529 * an annotation. |
2530 */ | 2530 */ |
2531 Element element; | 2531 Element element; |
2532 | 2532 |
2533 /** | 2533 /** |
2534 * The compilation unit in which this annotation appears. | 2534 * The compilation unit in which this annotation appears. |
2535 */ | 2535 */ |
2536 final CompilationUnitElementImpl compilationUnit; | 2536 CompilationUnitElementImpl compilationUnit; |
2537 | 2537 |
2538 /** | 2538 /** |
2539 * The AST of the annotation itself, cloned from the resolved AST for the | 2539 * The AST of the annotation itself, cloned from the resolved AST for the |
2540 * source code. | 2540 * source code. |
2541 */ | 2541 */ |
2542 Annotation annotationAst; | 2542 Annotation annotationAst; |
2543 | 2543 |
2544 /** | 2544 /** |
2545 * The result of evaluating this annotation as a compile-time constant | 2545 * The result of evaluating this annotation as a compile-time constant |
2546 * expression, or `null` if the compilation unit containing the variable has | 2546 * expression, or `null` if the compilation unit containing the variable has |
(...skipping 5938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8485 | 8485 |
8486 @override | 8486 @override |
8487 void visitElement(Element element) { | 8487 void visitElement(Element element) { |
8488 int offset = element.nameOffset; | 8488 int offset = element.nameOffset; |
8489 if (offset != -1) { | 8489 if (offset != -1) { |
8490 map[offset] = element; | 8490 map[offset] = element; |
8491 } | 8491 } |
8492 super.visitElement(element); | 8492 super.visitElement(element); |
8493 } | 8493 } |
8494 } | 8494 } |
OLD | NEW |