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

Unified Diff: pkg/analyzer/lib/dart/ast/ast.dart

Issue 2357803002: Add SyntacticEntity, an interface shared by AstNode and Token. (Closed)
Patch Set: Remove redundant comment Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/dart/ast/token.dart » ('j') | pkg/analyzer/lib/dart/ast/token.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/dart/ast/ast.dart
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index da182240d6f00a10da4f22f622ee380cd5dc2ec0..1e6b12ebee9d8a2d765a668057648073ffabd980 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -510,7 +510,7 @@ abstract class AssignmentExpression extends Expression {
*
* Clients may not extend, implement or mix-in this class.
*/
-abstract class AstNode {
+abstract class AstNode implements SyntacticEntity {
/**
* An empty list of AST nodes.
*/
@@ -536,7 +536,7 @@ abstract class AstNode {
* (either AST nodes or tokens) that make up the contents of this node,
* including doc comments but excluding other comments.
*/
- Iterable /* AstNode | Token */ get childEntities;
+ Iterable<SyntacticEntity> get childEntities;
/**
* Return the offset of the character immediately following the last character
@@ -546,6 +546,7 @@ abstract class AstNode {
* equivalent to the node's offset (because the length is zero (0) by
* definition).
*/
+ @override
int get end;
/**
@@ -560,15 +561,10 @@ abstract class AstNode {
*/
bool get isSynthetic;
- /**
- * Return the number of characters in the node's source range.
- */
+ @override
int get length;
- /**
- * Return the offset from the beginning of the file to the first character in
- * the node's source range.
- */
+ @override
int get offset;
/**
« no previous file with comments | « no previous file | pkg/analyzer/lib/dart/ast/token.dart » ('j') | pkg/analyzer/lib/dart/ast/token.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698