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

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

Issue 2637543002: Introduce the interface NamedType as a replacement for TypeName (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 | « no previous file | no next file » | 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 ba966a3287fa38e2443e4c7a89b671ca68ebed5c..cb171d8457e8d17c097c689b77e31db7510f5a97 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -5052,6 +5052,63 @@ abstract class NamedExpression extends Expression {
}
/**
+ * A named type, which can optionally include type arguments.
+ *
+ * namedType ::=
+ * [Identifier] typeArguments?
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class NamedType extends TypeAnnotation {
+ /**
+ * Return `true` if this type is a deferred type.
+ *
+ * 15.1 Static Types: A type <i>T</i> is deferred iff it is of the form
+ * </i>p.T</i> where <i>p</i> is a deferred prefix.
+ */
+ bool get isDeferred;
+
+ /**
+ * Return the name of the type.
+ */
+ Identifier get name;
+
+ /**
+ * Set the name of the type to the given [identifier].
+ */
+ 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);
+
+ /**
+ * Set the type being named to the given [type].
+ */
+ void set type(DartType type);
+
+ /**
+ * Return the type arguments associated with the type, or `null` if there are
+ * no type arguments.
+ */
+ TypeArgumentList get typeArguments;
+
+ /**
+ * Set the type arguments associated with the type to the given
+ * [typeArguments].
+ */
+ void set typeArguments(TypeArgumentList typeArguments);
+}
+
+/**
* A node that represents a directive that impacts the namespace of a library.
*
* directive ::=
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698