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

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

Issue 2342383002: Initial support for the NNBD proposal (Closed)
Patch Set: Addressed comments and added tests 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/src/dart/ast/ast.dart » ('j') | no next file with comments »
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 5132c1ef5cc9f6fca272690a7bd30c53144b304e..3f4722345e563601b12fdb2ddcd09210c8e04ab4 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -4292,9 +4292,10 @@ abstract class FunctionTypedFormalParameter extends NormalFormalParameter {
TypeName returnType,
SimpleIdentifier identifier,
TypeParameterList typeParameters,
- FormalParameterList parameters) =>
+ FormalParameterList parameters,
+ {Token question: null}) =>
new FunctionTypedFormalParameterImpl(comment, metadata, returnType,
- identifier, typeParameters, parameters);
+ identifier, typeParameters, parameters, question);
/**
* Return the parameters of the function-typed parameter.
@@ -4308,6 +4309,18 @@ abstract class FunctionTypedFormalParameter extends NormalFormalParameter {
void set parameters(FormalParameterList parameters);
/**
+ * Return the question mark marking this as a nullable type, or `null` if
+ * the type is non-nullable.
+ */
+ Token get question;
+
+ /**
+ * Return the question mark marking this as a nullable type to the given
+ * [question].
+ */
+ void set question(Token question);
+
+ /**
* Return the return type of the function, or `null` if the function does not
* have a return type.
*/
@@ -7724,8 +7737,9 @@ abstract class TypeName extends AstNode {
* Initialize a newly created type name. The [typeArguments] can be `null` if
* there are no type arguments.
*/
- factory TypeName(Identifier name, TypeArgumentList typeArguments) =>
- new TypeNameImpl(name, typeArguments);
+ factory TypeName(Identifier name, TypeArgumentList typeArguments,
+ {Token question: null}) =>
+ new TypeNameImpl(name, typeArguments, question);
/**
* Return `true` if this type is a deferred type.
@@ -7746,6 +7760,18 @@ abstract class TypeName extends AstNode {
void set name(Identifier identifier);
/**
+ * Return the question mark marking this as a nullable type, or `null` if
+ * the type is non-nullable.
+ */
+ Token get question;
+
+ /**
+ * Return the question mark marking this as a nullable type to the given
+ * [question].
+ */
+ void set question(Token question);
+
+ /**
* Return the type being named, or `null` if the AST structure has not been
* resolved.
*/
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698