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

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

Issue 2637753003: Ast changes to support the covariant keyword (Closed)
Patch Set: Created 3 years, 11 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 | « pkg/analyzer/lib/dart/ast/ast.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/ast/ast.dart
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 862b16c94ac7d2936423befe87cbb299fa38ecf2..a978f47c1326875ba979cdaae5606c9f119c9923 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -3446,6 +3446,9 @@ class DefaultFormalParameterImpl extends FormalParameterImpl
new ChildEntities()..add(_parameter)..add(separator)..add(_defaultValue);
@override
+ Token get covariantKeyword => null;
+
+ @override
Expression get defaultValue => _defaultValue;
@override
@@ -8102,6 +8105,11 @@ abstract class NormalFormalParameterImpl extends FormalParameterImpl
NodeList<Annotation> _metadata;
/**
+ * The 'covariant' keyword, or `null` if the keyword was not used.
+ */
+ Token covariantKeyword;
+
+ /**
* The name of the parameter being declared.
*/
SimpleIdentifier _identifier;
@@ -8169,6 +8177,9 @@ abstract class NormalFormalParameterImpl extends FormalParameterImpl
} else {
result.addAll(sortedCommentAndAnnotations);
}
+ if (covariantKeyword != null) {
+ result.add(covariantKeyword);
scheglov 2017/01/18 04:29:59 Do we need to update beginToken?
Brian Wilkerson 2017/01/18 17:19:29 Yes. Good catch. I'll have an update out shortly.
+ }
return result;
}
« no previous file with comments | « pkg/analyzer/lib/dart/ast/ast.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698