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

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

Issue 1939853002: Remove cast from AstNodeImpl._becomeParentOf (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 * 118 *
119 * Clients may not extend, implement or mix-in this class. 119 * Clients may not extend, implement or mix-in this class.
120 */ 120 */
121 abstract class Annotation extends AstNode { 121 abstract class Annotation extends AstNode {
122 /** 122 /**
123 * Initialize a newly created annotation. Both the [period] and the 123 * Initialize a newly created annotation. Both the [period] and the
124 * [constructorName] can be `null` if the annotation is not referencing a 124 * [constructorName] can be `null` if the annotation is not referencing a
125 * named constructor. The [arguments] can be `null` if the annotation is not 125 * named constructor. The [arguments] can be `null` if the annotation is not
126 * referencing a constructor. 126 * referencing a constructor.
127 */ 127 */
128 factory Annotation( 128 factory Annotation(Token atSign, Identifier name, Token period,
129 Token atSign, 129 SimpleIdentifier constructorName, ArgumentList arguments) =>
130 Identifier name, 130 new AnnotationImpl(atSign, name, period, constructorName, arguments);
131 Token period,
132 SimpleIdentifier constructorName,
133 ArgumentList arguments) = AnnotationImpl;
134 131
135 /** 132 /**
136 * Return the arguments to the constructor being invoked, or `null` if this 133 * Return the arguments to the constructor being invoked, or `null` if this
137 * annotation is not the invocation of a constructor. 134 * annotation is not the invocation of a constructor.
138 */ 135 */
139 ArgumentList get arguments; 136 ArgumentList get arguments;
140 137
141 /** 138 /**
142 * Set the arguments to the constructor being invoked to the given [arguments] . 139 * Set the arguments to the constructor being invoked to the given [arguments] .
143 */ 140 */
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 * 278 *
282 * asExpression ::= 279 * asExpression ::=
283 * [Expression] 'as' [TypeName] 280 * [Expression] 'as' [TypeName]
284 * 281 *
285 * Clients may not extend, implement or mix-in this class. 282 * Clients may not extend, implement or mix-in this class.
286 */ 283 */
287 abstract class AsExpression extends Expression { 284 abstract class AsExpression extends Expression {
288 /** 285 /**
289 * Initialize a newly created as expression. 286 * Initialize a newly created as expression.
290 */ 287 */
291 factory AsExpression(Expression expression, Token asOperator, TypeName type) = 288 factory AsExpression(
292 AsExpressionImpl; 289 Expression expression, Token asOperator, TypeName type) =>
290 new AsExpressionImpl(expression, asOperator, type);
293 291
294 /** 292 /**
295 * Return the 'as' operator. 293 * Return the 'as' operator.
296 */ 294 */
297 Token get asOperator; 295 Token get asOperator;
298 296
299 /** 297 /**
300 * Set the 'as' operator to the given [token]. 298 * Set the 'as' operator to the given [token].
301 */ 299 */
302 void set asOperator(Token token); 300 void set asOperator(Token token);
(...skipping 27 matching lines...) Expand all
330 * 'assert' '(' [Expression] ')' ';' 328 * 'assert' '(' [Expression] ')' ';'
331 * 329 *
332 * Clients may not extend, implement or mix-in this class. 330 * Clients may not extend, implement or mix-in this class.
333 */ 331 */
334 abstract class AssertStatement extends Statement { 332 abstract class AssertStatement extends Statement {
335 /** 333 /**
336 * Initialize a newly created assert statement. The [comma] and [message] can 334 * Initialize a newly created assert statement. The [comma] and [message] can
337 * be `null` if there is no message. 335 * be `null` if there is no message.
338 */ 336 */
339 factory AssertStatement( 337 factory AssertStatement(
340 Token assertKeyword, 338 Token assertKeyword,
341 Token leftParenthesis, 339 Token leftParenthesis,
342 Expression condition, 340 Expression condition,
343 Token comma, 341 Token comma,
344 Expression message, 342 Expression message,
345 Token rightParenthesis, 343 Token rightParenthesis,
346 Token semicolon) = AssertStatementImpl; 344 Token semicolon) =>
345 new AssertStatementImpl(assertKeyword, leftParenthesis, condition, comma,
346 message, rightParenthesis, semicolon);
347 347
348 /** 348 /**
349 * Return the token representing the 'assert' keyword. 349 * Return the token representing the 'assert' keyword.
350 */ 350 */
351 Token get assertKeyword; 351 Token get assertKeyword;
352 352
353 /** 353 /**
354 * Set the token representing the 'assert' keyword to the given [token]. 354 * Set the token representing the 'assert' keyword to the given [token].
355 */ 355 */
356 void set assertKeyword(Token token); 356 void set assertKeyword(Token token);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 * assignmentExpression ::= 426 * assignmentExpression ::=
427 * [Expression] operator [Expression] 427 * [Expression] operator [Expression]
428 * 428 *
429 * Clients may not extend, implement or mix-in this class. 429 * Clients may not extend, implement or mix-in this class.
430 */ 430 */
431 abstract class AssignmentExpression extends Expression { 431 abstract class AssignmentExpression extends Expression {
432 /** 432 /**
433 * Initialize a newly created assignment expression. 433 * Initialize a newly created assignment expression.
434 */ 434 */
435 factory AssignmentExpression( 435 factory AssignmentExpression(
436 Expression leftHandSide, Token operator, Expression rightHandSide) = 436 Expression leftHandSide, Token operator, Expression rightHandSide) =>
437 AssignmentExpressionImpl; 437 new AssignmentExpressionImpl(leftHandSide, operator, rightHandSide);
438 438
439 /** 439 /**
440 * Return the best element available for this operator. If resolution was able 440 * Return the best element available for this operator. If resolution was able
441 * to find a better element based on type propagation, that element will be 441 * to find a better element based on type propagation, that element will be
442 * returned. Otherwise, the element found using the result of static analysis 442 * returned. Otherwise, the element found using the result of static analysis
443 * will be returned. If resolution has not been performed, then `null` will be 443 * will be returned. If resolution has not been performed, then `null` will be
444 * returned. 444 * returned.
445 */ 445 */
446 MethodElement get bestElement; 446 MethodElement get bestElement;
447 447
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 * 855 *
856 * awaitExpression ::= 856 * awaitExpression ::=
857 * 'await' [Expression] 857 * 'await' [Expression]
858 * 858 *
859 * Clients may not extend, implement or mix-in this class. 859 * Clients may not extend, implement or mix-in this class.
860 */ 860 */
861 abstract class AwaitExpression extends Expression { 861 abstract class AwaitExpression extends Expression {
862 /** 862 /**
863 * Initialize a newly created await expression. 863 * Initialize a newly created await expression.
864 */ 864 */
865 factory AwaitExpression(Token awaitKeyword, Expression expression) = 865 factory AwaitExpression(Token awaitKeyword, Expression expression) =>
866 AwaitExpressionImpl; 866 new AwaitExpressionImpl(awaitKeyword, expression);
867 867
868 /** 868 /**
869 * Return the 'await' keyword. 869 * Return the 'await' keyword.
870 */ 870 */
871 Token get awaitKeyword; 871 Token get awaitKeyword;
872 872
873 /** 873 /**
874 * Set the 'await' keyword to the given [token]. 874 * Set the 'await' keyword to the given [token].
875 */ 875 */
876 void set awaitKeyword(Token token); 876 void set awaitKeyword(Token token);
(...skipping 15 matching lines...) Expand all
892 * binaryExpression ::= 892 * binaryExpression ::=
893 * [Expression] [Token] [Expression] 893 * [Expression] [Token] [Expression]
894 * 894 *
895 * Clients may not extend, implement or mix-in this class. 895 * Clients may not extend, implement or mix-in this class.
896 */ 896 */
897 abstract class BinaryExpression extends Expression { 897 abstract class BinaryExpression extends Expression {
898 /** 898 /**
899 * Initialize a newly created binary expression. 899 * Initialize a newly created binary expression.
900 */ 900 */
901 factory BinaryExpression( 901 factory BinaryExpression(
902 Expression leftOperand, Token operator, Expression rightOperand) = 902 Expression leftOperand, Token operator, Expression rightOperand) =>
903 BinaryExpressionImpl; 903 new BinaryExpressionImpl(leftOperand, operator, rightOperand);
904 904
905 /** 905 /**
906 * Return the best element available for this operator. If resolution was able 906 * Return the best element available for this operator. If resolution was able
907 * to find a better element based on type propagation, that element will be 907 * to find a better element based on type propagation, that element will be
908 * returned. Otherwise, the element found using the result of static analysis 908 * returned. Otherwise, the element found using the result of static analysis
909 * will be returned. If resolution has not been performed, then `null` will be 909 * will be returned. If resolution has not been performed, then `null` will be
910 * returned. 910 * returned.
911 */ 911 */
912 MethodElement get bestElement; 912 MethodElement get bestElement;
913 913
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 * block ::= 978 * block ::=
979 * '{' statement* '}' 979 * '{' statement* '}'
980 * 980 *
981 * Clients may not extend, implement or mix-in this class. 981 * Clients may not extend, implement or mix-in this class.
982 */ 982 */
983 abstract class Block extends Statement { 983 abstract class Block extends Statement {
984 /** 984 /**
985 * Initialize a newly created block of code. 985 * Initialize a newly created block of code.
986 */ 986 */
987 factory Block( 987 factory Block(
988 Token leftBracket, List<Statement> statements, Token rightBracket) = 988 Token leftBracket, List<Statement> statements, Token rightBracket) =>
989 BlockImpl; 989 new BlockImpl(leftBracket, statements, rightBracket);
990 990
991 /** 991 /**
992 * Return the left curly bracket. 992 * Return the left curly bracket.
993 */ 993 */
994 Token get leftBracket; 994 Token get leftBracket;
995 995
996 /** 996 /**
997 * Set the left curly bracket to the given [token]. 997 * Set the left curly bracket to the given [token].
998 */ 998 */
999 void set leftBracket(Token token); 999 void set leftBracket(Token token);
(...skipping 22 matching lines...) Expand all
1022 * 1022 *
1023 * Clients may not extend, implement or mix-in this class. 1023 * Clients may not extend, implement or mix-in this class.
1024 */ 1024 */
1025 abstract class BlockFunctionBody extends FunctionBody { 1025 abstract class BlockFunctionBody extends FunctionBody {
1026 /** 1026 /**
1027 * Initialize a newly created function body consisting of a block of 1027 * Initialize a newly created function body consisting of a block of
1028 * statements. The [keyword] can be `null` if there is no keyword specified 1028 * statements. The [keyword] can be `null` if there is no keyword specified
1029 * for the block. The [star] can be `null` if there is no star following the 1029 * for the block. The [star] can be `null` if there is no star following the
1030 * keyword (and must be `null` if there is no keyword). 1030 * keyword (and must be `null` if there is no keyword).
1031 */ 1031 */
1032 factory BlockFunctionBody(Token keyword, Token star, Block block) = 1032 factory BlockFunctionBody(Token keyword, Token star, Block block) =>
1033 BlockFunctionBodyImpl; 1033 new BlockFunctionBodyImpl(keyword, star, block);
1034 1034
1035 /** 1035 /**
1036 * Return the block representing the body of the function. 1036 * Return the block representing the body of the function.
1037 */ 1037 */
1038 Block get block; 1038 Block get block;
1039 1039
1040 /** 1040 /**
1041 * Set the block representing the body of the function to the given [block]. 1041 * Set the block representing the body of the function to the given [block].
1042 */ 1042 */
1043 void set block(Block block); 1043 void set block(Block block);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 * 'break' [SimpleIdentifier]? ';' 1090 * 'break' [SimpleIdentifier]? ';'
1091 * 1091 *
1092 * Clients may not extend, implement or mix-in this class. 1092 * Clients may not extend, implement or mix-in this class.
1093 */ 1093 */
1094 abstract class BreakStatement extends Statement { 1094 abstract class BreakStatement extends Statement {
1095 /** 1095 /**
1096 * Initialize a newly created break statement. The [label] can be `null` if 1096 * Initialize a newly created break statement. The [label] can be `null` if
1097 * there is no label associated with the statement. 1097 * there is no label associated with the statement.
1098 */ 1098 */
1099 factory BreakStatement( 1099 factory BreakStatement(
1100 Token breakKeyword, SimpleIdentifier label, Token semicolon) = 1100 Token breakKeyword, SimpleIdentifier label, Token semicolon) =>
1101 BreakStatementImpl; 1101 new BreakStatementImpl(breakKeyword, label, semicolon);
1102 1102
1103 /** 1103 /**
1104 * Return the token representing the 'break' keyword. 1104 * Return the token representing the 'break' keyword.
1105 */ 1105 */
1106 Token get breakKeyword; 1106 Token get breakKeyword;
1107 1107
1108 /** 1108 /**
1109 * Set the token representing the 'break' keyword to the given [token]. 1109 * Set the token representing the 'break' keyword to the given [token].
1110 */ 1110 */
1111 void set breakKeyword(Token token); 1111 void set breakKeyword(Token token);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 * | identifier 1166 * | identifier
1167 * 1167 *
1168 * Clients may not extend, implement or mix-in this class. 1168 * Clients may not extend, implement or mix-in this class.
1169 */ 1169 */
1170 abstract class CascadeExpression extends Expression { 1170 abstract class CascadeExpression extends Expression {
1171 /** 1171 /**
1172 * Initialize a newly created cascade expression. The list of 1172 * Initialize a newly created cascade expression. The list of
1173 * [cascadeSections] must contain at least one element. 1173 * [cascadeSections] must contain at least one element.
1174 */ 1174 */
1175 factory CascadeExpression( 1175 factory CascadeExpression(
1176 Expression target, List<Expression> cascadeSections) = 1176 Expression target, List<Expression> cascadeSections) =>
1177 CascadeExpressionImpl; 1177 new CascadeExpressionImpl(target, cascadeSections);
1178 1178
1179 /** 1179 /**
1180 * Return the cascade sections sharing the common target. 1180 * Return the cascade sections sharing the common target.
1181 */ 1181 */
1182 NodeList<Expression> get cascadeSections; 1182 NodeList<Expression> get cascadeSections;
1183 1183
1184 /** 1184 /**
1185 * Return the target of the cascade sections. 1185 * Return the target of the cascade sections.
1186 */ 1186 */
1187 Expression get target; 1187 Expression get target;
(...skipping 17 matching lines...) Expand all
1205 * Clients may not extend, implement or mix-in this class. 1205 * Clients may not extend, implement or mix-in this class.
1206 */ 1206 */
1207 abstract class CatchClause extends AstNode { 1207 abstract class CatchClause extends AstNode {
1208 /** 1208 /**
1209 * Initialize a newly created catch clause. The [onKeyword] and 1209 * Initialize a newly created catch clause. The [onKeyword] and
1210 * [exceptionType] can be `null` if the clause will catch all exceptions. The 1210 * [exceptionType] can be `null` if the clause will catch all exceptions. The
1211 * [comma] and [stackTraceParameter] can be `null` if the stack trace 1211 * [comma] and [stackTraceParameter] can be `null` if the stack trace
1212 * parameter is not defined. 1212 * parameter is not defined.
1213 */ 1213 */
1214 factory CatchClause( 1214 factory CatchClause(
1215 Token onKeyword, 1215 Token onKeyword,
1216 TypeName exceptionType, 1216 TypeName exceptionType,
1217 Token catchKeyword, 1217 Token catchKeyword,
1218 Token leftParenthesis, 1218 Token leftParenthesis,
1219 SimpleIdentifier exceptionParameter, 1219 SimpleIdentifier exceptionParameter,
1220 Token comma, 1220 Token comma,
1221 SimpleIdentifier stackTraceParameter, 1221 SimpleIdentifier stackTraceParameter,
1222 Token rightParenthesis, 1222 Token rightParenthesis,
1223 Block body) = CatchClauseImpl; 1223 Block body) =>
1224 new CatchClauseImpl(
1225 onKeyword,
1226 exceptionType,
1227 catchKeyword,
1228 leftParenthesis,
1229 exceptionParameter,
1230 comma,
1231 stackTraceParameter,
1232 rightParenthesis,
1233 body);
1224 1234
1225 /** 1235 /**
1226 * Return the body of the catch block. 1236 * Return the body of the catch block.
1227 */ 1237 */
1228 Block get body; 1238 Block get body;
1229 1239
1230 /** 1240 /**
1231 * Set the body of the catch block to the given [block]. 1241 * Set the body of the catch block to the given [block].
1232 */ 1242 */
1233 void set body(Block block); 1243 void set body(Block block);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 * Initialize a newly created class declaration. Either or both of the 1349 * Initialize a newly created class declaration. Either or both of the
1340 * [comment] and [metadata] can be `null` if the class does not have the 1350 * [comment] and [metadata] can be `null` if the class does not have the
1341 * corresponding attribute. The [abstractKeyword] can be `null` if the class 1351 * corresponding attribute. The [abstractKeyword] can be `null` if the class
1342 * is not abstract. The [typeParameters] can be `null` if the class does not 1352 * is not abstract. The [typeParameters] can be `null` if the class does not
1343 * have any type parameters. Any or all of the [extendsClause], [withClause], 1353 * have any type parameters. Any or all of the [extendsClause], [withClause],
1344 * and [implementsClause] can be `null` if the class does not have the 1354 * and [implementsClause] can be `null` if the class does not have the
1345 * corresponding clause. The list of [members] can be `null` if the class does 1355 * corresponding clause. The list of [members] can be `null` if the class does
1346 * not have any members. 1356 * not have any members.
1347 */ 1357 */
1348 factory ClassDeclaration( 1358 factory ClassDeclaration(
1349 Comment comment, 1359 Comment comment,
1350 List<Annotation> metadata, 1360 List<Annotation> metadata,
1351 Token abstractKeyword, 1361 Token abstractKeyword,
1352 Token classKeyword, 1362 Token classKeyword,
1353 SimpleIdentifier name, 1363 SimpleIdentifier name,
1354 TypeParameterList typeParameters, 1364 TypeParameterList typeParameters,
1355 ExtendsClause extendsClause, 1365 ExtendsClause extendsClause,
1356 WithClause withClause, 1366 WithClause withClause,
1357 ImplementsClause implementsClause, 1367 ImplementsClause implementsClause,
1358 Token leftBracket, 1368 Token leftBracket,
1359 List<ClassMember> members, 1369 List<ClassMember> members,
1360 Token rightBracket) = ClassDeclarationImpl; 1370 Token rightBracket) =>
1371 new ClassDeclarationImpl(
1372 comment,
1373 metadata,
1374 abstractKeyword,
1375 classKeyword,
1376 name,
1377 typeParameters,
1378 extendsClause,
1379 withClause,
1380 implementsClause,
1381 leftBracket,
1382 members,
1383 rightBracket);
1361 1384
1362 /** 1385 /**
1363 * Return the 'abstract' keyword, or `null` if the keyword was absent. 1386 * Return the 'abstract' keyword, or `null` if the keyword was absent.
1364 */ 1387 */
1365 Token get abstractKeyword; 1388 Token get abstractKeyword;
1366 1389
1367 /** 1390 /**
1368 * Set the 'abstract' keyword to the given [token]. 1391 * Set the 'abstract' keyword to the given [token].
1369 */ 1392 */
1370 void set abstractKeyword(Token token); 1393 void set abstractKeyword(Token token);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 abstract class ClassTypeAlias extends TypeAlias { 1531 abstract class ClassTypeAlias extends TypeAlias {
1509 /** 1532 /**
1510 * Initialize a newly created class type alias. Either or both of the 1533 * Initialize a newly created class type alias. Either or both of the
1511 * [comment] and [metadata] can be `null` if the class type alias does not 1534 * [comment] and [metadata] can be `null` if the class type alias does not
1512 * have the corresponding attribute. The [typeParameters] can be `null` if the 1535 * have the corresponding attribute. The [typeParameters] can be `null` if the
1513 * class does not have any type parameters. The [abstractKeyword] can be 1536 * class does not have any type parameters. The [abstractKeyword] can be
1514 * `null` if the class is not abstract. The [implementsClause] can be `null` 1537 * `null` if the class is not abstract. The [implementsClause] can be `null`
1515 * if the class does not implement any interfaces. 1538 * if the class does not implement any interfaces.
1516 */ 1539 */
1517 factory ClassTypeAlias( 1540 factory ClassTypeAlias(
1518 Comment comment, 1541 Comment comment,
1519 List<Annotation> metadata, 1542 List<Annotation> metadata,
1520 Token keyword, 1543 Token keyword,
1521 SimpleIdentifier name, 1544 SimpleIdentifier name,
1522 TypeParameterList typeParameters, 1545 TypeParameterList typeParameters,
1523 Token equals, 1546 Token equals,
1524 Token abstractKeyword, 1547 Token abstractKeyword,
1525 TypeName superclass, 1548 TypeName superclass,
1526 WithClause withClause, 1549 WithClause withClause,
1527 ImplementsClause implementsClause, 1550 ImplementsClause implementsClause,
1528 Token semicolon) = ClassTypeAliasImpl; 1551 Token semicolon) =>
1552 new ClassTypeAliasImpl(
1553 comment,
1554 metadata,
1555 keyword,
1556 name,
1557 typeParameters,
1558 equals,
1559 abstractKeyword,
1560 superclass,
1561 withClause,
1562 implementsClause,
1563 semicolon);
1529 1564
1530 /** 1565 /**
1531 * Return the token for the 'abstract' keyword, or `null` if this is not 1566 * Return the token for the 'abstract' keyword, or `null` if this is not
1532 * defining an abstract class. 1567 * defining an abstract class.
1533 */ 1568 */
1534 Token get abstractKeyword; 1569 Token get abstractKeyword;
1535 1570
1536 /** 1571 /**
1537 * Set the token for the 'abstract' keyword to the given [token]. 1572 * Set the token for the 'abstract' keyword to the given [token].
1538 */ 1573 */
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 * commentReference ::= 1744 * commentReference ::=
1710 * '[' 'new'? [Identifier] ']' 1745 * '[' 'new'? [Identifier] ']'
1711 * 1746 *
1712 * Clients may not extend, implement or mix-in this class. 1747 * Clients may not extend, implement or mix-in this class.
1713 */ 1748 */
1714 abstract class CommentReference extends AstNode { 1749 abstract class CommentReference extends AstNode {
1715 /** 1750 /**
1716 * Initialize a newly created reference to a Dart element. The [newKeyword] 1751 * Initialize a newly created reference to a Dart element. The [newKeyword]
1717 * can be `null` if the reference is not to a constructor. 1752 * can be `null` if the reference is not to a constructor.
1718 */ 1753 */
1719 factory CommentReference(Token newKeyword, Identifier identifier) = 1754 factory CommentReference(Token newKeyword, Identifier identifier) =>
1720 CommentReferenceImpl; 1755 new CommentReferenceImpl(newKeyword, identifier);
1721 1756
1722 /** 1757 /**
1723 * Return the identifier being referenced. 1758 * Return the identifier being referenced.
1724 */ 1759 */
1725 Identifier get identifier; 1760 Identifier get identifier;
1726 1761
1727 /** 1762 /**
1728 * Set the identifier being referenced to the given [identifier]. 1763 * Set the identifier being referenced to the given [identifier].
1729 */ 1764 */
1730 void set identifier(Identifier identifier); 1765 void set identifier(Identifier identifier);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 */ 1803 */
1769 abstract class CompilationUnit extends AstNode { 1804 abstract class CompilationUnit extends AstNode {
1770 /** 1805 /**
1771 * Initialize a newly created compilation unit to have the given directives 1806 * Initialize a newly created compilation unit to have the given directives
1772 * and declarations. The [scriptTag] can be `null` if there is no script tag 1807 * and declarations. The [scriptTag] can be `null` if there is no script tag
1773 * in the compilation unit. The list of [directives] can be `null` if there 1808 * in the compilation unit. The list of [directives] can be `null` if there
1774 * are no directives in the compilation unit. The list of [declarations] can 1809 * are no directives in the compilation unit. The list of [declarations] can
1775 * be `null` if there are no declarations in the compilation unit. 1810 * be `null` if there are no declarations in the compilation unit.
1776 */ 1811 */
1777 factory CompilationUnit( 1812 factory CompilationUnit(
1778 Token beginToken, 1813 Token beginToken,
1779 ScriptTag scriptTag, 1814 ScriptTag scriptTag,
1780 List<Directive> directives, 1815 List<Directive> directives,
1781 List<CompilationUnitMember> declarations, 1816 List<CompilationUnitMember> declarations,
1782 Token endToken) = CompilationUnitImpl; 1817 Token endToken) =>
1818 new CompilationUnitImpl(
1819 beginToken, scriptTag, directives, declarations, endToken);
1783 1820
1784 /** 1821 /**
1785 * Set the first token included in this node's source range to the given 1822 * Set the first token included in this node's source range to the given
1786 * [token]. 1823 * [token].
1787 */ 1824 */
1788 void set beginToken(Token token); 1825 void set beginToken(Token token);
1789 1826
1790 /** 1827 /**
1791 * Return the declarations contained in this compilation unit. 1828 * Return the declarations contained in this compilation unit.
1792 */ 1829 */
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 * 1902 *
1866 * conditionalExpression ::= 1903 * conditionalExpression ::=
1867 * [Expression] '?' [Expression] ':' [Expression] 1904 * [Expression] '?' [Expression] ':' [Expression]
1868 * 1905 *
1869 * Clients may not extend, implement or mix-in this class. 1906 * Clients may not extend, implement or mix-in this class.
1870 */ 1907 */
1871 abstract class ConditionalExpression extends Expression { 1908 abstract class ConditionalExpression extends Expression {
1872 /** 1909 /**
1873 * Initialize a newly created conditional expression. 1910 * Initialize a newly created conditional expression.
1874 */ 1911 */
1875 factory ConditionalExpression( 1912 factory ConditionalExpression(Expression condition, Token question,
1876 Expression condition, 1913 Expression thenExpression, Token colon, Expression elseExpression) =>
1877 Token question, 1914 new ConditionalExpressionImpl(
1878 Expression thenExpression, 1915 condition, question, thenExpression, colon, elseExpression);
1879 Token colon,
1880 Expression elseExpression) = ConditionalExpressionImpl;
1881 1916
1882 /** 1917 /**
1883 * Return the token used to separate the then expression from the else 1918 * Return the token used to separate the then expression from the else
1884 * expression. 1919 * expression.
1885 */ 1920 */
1886 Token get colon; 1921 Token get colon;
1887 1922
1888 /** 1923 /**
1889 * Set the token used to separate the then expression from the else expression 1924 * Set the token used to separate the then expression from the else expression
1890 * to the given [token]. 1925 * to the given [token].
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 * dottedName ::= 1986 * dottedName ::=
1952 * identifier ('.' identifier)* 1987 * identifier ('.' identifier)*
1953 * 1988 *
1954 * Clients may not extend, implement or mix-in this class. 1989 * Clients may not extend, implement or mix-in this class.
1955 */ 1990 */
1956 abstract class Configuration extends AstNode { 1991 abstract class Configuration extends AstNode {
1957 /** 1992 /**
1958 * Initialize a newly created configuration. 1993 * Initialize a newly created configuration.
1959 */ 1994 */
1960 factory Configuration( 1995 factory Configuration(
1961 Token ifKeyword, 1996 Token ifKeyword,
1962 Token leftParenthesis, 1997 Token leftParenthesis,
1963 DottedName name, 1998 DottedName name,
1964 Token equalToken, 1999 Token equalToken,
1965 StringLiteral value, 2000 StringLiteral value,
1966 Token rightParenthesis, 2001 Token rightParenthesis,
1967 StringLiteral libraryUri) = ConfigurationImpl; 2002 StringLiteral libraryUri) =>
2003 new ConfigurationImpl(ifKeyword, leftParenthesis, name, equalToken, value,
2004 rightParenthesis, libraryUri);
1968 2005
1969 /** 2006 /**
1970 * Return the token for the equal operator, or `null` if the condition does 2007 * Return the token for the equal operator, or `null` if the condition does
1971 * not include an equality test. 2008 * not include an equality test.
1972 */ 2009 */
1973 Token get equalToken; 2010 Token get equalToken;
1974 2011
1975 /** 2012 /**
1976 * Set the token for the equal operator to the given [token]. 2013 * Set the token for the equal operator to the given [token].
1977 */ 2014 */
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
2077 * be `null` if the constructor is not a factory. The [period] and [name] can 2114 * be `null` if the constructor is not a factory. The [period] and [name] can
2078 * both be `null` if the constructor is not a named constructor. The 2115 * both be `null` if the constructor is not a named constructor. The
2079 * [separator] can be `null` if the constructor does not have any initializers 2116 * [separator] can be `null` if the constructor does not have any initializers
2080 * and does not redirect to a different constructor. The list of 2117 * and does not redirect to a different constructor. The list of
2081 * [initializers] can be `null` if the constructor does not have any 2118 * [initializers] can be `null` if the constructor does not have any
2082 * initializers. The [redirectedConstructor] can be `null` if the constructor 2119 * initializers. The [redirectedConstructor] can be `null` if the constructor
2083 * does not redirect to a different constructor. The [body] can be `null` if 2120 * does not redirect to a different constructor. The [body] can be `null` if
2084 * the constructor does not have a body. 2121 * the constructor does not have a body.
2085 */ 2122 */
2086 factory ConstructorDeclaration( 2123 factory ConstructorDeclaration(
2087 Comment comment, 2124 Comment comment,
2088 List<Annotation> metadata, 2125 List<Annotation> metadata,
2089 Token externalKeyword, 2126 Token externalKeyword,
2090 Token constKeyword, 2127 Token constKeyword,
2091 Token factoryKeyword, 2128 Token factoryKeyword,
2092 Identifier returnType, 2129 Identifier returnType,
2093 Token period, 2130 Token period,
2094 SimpleIdentifier name, 2131 SimpleIdentifier name,
2095 FormalParameterList parameters, 2132 FormalParameterList parameters,
2096 Token separator, 2133 Token separator,
2097 List<ConstructorInitializer> initializers, 2134 List<ConstructorInitializer> initializers,
2098 ConstructorName redirectedConstructor, 2135 ConstructorName redirectedConstructor,
2099 FunctionBody body) = ConstructorDeclarationImpl; 2136 FunctionBody body) =>
2137 new ConstructorDeclarationImpl(
2138 comment,
2139 metadata,
2140 externalKeyword,
2141 constKeyword,
2142 factoryKeyword,
2143 returnType,
2144 period,
2145 name,
2146 parameters,
2147 separator,
2148 initializers,
2149 redirectedConstructor,
2150 body);
2100 2151
2101 /** 2152 /**
2102 * Return the body of the constructor, or `null` if the constructor does not 2153 * Return the body of the constructor, or `null` if the constructor does not
2103 * have a body. 2154 * have a body.
2104 */ 2155 */
2105 FunctionBody get body; 2156 FunctionBody get body;
2106 2157
2107 /** 2158 /**
2108 * Set the body of the constructor to the given [functionBody]. 2159 * Set the body of the constructor to the given [functionBody].
2109 */ 2160 */
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 * ('this' '.')? [SimpleIdentifier] '=' [Expression] 2284 * ('this' '.')? [SimpleIdentifier] '=' [Expression]
2234 * 2285 *
2235 * Clients may not extend, implement or mix-in this class. 2286 * Clients may not extend, implement or mix-in this class.
2236 */ 2287 */
2237 abstract class ConstructorFieldInitializer extends ConstructorInitializer { 2288 abstract class ConstructorFieldInitializer extends ConstructorInitializer {
2238 /** 2289 /**
2239 * Initialize a newly created field initializer to initialize the field with 2290 * Initialize a newly created field initializer to initialize the field with
2240 * the given name to the value of the given expression. The [thisKeyword] and 2291 * the given name to the value of the given expression. The [thisKeyword] and
2241 * [period] can be `null` if the 'this' keyword was not specified. 2292 * [period] can be `null` if the 'this' keyword was not specified.
2242 */ 2293 */
2243 factory ConstructorFieldInitializer( 2294 factory ConstructorFieldInitializer(Token thisKeyword, Token period,
2244 Token thisKeyword, 2295 SimpleIdentifier fieldName, Token equals, Expression expression) =>
2245 Token period, 2296 new ConstructorFieldInitializerImpl(
2246 SimpleIdentifier fieldName, 2297 thisKeyword, period, fieldName, equals, expression);
2247 Token equals,
2248 Expression expression) = ConstructorFieldInitializerImpl;
2249 2298
2250 /** 2299 /**
2251 * Return the token for the equal sign between the field name and the 2300 * Return the token for the equal sign between the field name and the
2252 * expression. 2301 * expression.
2253 */ 2302 */
2254 Token get equals; 2303 Token get equals;
2255 2304
2256 /** 2305 /**
2257 * Set the token for the equal sign between the field name and the 2306 * Set the token for the equal sign between the field name and the
2258 * expression to the given [token]. 2307 * expression to the given [token].
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
2322 * constructorName ::= 2371 * constructorName ::=
2323 * type ('.' identifier)? 2372 * type ('.' identifier)?
2324 * 2373 *
2325 * Clients may not extend, implement or mix-in this class. 2374 * Clients may not extend, implement or mix-in this class.
2326 */ 2375 */
2327 abstract class ConstructorName extends AstNode { 2376 abstract class ConstructorName extends AstNode {
2328 /** 2377 /**
2329 * Initialize a newly created constructor name. The [period] and [name] can be 2378 * Initialize a newly created constructor name. The [period] and [name] can be
2330 * `null` if the constructor being named is the unnamed constructor. 2379 * `null` if the constructor being named is the unnamed constructor.
2331 */ 2380 */
2332 factory ConstructorName(TypeName type, Token period, SimpleIdentifier name) = 2381 factory ConstructorName(TypeName type, Token period, SimpleIdentifier name) =>
2333 ConstructorNameImpl; 2382 new ConstructorNameImpl(type, period, name);
2334 2383
2335 /** 2384 /**
2336 * Return the name of the constructor, or `null` if the specified constructor 2385 * Return the name of the constructor, or `null` if the specified constructor
2337 * is the unnamed constructor. 2386 * is the unnamed constructor.
2338 */ 2387 */
2339 SimpleIdentifier get name; 2388 SimpleIdentifier get name;
2340 2389
2341 /** 2390 /**
2342 * Set the name of the constructor to the given [name]. 2391 * Set the name of the constructor to the given [name].
2343 */ 2392 */
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 * 'continue' [SimpleIdentifier]? ';' 2435 * 'continue' [SimpleIdentifier]? ';'
2387 * 2436 *
2388 * Clients may not extend, implement or mix-in this class. 2437 * Clients may not extend, implement or mix-in this class.
2389 */ 2438 */
2390 abstract class ContinueStatement extends Statement { 2439 abstract class ContinueStatement extends Statement {
2391 /** 2440 /**
2392 * Initialize a newly created continue statement. The [label] can be `null` if 2441 * Initialize a newly created continue statement. The [label] can be `null` if
2393 * there is no label associated with the statement. 2442 * there is no label associated with the statement.
2394 */ 2443 */
2395 factory ContinueStatement( 2444 factory ContinueStatement(
2396 Token continueKeyword, SimpleIdentifier label, Token semicolon) = 2445 Token continueKeyword, SimpleIdentifier label, Token semicolon) =>
2397 ContinueStatementImpl; 2446 new ContinueStatementImpl(continueKeyword, label, semicolon);
2398 2447
2399 /** 2448 /**
2400 * Return the token representing the 'continue' keyword. 2449 * Return the token representing the 'continue' keyword.
2401 */ 2450 */
2402 Token get continueKeyword; 2451 Token get continueKeyword;
2403 2452
2404 /** 2453 /**
2405 * Set the token representing the 'continue' keyword to the given [token]. 2454 * Set the token representing the 'continue' keyword to the given [token].
2406 */ 2455 */
2407 void set continueKeyword(Token token); 2456 void set continueKeyword(Token token);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
2467 * 2516 *
2468 * Clients may not extend, implement or mix-in this class. 2517 * Clients may not extend, implement or mix-in this class.
2469 */ 2518 */
2470 abstract class DeclaredIdentifier extends Declaration { 2519 abstract class DeclaredIdentifier extends Declaration {
2471 /** 2520 /**
2472 * Initialize a newly created formal parameter. Either or both of the 2521 * Initialize a newly created formal parameter. Either or both of the
2473 * [comment] and [metadata] can be `null` if the declaration does not have the 2522 * [comment] and [metadata] can be `null` if the declaration does not have the
2474 * corresponding attribute. The [keyword] can be `null` if a type name is 2523 * corresponding attribute. The [keyword] can be `null` if a type name is
2475 * given. The [type] must be `null` if the keyword is 'var'. 2524 * given. The [type] must be `null` if the keyword is 'var'.
2476 */ 2525 */
2477 factory DeclaredIdentifier( 2526 factory DeclaredIdentifier(Comment comment, List<Annotation> metadata,
2478 Comment comment, 2527 Token keyword, TypeName type, SimpleIdentifier identifier) =>
2479 List<Annotation> metadata, 2528 new DeclaredIdentifierImpl(comment, metadata, keyword, type, identifier);
2480 Token keyword,
2481 TypeName type,
2482 SimpleIdentifier identifier) = DeclaredIdentifierImpl;
2483 2529
2484 @override 2530 @override
2485 LocalVariableElement get element; 2531 LocalVariableElement get element;
2486 2532
2487 /** 2533 /**
2488 * Return the name of the variable being declared. 2534 * Return the name of the variable being declared.
2489 */ 2535 */
2490 SimpleIdentifier get identifier; 2536 SimpleIdentifier get identifier;
2491 2537
2492 /** 2538 /**
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
2541 * defaultNamedParameter ::= 2587 * defaultNamedParameter ::=
2542 * [NormalFormalParameter] (':' [Expression])? 2588 * [NormalFormalParameter] (':' [Expression])?
2543 * 2589 *
2544 * Clients may not extend, implement or mix-in this class. 2590 * Clients may not extend, implement or mix-in this class.
2545 */ 2591 */
2546 abstract class DefaultFormalParameter extends FormalParameter { 2592 abstract class DefaultFormalParameter extends FormalParameter {
2547 /** 2593 /**
2548 * Initialize a newly created default formal parameter. The [separator] and 2594 * Initialize a newly created default formal parameter. The [separator] and
2549 * [defaultValue] can be `null` if there is no default value. 2595 * [defaultValue] can be `null` if there is no default value.
2550 */ 2596 */
2551 factory DefaultFormalParameter( 2597 factory DefaultFormalParameter(NormalFormalParameter parameter,
2552 NormalFormalParameter parameter, 2598 ParameterKind kind, Token separator, Expression defaultValue) =>
2553 ParameterKind kind, 2599 new DefaultFormalParameterImpl(parameter, kind, separator, defaultValue);
2554 Token separator,
2555 Expression defaultValue) = DefaultFormalParameterImpl;
2556 2600
2557 /** 2601 /**
2558 * Return the expression computing the default value for the parameter, or 2602 * Return the expression computing the default value for the parameter, or
2559 * `null` if there is no default value. 2603 * `null` if there is no default value.
2560 */ 2604 */
2561 Expression get defaultValue; 2605 Expression get defaultValue;
2562 2606
2563 /** 2607 /**
2564 * Set the expression computing the default value for the parameter to the 2608 * Set the expression computing the default value for the parameter to the
2565 * given [expression]. 2609 * given [expression].
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 * doStatement ::= 2676 * doStatement ::=
2633 * 'do' [Statement] 'while' '(' [Expression] ')' ';' 2677 * 'do' [Statement] 'while' '(' [Expression] ')' ';'
2634 * 2678 *
2635 * Clients may not extend, implement or mix-in this class. 2679 * Clients may not extend, implement or mix-in this class.
2636 */ 2680 */
2637 abstract class DoStatement extends Statement { 2681 abstract class DoStatement extends Statement {
2638 /** 2682 /**
2639 * Initialize a newly created do loop. 2683 * Initialize a newly created do loop.
2640 */ 2684 */
2641 factory DoStatement( 2685 factory DoStatement(
2642 Token doKeyword, 2686 Token doKeyword,
2643 Statement body, 2687 Statement body,
2644 Token whileKeyword, 2688 Token whileKeyword,
2645 Token leftParenthesis, 2689 Token leftParenthesis,
2646 Expression condition, 2690 Expression condition,
2647 Token rightParenthesis, 2691 Token rightParenthesis,
2648 Token semicolon) = DoStatementImpl; 2692 Token semicolon) =>
2693 new DoStatementImpl(doKeyword, body, whileKeyword, leftParenthesis,
2694 condition, rightParenthesis, semicolon);
2649 2695
2650 /** 2696 /**
2651 * Return the body of the loop. 2697 * Return the body of the loop.
2652 */ 2698 */
2653 Statement get body; 2699 Statement get body;
2654 2700
2655 /** 2701 /**
2656 * Set the body of the loop to the given [statement]. 2702 * Set the body of the loop to the given [statement].
2657 */ 2703 */
2658 void set body(Statement statement); 2704 void set body(Statement statement);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2837 * Clients may not extend, implement or mix-in this class. 2883 * Clients may not extend, implement or mix-in this class.
2838 */ 2884 */
2839 abstract class EnumConstantDeclaration extends Declaration { 2885 abstract class EnumConstantDeclaration extends Declaration {
2840 /** 2886 /**
2841 * Initialize a newly created enum constant declaration. Either or both of the 2887 * Initialize a newly created enum constant declaration. Either or both of the
2842 * [comment] and [metadata] can be `null` if the constant does not have the 2888 * [comment] and [metadata] can be `null` if the constant does not have the
2843 * corresponding attribute. (Technically, enum constants cannot have metadata, 2889 * corresponding attribute. (Technically, enum constants cannot have metadata,
2844 * but we allow it for consistency.) 2890 * but we allow it for consistency.)
2845 */ 2891 */
2846 factory EnumConstantDeclaration( 2892 factory EnumConstantDeclaration(
2847 Comment comment, List<Annotation> metadata, SimpleIdentifier name) = 2893 Comment comment, List<Annotation> metadata, SimpleIdentifier name) =>
2848 EnumConstantDeclarationImpl; 2894 new EnumConstantDeclarationImpl(comment, metadata, name);
2849 2895
2850 /** 2896 /**
2851 * Return the name of the constant. 2897 * Return the name of the constant.
2852 */ 2898 */
2853 SimpleIdentifier get name; 2899 SimpleIdentifier get name;
2854 2900
2855 /** 2901 /**
2856 * Set the name of the constant to the given [name]. 2902 * Set the name of the constant to the given [name].
2857 */ 2903 */
2858 void set name(SimpleIdentifier name); 2904 void set name(SimpleIdentifier name);
2859 } 2905 }
2860 2906
2861 /** 2907 /**
2862 * The declaration of an enumeration. 2908 * The declaration of an enumeration.
2863 * 2909 *
2864 * enumType ::= 2910 * enumType ::=
2865 * metadata 'enum' [SimpleIdentifier] '{' [SimpleIdentifier] (',' [Simple Identifier])* (',')? '}' 2911 * metadata 'enum' [SimpleIdentifier] '{' [SimpleIdentifier] (',' [Simple Identifier])* (',')? '}'
2866 * 2912 *
2867 * Clients may not extend, implement or mix-in this class. 2913 * Clients may not extend, implement or mix-in this class.
2868 */ 2914 */
2869 abstract class EnumDeclaration extends NamedCompilationUnitMember { 2915 abstract class EnumDeclaration extends NamedCompilationUnitMember {
2870 /** 2916 /**
2871 * Initialize a newly created enumeration declaration. Either or both of the 2917 * Initialize a newly created enumeration declaration. Either or both of the
2872 * [comment] and [metadata] can be `null` if the declaration does not have the 2918 * [comment] and [metadata] can be `null` if the declaration does not have the
2873 * corresponding attribute. The list of [constants] must contain at least one 2919 * corresponding attribute. The list of [constants] must contain at least one
2874 * value. 2920 * value.
2875 */ 2921 */
2876 factory EnumDeclaration( 2922 factory EnumDeclaration(
2877 Comment comment, 2923 Comment comment,
2878 List<Annotation> metadata, 2924 List<Annotation> metadata,
2879 Token enumKeyword, 2925 Token enumKeyword,
2880 SimpleIdentifier name, 2926 SimpleIdentifier name,
2881 Token leftBracket, 2927 Token leftBracket,
2882 List<EnumConstantDeclaration> constants, 2928 List<EnumConstantDeclaration> constants,
2883 Token rightBracket) = EnumDeclarationImpl; 2929 Token rightBracket) =>
2930 new EnumDeclarationImpl(comment, metadata, enumKeyword, name, leftBracket,
2931 constants, rightBracket);
2884 2932
2885 /** 2933 /**
2886 * Return the enumeration constants being declared. 2934 * Return the enumeration constants being declared.
2887 */ 2935 */
2888 NodeList<EnumConstantDeclaration> get constants; 2936 NodeList<EnumConstantDeclaration> get constants;
2889 2937
2890 @override 2938 @override
2891 ClassElement get element; 2939 ClassElement get element;
2892 2940
2893 /** 2941 /**
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2930 * Clients may not extend, implement or mix-in this class. 2978 * Clients may not extend, implement or mix-in this class.
2931 */ 2979 */
2932 abstract class ExportDirective extends NamespaceDirective { 2980 abstract class ExportDirective extends NamespaceDirective {
2933 /** 2981 /**
2934 * Initialize a newly created export directive. Either or both of the 2982 * Initialize a newly created export directive. Either or both of the
2935 * [comment] and [metadata] can be `null` if the directive does not have the 2983 * [comment] and [metadata] can be `null` if the directive does not have the
2936 * corresponding attribute. The list of [combinators] can be `null` if there 2984 * corresponding attribute. The list of [combinators] can be `null` if there
2937 * are no combinators. 2985 * are no combinators.
2938 */ 2986 */
2939 factory ExportDirective( 2987 factory ExportDirective(
2940 Comment comment, 2988 Comment comment,
2941 List<Annotation> metadata, 2989 List<Annotation> metadata,
2942 Token keyword, 2990 Token keyword,
2943 StringLiteral libraryUri, 2991 StringLiteral libraryUri,
2944 List<Configuration> configurations, 2992 List<Configuration> configurations,
2945 List<Combinator> combinators, 2993 List<Combinator> combinators,
2946 Token semicolon) = ExportDirectiveImpl; 2994 Token semicolon) =>
2995 new ExportDirectiveImpl(comment, metadata, keyword, libraryUri,
2996 configurations, combinators, semicolon);
2947 } 2997 }
2948 2998
2949 /** 2999 /**
2950 * A node that represents an expression. 3000 * A node that represents an expression.
2951 * 3001 *
2952 * expression ::= 3002 * expression ::=
2953 * [AssignmentExpression] 3003 * [AssignmentExpression]
2954 * | [ConditionalExpression] cascadeSection* 3004 * | [ConditionalExpression] cascadeSection*
2955 * | [ThrowExpression] 3005 * | [ThrowExpression]
2956 * 3006 *
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
3055 * 3105 *
3056 * Clients may not extend, implement or mix-in this class. 3106 * Clients may not extend, implement or mix-in this class.
3057 */ 3107 */
3058 abstract class ExpressionFunctionBody extends FunctionBody { 3108 abstract class ExpressionFunctionBody extends FunctionBody {
3059 /** 3109 /**
3060 * Initialize a newly created function body consisting of a block of 3110 * Initialize a newly created function body consisting of a block of
3061 * statements. The [keyword] can be `null` if the function body is not an 3111 * statements. The [keyword] can be `null` if the function body is not an
3062 * async function body. 3112 * async function body.
3063 */ 3113 */
3064 factory ExpressionFunctionBody(Token keyword, Token functionDefinition, 3114 factory ExpressionFunctionBody(Token keyword, Token functionDefinition,
3065 Expression expression, Token semicolon) = ExpressionFunctionBodyImpl; 3115 Expression expression, Token semicolon) =>
3116 new ExpressionFunctionBodyImpl(
3117 keyword, functionDefinition, expression, semicolon);
3066 3118
3067 /** 3119 /**
3068 * Return the expression representing the body of the function. 3120 * Return the expression representing the body of the function.
3069 */ 3121 */
3070 Expression get expression; 3122 Expression get expression;
3071 3123
3072 /** 3124 /**
3073 * Set the expression representing the body of the function to the given 3125 * Set the expression representing the body of the function to the given
3074 * [expression]. 3126 * [expression].
3075 */ 3127 */
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3108 * 3160 *
3109 * expressionStatement ::= 3161 * expressionStatement ::=
3110 * [Expression]? ';' 3162 * [Expression]? ';'
3111 * 3163 *
3112 * Clients may not extend, implement or mix-in this class. 3164 * Clients may not extend, implement or mix-in this class.
3113 */ 3165 */
3114 abstract class ExpressionStatement extends Statement { 3166 abstract class ExpressionStatement extends Statement {
3115 /** 3167 /**
3116 * Initialize a newly created expression statement. 3168 * Initialize a newly created expression statement.
3117 */ 3169 */
3118 factory ExpressionStatement(Expression expression, Token semicolon) = 3170 factory ExpressionStatement(Expression expression, Token semicolon) =>
3119 ExpressionStatementImpl; 3171 new ExpressionStatementImpl(expression, semicolon);
3120 3172
3121 /** 3173 /**
3122 * Return the expression that comprises the statement. 3174 * Return the expression that comprises the statement.
3123 */ 3175 */
3124 Expression get expression; 3176 Expression get expression;
3125 3177
3126 /** 3178 /**
3127 * Set the expression that comprises the statement to the given [expression]. 3179 * Set the expression that comprises the statement to the given [expression].
3128 */ 3180 */
3129 void set expression(Expression expression); 3181 void set expression(Expression expression);
(...skipping 15 matching lines...) Expand all
3145 * 3197 *
3146 * extendsClause ::= 3198 * extendsClause ::=
3147 * 'extends' [TypeName] 3199 * 'extends' [TypeName]
3148 * 3200 *
3149 * Clients may not extend, implement or mix-in this class. 3201 * Clients may not extend, implement or mix-in this class.
3150 */ 3202 */
3151 abstract class ExtendsClause extends AstNode { 3203 abstract class ExtendsClause extends AstNode {
3152 /** 3204 /**
3153 * Initialize a newly created extends clause. 3205 * Initialize a newly created extends clause.
3154 */ 3206 */
3155 factory ExtendsClause(Token extendsKeyword, TypeName superclass) = 3207 factory ExtendsClause(Token extendsKeyword, TypeName superclass) =>
3156 ExtendsClauseImpl; 3208 new ExtendsClauseImpl(extendsKeyword, superclass);
3157 3209
3158 /** 3210 /**
3159 * Return the token representing the 'extends' keyword. 3211 * Return the token representing the 'extends' keyword.
3160 */ 3212 */
3161 Token get extendsKeyword; 3213 Token get extendsKeyword;
3162 3214
3163 /** 3215 /**
3164 * Set the token representing the 'extends' keyword to the given [token]. 3216 * Set the token representing the 'extends' keyword to the given [token].
3165 */ 3217 */
3166 void set extendsKeyword(Token token); 3218 void set extendsKeyword(Token token);
(...skipping 18 matching lines...) Expand all
3185 * Clients may not extend, implement or mix-in this class. 3237 * Clients may not extend, implement or mix-in this class.
3186 */ 3238 */
3187 abstract class FieldDeclaration extends ClassMember { 3239 abstract class FieldDeclaration extends ClassMember {
3188 /** 3240 /**
3189 * Initialize a newly created field declaration. Either or both of the 3241 * Initialize a newly created field declaration. Either or both of the
3190 * [comment] and [metadata] can be `null` if the declaration does not have the 3242 * [comment] and [metadata] can be `null` if the declaration does not have the
3191 * corresponding attribute. The [staticKeyword] can be `null` if the field is 3243 * corresponding attribute. The [staticKeyword] can be `null` if the field is
3192 * not a static field. 3244 * not a static field.
3193 */ 3245 */
3194 factory FieldDeclaration( 3246 factory FieldDeclaration(
3195 Comment comment, 3247 Comment comment,
3196 List<Annotation> metadata, 3248 List<Annotation> metadata,
3197 Token staticKeyword, 3249 Token staticKeyword,
3198 VariableDeclarationList fieldList, 3250 VariableDeclarationList fieldList,
3199 Token semicolon) = FieldDeclarationImpl; 3251 Token semicolon) =>
3252 new FieldDeclarationImpl(
3253 comment, metadata, staticKeyword, fieldList, semicolon);
3200 3254
3201 /** 3255 /**
3202 * Return the fields being declared. 3256 * Return the fields being declared.
3203 */ 3257 */
3204 VariableDeclarationList get fields; 3258 VariableDeclarationList get fields;
3205 3259
3206 /** 3260 /**
3207 * Set the fields being declared to the given list of [fields]. 3261 * Set the fields being declared to the given list of [fields].
3208 */ 3262 */
3209 void set fields(VariableDeclarationList fields); 3263 void set fields(VariableDeclarationList fields);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
3248 /** 3302 /**
3249 * Initialize a newly created formal parameter. Either or both of the 3303 * Initialize a newly created formal parameter. Either or both of the
3250 * [comment] and [metadata] can be `null` if the parameter does not have the 3304 * [comment] and [metadata] can be `null` if the parameter does not have the
3251 * corresponding attribute. The [keyword] can be `null` if there is a type. 3305 * corresponding attribute. The [keyword] can be `null` if there is a type.
3252 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and 3306 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
3253 * [period] can be `null` if the keyword 'this' was not provided. The 3307 * [period] can be `null` if the keyword 'this' was not provided. The
3254 * [parameters] can be `null` if this is not a function-typed field formal 3308 * [parameters] can be `null` if this is not a function-typed field formal
3255 * parameter. 3309 * parameter.
3256 */ 3310 */
3257 factory FieldFormalParameter( 3311 factory FieldFormalParameter(
3258 Comment comment, 3312 Comment comment,
3259 List<Annotation> metadata, 3313 List<Annotation> metadata,
3260 Token keyword, 3314 Token keyword,
3261 TypeName type, 3315 TypeName type,
3262 Token thisKeyword, 3316 Token thisKeyword,
3263 Token period, 3317 Token period,
3264 SimpleIdentifier identifier, 3318 SimpleIdentifier identifier,
3265 TypeParameterList typeParameters, 3319 TypeParameterList typeParameters,
3266 FormalParameterList parameters) = FieldFormalParameterImpl; 3320 FormalParameterList parameters) =>
3321 new FieldFormalParameterImpl(comment, metadata, keyword, type,
3322 thisKeyword, period, identifier, typeParameters, parameters);
3267 3323
3268 /** 3324 /**
3269 * Return the token representing either the 'final', 'const' or 'var' keyword, 3325 * Return the token representing either the 'final', 'const' or 'var' keyword,
3270 * or `null` if no keyword was used. 3326 * or `null` if no keyword was used.
3271 */ 3327 */
3272 Token get keyword; 3328 Token get keyword;
3273 3329
3274 /** 3330 /**
3275 * Set the token representing either the 'final', 'const' or 'var' keyword to 3331 * Set the token representing either the 'final', 'const' or 'var' keyword to
3276 * the given [token]. 3332 * the given [token].
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
3344 * 3400 *
3345 * Clients may not extend, implement or mix-in this class. 3401 * Clients may not extend, implement or mix-in this class.
3346 */ 3402 */
3347 abstract class ForEachStatement extends Statement { 3403 abstract class ForEachStatement extends Statement {
3348 /** 3404 /**
3349 * Initialize a newly created for-each statement whose loop control variable 3405 * Initialize a newly created for-each statement whose loop control variable
3350 * is declared internally (in the for-loop part). The [awaitKeyword] can be 3406 * is declared internally (in the for-loop part). The [awaitKeyword] can be
3351 * `null` if this is not an asynchronous for loop. 3407 * `null` if this is not an asynchronous for loop.
3352 */ 3408 */
3353 factory ForEachStatement.withDeclaration( 3409 factory ForEachStatement.withDeclaration(
3354 Token awaitKeyword, 3410 Token awaitKeyword,
3355 Token forKeyword, 3411 Token forKeyword,
3356 Token leftParenthesis, 3412 Token leftParenthesis,
3357 DeclaredIdentifier loopVariable, 3413 DeclaredIdentifier loopVariable,
3358 Token inKeyword, 3414 Token inKeyword,
3359 Expression iterator, 3415 Expression iterator,
3360 Token rightParenthesis, 3416 Token rightParenthesis,
3361 Statement body) = ForEachStatementImpl.withDeclaration; 3417 Statement body) =>
3418 new ForEachStatementImpl.withDeclaration(
3419 awaitKeyword,
3420 forKeyword,
3421 leftParenthesis,
3422 loopVariable,
3423 inKeyword,
3424 iterator,
3425 rightParenthesis,
3426 body);
3362 3427
3363 /** 3428 /**
3364 * Initialize a newly created for-each statement whose loop control variable 3429 * Initialize a newly created for-each statement whose loop control variable
3365 * is declared outside the for loop. The [awaitKeyword] can be `null` if this 3430 * is declared outside the for loop. The [awaitKeyword] can be `null` if this
3366 * is not an asynchronous for loop. 3431 * is not an asynchronous for loop.
3367 */ 3432 */
3368 factory ForEachStatement.withReference( 3433 factory ForEachStatement.withReference(
3369 Token awaitKeyword, 3434 Token awaitKeyword,
3370 Token forKeyword, 3435 Token forKeyword,
3371 Token leftParenthesis, 3436 Token leftParenthesis,
3372 SimpleIdentifier identifier, 3437 SimpleIdentifier identifier,
3373 Token inKeyword, 3438 Token inKeyword,
3374 Expression iterator, 3439 Expression iterator,
3375 Token rightParenthesis, 3440 Token rightParenthesis,
3376 Statement body) = ForEachStatementImpl.withReference; 3441 Statement body) =>
3442 new ForEachStatementImpl.withReference(
3443 awaitKeyword,
3444 forKeyword,
3445 leftParenthesis,
3446 identifier,
3447 inKeyword,
3448 iterator,
3449 rightParenthesis,
3450 body);
3377 3451
3378 /** 3452 /**
3379 * Return the token representing the 'await' keyword, or `null` if there is no 3453 * Return the token representing the 'await' keyword, or `null` if there is no
3380 * 'await' keyword. 3454 * 'await' keyword.
3381 */ 3455 */
3382 Token get awaitKeyword; 3456 Token get awaitKeyword;
3383 3457
3384 /** 3458 /**
3385 * Set the token representing the 'await' keyword to the given [token]. 3459 * Set the token representing the 'await' keyword to the given [token].
3386 */ 3460 */
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
3630 * Clients may not extend, implement or mix-in this class. 3704 * Clients may not extend, implement or mix-in this class.
3631 */ 3705 */
3632 abstract class ForStatement extends Statement { 3706 abstract class ForStatement extends Statement {
3633 /** 3707 /**
3634 * Initialize a newly created for statement. Either the [variableList] or the 3708 * Initialize a newly created for statement. Either the [variableList] or the
3635 * [initialization] must be `null`. Either the [condition] and the list of 3709 * [initialization] must be `null`. Either the [condition] and the list of
3636 * [updaters] can be `null` if the loop does not have the corresponding 3710 * [updaters] can be `null` if the loop does not have the corresponding
3637 * attribute. 3711 * attribute.
3638 */ 3712 */
3639 factory ForStatement( 3713 factory ForStatement(
3640 Token forKeyword, 3714 Token forKeyword,
3641 Token leftParenthesis, 3715 Token leftParenthesis,
3642 VariableDeclarationList variableList, 3716 VariableDeclarationList variableList,
3643 Expression initialization, 3717 Expression initialization,
3644 Token leftSeparator, 3718 Token leftSeparator,
3645 Expression condition, 3719 Expression condition,
3646 Token rightSeparator, 3720 Token rightSeparator,
3647 List<Expression> updaters, 3721 List<Expression> updaters,
3648 Token rightParenthesis, 3722 Token rightParenthesis,
3649 Statement body) = ForStatementImpl; 3723 Statement body) =>
3724 new ForStatementImpl(
3725 forKeyword,
3726 leftParenthesis,
3727 variableList,
3728 initialization,
3729 leftSeparator,
3730 condition,
3731 rightSeparator,
3732 updaters,
3733 rightParenthesis,
3734 body);
3650 3735
3651 /** 3736 /**
3652 * Return the body of the loop. 3737 * Return the body of the loop.
3653 */ 3738 */
3654 Statement get body; 3739 Statement get body;
3655 3740
3656 /** 3741 /**
3657 * Set the body of the loop to the given [statement]. 3742 * Set the body of the loop to the given [statement].
3658 */ 3743 */
3659 void set body(Statement statement); 3744 void set body(Statement statement);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
3830 abstract class FunctionDeclaration extends NamedCompilationUnitMember { 3915 abstract class FunctionDeclaration extends NamedCompilationUnitMember {
3831 /** 3916 /**
3832 * Initialize a newly created function declaration. Either or both of the 3917 * Initialize a newly created function declaration. Either or both of the
3833 * [comment] and [metadata] can be `null` if the function does not have the 3918 * [comment] and [metadata] can be `null` if the function does not have the
3834 * corresponding attribute. The [externalKeyword] can be `null` if the 3919 * corresponding attribute. The [externalKeyword] can be `null` if the
3835 * function is not an external function. The [returnType] can be `null` if no 3920 * function is not an external function. The [returnType] can be `null` if no
3836 * return type was specified. The [propertyKeyword] can be `null` if the 3921 * return type was specified. The [propertyKeyword] can be `null` if the
3837 * function is neither a getter or a setter. 3922 * function is neither a getter or a setter.
3838 */ 3923 */
3839 factory FunctionDeclaration( 3924 factory FunctionDeclaration(
3840 Comment comment, 3925 Comment comment,
3841 List<Annotation> metadata, 3926 List<Annotation> metadata,
3842 Token externalKeyword, 3927 Token externalKeyword,
3843 TypeName returnType, 3928 TypeName returnType,
3844 Token propertyKeyword, 3929 Token propertyKeyword,
3845 SimpleIdentifier name, 3930 SimpleIdentifier name,
3846 FunctionExpression functionExpression) = FunctionDeclarationImpl; 3931 FunctionExpression functionExpression) =>
3932 new FunctionDeclarationImpl(comment, metadata, externalKeyword,
3933 returnType, propertyKeyword, name, functionExpression);
3847 3934
3848 @override 3935 @override
3849 ExecutableElement get element; 3936 ExecutableElement get element;
3850 3937
3851 /** 3938 /**
3852 * Return the token representing the 'external' keyword, or `null` if this is 3939 * Return the token representing the 'external' keyword, or `null` if this is
3853 * not an external function. 3940 * not an external function.
3854 */ 3941 */
3855 Token get externalKeyword; 3942 Token get externalKeyword;
3856 3943
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
3933 * 4020 *
3934 * functionExpression ::= 4021 * functionExpression ::=
3935 * [TypeParameterList]? [FormalParameterList] [FunctionBody] 4022 * [TypeParameterList]? [FormalParameterList] [FunctionBody]
3936 * 4023 *
3937 * Clients may not extend, implement or mix-in this class. 4024 * Clients may not extend, implement or mix-in this class.
3938 */ 4025 */
3939 abstract class FunctionExpression extends Expression { 4026 abstract class FunctionExpression extends Expression {
3940 /** 4027 /**
3941 * Initialize a newly created function declaration. 4028 * Initialize a newly created function declaration.
3942 */ 4029 */
3943 factory FunctionExpression( 4030 factory FunctionExpression(TypeParameterList typeParameters,
3944 TypeParameterList typeParameters, 4031 FormalParameterList parameters, FunctionBody body) =>
3945 FormalParameterList parameters, 4032 new FunctionExpressionImpl(typeParameters, parameters, body);
3946 FunctionBody body) = FunctionExpressionImpl;
3947 4033
3948 /** 4034 /**
3949 * Return the body of the function, or `null` if this is an external function. 4035 * Return the body of the function, or `null` if this is an external function.
3950 */ 4036 */
3951 FunctionBody get body; 4037 FunctionBody get body;
3952 4038
3953 /** 4039 /**
3954 * Set the body of the function to the given [functionBody]. 4040 * Set the body of the function to the given [functionBody].
3955 */ 4041 */
3956 void set body(FunctionBody functionBody); 4042 void set body(FunctionBody functionBody);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
3998 * 4084 *
3999 * functionExpressionInvocation ::= 4085 * functionExpressionInvocation ::=
4000 * [Expression] [TypeArgumentList]? [ArgumentList] 4086 * [Expression] [TypeArgumentList]? [ArgumentList]
4001 * 4087 *
4002 * Clients may not extend, implement or mix-in this class. 4088 * Clients may not extend, implement or mix-in this class.
4003 */ 4089 */
4004 abstract class FunctionExpressionInvocation extends InvocationExpression { 4090 abstract class FunctionExpressionInvocation extends InvocationExpression {
4005 /** 4091 /**
4006 * Initialize a newly created function expression invocation. 4092 * Initialize a newly created function expression invocation.
4007 */ 4093 */
4008 factory FunctionExpressionInvocation( 4094 factory FunctionExpressionInvocation(Expression function,
4009 Expression function, 4095 TypeArgumentList typeArguments, ArgumentList argumentList) =>
4010 TypeArgumentList typeArguments, 4096 new FunctionExpressionInvocationImpl(
4011 ArgumentList argumentList) = FunctionExpressionInvocationImpl; 4097 function, typeArguments, argumentList);
4012 4098
4013 /** 4099 /**
4014 * Set the list of arguments to the method to the given [argumentList]. 4100 * Set the list of arguments to the method to the given [argumentList].
4015 */ 4101 */
4016 void set argumentList(ArgumentList argumentList); 4102 void set argumentList(ArgumentList argumentList);
4017 4103
4018 /** 4104 /**
4019 * Return the best element available for the function being invoked. If 4105 * Return the best element available for the function being invoked. If
4020 * resolution was able to find a better element based on type propagation, 4106 * resolution was able to find a better element based on type propagation,
4021 * that element will be returned. Otherwise, the element found using the 4107 * that element will be returned. Otherwise, the element found using the
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
4120 */ 4206 */
4121 abstract class FunctionTypeAlias extends TypeAlias { 4207 abstract class FunctionTypeAlias extends TypeAlias {
4122 /** 4208 /**
4123 * Initialize a newly created function type alias. Either or both of the 4209 * Initialize a newly created function type alias. Either or both of the
4124 * [comment] and [metadata] can be `null` if the function does not have the 4210 * [comment] and [metadata] can be `null` if the function does not have the
4125 * corresponding attribute. The [returnType] can be `null` if no return type 4211 * corresponding attribute. The [returnType] can be `null` if no return type
4126 * was specified. The [typeParameters] can be `null` if the function has no 4212 * was specified. The [typeParameters] can be `null` if the function has no
4127 * type parameters. 4213 * type parameters.
4128 */ 4214 */
4129 factory FunctionTypeAlias( 4215 factory FunctionTypeAlias(
4130 Comment comment, 4216 Comment comment,
4131 List<Annotation> metadata, 4217 List<Annotation> metadata,
4132 Token keyword, 4218 Token keyword,
4133 TypeName returnType, 4219 TypeName returnType,
4134 SimpleIdentifier name, 4220 SimpleIdentifier name,
4135 TypeParameterList typeParameters, 4221 TypeParameterList typeParameters,
4136 FormalParameterList parameters, 4222 FormalParameterList parameters,
4137 Token semicolon) = FunctionTypeAliasImpl; 4223 Token semicolon) =>
4224 new FunctionTypeAliasImpl(comment, metadata, keyword, returnType, name,
4225 typeParameters, parameters, semicolon);
4138 4226
4139 /** 4227 /**
4140 * Return the parameters associated with the function type. 4228 * Return the parameters associated with the function type.
4141 */ 4229 */
4142 FormalParameterList get parameters; 4230 FormalParameterList get parameters;
4143 4231
4144 /** 4232 /**
4145 * Set the parameters associated with the function type to the given list of 4233 * Set the parameters associated with the function type to the given list of
4146 * [parameters]. 4234 * [parameters].
4147 */ 4235 */
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
4181 * Clients may not extend, implement or mix-in this class. 4269 * Clients may not extend, implement or mix-in this class.
4182 */ 4270 */
4183 abstract class FunctionTypedFormalParameter extends NormalFormalParameter { 4271 abstract class FunctionTypedFormalParameter extends NormalFormalParameter {
4184 /** 4272 /**
4185 * Initialize a newly created formal parameter. Either or both of the 4273 * Initialize a newly created formal parameter. Either or both of the
4186 * [comment] and [metadata] can be `null` if the parameter does not have the 4274 * [comment] and [metadata] can be `null` if the parameter does not have the
4187 * corresponding attribute. The [returnType] can be `null` if no return type 4275 * corresponding attribute. The [returnType] can be `null` if no return type
4188 * was specified. 4276 * was specified.
4189 */ 4277 */
4190 factory FunctionTypedFormalParameter( 4278 factory FunctionTypedFormalParameter(
4191 Comment comment, 4279 Comment comment,
4192 List<Annotation> metadata, 4280 List<Annotation> metadata,
4193 TypeName returnType, 4281 TypeName returnType,
4194 SimpleIdentifier identifier, 4282 SimpleIdentifier identifier,
4195 TypeParameterList typeParameters, 4283 TypeParameterList typeParameters,
4196 FormalParameterList parameters) = FunctionTypedFormalParameterImpl; 4284 FormalParameterList parameters) =>
4285 new FunctionTypedFormalParameterImpl(comment, metadata, returnType,
4286 identifier, typeParameters, parameters);
4197 4287
4198 /** 4288 /**
4199 * Return the parameters of the function-typed parameter. 4289 * Return the parameters of the function-typed parameter.
4200 */ 4290 */
4201 FormalParameterList get parameters; 4291 FormalParameterList get parameters;
4202 4292
4203 /** 4293 /**
4204 * Set the parameters of the function-typed parameter to the given 4294 * Set the parameters of the function-typed parameter to the given
4205 * [parameters]. 4295 * [parameters].
4206 */ 4296 */
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
4308 * 'if' '(' [Expression] ')' [Statement] ('else' [Statement])? 4398 * 'if' '(' [Expression] ')' [Statement] ('else' [Statement])?
4309 * 4399 *
4310 * Clients may not extend, implement or mix-in this class. 4400 * Clients may not extend, implement or mix-in this class.
4311 */ 4401 */
4312 abstract class IfStatement extends Statement { 4402 abstract class IfStatement extends Statement {
4313 /** 4403 /**
4314 * Initialize a newly created if statement. The [elseKeyword] and 4404 * Initialize a newly created if statement. The [elseKeyword] and
4315 * [elseStatement] can be `null` if there is no else clause. 4405 * [elseStatement] can be `null` if there is no else clause.
4316 */ 4406 */
4317 factory IfStatement( 4407 factory IfStatement(
4318 Token ifKeyword, 4408 Token ifKeyword,
4319 Token leftParenthesis, 4409 Token leftParenthesis,
4320 Expression condition, 4410 Expression condition,
4321 Token rightParenthesis, 4411 Token rightParenthesis,
4322 Statement thenStatement, 4412 Statement thenStatement,
4323 Token elseKeyword, 4413 Token elseKeyword,
4324 Statement elseStatement) = IfStatementImpl; 4414 Statement elseStatement) =>
4415 new IfStatementImpl(ifKeyword, leftParenthesis, condition,
4416 rightParenthesis, thenStatement, elseKeyword, elseStatement);
4325 4417
4326 /** 4418 /**
4327 * Return the condition used to determine which of the statements is executed 4419 * Return the condition used to determine which of the statements is executed
4328 * next. 4420 * next.
4329 */ 4421 */
4330 Expression get condition; 4422 Expression get condition;
4331 4423
4332 /** 4424 /**
4333 * Set the condition used to determine which of the statements is executed 4425 * Set the condition used to determine which of the statements is executed
4334 * next to the given [expression]. 4426 * next to the given [expression].
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
4537 4629
4538 /** 4630 /**
4539 * Initialize a newly created import directive. Either or both of the 4631 * Initialize a newly created import directive. Either or both of the
4540 * [comment] and [metadata] can be `null` if the function does not have the 4632 * [comment] and [metadata] can be `null` if the function does not have the
4541 * corresponding attribute. The [deferredKeyword] can be `null` if the import 4633 * corresponding attribute. The [deferredKeyword] can be `null` if the import
4542 * is not deferred. The [asKeyword] and [prefix] can be `null` if the import 4634 * is not deferred. The [asKeyword] and [prefix] can be `null` if the import
4543 * does not specify a prefix. The list of [combinators] can be `null` if there 4635 * does not specify a prefix. The list of [combinators] can be `null` if there
4544 * are no combinators. 4636 * are no combinators.
4545 */ 4637 */
4546 factory ImportDirective( 4638 factory ImportDirective(
4547 Comment comment, 4639 Comment comment,
4548 List<Annotation> metadata, 4640 List<Annotation> metadata,
4549 Token keyword, 4641 Token keyword,
4550 StringLiteral libraryUri, 4642 StringLiteral libraryUri,
4551 List<Configuration> configurations, 4643 List<Configuration> configurations,
4552 Token deferredKeyword, 4644 Token deferredKeyword,
4553 Token asKeyword, 4645 Token asKeyword,
4554 SimpleIdentifier prefix, 4646 SimpleIdentifier prefix,
4555 List<Combinator> combinators, 4647 List<Combinator> combinators,
4556 Token semicolon) = ImportDirectiveImpl; 4648 Token semicolon) =>
4649 new ImportDirectiveImpl(
4650 comment,
4651 metadata,
4652 keyword,
4653 libraryUri,
4654 configurations,
4655 deferredKeyword,
4656 asKeyword,
4657 prefix,
4658 combinators,
4659 semicolon);
4557 4660
4558 /** 4661 /**
4559 * Return the token representing the 'as' keyword, or `null` if the imported 4662 * Return the token representing the 'as' keyword, or `null` if the imported
4560 * names are not prefixed. 4663 * names are not prefixed.
4561 */ 4664 */
4562 Token get asKeyword; 4665 Token get asKeyword;
4563 4666
4564 /** 4667 /**
4565 * Set the token representing the 'as' keyword to the given [token]. 4668 * Set the token representing the 'as' keyword to the given [token].
4566 */ 4669 */
(...skipping 28 matching lines...) Expand all
4595 * indexExpression ::= 4698 * indexExpression ::=
4596 * [Expression] '[' [Expression] ']' 4699 * [Expression] '[' [Expression] ']'
4597 * 4700 *
4598 * Clients may not extend, implement or mix-in this class. 4701 * Clients may not extend, implement or mix-in this class.
4599 */ 4702 */
4600 abstract class IndexExpression extends Expression { 4703 abstract class IndexExpression extends Expression {
4601 /** 4704 /**
4602 * Initialize a newly created index expression. 4705 * Initialize a newly created index expression.
4603 */ 4706 */
4604 factory IndexExpression.forCascade(Token period, Token leftBracket, 4707 factory IndexExpression.forCascade(Token period, Token leftBracket,
4605 Expression index, Token rightBracket) = IndexExpressionImpl.forCascade; 4708 Expression index, Token rightBracket) =>
4709 new IndexExpressionImpl.forCascade(
4710 period, leftBracket, index, rightBracket);
4606 4711
4607 /** 4712 /**
4608 * Initialize a newly created index expression. 4713 * Initialize a newly created index expression.
4609 */ 4714 */
4610 factory IndexExpression.forTarget(Expression target, Token leftBracket, 4715 factory IndexExpression.forTarget(Expression target, Token leftBracket,
4611 Expression index, Token rightBracket) = IndexExpressionImpl.forTarget; 4716 Expression index, Token rightBracket) =>
4717 new IndexExpressionImpl.forTarget(
4718 target, leftBracket, index, rightBracket);
4612 4719
4613 /** 4720 /**
4614 * Return the auxiliary elements associated with this identifier, or `null` if 4721 * Return the auxiliary elements associated with this identifier, or `null` if
4615 * this identifier is not in both a getter and setter context. The auxiliary 4722 * this identifier is not in both a getter and setter context. The auxiliary
4616 * elements hold the static and propagated elements associated with the getter 4723 * elements hold the static and propagated elements associated with the getter
4617 * context. 4724 * context.
4618 */ 4725 */
4619 // TODO(brianwilkerson) Replace this API. 4726 // TODO(brianwilkerson) Replace this API.
4620 AuxiliaryElements get auxiliaryElements; 4727 AuxiliaryElements get auxiliaryElements;
4621 4728
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
4758 * 4865 *
4759 * newExpression ::= 4866 * newExpression ::=
4760 * ('new' | 'const') [TypeName] ('.' [SimpleIdentifier])? [ArgumentList] 4867 * ('new' | 'const') [TypeName] ('.' [SimpleIdentifier])? [ArgumentList]
4761 * 4868 *
4762 * Clients may not extend, implement or mix-in this class. 4869 * Clients may not extend, implement or mix-in this class.
4763 */ 4870 */
4764 abstract class InstanceCreationExpression extends Expression { 4871 abstract class InstanceCreationExpression extends Expression {
4765 /** 4872 /**
4766 * Initialize a newly created instance creation expression. 4873 * Initialize a newly created instance creation expression.
4767 */ 4874 */
4768 factory InstanceCreationExpression( 4875 factory InstanceCreationExpression(Token keyword,
4769 Token keyword, 4876 ConstructorName constructorName, ArgumentList argumentList) =>
4770 ConstructorName constructorName, 4877 new InstanceCreationExpressionImpl(
4771 ArgumentList argumentList) = InstanceCreationExpressionImpl; 4878 keyword, constructorName, argumentList);
4772 4879
4773 /** 4880 /**
4774 * Return the list of arguments to the constructor. 4881 * Return the list of arguments to the constructor.
4775 */ 4882 */
4776 ArgumentList get argumentList; 4883 ArgumentList get argumentList;
4777 4884
4778 /** 4885 /**
4779 * Set the list of arguments to the constructor to the given [argumentList]. 4886 * Set the list of arguments to the constructor to the given [argumentList].
4780 */ 4887 */
4781 void set argumentList(ArgumentList argumentList); 4888 void set argumentList(ArgumentList argumentList);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
4883 * '$' [SimpleIdentifier] 4990 * '$' [SimpleIdentifier]
4884 * | '$' '{' [Expression] '}' 4991 * | '$' '{' [Expression] '}'
4885 * 4992 *
4886 * Clients may not extend, implement or mix-in this class. 4993 * Clients may not extend, implement or mix-in this class.
4887 */ 4994 */
4888 abstract class InterpolationExpression extends InterpolationElement { 4995 abstract class InterpolationExpression extends InterpolationElement {
4889 /** 4996 /**
4890 * Initialize a newly created interpolation expression. 4997 * Initialize a newly created interpolation expression.
4891 */ 4998 */
4892 factory InterpolationExpression( 4999 factory InterpolationExpression(
4893 Token leftBracket, Expression expression, Token rightBracket) = 5000 Token leftBracket, Expression expression, Token rightBracket) =>
4894 InterpolationExpressionImpl; 5001 new InterpolationExpressionImpl(leftBracket, expression, rightBracket);
4895 5002
4896 /** 5003 /**
4897 * Return the expression to be evaluated for the value to be converted into a 5004 * Return the expression to be evaluated for the value to be converted into a
4898 * string. 5005 * string.
4899 */ 5006 */
4900 Expression get expression; 5007 Expression get expression;
4901 5008
4902 /** 5009 /**
4903 * Set the expression to be evaluated for the value to be converted into a 5010 * Set the expression to be evaluated for the value to be converted into a
4904 * string to the given [expression]. 5011 * string to the given [expression].
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
5052 * [Expression] 'is' '!'? [TypeName] 5159 * [Expression] 'is' '!'? [TypeName]
5053 * 5160 *
5054 * Clients may not extend, implement or mix-in this class. 5161 * Clients may not extend, implement or mix-in this class.
5055 */ 5162 */
5056 abstract class IsExpression extends Expression { 5163 abstract class IsExpression extends Expression {
5057 /** 5164 /**
5058 * Initialize a newly created is expression. The [notOperator] can be `null` 5165 * Initialize a newly created is expression. The [notOperator] can be `null`
5059 * if the sense of the test is not negated. 5166 * if the sense of the test is not negated.
5060 */ 5167 */
5061 factory IsExpression(Expression expression, Token isOperator, 5168 factory IsExpression(Expression expression, Token isOperator,
5062 Token notOperator, TypeName type) = IsExpressionImpl; 5169 Token notOperator, TypeName type) =>
5170 new IsExpressionImpl(expression, isOperator, notOperator, type);
5063 5171
5064 /** 5172 /**
5065 * Return the expression used to compute the value whose type is being tested. 5173 * Return the expression used to compute the value whose type is being tested.
5066 */ 5174 */
5067 Expression get expression; 5175 Expression get expression;
5068 5176
5069 /** 5177 /**
5070 * Set the expression used to compute the value whose type is being tested to 5178 * Set the expression used to compute the value whose type is being tested to
5071 * the given [expression]. 5179 * the given [expression].
5072 */ 5180 */
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
5108 * 5216 *
5109 * label ::= 5217 * label ::=
5110 * [SimpleIdentifier] ':' 5218 * [SimpleIdentifier] ':'
5111 * 5219 *
5112 * Clients may not extend, implement or mix-in this class. 5220 * Clients may not extend, implement or mix-in this class.
5113 */ 5221 */
5114 abstract class Label extends AstNode { 5222 abstract class Label extends AstNode {
5115 /** 5223 /**
5116 * Initialize a newly created label. 5224 * Initialize a newly created label.
5117 */ 5225 */
5118 factory Label(SimpleIdentifier label, Token colon) = LabelImpl; 5226 factory Label(SimpleIdentifier label, Token colon) =>
5227 new LabelImpl(label, colon);
5119 5228
5120 /** 5229 /**
5121 * Return the colon that separates the label from the statement. 5230 * Return the colon that separates the label from the statement.
5122 */ 5231 */
5123 Token get colon; 5232 Token get colon;
5124 5233
5125 /** 5234 /**
5126 * Set the colon that separates the label from the statement to the given 5235 * Set the colon that separates the label from the statement to the given
5127 * [token]. 5236 * [token].
5128 */ 5237 */
(...skipping 15 matching lines...) Expand all
5144 * 5253 *
5145 * labeledStatement ::= 5254 * labeledStatement ::=
5146 * [Label]+ [Statement] 5255 * [Label]+ [Statement]
5147 * 5256 *
5148 * Clients may not extend, implement or mix-in this class. 5257 * Clients may not extend, implement or mix-in this class.
5149 */ 5258 */
5150 abstract class LabeledStatement extends Statement { 5259 abstract class LabeledStatement extends Statement {
5151 /** 5260 /**
5152 * Initialize a newly created labeled statement. 5261 * Initialize a newly created labeled statement.
5153 */ 5262 */
5154 factory LabeledStatement(List<Label> labels, Statement statement) = 5263 factory LabeledStatement(List<Label> labels, Statement statement) =>
5155 LabeledStatementImpl; 5264 new LabeledStatementImpl(labels, statement);
5156 5265
5157 /** 5266 /**
5158 * Return the labels being associated with the statement. 5267 * Return the labels being associated with the statement.
5159 */ 5268 */
5160 NodeList<Label> get labels; 5269 NodeList<Label> get labels;
5161 5270
5162 /** 5271 /**
5163 * Return the statement with which the labels are being associated. 5272 * Return the statement with which the labels are being associated.
5164 */ 5273 */
5165 Statement get statement; 5274 Statement get statement;
(...skipping 12 matching lines...) Expand all
5178 * [Annotation] 'library' [Identifier] ';' 5287 * [Annotation] 'library' [Identifier] ';'
5179 * 5288 *
5180 * Clients may not extend, implement or mix-in this class. 5289 * Clients may not extend, implement or mix-in this class.
5181 */ 5290 */
5182 abstract class LibraryDirective extends Directive { 5291 abstract class LibraryDirective extends Directive {
5183 /** 5292 /**
5184 * Initialize a newly created library directive. Either or both of the 5293 * Initialize a newly created library directive. Either or both of the
5185 * [comment] and [metadata] can be `null` if the directive does not have the 5294 * [comment] and [metadata] can be `null` if the directive does not have the
5186 * corresponding attribute. 5295 * corresponding attribute.
5187 */ 5296 */
5188 factory LibraryDirective( 5297 factory LibraryDirective(Comment comment, List<Annotation> metadata,
5189 Comment comment, 5298 Token libraryKeyword, LibraryIdentifier name, Token semicolon) =>
5190 List<Annotation> metadata, 5299 new LibraryDirectiveImpl(
5191 Token libraryKeyword, 5300 comment, metadata, libraryKeyword, name, semicolon);
5192 LibraryIdentifier name,
5193 Token semicolon) = LibraryDirectiveImpl;
5194 5301
5195 /** 5302 /**
5196 * Return the token representing the 'library' keyword. 5303 * Return the token representing the 'library' keyword.
5197 */ 5304 */
5198 Token get libraryKeyword; 5305 Token get libraryKeyword;
5199 5306
5200 /** 5307 /**
5201 * Set the token representing the 'library' keyword to the given [token]. 5308 * Set the token representing the 'library' keyword to the given [token].
5202 */ 5309 */
5203 void set libraryKeyword(Token token); 5310 void set libraryKeyword(Token token);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
5361 * 5468 *
5362 * mapLiteralEntry ::= 5469 * mapLiteralEntry ::=
5363 * [Expression] ':' [Expression] 5470 * [Expression] ':' [Expression]
5364 * 5471 *
5365 * Clients may not extend, implement or mix-in this class. 5472 * Clients may not extend, implement or mix-in this class.
5366 */ 5473 */
5367 abstract class MapLiteralEntry extends AstNode { 5474 abstract class MapLiteralEntry extends AstNode {
5368 /** 5475 /**
5369 * Initialize a newly created map literal entry. 5476 * Initialize a newly created map literal entry.
5370 */ 5477 */
5371 factory MapLiteralEntry(Expression key, Token separator, Expression value) = 5478 factory MapLiteralEntry(Expression key, Token separator, Expression value) =>
5372 MapLiteralEntryImpl; 5479 new MapLiteralEntryImpl(key, separator, value);
5373 5480
5374 /** 5481 /**
5375 * Return the expression computing the key with which the value will be 5482 * Return the expression computing the key with which the value will be
5376 * associated. 5483 * associated.
5377 */ 5484 */
5378 Expression get key; 5485 Expression get key;
5379 5486
5380 /** 5487 /**
5381 * Set the expression computing the key with which the value will be 5488 * Set the expression computing the key with which the value will be
5382 * associated to the given [string]. 5489 * associated to the given [string].
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
5428 * [comment] and [metadata] can be `null` if the declaration does not have the 5535 * [comment] and [metadata] can be `null` if the declaration does not have the
5429 * corresponding attribute. The [externalKeyword] can be `null` if the method 5536 * corresponding attribute. The [externalKeyword] can be `null` if the method
5430 * is not external. The [modifierKeyword] can be `null` if the method is 5537 * is not external. The [modifierKeyword] can be `null` if the method is
5431 * neither abstract nor static. The [returnType] can be `null` if no return 5538 * neither abstract nor static. The [returnType] can be `null` if no return
5432 * type was specified. The [propertyKeyword] can be `null` if the method is 5539 * type was specified. The [propertyKeyword] can be `null` if the method is
5433 * neither a getter or a setter. The [operatorKeyword] can be `null` if the 5540 * neither a getter or a setter. The [operatorKeyword] can be `null` if the
5434 * method does not implement an operator. The [parameters] must be `null` if 5541 * method does not implement an operator. The [parameters] must be `null` if
5435 * this method declares a getter. 5542 * this method declares a getter.
5436 */ 5543 */
5437 factory MethodDeclaration( 5544 factory MethodDeclaration(
5438 Comment comment, 5545 Comment comment,
5439 List<Annotation> metadata, 5546 List<Annotation> metadata,
5440 Token externalKeyword, 5547 Token externalKeyword,
5441 Token modifierKeyword, 5548 Token modifierKeyword,
5442 TypeName returnType, 5549 TypeName returnType,
5443 Token propertyKeyword, 5550 Token propertyKeyword,
5444 Token operatorKeyword, 5551 Token operatorKeyword,
5445 SimpleIdentifier name, 5552 SimpleIdentifier name,
5446 TypeParameterList typeParameters, 5553 TypeParameterList typeParameters,
5447 FormalParameterList parameters, 5554 FormalParameterList parameters,
5448 FunctionBody body) = MethodDeclarationImpl; 5555 FunctionBody body) =>
5556 new MethodDeclarationImpl(
5557 comment,
5558 metadata,
5559 externalKeyword,
5560 modifierKeyword,
5561 returnType,
5562 propertyKeyword,
5563 operatorKeyword,
5564 name,
5565 typeParameters,
5566 parameters,
5567 body);
5449 5568
5450 /** 5569 /**
5451 * Return the body of the method. 5570 * Return the body of the method.
5452 */ 5571 */
5453 FunctionBody get body; 5572 FunctionBody get body;
5454 5573
5455 /** 5574 /**
5456 * Set the body of the method to the given [functionBody]. 5575 * Set the body of the method to the given [functionBody].
5457 */ 5576 */
5458 void set body(FunctionBody functionBody); 5577 void set body(FunctionBody functionBody);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
5586 * ([Expression] '.')? [SimpleIdentifier] [TypeArgumentList]? [ArgumentLi st] 5705 * ([Expression] '.')? [SimpleIdentifier] [TypeArgumentList]? [ArgumentLi st]
5587 * 5706 *
5588 * Clients may not extend, implement or mix-in this class. 5707 * Clients may not extend, implement or mix-in this class.
5589 */ 5708 */
5590 abstract class MethodInvocation extends InvocationExpression { 5709 abstract class MethodInvocation extends InvocationExpression {
5591 /** 5710 /**
5592 * Initialize a newly created method invocation. The [target] and [operator] 5711 * Initialize a newly created method invocation. The [target] and [operator]
5593 * can be `null` if there is no target. 5712 * can be `null` if there is no target.
5594 */ 5713 */
5595 factory MethodInvocation( 5714 factory MethodInvocation(
5596 Expression target, 5715 Expression target,
5597 Token operator, 5716 Token operator,
5598 SimpleIdentifier methodName, 5717 SimpleIdentifier methodName,
5599 TypeArgumentList typeArguments, 5718 TypeArgumentList typeArguments,
5600 ArgumentList argumentList) = MethodInvocationImpl; 5719 ArgumentList argumentList) =>
5720 new MethodInvocationImpl(
5721 target, operator, methodName, typeArguments, argumentList);
5601 5722
5602 /** 5723 /**
5603 * Set the list of arguments to the method to the given [argumentList]. 5724 * Set the list of arguments to the method to the given [argumentList].
5604 */ 5725 */
5605 void set argumentList(ArgumentList argumentList); 5726 void set argumentList(ArgumentList argumentList);
5606 5727
5607 /** 5728 /**
5608 * Return `true` if this expression is cascaded. If it is, then the target of 5729 * Return `true` if this expression is cascaded. If it is, then the target of
5609 * this expression is not stored locally but is stored in the nearest ancestor 5730 * this expression is not stored locally but is stored in the nearest ancestor
5610 * that is a [CascadeExpression]. 5731 * that is a [CascadeExpression].
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
5727 * 5848 *
5728 * namedExpression ::= 5849 * namedExpression ::=
5729 * [Label] [Expression] 5850 * [Label] [Expression]
5730 * 5851 *
5731 * Clients may not extend, implement or mix-in this class. 5852 * Clients may not extend, implement or mix-in this class.
5732 */ 5853 */
5733 abstract class NamedExpression extends Expression { 5854 abstract class NamedExpression extends Expression {
5734 /** 5855 /**
5735 * Initialize a newly created named expression.. 5856 * Initialize a newly created named expression..
5736 */ 5857 */
5737 factory NamedExpression(Label name, Expression expression) = 5858 factory NamedExpression(Label name, Expression expression) =>
5738 NamedExpressionImpl; 5859 new NamedExpressionImpl(name, expression);
5739 5860
5740 /** 5861 /**
5741 * Return the element representing the parameter being named by this 5862 * Return the element representing the parameter being named by this
5742 * expression, or `null` if the AST structure has not been resolved or if 5863 * expression, or `null` if the AST structure has not been resolved or if
5743 * there is no parameter with the same name as this expression. 5864 * there is no parameter with the same name as this expression.
5744 */ 5865 */
5745 ParameterElement get element; 5866 ParameterElement get element;
5746 5867
5747 /** 5868 /**
5748 * Return the expression with which the name is associated. 5869 * Return the expression with which the name is associated.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
5809 * 5930 *
5810 * nativeClause ::= 5931 * nativeClause ::=
5811 * 'native' [StringLiteral] 5932 * 'native' [StringLiteral]
5812 * 5933 *
5813 * Clients may not extend, implement or mix-in this class. 5934 * Clients may not extend, implement or mix-in this class.
5814 */ 5935 */
5815 abstract class NativeClause extends AstNode { 5936 abstract class NativeClause extends AstNode {
5816 /** 5937 /**
5817 * Initialize a newly created native clause. 5938 * Initialize a newly created native clause.
5818 */ 5939 */
5819 factory NativeClause(Token nativeKeyword, StringLiteral name) = 5940 factory NativeClause(Token nativeKeyword, StringLiteral name) =>
5820 NativeClauseImpl; 5941 new NativeClauseImpl(nativeKeyword, name);
5821 5942
5822 /** 5943 /**
5823 * Return the name of the native object that implements the class. 5944 * Return the name of the native object that implements the class.
5824 */ 5945 */
5825 StringLiteral get name; 5946 StringLiteral get name;
5826 5947
5827 /** 5948 /**
5828 * Set the name of the native object that implements the class to the given 5949 * Set the name of the native object that implements the class to the given
5829 * [name]. 5950 * [name].
5830 */ 5951 */
(...skipping 18 matching lines...) Expand all
5849 * 'native' [SimpleStringLiteral] ';' 5970 * 'native' [SimpleStringLiteral] ';'
5850 * 5971 *
5851 * Clients may not extend, implement or mix-in this class. 5972 * Clients may not extend, implement or mix-in this class.
5852 */ 5973 */
5853 abstract class NativeFunctionBody extends FunctionBody { 5974 abstract class NativeFunctionBody extends FunctionBody {
5854 /** 5975 /**
5855 * Initialize a newly created function body consisting of the 'native' token, 5976 * Initialize a newly created function body consisting of the 'native' token,
5856 * a string literal, and a semicolon. 5977 * a string literal, and a semicolon.
5857 */ 5978 */
5858 factory NativeFunctionBody( 5979 factory NativeFunctionBody(
5859 Token nativeKeyword, StringLiteral stringLiteral, Token semicolon) = 5980 Token nativeKeyword, StringLiteral stringLiteral, Token semicolon) =>
5860 NativeFunctionBodyImpl; 5981 new NativeFunctionBodyImpl(nativeKeyword, stringLiteral, semicolon);
5861 5982
5862 /** 5983 /**
5863 * Return the token representing 'native' that marks the start of the function 5984 * Return the token representing 'native' that marks the start of the function
5864 * body. 5985 * body.
5865 */ 5986 */
5866 Token get nativeKeyword; 5987 Token get nativeKeyword;
5867 5988
5868 /** 5989 /**
5869 * Set the token representing 'native' that marks the start of the function 5990 * Set the token representing 'native' that marks the start of the function
5870 * body to the given [token]. 5991 * body to the given [token].
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
6024 * parenthesizedExpression ::= 6145 * parenthesizedExpression ::=
6025 * '(' [Expression] ')' 6146 * '(' [Expression] ')'
6026 * 6147 *
6027 * Clients may not extend, implement or mix-in this class. 6148 * Clients may not extend, implement or mix-in this class.
6028 */ 6149 */
6029 abstract class ParenthesizedExpression extends Expression { 6150 abstract class ParenthesizedExpression extends Expression {
6030 /** 6151 /**
6031 * Initialize a newly created parenthesized expression. 6152 * Initialize a newly created parenthesized expression.
6032 */ 6153 */
6033 factory ParenthesizedExpression(Token leftParenthesis, Expression expression, 6154 factory ParenthesizedExpression(Token leftParenthesis, Expression expression,
6034 Token rightParenthesis) = ParenthesizedExpressionImpl; 6155 Token rightParenthesis) =>
6156 new ParenthesizedExpressionImpl(
6157 leftParenthesis, expression, rightParenthesis);
6035 6158
6036 /** 6159 /**
6037 * Return the expression within the parentheses. 6160 * Return the expression within the parentheses.
6038 */ 6161 */
6039 Expression get expression; 6162 Expression get expression;
6040 6163
6041 /** 6164 /**
6042 * Set the expression within the parentheses to the given [expression]. 6165 * Set the expression within the parentheses to the given [expression].
6043 */ 6166 */
6044 void set expression(Expression expression); 6167 void set expression(Expression expression);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
6114 * 6237 *
6115 * Clients may not extend, implement or mix-in this class. 6238 * Clients may not extend, implement or mix-in this class.
6116 */ 6239 */
6117 abstract class PartOfDirective extends Directive { 6240 abstract class PartOfDirective extends Directive {
6118 /** 6241 /**
6119 * Initialize a newly created part-of directive. Either or both of the 6242 * Initialize a newly created part-of directive. Either or both of the
6120 * [comment] and [metadata] can be `null` if the directive does not have the 6243 * [comment] and [metadata] can be `null` if the directive does not have the
6121 * corresponding attribute. 6244 * corresponding attribute.
6122 */ 6245 */
6123 factory PartOfDirective( 6246 factory PartOfDirective(
6124 Comment comment, 6247 Comment comment,
6125 List<Annotation> metadata, 6248 List<Annotation> metadata,
6126 Token partKeyword, 6249 Token partKeyword,
6127 Token ofKeyword, 6250 Token ofKeyword,
6128 LibraryIdentifier libraryName, 6251 LibraryIdentifier libraryName,
6129 Token semicolon) = PartOfDirectiveImpl; 6252 Token semicolon) =>
6253 new PartOfDirectiveImpl(
6254 comment, metadata, partKeyword, ofKeyword, libraryName, semicolon);
6130 6255
6131 /** 6256 /**
6132 * Return the name of the library that the containing compilation unit is part 6257 * Return the name of the library that the containing compilation unit is part
6133 * of. 6258 * of.
6134 */ 6259 */
6135 LibraryIdentifier get libraryName; 6260 LibraryIdentifier get libraryName;
6136 6261
6137 /** 6262 /**
6138 * Set the name of the library that the containing compilation unit is part of 6263 * Set the name of the library that the containing compilation unit is part of
6139 * to the given [libraryName]. 6264 * to the given [libraryName].
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
6176 * 6301 *
6177 * postfixExpression ::= 6302 * postfixExpression ::=
6178 * [Expression] [Token] 6303 * [Expression] [Token]
6179 * 6304 *
6180 * Clients may not extend, implement or mix-in this class. 6305 * Clients may not extend, implement or mix-in this class.
6181 */ 6306 */
6182 abstract class PostfixExpression extends Expression { 6307 abstract class PostfixExpression extends Expression {
6183 /** 6308 /**
6184 * Initialize a newly created postfix expression. 6309 * Initialize a newly created postfix expression.
6185 */ 6310 */
6186 factory PostfixExpression(Expression operand, Token operator) = 6311 factory PostfixExpression(Expression operand, Token operator) =>
6187 PostfixExpressionImpl; 6312 new PostfixExpressionImpl(operand, operator);
6188 6313
6189 /** 6314 /**
6190 * Return the best element available for this operator. If resolution was able 6315 * Return the best element available for this operator. If resolution was able
6191 * to find a better element based on type propagation, that element will be 6316 * to find a better element based on type propagation, that element will be
6192 * returned. Otherwise, the element found using the result of static analysis 6317 * returned. Otherwise, the element found using the result of static analysis
6193 * will be returned. If resolution has not been performed, then `null` will be 6318 * will be returned. If resolution has not been performed, then `null` will be
6194 * returned. 6319 * returned.
6195 */ 6320 */
6196 MethodElement get bestElement; 6321 MethodElement get bestElement;
6197 6322
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
6251 * prefixedIdentifier ::= 6376 * prefixedIdentifier ::=
6252 * [SimpleIdentifier] '.' [SimpleIdentifier] 6377 * [SimpleIdentifier] '.' [SimpleIdentifier]
6253 * 6378 *
6254 * Clients may not extend, implement or mix-in this class. 6379 * Clients may not extend, implement or mix-in this class.
6255 */ 6380 */
6256 abstract class PrefixedIdentifier extends Identifier { 6381 abstract class PrefixedIdentifier extends Identifier {
6257 /** 6382 /**
6258 * Initialize a newly created prefixed identifier. 6383 * Initialize a newly created prefixed identifier.
6259 */ 6384 */
6260 factory PrefixedIdentifier( 6385 factory PrefixedIdentifier(
6261 SimpleIdentifier prefix, Token period, SimpleIdentifier identifier) = 6386 SimpleIdentifier prefix, Token period, SimpleIdentifier identifier) =>
6262 PrefixedIdentifierImpl; 6387 new PrefixedIdentifierImpl(prefix, period, identifier);
6263 6388
6264 /** 6389 /**
6265 * Return the identifier being prefixed. 6390 * Return the identifier being prefixed.
6266 */ 6391 */
6267 SimpleIdentifier get identifier; 6392 SimpleIdentifier get identifier;
6268 6393
6269 /** 6394 /**
6270 * Set the identifier being prefixed to the given [identifier]. 6395 * Set the identifier being prefixed to the given [identifier].
6271 */ 6396 */
6272 void set identifier(SimpleIdentifier identifier); 6397 void set identifier(SimpleIdentifier identifier);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
6309 * 6434 *
6310 * prefixExpression ::= 6435 * prefixExpression ::=
6311 * [Token] [Expression] 6436 * [Token] [Expression]
6312 * 6437 *
6313 * Clients may not extend, implement or mix-in this class. 6438 * Clients may not extend, implement or mix-in this class.
6314 */ 6439 */
6315 abstract class PrefixExpression extends Expression { 6440 abstract class PrefixExpression extends Expression {
6316 /** 6441 /**
6317 * Initialize a newly created prefix expression. 6442 * Initialize a newly created prefix expression.
6318 */ 6443 */
6319 factory PrefixExpression(Token operator, Expression operand) = 6444 factory PrefixExpression(Token operator, Expression operand) =>
6320 PrefixExpressionImpl; 6445 new PrefixExpressionImpl(operator, operand);
6321 6446
6322 /** 6447 /**
6323 * Return the best element available for this operator. If resolution was able 6448 * Return the best element available for this operator. If resolution was able
6324 * to find a better element based on type propagation, that element will be 6449 * to find a better element based on type propagation, that element will be
6325 * returned. Otherwise, the element found using the result of static analysis 6450 * returned. Otherwise, the element found using the result of static analysis
6326 * will be returned. If resolution has not been performed, then `null` will be 6451 * will be returned. If resolution has not been performed, then `null` will be
6327 * returned. 6452 * returned.
6328 */ 6453 */
6329 MethodElement get bestElement; 6454 MethodElement get bestElement;
6330 6455
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
6387 * propertyAccess ::= 6512 * propertyAccess ::=
6388 * [Expression] '.' [SimpleIdentifier] 6513 * [Expression] '.' [SimpleIdentifier]
6389 * 6514 *
6390 * Clients may not extend, implement or mix-in this class. 6515 * Clients may not extend, implement or mix-in this class.
6391 */ 6516 */
6392 abstract class PropertyAccess extends Expression { 6517 abstract class PropertyAccess extends Expression {
6393 /** 6518 /**
6394 * Initialize a newly created property access expression. 6519 * Initialize a newly created property access expression.
6395 */ 6520 */
6396 factory PropertyAccess( 6521 factory PropertyAccess(
6397 Expression target, Token operator, SimpleIdentifier propertyName) = 6522 Expression target, Token operator, SimpleIdentifier propertyName) =>
6398 PropertyAccessImpl; 6523 new PropertyAccessImpl(target, operator, propertyName);
6399 6524
6400 /** 6525 /**
6401 * Return `true` if this expression is cascaded. If it is, then the target of 6526 * Return `true` if this expression is cascaded. If it is, then the target of
6402 * this expression is not stored locally but is stored in the nearest ancestor 6527 * this expression is not stored locally but is stored in the nearest ancestor
6403 * that is a [CascadeExpression]. 6528 * that is a [CascadeExpression].
6404 */ 6529 */
6405 bool get isCascaded; 6530 bool get isCascaded;
6406 6531
6407 /** 6532 /**
6408 * Return the property access operator. 6533 * Return the property access operator.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
6456 * 'this' ('.' identifier)? arguments 6581 * 'this' ('.' identifier)? arguments
6457 * 6582 *
6458 * Clients may not extend, implement or mix-in this class. 6583 * Clients may not extend, implement or mix-in this class.
6459 */ 6584 */
6460 abstract class RedirectingConstructorInvocation extends ConstructorInitializer { 6585 abstract class RedirectingConstructorInvocation extends ConstructorInitializer {
6461 /** 6586 /**
6462 * Initialize a newly created redirecting invocation to invoke the constructor 6587 * Initialize a newly created redirecting invocation to invoke the constructor
6463 * with the given name with the given arguments. The [constructorName] can be 6588 * with the given name with the given arguments. The [constructorName] can be
6464 * `null` if the constructor being invoked is the unnamed constructor. 6589 * `null` if the constructor being invoked is the unnamed constructor.
6465 */ 6590 */
6466 factory RedirectingConstructorInvocation( 6591 factory RedirectingConstructorInvocation(Token thisKeyword, Token period,
6467 Token thisKeyword, 6592 SimpleIdentifier constructorName, ArgumentList argumentList) =>
6468 Token period, 6593 new RedirectingConstructorInvocationImpl(
6469 SimpleIdentifier constructorName, 6594 thisKeyword, period, constructorName, argumentList);
6470 ArgumentList argumentList) = RedirectingConstructorInvocationImpl;
6471 6595
6472 /** 6596 /**
6473 * Return the list of arguments to the constructor. 6597 * Return the list of arguments to the constructor.
6474 */ 6598 */
6475 ArgumentList get argumentList; 6599 ArgumentList get argumentList;
6476 6600
6477 /** 6601 /**
6478 * Set the list of arguments to the constructor to the given [argumentList]. 6602 * Set the list of arguments to the constructor to the given [argumentList].
6479 */ 6603 */
6480 void set argumentList(ArgumentList argumentList); 6604 void set argumentList(ArgumentList argumentList);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
6559 * 'return' [Expression]? ';' 6683 * 'return' [Expression]? ';'
6560 * 6684 *
6561 * Clients may not extend, implement or mix-in this class. 6685 * Clients may not extend, implement or mix-in this class.
6562 */ 6686 */
6563 abstract class ReturnStatement extends Statement { 6687 abstract class ReturnStatement extends Statement {
6564 /** 6688 /**
6565 * Initialize a newly created return statement. The [expression] can be `null` 6689 * Initialize a newly created return statement. The [expression] can be `null`
6566 * if no explicit value was provided. 6690 * if no explicit value was provided.
6567 */ 6691 */
6568 factory ReturnStatement( 6692 factory ReturnStatement(
6569 Token returnKeyword, Expression expression, Token semicolon) = 6693 Token returnKeyword, Expression expression, Token semicolon) =>
6570 ReturnStatementImpl; 6694 new ReturnStatementImpl(returnKeyword, expression, semicolon);
6571 6695
6572 /** 6696 /**
6573 * Return the expression computing the value to be returned, or `null` if no 6697 * Return the expression computing the value to be returned, or `null` if no
6574 * explicit value was provided. 6698 * explicit value was provided.
6575 */ 6699 */
6576 Expression get expression; 6700 Expression get expression;
6577 6701
6578 /** 6702 /**
6579 * Set the expression computing the value to be returned to the given 6703 * Set the expression computing the value to be returned to the given
6580 * [expression]. 6704 * [expression].
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
6657 * 6781 *
6658 * Clients may not extend, implement or mix-in this class. 6782 * Clients may not extend, implement or mix-in this class.
6659 */ 6783 */
6660 abstract class SimpleFormalParameter extends NormalFormalParameter { 6784 abstract class SimpleFormalParameter extends NormalFormalParameter {
6661 /** 6785 /**
6662 * Initialize a newly created formal parameter. Either or both of the 6786 * Initialize a newly created formal parameter. Either or both of the
6663 * [comment] and [metadata] can be `null` if the parameter does not have the 6787 * [comment] and [metadata] can be `null` if the parameter does not have the
6664 * corresponding attribute. The [keyword] can be `null` if a type was 6788 * corresponding attribute. The [keyword] can be `null` if a type was
6665 * specified. The [type] must be `null` if the keyword is 'var'. 6789 * specified. The [type] must be `null` if the keyword is 'var'.
6666 */ 6790 */
6667 factory SimpleFormalParameter( 6791 factory SimpleFormalParameter(Comment comment, List<Annotation> metadata,
6668 Comment comment, 6792 Token keyword, TypeName type, SimpleIdentifier identifier) =>
6669 List<Annotation> metadata, 6793 new SimpleFormalParameterImpl(
6670 Token keyword, 6794 comment, metadata, keyword, type, identifier);
6671 TypeName type,
6672 SimpleIdentifier identifier) = SimpleFormalParameterImpl;
6673 6795
6674 /** 6796 /**
6675 * Return the token representing either the 'final', 'const' or 'var' keyword, 6797 * Return the token representing either the 'final', 'const' or 'var' keyword,
6676 * or `null` if no keyword was used. 6798 * or `null` if no keyword was used.
6677 */ 6799 */
6678 Token get keyword; 6800 Token get keyword;
6679 6801
6680 /** 6802 /**
6681 * Set the token representing either the 'final', 'const' or 'var' keyword to 6803 * Set the token representing either the 'final', 'const' or 'var' keyword to
6682 * the given [token]. 6804 * the given [token].
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
6958 * 7080 *
6959 * Clients may not extend, implement or mix-in this class. 7081 * Clients may not extend, implement or mix-in this class.
6960 */ 7082 */
6961 abstract class SuperConstructorInvocation extends ConstructorInitializer { 7083 abstract class SuperConstructorInvocation extends ConstructorInitializer {
6962 /** 7084 /**
6963 * Initialize a newly created super invocation to invoke the inherited 7085 * Initialize a newly created super invocation to invoke the inherited
6964 * constructor with the given name with the given arguments. The [period] and 7086 * constructor with the given name with the given arguments. The [period] and
6965 * [constructorName] can be `null` if the constructor being invoked is the 7087 * [constructorName] can be `null` if the constructor being invoked is the
6966 * unnamed constructor. 7088 * unnamed constructor.
6967 */ 7089 */
6968 factory SuperConstructorInvocation( 7090 factory SuperConstructorInvocation(Token superKeyword, Token period,
6969 Token superKeyword, 7091 SimpleIdentifier constructorName, ArgumentList argumentList) =>
6970 Token period, 7092 new SuperConstructorInvocationImpl(
6971 SimpleIdentifier constructorName, 7093 superKeyword, period, constructorName, argumentList);
6972 ArgumentList argumentList) = SuperConstructorInvocationImpl;
6973 7094
6974 /** 7095 /**
6975 * Return the list of arguments to the constructor. 7096 * Return the list of arguments to the constructor.
6976 */ 7097 */
6977 ArgumentList get argumentList; 7098 ArgumentList get argumentList;
6978 7099
6979 /** 7100 /**
6980 * Set the list of arguments to the constructor to the given [argumentList]. 7101 * Set the list of arguments to the constructor to the given [argumentList].
6981 */ 7102 */
6982 void set argumentList(ArgumentList argumentList); 7103 void set argumentList(ArgumentList argumentList);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
7061 * [SimpleIdentifier]* 'case' [Expression] ':' [Statement]* 7182 * [SimpleIdentifier]* 'case' [Expression] ':' [Statement]*
7062 * 7183 *
7063 * Clients may not extend, implement or mix-in this class. 7184 * Clients may not extend, implement or mix-in this class.
7064 */ 7185 */
7065 abstract class SwitchCase extends SwitchMember { 7186 abstract class SwitchCase extends SwitchMember {
7066 /** 7187 /**
7067 * Initialize a newly created switch case. The list of [labels] can be `null` 7188 * Initialize a newly created switch case. The list of [labels] can be `null`
7068 * if there are no labels. 7189 * if there are no labels.
7069 */ 7190 */
7070 factory SwitchCase(List<Label> labels, Token keyword, Expression expression, 7191 factory SwitchCase(List<Label> labels, Token keyword, Expression expression,
7071 Token colon, List<Statement> statements) = SwitchCaseImpl; 7192 Token colon, List<Statement> statements) =>
7193 new SwitchCaseImpl(labels, keyword, expression, colon, statements);
7072 7194
7073 /** 7195 /**
7074 * Return the expression controlling whether the statements will be executed. 7196 * Return the expression controlling whether the statements will be executed.
7075 */ 7197 */
7076 Expression get expression; 7198 Expression get expression;
7077 7199
7078 /** 7200 /**
7079 * Set the expression controlling whether the statements will be executed to 7201 * Set the expression controlling whether the statements will be executed to
7080 * the given [expression]. 7202 * the given [expression].
7081 */ 7203 */
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
7151 * 'switch' '(' [Expression] ')' '{' [SwitchCase]* [SwitchDefault]? '}' 7273 * 'switch' '(' [Expression] ')' '{' [SwitchCase]* [SwitchDefault]? '}'
7152 * 7274 *
7153 * Clients may not extend, implement or mix-in this class. 7275 * Clients may not extend, implement or mix-in this class.
7154 */ 7276 */
7155 abstract class SwitchStatement extends Statement { 7277 abstract class SwitchStatement extends Statement {
7156 /** 7278 /**
7157 * Initialize a newly created switch statement. The list of [members] can be 7279 * Initialize a newly created switch statement. The list of [members] can be
7158 * `null` if there are no switch members. 7280 * `null` if there are no switch members.
7159 */ 7281 */
7160 factory SwitchStatement( 7282 factory SwitchStatement(
7161 Token switchKeyword, 7283 Token switchKeyword,
7162 Token leftParenthesis, 7284 Token leftParenthesis,
7163 Expression expression, 7285 Expression expression,
7164 Token rightParenthesis, 7286 Token rightParenthesis,
7165 Token leftBracket, 7287 Token leftBracket,
7166 List<SwitchMember> members, 7288 List<SwitchMember> members,
7167 Token rightBracket) = SwitchStatementImpl; 7289 Token rightBracket) =>
7290 new SwitchStatementImpl(switchKeyword, leftParenthesis, expression,
7291 rightParenthesis, leftBracket, members, rightBracket);
7168 7292
7169 /** 7293 /**
7170 * Return the expression used to determine which of the switch members will be 7294 * Return the expression used to determine which of the switch members will be
7171 * selected. 7295 * selected.
7172 */ 7296 */
7173 Expression get expression; 7297 Expression get expression;
7174 7298
7175 /** 7299 /**
7176 * Set the expression used to determine which of the switch members will be 7300 * Set the expression used to determine which of the switch members will be
7177 * selected to the given [expression]. 7301 * selected to the given [expression].
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
7295 * 7419 *
7296 * throwExpression ::= 7420 * throwExpression ::=
7297 * 'throw' [Expression] 7421 * 'throw' [Expression]
7298 * 7422 *
7299 * Clients may not extend, implement or mix-in this class. 7423 * Clients may not extend, implement or mix-in this class.
7300 */ 7424 */
7301 abstract class ThrowExpression extends Expression { 7425 abstract class ThrowExpression extends Expression {
7302 /** 7426 /**
7303 * Initialize a newly created throw expression. 7427 * Initialize a newly created throw expression.
7304 */ 7428 */
7305 factory ThrowExpression(Token throwKeyword, Expression expression) = 7429 factory ThrowExpression(Token throwKeyword, Expression expression) =>
7306 ThrowExpressionImpl; 7430 new ThrowExpressionImpl(throwKeyword, expression);
7307 7431
7308 /** 7432 /**
7309 * Return the expression computing the exception to be thrown. 7433 * Return the expression computing the exception to be thrown.
7310 */ 7434 */
7311 Expression get expression; 7435 Expression get expression;
7312 7436
7313 /** 7437 /**
7314 * Set the expression computing the exception to be thrown to the given 7438 * Set the expression computing the exception to be thrown to the given
7315 * [expression]. 7439 * [expression].
7316 */ 7440 */
(...skipping 19 matching lines...) Expand all
7336 * 7460 *
7337 * Clients may not extend, implement or mix-in this class. 7461 * Clients may not extend, implement or mix-in this class.
7338 */ 7462 */
7339 abstract class TopLevelVariableDeclaration extends CompilationUnitMember { 7463 abstract class TopLevelVariableDeclaration extends CompilationUnitMember {
7340 /** 7464 /**
7341 * Initialize a newly created top-level variable declaration. Either or both 7465 * Initialize a newly created top-level variable declaration. Either or both
7342 * of the [comment] and [metadata] can be `null` if the variable does not have 7466 * of the [comment] and [metadata] can be `null` if the variable does not have
7343 * the corresponding attribute. 7467 * the corresponding attribute.
7344 */ 7468 */
7345 factory TopLevelVariableDeclaration( 7469 factory TopLevelVariableDeclaration(
7346 Comment comment, 7470 Comment comment,
7347 List<Annotation> metadata, 7471 List<Annotation> metadata,
7348 VariableDeclarationList variableList, 7472 VariableDeclarationList variableList,
7349 Token semicolon) = TopLevelVariableDeclarationImpl; 7473 Token semicolon) =>
7474 new TopLevelVariableDeclarationImpl(
7475 comment, metadata, variableList, semicolon);
7350 7476
7351 /** 7477 /**
7352 * Return the semicolon terminating the declaration. 7478 * Return the semicolon terminating the declaration.
7353 */ 7479 */
7354 Token get semicolon; 7480 Token get semicolon;
7355 7481
7356 /** 7482 /**
7357 * Set the semicolon terminating the declaration to the given [token]. 7483 * Set the semicolon terminating the declaration to the given [token].
7358 */ 7484 */
7359 void set semicolon(Token token); 7485 void set semicolon(Token token);
(...skipping 21 matching lines...) Expand all
7381 * 7507 *
7382 * Clients may not extend, implement or mix-in this class. 7508 * Clients may not extend, implement or mix-in this class.
7383 */ 7509 */
7384 abstract class TryStatement extends Statement { 7510 abstract class TryStatement extends Statement {
7385 /** 7511 /**
7386 * Initialize a newly created try statement. The list of [catchClauses] can be 7512 * Initialize a newly created try statement. The list of [catchClauses] can be
7387 * `null` if there are no catch clauses. The [finallyKeyword] and 7513 * `null` if there are no catch clauses. The [finallyKeyword] and
7388 * [finallyBlock] can be `null` if there is no finally clause. 7514 * [finallyBlock] can be `null` if there is no finally clause.
7389 */ 7515 */
7390 factory TryStatement( 7516 factory TryStatement(
7391 Token tryKeyword, 7517 Token tryKeyword,
7392 Block body, 7518 Block body,
7393 List<CatchClause> catchClauses, 7519 List<CatchClause> catchClauses,
7394 Token finallyKeyword, 7520 Token finallyKeyword,
7395 Block finallyBlock) = TryStatementImpl; 7521 Block finallyBlock) =>
7522 new TryStatementImpl(
7523 tryKeyword, body, catchClauses, finallyKeyword, finallyBlock);
7396 7524
7397 /** 7525 /**
7398 * Return the body of the statement. 7526 * Return the body of the statement.
7399 */ 7527 */
7400 Block get body; 7528 Block get body;
7401 7529
7402 /** 7530 /**
7403 * Set the body of the statement to the given [block]. 7531 * Set the body of the statement to the given [block].
7404 */ 7532 */
7405 void set body(Block block); 7533 void set body(Block block);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
7558 * typeName ::= 7686 * typeName ::=
7559 * [Identifier] typeArguments? 7687 * [Identifier] typeArguments?
7560 * 7688 *
7561 * Clients may not extend, implement or mix-in this class. 7689 * Clients may not extend, implement or mix-in this class.
7562 */ 7690 */
7563 abstract class TypeName extends AstNode { 7691 abstract class TypeName extends AstNode {
7564 /** 7692 /**
7565 * Initialize a newly created type name. The [typeArguments] can be `null` if 7693 * Initialize a newly created type name. The [typeArguments] can be `null` if
7566 * there are no type arguments. 7694 * there are no type arguments.
7567 */ 7695 */
7568 factory TypeName(Identifier name, TypeArgumentList typeArguments) = 7696 factory TypeName(Identifier name, TypeArgumentList typeArguments) =>
7569 TypeNameImpl; 7697 new TypeNameImpl(name, typeArguments);
7570 7698
7571 /** 7699 /**
7572 * Return `true` if this type is a deferred type. 7700 * Return `true` if this type is a deferred type.
7573 * 7701 *
7574 * 15.1 Static Types: A type <i>T</i> is deferred iff it is of the form 7702 * 15.1 Static Types: A type <i>T</i> is deferred iff it is of the form
7575 * </i>p.T</i> where <i>p</i> is a deferred prefix. 7703 * </i>p.T</i> where <i>p</i> is a deferred prefix.
7576 */ 7704 */
7577 bool get isDeferred; 7705 bool get isDeferred;
7578 7706
7579 /** 7707 /**
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
7618 * 7746 *
7619 * Clients may not extend, implement or mix-in this class. 7747 * Clients may not extend, implement or mix-in this class.
7620 */ 7748 */
7621 abstract class TypeParameter extends Declaration { 7749 abstract class TypeParameter extends Declaration {
7622 /** 7750 /**
7623 * Initialize a newly created type parameter. Either or both of the [comment] 7751 * Initialize a newly created type parameter. Either or both of the [comment]
7624 * and [metadata] can be `null` if the parameter does not have the 7752 * and [metadata] can be `null` if the parameter does not have the
7625 * corresponding attribute. The [extendsKeyword] and [bound] can be `null` if 7753 * corresponding attribute. The [extendsKeyword] and [bound] can be `null` if
7626 * the parameter does not have an upper bound. 7754 * the parameter does not have an upper bound.
7627 */ 7755 */
7628 factory TypeParameter( 7756 factory TypeParameter(Comment comment, List<Annotation> metadata,
7629 Comment comment, 7757 SimpleIdentifier name, Token extendsKeyword, TypeName bound) =>
7630 List<Annotation> metadata, 7758 new TypeParameterImpl(comment, metadata, name, extendsKeyword, bound);
7631 SimpleIdentifier name,
7632 Token extendsKeyword,
7633 TypeName bound) = TypeParameterImpl;
7634 7759
7635 /** 7760 /**
7636 * Return the name of the upper bound for legal arguments, or `null` if there 7761 * Return the name of the upper bound for legal arguments, or `null` if there
7637 * is no explicit upper bound. 7762 * is no explicit upper bound.
7638 */ 7763 */
7639 TypeName get bound; 7764 TypeName get bound;
7640 7765
7641 /** 7766 /**
7642 * Set the name of the upper bound for legal arguments to the given 7767 * Set the name of the upper bound for legal arguments to the given
7643 * [typeName]. 7768 * [typeName].
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
7784 * extend [Declaration]. 7909 * extend [Declaration].
7785 * 7910 *
7786 * Clients may not extend, implement or mix-in this class. 7911 * Clients may not extend, implement or mix-in this class.
7787 */ 7912 */
7788 abstract class VariableDeclaration extends Declaration { 7913 abstract class VariableDeclaration extends Declaration {
7789 /** 7914 /**
7790 * Initialize a newly created variable declaration. The [equals] and 7915 * Initialize a newly created variable declaration. The [equals] and
7791 * [initializer] can be `null` if there is no initializer. 7916 * [initializer] can be `null` if there is no initializer.
7792 */ 7917 */
7793 factory VariableDeclaration( 7918 factory VariableDeclaration(
7794 SimpleIdentifier name, Token equals, Expression initializer) = 7919 SimpleIdentifier name, Token equals, Expression initializer) =>
7795 VariableDeclarationImpl; 7920 new VariableDeclarationImpl(name, equals, initializer);
7796 7921
7797 @override 7922 @override
7798 VariableElement get element; 7923 VariableElement get element;
7799 7924
7800 /** 7925 /**
7801 * Return the equal sign separating the variable name from the initial value, 7926 * Return the equal sign separating the variable name from the initial value,
7802 * or `null` if the initial value was not specified. 7927 * or `null` if the initial value was not specified.
7803 */ 7928 */
7804 Token get equals; 7929 Token get equals;
7805 7930
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
7858 * 7983 *
7859 * Clients may not extend, implement or mix-in this class. 7984 * Clients may not extend, implement or mix-in this class.
7860 */ 7985 */
7861 abstract class VariableDeclarationList extends AnnotatedNode { 7986 abstract class VariableDeclarationList extends AnnotatedNode {
7862 /** 7987 /**
7863 * Initialize a newly created variable declaration list. Either or both of the 7988 * Initialize a newly created variable declaration list. Either or both of the
7864 * [comment] and [metadata] can be `null` if the variable list does not have 7989 * [comment] and [metadata] can be `null` if the variable list does not have
7865 * the corresponding attribute. The [keyword] can be `null` if a type was 7990 * the corresponding attribute. The [keyword] can be `null` if a type was
7866 * specified. The [type] must be `null` if the keyword is 'var'. 7991 * specified. The [type] must be `null` if the keyword is 'var'.
7867 */ 7992 */
7868 factory VariableDeclarationList( 7993 factory VariableDeclarationList(Comment comment, List<Annotation> metadata,
7869 Comment comment, 7994 Token keyword, TypeName type, List<VariableDeclaration> variables) =>
7870 List<Annotation> metadata, 7995 new VariableDeclarationListImpl(
7871 Token keyword, 7996 comment, metadata, keyword, type, variables);
7872 TypeName type,
7873 List<VariableDeclaration> variables) = VariableDeclarationListImpl;
7874 7997
7875 /** 7998 /**
7876 * Return `true` if the variables in this list were declared with the 'const' 7999 * Return `true` if the variables in this list were declared with the 'const'
7877 * modifier. 8000 * modifier.
7878 */ 8001 */
7879 bool get isConst; 8002 bool get isConst;
7880 8003
7881 /** 8004 /**
7882 * Return `true` if the variables in this list were declared with the 'final' 8005 * Return `true` if the variables in this list were declared with the 'final'
7883 * modifier. Variables that are declared with the 'const' modifier will return 8006 * modifier. Variables that are declared with the 'const' modifier will return
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
7922 * variableDeclarationStatement ::= 8045 * variableDeclarationStatement ::=
7923 * [VariableDeclarationList] ';' 8046 * [VariableDeclarationList] ';'
7924 * 8047 *
7925 * Clients may not extend, implement or mix-in this class. 8048 * Clients may not extend, implement or mix-in this class.
7926 */ 8049 */
7927 abstract class VariableDeclarationStatement extends Statement { 8050 abstract class VariableDeclarationStatement extends Statement {
7928 /** 8051 /**
7929 * Initialize a newly created variable declaration statement. 8052 * Initialize a newly created variable declaration statement.
7930 */ 8053 */
7931 factory VariableDeclarationStatement( 8054 factory VariableDeclarationStatement(
7932 VariableDeclarationList variableList, Token semicolon) = 8055 VariableDeclarationList variableList, Token semicolon) =>
7933 VariableDeclarationStatementImpl; 8056 new VariableDeclarationStatementImpl(variableList, semicolon);
7934 8057
7935 /** 8058 /**
7936 * Return the semicolon terminating the statement. 8059 * Return the semicolon terminating the statement.
7937 */ 8060 */
7938 Token get semicolon; 8061 Token get semicolon;
7939 8062
7940 /** 8063 /**
7941 * Set the semicolon terminating the statement to the given [token]. 8064 * Set the semicolon terminating the statement to the given [token].
7942 */ 8065 */
7943 void set semicolon(Token token); 8066 void set semicolon(Token token);
(...skipping 14 matching lines...) Expand all
7958 * 8081 *
7959 * whileStatement ::= 8082 * whileStatement ::=
7960 * 'while' '(' [Expression] ')' [Statement] 8083 * 'while' '(' [Expression] ')' [Statement]
7961 * 8084 *
7962 * Clients may not extend, implement or mix-in this class. 8085 * Clients may not extend, implement or mix-in this class.
7963 */ 8086 */
7964 abstract class WhileStatement extends Statement { 8087 abstract class WhileStatement extends Statement {
7965 /** 8088 /**
7966 * Initialize a newly created while statement. 8089 * Initialize a newly created while statement.
7967 */ 8090 */
7968 factory WhileStatement( 8091 factory WhileStatement(Token whileKeyword, Token leftParenthesis,
7969 Token whileKeyword, 8092 Expression condition, Token rightParenthesis, Statement body) =>
7970 Token leftParenthesis, 8093 new WhileStatementImpl(
7971 Expression condition, 8094 whileKeyword, leftParenthesis, condition, rightParenthesis, body);
7972 Token rightParenthesis,
7973 Statement body) = WhileStatementImpl;
7974 8095
7975 /** 8096 /**
7976 * Return the body of the loop. 8097 * Return the body of the loop.
7977 */ 8098 */
7978 Statement get body; 8099 Statement get body;
7979 8100
7980 /** 8101 /**
7981 * Set the body of the loop to the given [statement]. 8102 * Set the body of the loop to the given [statement].
7982 */ 8103 */
7983 void set body(Statement statement); 8104 void set body(Statement statement);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
8063 * 'yield' '*'? [Expression] ‘;’ 8184 * 'yield' '*'? [Expression] ‘;’
8064 * 8185 *
8065 * Clients may not extend, implement or mix-in this class. 8186 * Clients may not extend, implement or mix-in this class.
8066 */ 8187 */
8067 abstract class YieldStatement extends Statement { 8188 abstract class YieldStatement extends Statement {
8068 /** 8189 /**
8069 * Initialize a newly created yield expression. The [star] can be `null` if no 8190 * Initialize a newly created yield expression. The [star] can be `null` if no
8070 * star was provided. 8191 * star was provided.
8071 */ 8192 */
8072 factory YieldStatement(Token yieldKeyword, Token star, Expression expression, 8193 factory YieldStatement(Token yieldKeyword, Token star, Expression expression,
8073 Token semicolon) = YieldStatementImpl; 8194 Token semicolon) =>
8195 new YieldStatementImpl(yieldKeyword, star, expression, semicolon);
8074 8196
8075 /** 8197 /**
8076 * Return the expression whose value will be yielded. 8198 * Return the expression whose value will be yielded.
8077 */ 8199 */
8078 Expression get expression; 8200 Expression get expression;
8079 8201
8080 /** 8202 /**
8081 * Set the expression whose value will be yielded to the given [expression]. 8203 * Set the expression whose value will be yielded to the given [expression].
8082 */ 8204 */
8083 void set expression(Expression expression); 8205 void set expression(Expression expression);
(...skipping 21 matching lines...) Expand all
8105 /** 8227 /**
8106 * Return the 'yield' keyword. 8228 * Return the 'yield' keyword.
8107 */ 8229 */
8108 Token get yieldKeyword; 8230 Token get yieldKeyword;
8109 8231
8110 /** 8232 /**
8111 * Return the 'yield' keyword to the given [token]. 8233 * Return the 'yield' keyword to the given [token].
8112 */ 8234 */
8113 void set yieldKeyword(Token token); 8235 void set yieldKeyword(Token token);
8114 } 8236 }
OLDNEW
« 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