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

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

Issue 2635113004: Make TypeName a subtype of NamedType (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * Defines the AST model. The AST (Abstract Syntax Tree) model describes the 6 * Defines the AST model. The AST (Abstract Syntax Tree) model describes the
7 * syntactic (as opposed to semantic) structure of Dart code. The semantic 7 * syntactic (as opposed to semantic) structure of Dart code. The semantic
8 * structure of the code is modeled by the 8 * structure of the code is modeled by the
9 * [element model](../element/element.dart). 9 * [element model](../element/element.dart).
10 * 10 *
(...skipping 6597 matching lines...) Expand 10 before | Expand all | Expand 10 after
6608 } 6608 }
6609 6609
6610 /** 6610 /**
6611 * The name of a type, which can optionally include type arguments. 6611 * The name of a type, which can optionally include type arguments.
6612 * 6612 *
6613 * typeName ::= 6613 * typeName ::=
6614 * [Identifier] typeArguments? 6614 * [Identifier] typeArguments?
6615 * 6615 *
6616 * Clients may not extend, implement or mix-in this class. 6616 * Clients may not extend, implement or mix-in this class.
6617 */ 6617 */
6618 abstract class TypeName extends TypeAnnotation { 6618 abstract class TypeName extends NamedType {}
6619 /**
6620 * Return `true` if this type is a deferred type.
6621 *
6622 * 15.1 Static Types: A type <i>T</i> is deferred iff it is of the form
6623 * </i>p.T</i> where <i>p</i> is a deferred prefix.
6624 */
6625 bool get isDeferred;
6626
6627 /**
6628 * Return the name of the type.
6629 */
6630 Identifier get name;
6631
6632 /**
6633 * Set the name of the type to the given [identifier].
6634 */
6635 void set name(Identifier identifier);
6636
6637 /**
6638 * Return the question mark marking this as a nullable type, or `null` if
6639 * the type is non-nullable.
6640 */
6641 Token get question;
6642
6643 /**
6644 * Return the question mark marking this as a nullable type to the given
6645 * [question].
6646 */
6647 void set question(Token question);
6648
6649 /**
6650 * Set the type being named to the given [type].
6651 */
6652 void set type(DartType type);
6653
6654 /**
6655 * Return the type arguments associated with the type, or `null` if there are
6656 * no type arguments.
6657 */
6658 TypeArgumentList get typeArguments;
6659
6660 /**
6661 * Set the type arguments associated with the type to the given
6662 * [typeArguments].
6663 */
6664 void set typeArguments(TypeArgumentList typeArguments);
6665 }
6666 6619
6667 /** 6620 /**
6668 * A type parameter. 6621 * A type parameter.
6669 * 6622 *
6670 * typeParameter ::= 6623 * typeParameter ::=
6671 * [SimpleIdentifier] ('extends' [TypeAnnotation])? 6624 * [SimpleIdentifier] ('extends' [TypeAnnotation])?
6672 * 6625 *
6673 * Clients may not extend, implement or mix-in this class. 6626 * Clients may not extend, implement or mix-in this class.
6674 */ 6627 */
6675 abstract class TypeParameter extends Declaration { 6628 abstract class TypeParameter extends Declaration {
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
7076 /** 7029 /**
7077 * Return the 'yield' keyword. 7030 * Return the 'yield' keyword.
7078 */ 7031 */
7079 Token get yieldKeyword; 7032 Token get yieldKeyword;
7080 7033
7081 /** 7034 /**
7082 * Return the 'yield' keyword to the given [token]. 7035 * Return the 'yield' keyword to the given [token].
7083 */ 7036 */
7084 void set yieldKeyword(Token token); 7037 void set yieldKeyword(Token token);
7085 } 7038 }
OLDNEW
« 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