Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: pkg/analyzer/lib/dart/element/element.dart

Issue 1665353002: Use ElementAnnotation as the ConstantEvaluationTarget for annotations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.dart.element.element; 5 library analyzer.dart.element.element;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/type.dart'; 8 import 'package:analyzer/dart/element/type.dart';
9 import 'package:analyzer/src/generated/constant.dart' show DartObject; 9 import 'package:analyzer/src/generated/constant.dart' show DartObject;
10 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; 10 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 * is no guarantee of the order in which the children will be visited. 737 * is no guarantee of the order in which the children will be visited.
738 */ 738 */
739 void visitChildren(ElementVisitor visitor); 739 void visitChildren(ElementVisitor visitor);
740 } 740 }
741 741
742 /** 742 /**
743 * A single annotation associated with an element. 743 * A single annotation associated with an element.
744 * 744 *
745 * Clients may not extend, implement or mix-in this class. 745 * Clients may not extend, implement or mix-in this class.
746 */ 746 */
747 abstract class ElementAnnotation { 747 abstract class ElementAnnotation implements ConstantEvaluationTarget {
748 /** 748 /**
749 * An empty list of annotations. 749 * An empty list of annotations.
750 */ 750 */
751 static const List<ElementAnnotation> EMPTY_LIST = const <ElementAnnotation>[]; 751 static const List<ElementAnnotation> EMPTY_LIST = const <ElementAnnotation>[];
752 752
753 /** 753 /**
754 * Return a representation of the value of this annotation. 754 * Return a representation of the value of this annotation.
755 * 755 *
756 * Return `null` if the value of this annotation could not be computed because 756 * Return `null` if the value of this annotation could not be computed because
757 * of errors. 757 * of errors.
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 */ 1901 */
1902 bool get isStatic; 1902 bool get isStatic;
1903 1903
1904 /** 1904 /**
1905 * Return the declared type of this variable, or `null` if the variable did 1905 * Return the declared type of this variable, or `null` if the variable did
1906 * not have a declared type (such as if it was declared using the keyword 1906 * not have a declared type (such as if it was declared using the keyword
1907 * 'var'). 1907 * 'var').
1908 */ 1908 */
1909 DartType get type; 1909 DartType get type;
1910 } 1910 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/status/validator.dart ('k') | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698