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

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

Issue 1738533003: Fix dartdoc for AST nodes (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 import 'package:analyzer/src/generated/utilities_dart.dart'; 46 import 'package:analyzer/src/generated/utilities_dart.dart';
47 47
48 /** 48 /**
49 * Two or more string literals that are implicitly concatenated because of being 49 * Two or more string literals that are implicitly concatenated because of being
50 * adjacent (separated only by whitespace). 50 * adjacent (separated only by whitespace).
51 * 51 *
52 * While the grammar only allows adjacent strings when all of the strings are of 52 * While the grammar only allows adjacent strings when all of the strings are of
53 * the same kind (single line or multi-line), this class doesn't enforce that 53 * the same kind (single line or multi-line), this class doesn't enforce that
54 * restriction. 54 * restriction.
55 * 55 *
56 * > adjacentStrings ::= 56 * adjacentStrings ::=
57 * > [StringLiteral] [StringLiteral]+ 57 * [StringLiteral] [StringLiteral]+
58 * 58 *
59 * Clients may not extend, implement or mix-in this class. 59 * Clients may not extend, implement or mix-in this class.
60 */ 60 */
61 abstract class AdjacentStrings extends StringLiteral { 61 abstract class AdjacentStrings extends StringLiteral {
62 /** 62 /**
63 * Initialize a newly created list of adjacent strings. To be syntactically 63 * Initialize a newly created list of adjacent strings. To be syntactically
64 * valid, the list of [strings] must contain at least two elements. 64 * valid, the list of [strings] must contain at least two elements.
65 */ 65 */
66 factory AdjacentStrings(List<StringLiteral> strings) = AdjacentStringsImpl; 66 factory AdjacentStrings(List<StringLiteral> strings) = AdjacentStringsImpl;
67 67
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 /** 103 /**
104 * Return a list containing the comment and annotations associated with this 104 * Return a list containing the comment and annotations associated with this
105 * node, sorted in lexical order. 105 * node, sorted in lexical order.
106 */ 106 */
107 List<AstNode> get sortedCommentAndAnnotations; 107 List<AstNode> get sortedCommentAndAnnotations;
108 } 108 }
109 109
110 /** 110 /**
111 * An annotation that can be associated with an AST node. 111 * An annotation that can be associated with an AST node.
112 * 112 *
113 * > metadata ::= 113 * metadata ::=
114 * > annotation* 114 * annotation*
115 * > 115 *
116 * > annotation ::= 116 * annotation ::=
117 * > '@' [Identifier] ('.' [SimpleIdentifier])? [ArgumentList]? 117 * '@' [Identifier] ('.' [SimpleIdentifier])? [ArgumentList]?
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 */
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 /** 208 /**
209 * Set the period before the constructor name to the given [token]. 209 * Set the period before the constructor name to the given [token].
210 */ 210 */
211 void set period(Token token); 211 void set period(Token token);
212 } 212 }
213 213
214 /** 214 /**
215 * A list of arguments in the invocation of an executable element (that is, a 215 * A list of arguments in the invocation of an executable element (that is, a
216 * function, method, or constructor). 216 * function, method, or constructor).
217 * 217 *
218 * > argumentList ::= 218 * argumentList ::=
219 * > '(' arguments? ')' 219 * '(' arguments? ')'
220 * > 220 *
221 * > arguments ::= 221 * arguments ::=
222 * > [NamedExpression] (',' [NamedExpression])* 222 * [NamedExpression] (',' [NamedExpression])*
223 * > | [Expression] (',' [Expression])* (',' [NamedExpression])* 223 * | [Expression] (',' [Expression])* (',' [NamedExpression])*
224 * 224 *
225 * Clients may not extend, implement or mix-in this class. 225 * Clients may not extend, implement or mix-in this class.
226 */ 226 */
227 abstract class ArgumentList extends AstNode { 227 abstract class ArgumentList extends AstNode {
228 /** 228 /**
229 * Initialize a newly created list of arguments. The list of [arguments] can 229 * Initialize a newly created list of arguments. The list of [arguments] can
230 * be `null` if there are no arguments. 230 * be `null` if there are no arguments.
231 */ 231 */
232 factory ArgumentList(Token leftParenthesis, List<Expression> arguments, 232 factory ArgumentList(Token leftParenthesis, List<Expression> arguments,
233 Token rightParenthesis) = ArgumentListImpl; 233 Token rightParenthesis) = ArgumentListImpl;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 /** 273 /**
274 * Set the right parenthesis to the given [token]. 274 * Set the right parenthesis to the given [token].
275 */ 275 */
276 void set rightParenthesis(Token token); 276 void set rightParenthesis(Token token);
277 } 277 }
278 278
279 /** 279 /**
280 * An as expression. 280 * An as expression.
281 * 281 *
282 * > asExpression ::= 282 * asExpression ::=
283 * > [Expression] 'as' [TypeName] 283 * [Expression] 'as' [TypeName]
284 * 284 *
285 * Clients may not extend, implement or mix-in this class. 285 * Clients may not extend, implement or mix-in this class.
286 */ 286 */
287 abstract class AsExpression extends Expression { 287 abstract class AsExpression extends Expression {
288 /** 288 /**
289 * Initialize a newly created as expression. 289 * Initialize a newly created as expression.
290 */ 290 */
291 factory AsExpression(Expression expression, Token asOperator, TypeName type) = 291 factory AsExpression(Expression expression, Token asOperator, TypeName type) =
292 AsExpressionImpl; 292 AsExpressionImpl;
293 293
(...skipping 25 matching lines...) Expand all
319 319
320 /** 320 /**
321 * Set the name of the type being cast to to the given [name]. 321 * Set the name of the type being cast to to the given [name].
322 */ 322 */
323 void set type(TypeName name); 323 void set type(TypeName name);
324 } 324 }
325 325
326 /** 326 /**
327 * An assert statement. 327 * An assert statement.
328 * 328 *
329 * > assertStatement ::= 329 * assertStatement ::=
330 * > 'assert' '(' [Expression] ')' ';' 330 * 'assert' '(' [Expression] ')' ';'
331 * 331 *
332 * Clients may not extend, implement or mix-in this class. 332 * Clients may not extend, implement or mix-in this class.
333 */ 333 */
334 abstract class AssertStatement extends Statement { 334 abstract class AssertStatement extends Statement {
335 /** 335 /**
336 * Initialize a newly created assert statement. The [comma] and [message] can 336 * Initialize a newly created assert statement. The [comma] and [message] can
337 * be `null` if there is no message. 337 * be `null` if there is no message.
338 */ 338 */
339 factory AssertStatement( 339 factory AssertStatement(
340 Token assertKeyword, 340 Token assertKeyword,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 /** 417 /**
418 * Set the semicolon terminating the statement to the given [token]. 418 * Set the semicolon terminating the statement to the given [token].
419 */ 419 */
420 void set semicolon(Token token); 420 void set semicolon(Token token);
421 } 421 }
422 422
423 /** 423 /**
424 * An assignment expression. 424 * An assignment expression.
425 * 425 *
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 AssignmentExpressionImpl;
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 R visitWhileStatement(WhileStatement node); 846 R visitWhileStatement(WhileStatement node);
847 847
848 R visitWithClause(WithClause node); 848 R visitWithClause(WithClause node);
849 849
850 R visitYieldStatement(YieldStatement node); 850 R visitYieldStatement(YieldStatement node);
851 } 851 }
852 852
853 /** 853 /**
854 * An await expression. 854 * An await expression.
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 AwaitExpressionImpl;
867 867
(...skipping 14 matching lines...) Expand all
882 882
883 /** 883 /**
884 * Set the expression whose value is being waited on to the given [expression] . 884 * Set the expression whose value is being waited on to the given [expression] .
885 */ 885 */
886 void set expression(Expression expression); 886 void set expression(Expression expression);
887 } 887 }
888 888
889 /** 889 /**
890 * A binary (infix) expression. 890 * A binary (infix) expression.
891 * 891 *
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 BinaryExpressionImpl;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 /** 968 /**
969 * Set the element associated with the operator based on the static type of 969 * Set the element associated with the operator based on the static type of
970 * the left operand to the given [element]. 970 * the left operand to the given [element].
971 */ 971 */
972 void set staticElement(MethodElement element); 972 void set staticElement(MethodElement element);
973 } 973 }
974 974
975 /** 975 /**
976 * A sequence of statements. 976 * A sequence of statements.
977 * 977 *
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 BlockImpl;
(...skipping 20 matching lines...) Expand all
1010 1010
1011 /** 1011 /**
1012 * Return the statements contained in the block. 1012 * Return the statements contained in the block.
1013 */ 1013 */
1014 NodeList<Statement> get statements; 1014 NodeList<Statement> get statements;
1015 } 1015 }
1016 1016
1017 /** 1017 /**
1018 * A function body that consists of a block of statements. 1018 * A function body that consists of a block of statements.
1019 * 1019 *
1020 * > blockFunctionBody ::= 1020 * blockFunctionBody ::=
1021 * > ('async' | 'async' '*' | 'sync' '*')? [Block] 1021 * ('async' | 'async' '*' | 'sync' '*')? [Block]
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 */
(...skipping 17 matching lines...) Expand all
1049 1049
1050 /** 1050 /**
1051 * Set the star following the 'async' or 'sync' keyword to the given [token]. 1051 * Set the star following the 'async' or 'sync' keyword to the given [token].
1052 */ 1052 */
1053 void set star(Token token); 1053 void set star(Token token);
1054 } 1054 }
1055 1055
1056 /** 1056 /**
1057 * A boolean literal expression. 1057 * A boolean literal expression.
1058 * 1058 *
1059 * > booleanLiteral ::= 1059 * booleanLiteral ::=
1060 * > 'false' | 'true' 1060 * 'false' | 'true'
1061 * 1061 *
1062 * Clients may not extend, implement or mix-in this class. 1062 * Clients may not extend, implement or mix-in this class.
1063 */ 1063 */
1064 abstract class BooleanLiteral extends Literal { 1064 abstract class BooleanLiteral extends Literal {
1065 /** 1065 /**
1066 * Initialize a newly created boolean literal. 1066 * Initialize a newly created boolean literal.
1067 */ 1067 */
1068 factory BooleanLiteral(Token literal, bool value) = BooleanLiteralImpl; 1068 factory BooleanLiteral(Token literal, bool value) = BooleanLiteralImpl;
1069 1069
1070 /** 1070 /**
1071 * Return the token representing the literal. 1071 * Return the token representing the literal.
1072 */ 1072 */
1073 Token get literal; 1073 Token get literal;
1074 1074
1075 /** 1075 /**
1076 * Set the token representing the literal to the given [token]. 1076 * Set the token representing the literal to the given [token].
1077 */ 1077 */
1078 void set literal(Token token); 1078 void set literal(Token token);
1079 1079
1080 /** 1080 /**
1081 * Return the value of the literal. 1081 * Return the value of the literal.
1082 */ 1082 */
1083 bool get value; 1083 bool get value;
1084 } 1084 }
1085 1085
1086 /** 1086 /**
1087 * A break statement. 1087 * A break statement.
1088 * 1088 *
1089 * > breakStatement ::= 1089 * breakStatement ::=
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) =
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 * [node]. 1147 * [node].
1148 */ 1148 */
1149 void set target(AstNode node); 1149 void set target(AstNode node);
1150 } 1150 }
1151 1151
1152 /** 1152 /**
1153 * A sequence of cascaded expressions: expressions that share a common target. 1153 * A sequence of cascaded expressions: expressions that share a common target.
1154 * There are three kinds of expressions that can be used in a cascade 1154 * There are three kinds of expressions that can be used in a cascade
1155 * expression: [IndexExpression], [MethodInvocation] and [PropertyAccess]. 1155 * expression: [IndexExpression], [MethodInvocation] and [PropertyAccess].
1156 * 1156 *
1157 * > cascadeExpression ::= 1157 * cascadeExpression ::=
1158 * > [Expression] cascadeSection* 1158 * [Expression] cascadeSection*
1159 * > 1159 *
1160 * > cascadeSection ::= 1160 * cascadeSection ::=
1161 * > '..' (cascadeSelector arguments*) (assignableSelector arguments*)* 1161 * '..' (cascadeSelector arguments*) (assignableSelector arguments*)*
1162 * > (assignmentOperator expressionWithoutCascade)? 1162 * (assignmentOperator expressionWithoutCascade)?
1163 * > 1163 *
1164 * > cascadeSelector ::= 1164 * cascadeSelector ::=
1165 * > '[ ' expression '] ' 1165 * '[ ' expression '] '
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) =
(...skipping 11 matching lines...) Expand all
1188 1188
1189 /** 1189 /**
1190 * Set the target of the cascade sections to the given [expression]. 1190 * Set the target of the cascade sections to the given [expression].
1191 */ 1191 */
1192 void set target(Expression target); 1192 void set target(Expression target);
1193 } 1193 }
1194 1194
1195 /** 1195 /**
1196 * A catch clause within a try statement. 1196 * A catch clause within a try statement.
1197 * 1197 *
1198 * > onPart ::= 1198 * onPart ::=
1199 * > catchPart [Block] 1199 * catchPart [Block]
1200 * > | 'on' type catchPart? [Block] 1200 * | 'on' type catchPart? [Block]
1201 * > 1201 *
1202 * > catchPart ::= 1202 * catchPart ::=
1203 * > 'catch' '(' [SimpleIdentifier] (',' [SimpleIdentifier])? ')' 1203 * 'catch' '(' [SimpleIdentifier] (',' [SimpleIdentifier])? ')'
1204 * 1204 *
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 */
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 /** 1319 /**
1320 * Set the parameter whose value will be the stack trace associated with the 1320 * Set the parameter whose value will be the stack trace associated with the
1321 * exception to the given [parameter]. 1321 * exception to the given [parameter].
1322 */ 1322 */
1323 void set stackTraceParameter(SimpleIdentifier parameter); 1323 void set stackTraceParameter(SimpleIdentifier parameter);
1324 } 1324 }
1325 1325
1326 /** 1326 /**
1327 * The declaration of a class. 1327 * The declaration of a class.
1328 * 1328 *
1329 * > classDeclaration ::= 1329 * classDeclaration ::=
1330 * > 'abstract'? 'class' [SimpleIdentifier] [TypeParameterList]? 1330 * 'abstract'? 'class' [SimpleIdentifier] [TypeParameterList]?
1331 * > ([ExtendsClause] [WithClause]?)? 1331 * ([ExtendsClause] [WithClause]?)?
1332 * > [ImplementsClause]? 1332 * [ImplementsClause]?
1333 * > '{' [ClassMember]* '}' 1333 * '{' [ClassMember]* '}'
1334 * 1334 *
1335 * Clients may not extend, implement or mix-in this class. 1335 * Clients may not extend, implement or mix-in this class.
1336 */ 1336 */
1337 abstract class ClassDeclaration extends NamedCompilationUnitMember { 1337 abstract class ClassDeclaration extends NamedCompilationUnitMember {
1338 /** 1338 /**
1339 * Initialize a newly created class declaration. Either or both of the 1339 * 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 1340 * [comment] and [metadata] can be `null` if the class does not have the
1341 * corresponding attribute. The [abstractKeyword] can be `null` if the class 1341 * corresponding attribute. The [abstractKeyword] can be `null` if the class
1342 * is not abstract. The [typeParameters] can be `null` if the class does not 1342 * 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], 1343 * have any type parameters. Any or all of the [extendsClause], [withClause],
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 /** 1490 /**
1491 * A node that declares a name within the scope of a class. 1491 * A node that declares a name within the scope of a class.
1492 * 1492 *
1493 * Clients may not extend, implement or mix-in this class. 1493 * Clients may not extend, implement or mix-in this class.
1494 */ 1494 */
1495 abstract class ClassMember extends Declaration {} 1495 abstract class ClassMember extends Declaration {}
1496 1496
1497 /** 1497 /**
1498 * A class type alias. 1498 * A class type alias.
1499 * 1499 *
1500 * > classTypeAlias ::= 1500 * classTypeAlias ::=
1501 * > [SimpleIdentifier] [TypeParameterList]? '=' 'abstract'? mixinApplicatio n 1501 * [SimpleIdentifier] [TypeParameterList]? '=' 'abstract'? mixinApplicati on
1502 * > 1502 *
1503 * > mixinApplication ::= 1503 * mixinApplication ::=
1504 * > [TypeName] [WithClause] [ImplementsClause]? ';' 1504 * [TypeName] [WithClause] [ImplementsClause]? ';'
1505 * 1505 *
1506 * Clients may not extend, implement or mix-in this class. 1506 * Clients may not extend, implement or mix-in this class.
1507 */ 1507 */
1508 abstract class ClassTypeAlias extends TypeAlias { 1508 abstract class ClassTypeAlias extends TypeAlias {
1509 /** 1509 /**
1510 * Initialize a newly created class type alias. Either or both of the 1510 * 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 1511 * [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 1512 * have the corresponding attribute. The [typeParameters] can be `null` if the
1513 * class does not have any type parameters. The [abstractKeyword] can be 1513 * class does not have any type parameters. The [abstractKeyword] can be
1514 * `null` if the class is not abstract. The [implementsClause] can be `null` 1514 * `null` if the class is not abstract. The [implementsClause] can be `null`
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 1594
1595 /** 1595 /**
1596 * Set the with clause for this class to the given with [withClause]. 1596 * Set the with clause for this class to the given with [withClause].
1597 */ 1597 */
1598 void set withClause(WithClause withClause); 1598 void set withClause(WithClause withClause);
1599 } 1599 }
1600 1600
1601 /** 1601 /**
1602 * A combinator associated with an import or export directive. 1602 * A combinator associated with an import or export directive.
1603 * 1603 *
1604 * > combinator ::= 1604 * combinator ::=
1605 * > [HideCombinator] 1605 * [HideCombinator]
1606 * > | [ShowCombinator] 1606 * | [ShowCombinator]
1607 * 1607 *
1608 * Clients may not extend, implement or mix-in this class. 1608 * Clients may not extend, implement or mix-in this class.
1609 */ 1609 */
1610 abstract class Combinator extends AstNode { 1610 abstract class Combinator extends AstNode {
1611 /** 1611 /**
1612 * Return the 'hide' or 'show' keyword specifying what kind of processing is 1612 * Return the 'hide' or 'show' keyword specifying what kind of processing is
1613 * to be done on the names. 1613 * to be done on the names.
1614 */ 1614 */
1615 Token get keyword; 1615 Token get keyword;
1616 1616
1617 /** 1617 /**
1618 * Set the 'hide' or 'show' keyword specifying what kind of processing is 1618 * Set the 'hide' or 'show' keyword specifying what kind of processing is
1619 * to be done on the names to the given [token]. 1619 * to be done on the names to the given [token].
1620 */ 1620 */
1621 void set keyword(Token token); 1621 void set keyword(Token token);
1622 } 1622 }
1623 1623
1624 /** 1624 /**
1625 * A comment within the source code. 1625 * A comment within the source code.
1626 * 1626 *
1627 * > comment ::= 1627 * comment ::=
1628 * > endOfLineComment 1628 * endOfLineComment
1629 * > | blockComment 1629 * | blockComment
1630 * > | documentationComment 1630 * | documentationComment
1631 * > 1631 *
1632 * > endOfLineComment ::= 1632 * endOfLineComment ::=
1633 * > '//' (CHARACTER - EOL)* EOL 1633 * '//' (CHARACTER - EOL)* EOL
1634 * > 1634 *
1635 * > blockComment ::= 1635 * blockComment ::=
1636 * > '/ *' CHARACTER* '&#42;/' 1636 * '/ *' CHARACTER* '&#42;/'
1637 * > 1637 *
1638 * > documentationComment ::= 1638 * documentationComment ::=
1639 * > '/ **' (CHARACTER | [CommentReference])* '&#42;/' 1639 * '/ **' (CHARACTER | [CommentReference])* '&#42;/'
1640 * > | ('///' (CHARACTER - EOL)* EOL)+ 1640 * | ('///' (CHARACTER - EOL)* EOL)+
1641 * 1641 *
1642 * Clients may not extend, implement or mix-in this class. 1642 * Clients may not extend, implement or mix-in this class.
1643 */ 1643 */
1644 abstract class Comment extends AstNode { 1644 abstract class Comment extends AstNode {
1645 /** 1645 /**
1646 * Initialize a newly created comment. The list of [tokens] must contain at 1646 * Initialize a newly created comment. The list of [tokens] must contain at
1647 * least one token. The [type] is the type of the comment. The list of 1647 * least one token. The [type] is the type of the comment. The list of
1648 * [references] can be empty if the comment does not contain any embedded 1648 * [references] can be empty if the comment does not contain any embedded
1649 * references. 1649 * references.
1650 */ 1650 */
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 /** 1699 /**
1700 * Create an end-of-line comment consisting of the given [tokens]. 1700 * Create an end-of-line comment consisting of the given [tokens].
1701 */ 1701 */
1702 static Comment createEndOfLineComment(List<Token> tokens) => 1702 static Comment createEndOfLineComment(List<Token> tokens) =>
1703 CommentImpl.createEndOfLineComment(tokens); 1703 CommentImpl.createEndOfLineComment(tokens);
1704 } 1704 }
1705 1705
1706 /** 1706 /**
1707 * A reference to a Dart element that is found within a documentation comment. 1707 * A reference to a Dart element that is found within a documentation comment.
1708 * 1708 *
1709 * > commentReference ::= 1709 * commentReference ::=
1710 * > '[' 'new'? [Identifier] ']' 1710 * '[' 'new'? [Identifier] ']'
1711 * 1711 *
1712 * Clients may not extend, implement or mix-in this class. 1712 * Clients may not extend, implement or mix-in this class.
1713 */ 1713 */
1714 abstract class CommentReference extends AstNode { 1714 abstract class CommentReference extends AstNode {
1715 /** 1715 /**
1716 * Initialize a newly created reference to a Dart element. The [newKeyword] 1716 * Initialize a newly created reference to a Dart element. The [newKeyword]
1717 * can be `null` if the reference is not to a constructor. 1717 * can be `null` if the reference is not to a constructor.
1718 */ 1718 */
1719 factory CommentReference(Token newKeyword, Identifier identifier) = 1719 factory CommentReference(Token newKeyword, Identifier identifier) =
1720 CommentReferenceImpl; 1720 CommentReferenceImpl;
(...skipping 22 matching lines...) Expand all
1743 1743
1744 /** 1744 /**
1745 * A compilation unit. 1745 * A compilation unit.
1746 * 1746 *
1747 * While the grammar restricts the order of the directives and declarations 1747 * While the grammar restricts the order of the directives and declarations
1748 * within a compilation unit, this class does not enforce those restrictions. 1748 * within a compilation unit, this class does not enforce those restrictions.
1749 * In particular, the children of a compilation unit will be visited in lexical 1749 * In particular, the children of a compilation unit will be visited in lexical
1750 * order even if lexical order does not conform to the restrictions of the 1750 * order even if lexical order does not conform to the restrictions of the
1751 * grammar. 1751 * grammar.
1752 * 1752 *
1753 * > compilationUnit ::= 1753 * compilationUnit ::=
1754 * > directives declarations 1754 * directives declarations
1755 * > 1755 *
1756 * > directives ::= 1756 * directives ::=
1757 * > [ScriptTag]? [LibraryDirective]? namespaceDirective* [PartDirective]* 1757 * [ScriptTag]? [LibraryDirective]? namespaceDirective* [PartDirective]*
1758 * > | [PartOfDirective] 1758 * | [PartOfDirective]
1759 * > 1759 *
1760 * > namespaceDirective ::= 1760 * namespaceDirective ::=
1761 * > [ImportDirective] 1761 * [ImportDirective]
1762 * > | [ExportDirective] 1762 * | [ExportDirective]
1763 * > 1763 *
1764 * > declarations ::= 1764 * declarations ::=
1765 * > [CompilationUnitMember]* 1765 * [CompilationUnitMember]*
1766 * 1766 *
1767 * Clients may not extend, implement or mix-in this class. 1767 * Clients may not extend, implement or mix-in this class.
1768 */ 1768 */
1769 abstract class CompilationUnit extends AstNode { 1769 abstract class CompilationUnit extends AstNode {
1770 /** 1770 /**
1771 * Initialize a newly created compilation unit to have the given directives 1771 * 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 1772 * 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 1773 * 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 1774 * are no directives in the compilation unit. The list of [declarations] can
1775 * be `null` if there are no declarations in the compilation unit. 1775 * be `null` if there are no declarations in the compilation unit.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 * Return a list containing all of the directives and declarations in this 1841 * Return a list containing all of the directives and declarations in this
1842 * compilation unit, sorted in lexical order. 1842 * compilation unit, sorted in lexical order.
1843 */ 1843 */
1844 List<AstNode> get sortedDirectivesAndDeclarations; 1844 List<AstNode> get sortedDirectivesAndDeclarations;
1845 } 1845 }
1846 1846
1847 /** 1847 /**
1848 * A node that declares one or more names within the scope of a compilation 1848 * A node that declares one or more names within the scope of a compilation
1849 * unit. 1849 * unit.
1850 * 1850 *
1851 * > compilationUnitMember ::= 1851 * compilationUnitMember ::=
1852 * > [ClassDeclaration] 1852 * [ClassDeclaration]
1853 * > | [TypeAlias] 1853 * | [TypeAlias]
1854 * > | [FunctionDeclaration] 1854 * | [FunctionDeclaration]
1855 * > | [MethodDeclaration] 1855 * | [MethodDeclaration]
1856 * > | [VariableDeclaration] 1856 * | [VariableDeclaration]
1857 * > | [VariableDeclaration] 1857 * | [VariableDeclaration]
1858 * 1858 *
1859 * Clients may not extend, implement or mix-in this class. 1859 * Clients may not extend, implement or mix-in this class.
1860 */ 1860 */
1861 abstract class CompilationUnitMember extends Declaration {} 1861 abstract class CompilationUnitMember extends Declaration {}
1862 1862
1863 /** 1863 /**
1864 * A conditional expression. 1864 * A conditional expression.
1865 * 1865 *
1866 * > conditionalExpression ::= 1866 * conditionalExpression ::=
1867 * > [Expression] '?' [Expression] ':' [Expression] 1867 * [Expression] '?' [Expression] ':' [Expression]
1868 * 1868 *
1869 * Clients may not extend, implement or mix-in this class. 1869 * Clients may not extend, implement or mix-in this class.
1870 */ 1870 */
1871 abstract class ConditionalExpression extends Expression { 1871 abstract class ConditionalExpression extends Expression {
1872 /** 1872 /**
1873 * Initialize a newly created conditional expression. 1873 * Initialize a newly created conditional expression.
1874 */ 1874 */
1875 factory ConditionalExpression( 1875 factory ConditionalExpression(
1876 Expression condition, 1876 Expression condition,
1877 Token question, 1877 Token question,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1935 /** 1935 /**
1936 * Set the expression that is executed if the condition evaluates to `true` to 1936 * Set the expression that is executed if the condition evaluates to `true` to
1937 * the given [expression]. 1937 * the given [expression].
1938 */ 1938 */
1939 void set thenExpression(Expression expression); 1939 void set thenExpression(Expression expression);
1940 } 1940 }
1941 1941
1942 /** 1942 /**
1943 * A configuration in either an import or export directive. 1943 * A configuration in either an import or export directive.
1944 * 1944 *
1945 * > configuration ::= 1945 * configuration ::=
1946 * > 'if' '(' test ')' uri 1946 * 'if' '(' test ')' uri
1947 * > 1947 *
1948 * > test ::= 1948 * test ::=
1949 * > dottedName ('==' stringLiteral)? 1949 * dottedName ('==' stringLiteral)?
1950 * > 1950 *
1951 * > dottedName ::= 1951 * dottedName ::=
1952 * > identifier ('.' identifier)* 1952 * identifier ('.' identifier)*
1953 * 1953 *
1954 * Clients may not extend, implement or mix-in this class. 1954 * Clients may not extend, implement or mix-in this class.
1955 */ 1955 */
1956 abstract class Configuration extends AstNode { 1956 abstract class Configuration extends AstNode {
1957 /** 1957 /**
1958 * Initialize a newly created configuration. 1958 * Initialize a newly created configuration.
1959 */ 1959 */
1960 factory Configuration( 1960 factory Configuration(
1961 Token ifKeyword, 1961 Token ifKeyword,
1962 Token leftParenthesis, 1962 Token leftParenthesis,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 /** 2040 /**
2041 * Set the value to which the value of the declared variable will be 2041 * Set the value to which the value of the declared variable will be
2042 * compared to the given [value]. 2042 * compared to the given [value].
2043 */ 2043 */
2044 void set value(StringLiteral value); 2044 void set value(StringLiteral value);
2045 } 2045 }
2046 2046
2047 /** 2047 /**
2048 * A constructor declaration. 2048 * A constructor declaration.
2049 * 2049 *
2050 * > constructorDeclaration ::= 2050 * constructorDeclaration ::=
2051 * > constructorSignature [FunctionBody]? 2051 * constructorSignature [FunctionBody]?
2052 * > | constructorName formalParameterList ':' 'this' ('.' [SimpleIdentifier]) ? arguments 2052 * | constructorName formalParameterList ':' 'this' ('.' [SimpleIdentifier] )? arguments
2053 * > 2053 *
2054 * > constructorSignature ::= 2054 * constructorSignature ::=
2055 * > 'external'? constructorName formalParameterList initializerList? 2055 * 'external'? constructorName formalParameterList initializerList?
2056 * > | 'external'? 'factory' factoryName formalParameterList initializerList? 2056 * | 'external'? 'factory' factoryName formalParameterList initializerList?
2057 * > | 'external'? 'const' constructorName formalParameterList initializerLis t? 2057 * | 'external'? 'const' constructorName formalParameterList initializerLi st?
2058 * > 2058 *
2059 * > constructorName ::= 2059 * constructorName ::=
2060 * > [SimpleIdentifier] ('.' [SimpleIdentifier])? 2060 * [SimpleIdentifier] ('.' [SimpleIdentifier])?
2061 * > 2061 *
2062 * > factoryName ::= 2062 * factoryName ::=
2063 * > [Identifier] ('.' [SimpleIdentifier])? 2063 * [Identifier] ('.' [SimpleIdentifier])?
2064 * > 2064 *
2065 * > initializerList ::= 2065 * initializerList ::=
2066 * > ':' [ConstructorInitializer] (',' [ConstructorInitializer])* 2066 * ':' [ConstructorInitializer] (',' [ConstructorInitializer])*
2067 * 2067 *
2068 * Clients may not extend, implement or mix-in this class. 2068 * Clients may not extend, implement or mix-in this class.
2069 */ 2069 */
2070 abstract class ConstructorDeclaration extends ClassMember { 2070 abstract class ConstructorDeclaration extends ClassMember {
2071 /** 2071 /**
2072 * Initialize a newly created constructor declaration. The [externalKeyword] 2072 * Initialize a newly created constructor declaration. The [externalKeyword]
2073 * can be `null` if the constructor is not external. Either or both of the 2073 * can be `null` if the constructor is not external. Either or both of the
2074 * [comment] and [metadata] can be `null` if the constructor does not have the 2074 * [comment] and [metadata] can be `null` if the constructor does not have the
2075 * corresponding attribute. The [constKeyword] can be `null` if the 2075 * corresponding attribute. The [constKeyword] can be `null` if the
2076 * constructor cannot be used to create a constant. The [factoryKeyword] can 2076 * constructor cannot be used to create a constant. The [factoryKeyword] can
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 /** 2222 /**
2223 * Set the token for the separator (colon or equals) before the initializer 2223 * Set the token for the separator (colon or equals) before the initializer
2224 * list or redirection to the given [token]. 2224 * list or redirection to the given [token].
2225 */ 2225 */
2226 void set separator(Token token); 2226 void set separator(Token token);
2227 } 2227 }
2228 2228
2229 /** 2229 /**
2230 * The initialization of a field within a constructor's initialization list. 2230 * The initialization of a field within a constructor's initialization list.
2231 * 2231 *
2232 * > fieldInitializer ::= 2232 * fieldInitializer ::=
2233 * > ('this' '.')? [SimpleIdentifier] '=' [Expression] 2233 * ('this' '.')? [SimpleIdentifier] '=' [Expression]
2234 * 2234 *
2235 * Clients may not extend, implement or mix-in this class. 2235 * Clients may not extend, implement or mix-in this class.
2236 */ 2236 */
2237 abstract class ConstructorFieldInitializer extends ConstructorInitializer { 2237 abstract class ConstructorFieldInitializer extends ConstructorInitializer {
2238 /** 2238 /**
2239 * Initialize a newly created field initializer to initialize the field with 2239 * 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 2240 * 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. 2241 * [period] can be `null` if the 'this' keyword was not specified.
2242 */ 2242 */
2243 factory ConstructorFieldInitializer( 2243 factory ConstructorFieldInitializer(
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
2300 2300
2301 /** 2301 /**
2302 * Set the token for the 'this' keyword to the given [token]. 2302 * Set the token for the 'this' keyword to the given [token].
2303 */ 2303 */
2304 void set thisKeyword(Token token); 2304 void set thisKeyword(Token token);
2305 } 2305 }
2306 2306
2307 /** 2307 /**
2308 * A node that can occur in the initializer list of a constructor declaration. 2308 * A node that can occur in the initializer list of a constructor declaration.
2309 * 2309 *
2310 * > constructorInitializer ::= 2310 * constructorInitializer ::=
2311 * > [SuperConstructorInvocation] 2311 * [SuperConstructorInvocation]
2312 * > | [ConstructorFieldInitializer] 2312 * | [ConstructorFieldInitializer]
2313 * > | [RedirectingConstructorInvocation] 2313 * | [RedirectingConstructorInvocation]
2314 * 2314 *
2315 * Clients may not extend, implement or mix-in this class. 2315 * Clients may not extend, implement or mix-in this class.
2316 */ 2316 */
2317 abstract class ConstructorInitializer extends AstNode {} 2317 abstract class ConstructorInitializer extends AstNode {}
2318 2318
2319 /** 2319 /**
2320 * The name of a constructor. 2320 * The name of a constructor.
2321 * 2321 *
2322 * > constructorName ::= 2322 * constructorName ::=
2323 * > type ('.' identifier)? 2323 * type ('.' identifier)?
2324 * 2324 *
2325 * Clients may not extend, implement or mix-in this class. 2325 * Clients may not extend, implement or mix-in this class.
2326 */ 2326 */
2327 abstract class ConstructorName extends AstNode { 2327 abstract class ConstructorName extends AstNode {
2328 /** 2328 /**
2329 * Initialize a newly created constructor name. The [period] and [name] can be 2329 * Initialize a newly created constructor name. The [period] and [name] can be
2330 * `null` if the constructor being named is the unnamed constructor. 2330 * `null` if the constructor being named is the unnamed constructor.
2331 */ 2331 */
2332 factory ConstructorName(TypeName type, Token period, SimpleIdentifier name) = 2332 factory ConstructorName(TypeName type, Token period, SimpleIdentifier name) =
2333 ConstructorNameImpl; 2333 ConstructorNameImpl;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
2375 2375
2376 /** 2376 /**
2377 * Set the name of the type defining the constructor to the given [type] name. 2377 * Set the name of the type defining the constructor to the given [type] name.
2378 */ 2378 */
2379 void set type(TypeName type); 2379 void set type(TypeName type);
2380 } 2380 }
2381 2381
2382 /** 2382 /**
2383 * A continue statement. 2383 * A continue statement.
2384 * 2384 *
2385 * > continueStatement ::= 2385 * continueStatement ::=
2386 * > 'continue' [SimpleIdentifier]? ';' 2386 * 'continue' [SimpleIdentifier]? ';'
2387 * 2387 *
2388 * Clients may not extend, implement or mix-in this class. 2388 * Clients may not extend, implement or mix-in this class.
2389 */ 2389 */
2390 abstract class ContinueStatement extends Statement { 2390 abstract class ContinueStatement extends Statement {
2391 /** 2391 /**
2392 * Initialize a newly created continue statement. The [label] can be `null` if 2392 * Initialize a newly created continue statement. The [label] can be `null` if
2393 * there is no label associated with the statement. 2393 * there is no label associated with the statement.
2394 */ 2394 */
2395 factory ContinueStatement( 2395 factory ContinueStatement(
2396 Token continueKeyword, SimpleIdentifier label, Token semicolon) = 2396 Token continueKeyword, SimpleIdentifier label, Token semicolon) =
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2455 * Return the element associated with this declaration, or `null` if either 2455 * Return the element associated with this declaration, or `null` if either
2456 * this node corresponds to a list of declarations or if the AST structure has 2456 * this node corresponds to a list of declarations or if the AST structure has
2457 * not been resolved. 2457 * not been resolved.
2458 */ 2458 */
2459 Element get element; 2459 Element get element;
2460 } 2460 }
2461 2461
2462 /** 2462 /**
2463 * The declaration of a single identifier. 2463 * The declaration of a single identifier.
2464 * 2464 *
2465 * > declaredIdentifier ::= 2465 * declaredIdentifier ::=
2466 * > [Annotation] finalConstVarOrType [SimpleIdentifier] 2466 * [Annotation] finalConstVarOrType [SimpleIdentifier]
2467 * 2467 *
2468 * Clients may not extend, implement or mix-in this class. 2468 * Clients may not extend, implement or mix-in this class.
2469 */ 2469 */
2470 abstract class DeclaredIdentifier extends Declaration { 2470 abstract class DeclaredIdentifier extends Declaration {
2471 /** 2471 /**
2472 * Initialize a newly created formal parameter. Either or both of the 2472 * 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 2473 * [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 2474 * corresponding attribute. The [keyword] can be `null` if a type name is
2475 * given. The [type] must be `null` if the keyword is 'var'. 2475 * given. The [type] must be `null` if the keyword is 'var'.
2476 */ 2476 */
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2528 * Set the name of the declared type of the parameter to the given [typeName]. 2528 * Set the name of the declared type of the parameter to the given [typeName].
2529 */ 2529 */
2530 void set type(TypeName typeName); 2530 void set type(TypeName typeName);
2531 } 2531 }
2532 2532
2533 /** 2533 /**
2534 * A formal parameter with a default value. There are two kinds of parameters 2534 * A formal parameter with a default value. There are two kinds of parameters
2535 * that are both represented by this class: named formal parameters and 2535 * that are both represented by this class: named formal parameters and
2536 * positional formal parameters. 2536 * positional formal parameters.
2537 * 2537 *
2538 * > defaultFormalParameter ::= 2538 * defaultFormalParameter ::=
2539 * > [NormalFormalParameter] ('=' [Expression])? 2539 * [NormalFormalParameter] ('=' [Expression])?
2540 * > 2540 *
2541 * > defaultNamedParameter ::= 2541 * defaultNamedParameter ::=
2542 * > [NormalFormalParameter] (':' [Expression])? 2542 * [NormalFormalParameter] (':' [Expression])?
2543 * 2543 *
2544 * Clients may not extend, implement or mix-in this class. 2544 * Clients may not extend, implement or mix-in this class.
2545 */ 2545 */
2546 abstract class DefaultFormalParameter extends FormalParameter { 2546 abstract class DefaultFormalParameter extends FormalParameter {
2547 /** 2547 /**
2548 * Initialize a newly created default formal parameter. The [separator] and 2548 * Initialize a newly created default formal parameter. The [separator] and
2549 * [defaultValue] can be `null` if there is no default value. 2549 * [defaultValue] can be `null` if there is no default value.
2550 */ 2550 */
2551 factory DefaultFormalParameter( 2551 factory DefaultFormalParameter(
2552 NormalFormalParameter parameter, 2552 NormalFormalParameter parameter,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2591 /** 2591 /**
2592 * Set the token separating the parameter from the default value to the given 2592 * Set the token separating the parameter from the default value to the given
2593 * [token]. 2593 * [token].
2594 */ 2594 */
2595 void set separator(Token token); 2595 void set separator(Token token);
2596 } 2596 }
2597 2597
2598 /** 2598 /**
2599 * A node that represents a directive. 2599 * A node that represents a directive.
2600 * 2600 *
2601 * > directive ::= 2601 * directive ::=
2602 * > [ExportDirective] 2602 * [ExportDirective]
2603 * > | [ImportDirective] 2603 * | [ImportDirective]
2604 * > | [LibraryDirective] 2604 * | [LibraryDirective]
2605 * > | [PartDirective] 2605 * | [PartDirective]
2606 * > | [PartOfDirective] 2606 * | [PartOfDirective]
2607 * 2607 *
2608 * Clients may not extend, implement or mix-in this class. 2608 * Clients may not extend, implement or mix-in this class.
2609 */ 2609 */
2610 abstract class Directive extends AnnotatedNode { 2610 abstract class Directive extends AnnotatedNode {
2611 /** 2611 /**
2612 * Return the element associated with this directive, or `null` if the AST 2612 * Return the element associated with this directive, or `null` if the AST
2613 * structure has not been resolved or if this directive could not be resolved. 2613 * structure has not been resolved or if this directive could not be resolved.
2614 */ 2614 */
2615 Element get element; 2615 Element get element;
2616 2616
2617 /** 2617 /**
2618 * Set the element associated with this directive to the given [element]. 2618 * Set the element associated with this directive to the given [element].
2619 */ 2619 */
2620 void set element(Element element); 2620 void set element(Element element);
2621 2621
2622 /** 2622 /**
2623 * Return the token representing the keyword that introduces this directive 2623 * Return the token representing the keyword that introduces this directive
2624 * ('import', 'export', 'library' or 'part'). 2624 * ('import', 'export', 'library' or 'part').
2625 */ 2625 */
2626 Token get keyword; 2626 Token get keyword;
2627 } 2627 }
2628 2628
2629 /** 2629 /**
2630 * A do statement. 2630 * A do statement.
2631 * 2631 *
2632 * > doStatement ::= 2632 * doStatement ::=
2633 * > 'do' [Statement] 'while' '(' [Expression] ')' ';' 2633 * 'do' [Statement] 'while' '(' [Expression] ')' ';'
2634 * 2634 *
2635 * Clients may not extend, implement or mix-in this class. 2635 * Clients may not extend, implement or mix-in this class.
2636 */ 2636 */
2637 abstract class DoStatement extends Statement { 2637 abstract class DoStatement extends Statement {
2638 /** 2638 /**
2639 * Initialize a newly created do loop. 2639 * Initialize a newly created do loop.
2640 */ 2640 */
2641 factory DoStatement( 2641 factory DoStatement(
2642 Token doKeyword, 2642 Token doKeyword,
2643 Statement body, 2643 Statement body,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
2715 2715
2716 /** 2716 /**
2717 * Set the token representing the 'while' keyword to the given [token]. 2717 * Set the token representing the 'while' keyword to the given [token].
2718 */ 2718 */
2719 void set whileKeyword(Token token); 2719 void set whileKeyword(Token token);
2720 } 2720 }
2721 2721
2722 /** 2722 /**
2723 * A dotted name, used in a configuration within an import or export directive. 2723 * A dotted name, used in a configuration within an import or export directive.
2724 * 2724 *
2725 * > dottedName ::= 2725 * dottedName ::=
2726 * > [SimpleIdentifier] ('.' [SimpleIdentifier])* 2726 * [SimpleIdentifier] ('.' [SimpleIdentifier])*
2727 * 2727 *
2728 * Clients may not extend, implement or mix-in this class. 2728 * Clients may not extend, implement or mix-in this class.
2729 */ 2729 */
2730 abstract class DottedName extends AstNode { 2730 abstract class DottedName extends AstNode {
2731 /** 2731 /**
2732 * Initialize a newly created dotted name. 2732 * Initialize a newly created dotted name.
2733 */ 2733 */
2734 factory DottedName(List<SimpleIdentifier> components) = DottedNameImpl; 2734 factory DottedName(List<SimpleIdentifier> components) = DottedNameImpl;
2735 2735
2736 /** 2736 /**
2737 * Return the components of the identifier. 2737 * Return the components of the identifier.
2738 */ 2738 */
2739 NodeList<SimpleIdentifier> get components; 2739 NodeList<SimpleIdentifier> get components;
2740 } 2740 }
2741 2741
2742 /** 2742 /**
2743 * A floating point literal expression. 2743 * A floating point literal expression.
2744 * 2744 *
2745 * > doubleLiteral ::= 2745 * doubleLiteral ::=
2746 * > decimalDigit+ ('.' decimalDigit*)? exponent? 2746 * decimalDigit+ ('.' decimalDigit*)? exponent?
2747 * > | '.' decimalDigit+ exponent? 2747 * | '.' decimalDigit+ exponent?
2748 * > 2748 *
2749 * > exponent ::= 2749 * exponent ::=
2750 * > ('e' | 'E') ('+' | '-')? decimalDigit+ 2750 * ('e' | 'E') ('+' | '-')? decimalDigit+
2751 * 2751 *
2752 * Clients may not extend, implement or mix-in this class. 2752 * Clients may not extend, implement or mix-in this class.
2753 */ 2753 */
2754 abstract class DoubleLiteral extends Literal { 2754 abstract class DoubleLiteral extends Literal {
2755 /** 2755 /**
2756 * Initialize a newly created floating point literal. 2756 * Initialize a newly created floating point literal.
2757 */ 2757 */
2758 factory DoubleLiteral(Token literal, double value) = DoubleLiteralImpl; 2758 factory DoubleLiteral(Token literal, double value) = DoubleLiteralImpl;
2759 2759
2760 /** 2760 /**
(...skipping 14 matching lines...) Expand all
2775 /** 2775 /**
2776 * Set the value of the literal to the given [value]. 2776 * Set the value of the literal to the given [value].
2777 */ 2777 */
2778 void set value(double value); 2778 void set value(double value);
2779 } 2779 }
2780 2780
2781 /** 2781 /**
2782 * An empty function body, which can only appear in constructors or abstract 2782 * An empty function body, which can only appear in constructors or abstract
2783 * methods. 2783 * methods.
2784 * 2784 *
2785 * > emptyFunctionBody ::= 2785 * emptyFunctionBody ::=
2786 * > ';' 2786 * ';'
2787 * 2787 *
2788 * Clients may not extend, implement or mix-in this class. 2788 * Clients may not extend, implement or mix-in this class.
2789 */ 2789 */
2790 abstract class EmptyFunctionBody extends FunctionBody { 2790 abstract class EmptyFunctionBody extends FunctionBody {
2791 /** 2791 /**
2792 * Initialize a newly created function body. 2792 * Initialize a newly created function body.
2793 */ 2793 */
2794 factory EmptyFunctionBody(Token semicolon) = EmptyFunctionBodyImpl; 2794 factory EmptyFunctionBody(Token semicolon) = EmptyFunctionBodyImpl;
2795 2795
2796 /** 2796 /**
2797 * Return the token representing the semicolon that marks the end of the 2797 * Return the token representing the semicolon that marks the end of the
2798 * function body. 2798 * function body.
2799 */ 2799 */
2800 Token get semicolon; 2800 Token get semicolon;
2801 2801
2802 /** 2802 /**
2803 * Set the token representing the semicolon that marks the end of the 2803 * Set the token representing the semicolon that marks the end of the
2804 * function body to the given [token]. 2804 * function body to the given [token].
2805 */ 2805 */
2806 void set semicolon(Token token); 2806 void set semicolon(Token token);
2807 } 2807 }
2808 2808
2809 /** 2809 /**
2810 * An empty statement. 2810 * An empty statement.
2811 * 2811 *
2812 * > emptyStatement ::= 2812 * emptyStatement ::=
2813 * > ';' 2813 * ';'
2814 * 2814 *
2815 * Clients may not extend, implement or mix-in this class. 2815 * Clients may not extend, implement or mix-in this class.
2816 */ 2816 */
2817 abstract class EmptyStatement extends Statement { 2817 abstract class EmptyStatement extends Statement {
2818 /** 2818 /**
2819 * Initialize a newly created empty statement. 2819 * Initialize a newly created empty statement.
2820 */ 2820 */
2821 factory EmptyStatement(Token semicolon) = EmptyStatementImpl; 2821 factory EmptyStatement(Token semicolon) = EmptyStatementImpl;
2822 2822
2823 /** 2823 /**
(...skipping 30 matching lines...) Expand all
2854 2854
2855 /** 2855 /**
2856 * Set the name of the constant to the given [name]. 2856 * Set the name of the constant to the given [name].
2857 */ 2857 */
2858 void set name(SimpleIdentifier name); 2858 void set name(SimpleIdentifier name);
2859 } 2859 }
2860 2860
2861 /** 2861 /**
2862 * The declaration of an enumeration. 2862 * The declaration of an enumeration.
2863 * 2863 *
2864 * > enumType ::= 2864 * enumType ::=
2865 * > metadata 'enum' [SimpleIdentifier] '{' [SimpleIdentifier] (',' [SimpleI dentifier])* (',')? '}' 2865 * metadata 'enum' [SimpleIdentifier] '{' [SimpleIdentifier] (',' [Simple Identifier])* (',')? '}'
2866 * 2866 *
2867 * Clients may not extend, implement or mix-in this class. 2867 * Clients may not extend, implement or mix-in this class.
2868 */ 2868 */
2869 abstract class EnumDeclaration extends NamedCompilationUnitMember { 2869 abstract class EnumDeclaration extends NamedCompilationUnitMember {
2870 /** 2870 /**
2871 * Initialize a newly created enumeration declaration. Either or both of the 2871 * 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 2872 * [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 2873 * corresponding attribute. The list of [constants] must contain at least one
2874 * value. 2874 * value.
2875 */ 2875 */
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
2917 2917
2918 /** 2918 /**
2919 * Set the right curly bracket to the given [token]. 2919 * Set the right curly bracket to the given [token].
2920 */ 2920 */
2921 void set rightBracket(Token token); 2921 void set rightBracket(Token token);
2922 } 2922 }
2923 2923
2924 /** 2924 /**
2925 * An export directive. 2925 * An export directive.
2926 * 2926 *
2927 * > exportDirective ::= 2927 * exportDirective ::=
2928 * > [Annotation] 'export' [StringLiteral] [Combinator]* ';' 2928 * [Annotation] 'export' [StringLiteral] [Combinator]* ';'
2929 * 2929 *
2930 * Clients may not extend, implement or mix-in this class. 2930 * Clients may not extend, implement or mix-in this class.
2931 */ 2931 */
2932 abstract class ExportDirective extends NamespaceDirective { 2932 abstract class ExportDirective extends NamespaceDirective {
2933 /** 2933 /**
2934 * Initialize a newly created export directive. Either or both of the 2934 * 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 2935 * [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 2936 * corresponding attribute. The list of [combinators] can be `null` if there
2937 * are no combinators. 2937 * are no combinators.
2938 */ 2938 */
2939 factory ExportDirective( 2939 factory ExportDirective(
2940 Comment comment, 2940 Comment comment,
2941 List<Annotation> metadata, 2941 List<Annotation> metadata,
2942 Token keyword, 2942 Token keyword,
2943 StringLiteral libraryUri, 2943 StringLiteral libraryUri,
2944 List<Configuration> configurations, 2944 List<Configuration> configurations,
2945 List<Combinator> combinators, 2945 List<Combinator> combinators,
2946 Token semicolon) = ExportDirectiveImpl; 2946 Token semicolon) = ExportDirectiveImpl;
2947 } 2947 }
2948 2948
2949 /** 2949 /**
2950 * A node that represents an expression. 2950 * A node that represents an expression.
2951 * 2951 *
2952 * > expression ::= 2952 * expression ::=
2953 * > [AssignmentExpression] 2953 * [AssignmentExpression]
2954 * > | [ConditionalExpression] cascadeSection* 2954 * | [ConditionalExpression] cascadeSection*
2955 * > | [ThrowExpression] 2955 * | [ThrowExpression]
2956 * 2956 *
2957 * Clients may not extend, implement or mix-in this class. 2957 * Clients may not extend, implement or mix-in this class.
2958 */ 2958 */
2959 abstract class Expression extends AstNode { 2959 abstract class Expression extends AstNode {
2960 /** 2960 /**
2961 * An empty list of expressions. 2961 * An empty list of expressions.
2962 */ 2962 */
2963 static const List<Expression> EMPTY_LIST = const <Expression>[]; 2963 static const List<Expression> EMPTY_LIST = const <Expression>[];
2964 2964
2965 /** 2965 /**
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
3036 3036
3037 /** 3037 /**
3038 * Set the static type of this expression to the given [type]. 3038 * Set the static type of this expression to the given [type].
3039 */ 3039 */
3040 void set staticType(DartType type); 3040 void set staticType(DartType type);
3041 } 3041 }
3042 3042
3043 /** 3043 /**
3044 * A function body consisting of a single expression. 3044 * A function body consisting of a single expression.
3045 * 3045 *
3046 * > expressionFunctionBody ::= 3046 * expressionFunctionBody ::=
3047 * > 'async'? '=>' [Expression] ';' 3047 * 'async'? '=>' [Expression] ';'
3048 * 3048 *
3049 * Clients may not extend, implement or mix-in this class. 3049 * Clients may not extend, implement or mix-in this class.
3050 */ 3050 */
3051 abstract class ExpressionFunctionBody extends FunctionBody { 3051 abstract class ExpressionFunctionBody extends FunctionBody {
3052 /** 3052 /**
3053 * Initialize a newly created function body consisting of a block of 3053 * Initialize a newly created function body consisting of a block of
3054 * statements. The [keyword] can be `null` if the function body is not an 3054 * statements. The [keyword] can be `null` if the function body is not an
3055 * async function body. 3055 * async function body.
3056 */ 3056 */
3057 factory ExpressionFunctionBody(Token keyword, Token functionDefinition, 3057 factory ExpressionFunctionBody(Token keyword, Token functionDefinition,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
3092 3092
3093 /** 3093 /**
3094 * Set the semicolon terminating the statement to the given [token]. 3094 * Set the semicolon terminating the statement to the given [token].
3095 */ 3095 */
3096 void set semicolon(Token token); 3096 void set semicolon(Token token);
3097 } 3097 }
3098 3098
3099 /** 3099 /**
3100 * An expression used as a statement. 3100 * An expression used as a statement.
3101 * 3101 *
3102 * > expressionStatement ::= 3102 * expressionStatement ::=
3103 * > [Expression]? ';' 3103 * [Expression]? ';'
3104 * 3104 *
3105 * Clients may not extend, implement or mix-in this class. 3105 * Clients may not extend, implement or mix-in this class.
3106 */ 3106 */
3107 abstract class ExpressionStatement extends Statement { 3107 abstract class ExpressionStatement extends Statement {
3108 /** 3108 /**
3109 * Initialize a newly created expression statement. 3109 * Initialize a newly created expression statement.
3110 */ 3110 */
3111 factory ExpressionStatement(Expression expression, Token semicolon) = 3111 factory ExpressionStatement(Expression expression, Token semicolon) =
3112 ExpressionStatementImpl; 3112 ExpressionStatementImpl;
3113 3113
(...skipping 15 matching lines...) Expand all
3129 3129
3130 /** 3130 /**
3131 * Set the semicolon terminating the statement to the given [token]. 3131 * Set the semicolon terminating the statement to the given [token].
3132 */ 3132 */
3133 void set semicolon(Token token); 3133 void set semicolon(Token token);
3134 } 3134 }
3135 3135
3136 /** 3136 /**
3137 * The "extends" clause in a class declaration. 3137 * The "extends" clause in a class declaration.
3138 * 3138 *
3139 * > extendsClause ::= 3139 * extendsClause ::=
3140 * > 'extends' [TypeName] 3140 * 'extends' [TypeName]
3141 * 3141 *
3142 * Clients may not extend, implement or mix-in this class. 3142 * Clients may not extend, implement or mix-in this class.
3143 */ 3143 */
3144 abstract class ExtendsClause extends AstNode { 3144 abstract class ExtendsClause extends AstNode {
3145 /** 3145 /**
3146 * Initialize a newly created extends clause. 3146 * Initialize a newly created extends clause.
3147 */ 3147 */
3148 factory ExtendsClause(Token extendsKeyword, TypeName superclass) = 3148 factory ExtendsClause(Token extendsKeyword, TypeName superclass) =
3149 ExtendsClauseImpl; 3149 ExtendsClauseImpl;
3150 3150
(...skipping 14 matching lines...) Expand all
3165 3165
3166 /** 3166 /**
3167 * Set the name of the class that is being extended to the given [name]. 3167 * Set the name of the class that is being extended to the given [name].
3168 */ 3168 */
3169 void set superclass(TypeName name); 3169 void set superclass(TypeName name);
3170 } 3170 }
3171 3171
3172 /** 3172 /**
3173 * The declaration of one or more fields of the same type. 3173 * The declaration of one or more fields of the same type.
3174 * 3174 *
3175 * > fieldDeclaration ::= 3175 * fieldDeclaration ::=
3176 * > 'static'? [VariableDeclarationList] ';' 3176 * 'static'? [VariableDeclarationList] ';'
3177 * 3177 *
3178 * Clients may not extend, implement or mix-in this class. 3178 * Clients may not extend, implement or mix-in this class.
3179 */ 3179 */
3180 abstract class FieldDeclaration extends ClassMember { 3180 abstract class FieldDeclaration extends ClassMember {
3181 /** 3181 /**
3182 * Initialize a newly created field declaration. Either or both of the 3182 * Initialize a newly created field declaration. Either or both of the
3183 * [comment] and [metadata] can be `null` if the declaration does not have the 3183 * [comment] and [metadata] can be `null` if the declaration does not have the
3184 * corresponding attribute. The [staticKeyword] can be `null` if the field is 3184 * corresponding attribute. The [staticKeyword] can be `null` if the field is
3185 * not a static field. 3185 * not a static field.
3186 */ 3186 */
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
3224 3224
3225 /** 3225 /**
3226 * Set the token representing the 'static' keyword to the given [token]. 3226 * Set the token representing the 'static' keyword to the given [token].
3227 */ 3227 */
3228 void set staticKeyword(Token token); 3228 void set staticKeyword(Token token);
3229 } 3229 }
3230 3230
3231 /** 3231 /**
3232 * A field formal parameter. 3232 * A field formal parameter.
3233 * 3233 *
3234 * > fieldFormalParameter ::= 3234 * fieldFormalParameter ::=
3235 * > ('final' [TypeName] | 'const' [TypeName] | 'var' | [TypeName])? 3235 * ('final' [TypeName] | 'const' [TypeName] | 'var' | [TypeName])?
3236 * > 'this' '.' [SimpleIdentifier] ([TypeParameterList]? [FormalParameterLis t])? 3236 * 'this' '.' [SimpleIdentifier] ([TypeParameterList]? [FormalParameterLi st])?
3237 * 3237 *
3238 * Clients may not extend, implement or mix-in this class. 3238 * Clients may not extend, implement or mix-in this class.
3239 */ 3239 */
3240 abstract class FieldFormalParameter extends NormalFormalParameter { 3240 abstract class FieldFormalParameter extends NormalFormalParameter {
3241 /** 3241 /**
3242 * Initialize a newly created formal parameter. Either or both of the 3242 * Initialize a newly created formal parameter. Either or both of the
3243 * [comment] and [metadata] can be `null` if the parameter does not have the 3243 * [comment] and [metadata] can be `null` if the parameter does not have the
3244 * corresponding attribute. The [keyword] can be `null` if there is a type. 3244 * corresponding attribute. The [keyword] can be `null` if there is a type.
3245 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and 3245 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
3246 * [period] can be `null` if the keyword 'this' was not provided. The 3246 * [period] can be `null` if the keyword 'this' was not provided. The
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
3324 /** 3324 /**
3325 * Set the type parameters associated with this method to the given 3325 * Set the type parameters associated with this method to the given
3326 * [typeParameters]. 3326 * [typeParameters].
3327 */ 3327 */
3328 void set typeParameters(TypeParameterList typeParameters); 3328 void set typeParameters(TypeParameterList typeParameters);
3329 } 3329 }
3330 3330
3331 /** 3331 /**
3332 * A for-each statement. 3332 * A for-each statement.
3333 * 3333 *
3334 * > forEachStatement ::= 3334 * forEachStatement ::=
3335 * > 'await'? 'for' '(' [DeclaredIdentifier] 'in' [Expression] ')' [Block] 3335 * 'await'? 'for' '(' [DeclaredIdentifier] 'in' [Expression] ')' [Block]
3336 * > | 'await'? 'for' '(' [SimpleIdentifier] 'in' [Expression] ')' [Block] 3336 * | 'await'? 'for' '(' [SimpleIdentifier] 'in' [Expression] ')' [Block]
3337 * 3337 *
3338 * Clients may not extend, implement or mix-in this class. 3338 * Clients may not extend, implement or mix-in this class.
3339 */ 3339 */
3340 abstract class ForEachStatement extends Statement { 3340 abstract class ForEachStatement extends Statement {
3341 /** 3341 /**
3342 * Initialize a newly created for-each statement whose loop control variable 3342 * Initialize a newly created for-each statement whose loop control variable
3343 * is declared internally (in the for-loop part). The [awaitKeyword] can be 3343 * is declared internally (in the for-loop part). The [awaitKeyword] can be
3344 * `null` if this is not an asynchronous for loop. 3344 * `null` if this is not an asynchronous for loop.
3345 */ 3345 */
3346 factory ForEachStatement.withDeclaration( 3346 factory ForEachStatement.withDeclaration(
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
3459 3459
3460 /** 3460 /**
3461 * Set the right parenthesis to the given [token]. 3461 * Set the right parenthesis to the given [token].
3462 */ 3462 */
3463 void set rightParenthesis(Token token); 3463 void set rightParenthesis(Token token);
3464 } 3464 }
3465 3465
3466 /** 3466 /**
3467 * A node representing a parameter to a function. 3467 * A node representing a parameter to a function.
3468 * 3468 *
3469 * > formalParameter ::= 3469 * formalParameter ::=
3470 * > [NormalFormalParameter] 3470 * [NormalFormalParameter]
3471 * > | [DefaultFormalParameter] 3471 * | [DefaultFormalParameter]
3472 * 3472 *
3473 * Clients may not extend, implement or mix-in this class. 3473 * Clients may not extend, implement or mix-in this class.
3474 */ 3474 */
3475 abstract class FormalParameter extends AstNode { 3475 abstract class FormalParameter extends AstNode {
3476 /** 3476 /**
3477 * Return the element representing this parameter, or `null` if this parameter 3477 * Return the element representing this parameter, or `null` if this parameter
3478 * has not been resolved. 3478 * has not been resolved.
3479 */ 3479 */
3480 ParameterElement get element; 3480 ParameterElement get element;
3481 3481
(...skipping 28 matching lines...) Expand all
3510 /** 3510 /**
3511 * The formal parameter list of a method declaration, function declaration, or 3511 * The formal parameter list of a method declaration, function declaration, or
3512 * function type alias. 3512 * function type alias.
3513 * 3513 *
3514 * While the grammar requires all optional formal parameters to follow all of 3514 * While the grammar requires all optional formal parameters to follow all of
3515 * the normal formal parameters and at most one grouping of optional formal 3515 * the normal formal parameters and at most one grouping of optional formal
3516 * parameters, this class does not enforce those constraints. All parameters are 3516 * parameters, this class does not enforce those constraints. All parameters are
3517 * flattened into a single list, which can have any or all kinds of parameters 3517 * flattened into a single list, which can have any or all kinds of parameters
3518 * (normal, named, and positional) in any order. 3518 * (normal, named, and positional) in any order.
3519 * 3519 *
3520 * > formalParameterList ::= 3520 * formalParameterList ::=
3521 * > '(' ')' 3521 * '(' ')'
3522 * > | '(' normalFormalParameters (',' optionalFormalParameters)? ')' 3522 * | '(' normalFormalParameters (',' optionalFormalParameters)? ')'
3523 * > | '(' optionalFormalParameters ')' 3523 * | '(' optionalFormalParameters ')'
3524 * > 3524 *
3525 * > normalFormalParameters ::= 3525 * normalFormalParameters ::=
3526 * > [NormalFormalParameter] (',' [NormalFormalParameter])* 3526 * [NormalFormalParameter] (',' [NormalFormalParameter])*
3527 * > 3527 *
3528 * > optionalFormalParameters ::= 3528 * optionalFormalParameters ::=
3529 * > optionalPositionalFormalParameters 3529 * optionalPositionalFormalParameters
3530 * > | namedFormalParameters 3530 * | namedFormalParameters
3531 * > 3531 *
3532 * > optionalPositionalFormalParameters ::= 3532 * optionalPositionalFormalParameters ::=
3533 * > '[' [DefaultFormalParameter] (',' [DefaultFormalParameter])* ']' 3533 * '[' [DefaultFormalParameter] (',' [DefaultFormalParameter])* ']'
3534 * > 3534 *
3535 * > namedFormalParameters ::= 3535 * namedFormalParameters ::=
3536 * > '{' [DefaultFormalParameter] (',' [DefaultFormalParameter])* '}' 3536 * '{' [DefaultFormalParameter] (',' [DefaultFormalParameter])* '}'
3537 * 3537 *
3538 * Clients may not extend, implement or mix-in this class. 3538 * Clients may not extend, implement or mix-in this class.
3539 */ 3539 */
3540 abstract class FormalParameterList extends AstNode { 3540 abstract class FormalParameterList extends AstNode {
3541 /** 3541 /**
3542 * Initialize a newly created parameter list. The list of [parameters] can be 3542 * Initialize a newly created parameter list. The list of [parameters] can be
3543 * `null` if there are no parameters. The [leftDelimiter] and [rightDelimiter] 3543 * `null` if there are no parameters. The [leftDelimiter] and [rightDelimiter]
3544 * can be `null` if there are no optional parameters. 3544 * can be `null` if there are no optional parameters.
3545 */ 3545 */
3546 factory FormalParameterList( 3546 factory FormalParameterList(
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
3603 3603
3604 /** 3604 /**
3605 * Set the right parenthesis to the given [token]. 3605 * Set the right parenthesis to the given [token].
3606 */ 3606 */
3607 void set rightParenthesis(Token token); 3607 void set rightParenthesis(Token token);
3608 } 3608 }
3609 3609
3610 /** 3610 /**
3611 * A for statement. 3611 * A for statement.
3612 * 3612 *
3613 * > forStatement ::= 3613 * forStatement ::=
3614 * > 'for' '(' forLoopParts ')' [Statement] 3614 * 'for' '(' forLoopParts ')' [Statement]
3615 * > 3615 *
3616 * > forLoopParts ::= 3616 * forLoopParts ::=
3617 * > forInitializerStatement ';' [Expression]? ';' [Expression]? 3617 * forInitializerStatement ';' [Expression]? ';' [Expression]?
3618 * > 3618 *
3619 * > forInitializerStatement ::= 3619 * forInitializerStatement ::=
3620 * > [DefaultFormalParameter] 3620 * [DefaultFormalParameter]
3621 * > | [Expression]? 3621 * | [Expression]?
3622 * 3622 *
3623 * Clients may not extend, implement or mix-in this class. 3623 * Clients may not extend, implement or mix-in this class.
3624 */ 3624 */
3625 abstract class ForStatement extends Statement { 3625 abstract class ForStatement extends Statement {
3626 /** 3626 /**
3627 * Initialize a newly created for statement. Either the [variableList] or the 3627 * Initialize a newly created for statement. Either the [variableList] or the
3628 * [initialization] must be `null`. Either the [condition] and the list of 3628 * [initialization] must be `null`. Either the [condition] and the list of
3629 * [updaters] can be `null` if the loop does not have the corresponding 3629 * [updaters] can be `null` if the loop does not have the corresponding
3630 * attribute. 3630 * attribute.
3631 */ 3631 */
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
3739 3739
3740 /** 3740 /**
3741 * Set the declaration of the loop variables to the given [variableList]. 3741 * Set the declaration of the loop variables to the given [variableList].
3742 */ 3742 */
3743 void set variables(VariableDeclarationList variableList); 3743 void set variables(VariableDeclarationList variableList);
3744 } 3744 }
3745 3745
3746 /** 3746 /**
3747 * A node representing the body of a function or method. 3747 * A node representing the body of a function or method.
3748 * 3748 *
3749 * > functionBody ::= 3749 * functionBody ::=
3750 * > [BlockFunctionBody] 3750 * [BlockFunctionBody]
3751 * > | [EmptyFunctionBody] 3751 * | [EmptyFunctionBody]
3752 * > | [ExpressionFunctionBody] 3752 * | [ExpressionFunctionBody]
3753 * 3753 *
3754 * Clients may not extend, implement or mix-in this class. 3754 * Clients may not extend, implement or mix-in this class.
3755 */ 3755 */
3756 abstract class FunctionBody extends AstNode { 3756 abstract class FunctionBody extends AstNode {
3757 /** 3757 /**
3758 * Return `true` if this function body is asynchronous. 3758 * Return `true` if this function body is asynchronous.
3759 */ 3759 */
3760 bool get isAsynchronous; 3760 bool get isAsynchronous;
3761 3761
3762 /** 3762 /**
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
3804 * level function or method containing this [FunctionBody], return `false`. 3804 * level function or method containing this [FunctionBody], return `false`.
3805 * 3805 *
3806 * Throws an exception if resolution has not yet been performed. 3806 * Throws an exception if resolution has not yet been performed.
3807 */ 3807 */
3808 bool isPotentiallyMutatedInScope(VariableElement variable); 3808 bool isPotentiallyMutatedInScope(VariableElement variable);
3809 } 3809 }
3810 3810
3811 /** 3811 /**
3812 * A top-level declaration. 3812 * A top-level declaration.
3813 * 3813 *
3814 * > functionDeclaration ::= 3814 * functionDeclaration ::=
3815 * > 'external' functionSignature 3815 * 'external' functionSignature
3816 * > | functionSignature [FunctionBody] 3816 * | functionSignature [FunctionBody]
3817 * > 3817 *
3818 * > functionSignature ::= 3818 * functionSignature ::=
3819 * > [Type]? ('get' | 'set')? [SimpleIdentifier] [FormalParameterList] 3819 * [Type]? ('get' | 'set')? [SimpleIdentifier] [FormalParameterList]
3820 * 3820 *
3821 * Clients may not extend, implement or mix-in this class. 3821 * Clients may not extend, implement or mix-in this class.
3822 */ 3822 */
3823 abstract class FunctionDeclaration extends NamedCompilationUnitMember { 3823 abstract class FunctionDeclaration extends NamedCompilationUnitMember {
3824 /** 3824 /**
3825 * Initialize a newly created function declaration. Either or both of the 3825 * Initialize a newly created function declaration. Either or both of the
3826 * [comment] and [metadata] can be `null` if the function does not have the 3826 * [comment] and [metadata] can be `null` if the function does not have the
3827 * corresponding attribute. The [externalKeyword] can be `null` if the 3827 * corresponding attribute. The [externalKeyword] can be `null` if the
3828 * function is not an external function. The [returnType] can be `null` if no 3828 * function is not an external function. The [returnType] can be `null` if no
3829 * return type was specified. The [propertyKeyword] can be `null` if the 3829 * return type was specified. The [propertyKeyword] can be `null` if the
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
3917 /** 3917 /**
3918 * Set the function declaration being wrapped to the given 3918 * Set the function declaration being wrapped to the given
3919 * [functionDeclaration]. 3919 * [functionDeclaration].
3920 */ 3920 */
3921 void set functionDeclaration(FunctionDeclaration functionDeclaration); 3921 void set functionDeclaration(FunctionDeclaration functionDeclaration);
3922 } 3922 }
3923 3923
3924 /** 3924 /**
3925 * A function expression. 3925 * A function expression.
3926 * 3926 *
3927 * > functionExpression ::= 3927 * functionExpression ::=
3928 * > [TypeParameterList]? [FormalParameterList] [FunctionBody] 3928 * [TypeParameterList]? [FormalParameterList] [FunctionBody]
3929 * 3929 *
3930 * Clients may not extend, implement or mix-in this class. 3930 * Clients may not extend, implement or mix-in this class.
3931 */ 3931 */
3932 abstract class FunctionExpression extends Expression { 3932 abstract class FunctionExpression extends Expression {
3933 /** 3933 /**
3934 * Initialize a newly created function declaration. 3934 * Initialize a newly created function declaration.
3935 */ 3935 */
3936 factory FunctionExpression( 3936 factory FunctionExpression(
3937 TypeParameterList typeParameters, 3937 TypeParameterList typeParameters,
3938 FormalParameterList parameters, 3938 FormalParameterList parameters,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
3982 */ 3982 */
3983 void set typeParameters(TypeParameterList typeParameters); 3983 void set typeParameters(TypeParameterList typeParameters);
3984 } 3984 }
3985 3985
3986 /** 3986 /**
3987 * The invocation of a function resulting from evaluating an expression. 3987 * The invocation of a function resulting from evaluating an expression.
3988 * Invocations of methods and other forms of functions are represented by 3988 * Invocations of methods and other forms of functions are represented by
3989 * [MethodInvocation] nodes. Invocations of getters and setters are represented 3989 * [MethodInvocation] nodes. Invocations of getters and setters are represented
3990 * by either [PrefixedIdentifier] or [PropertyAccess] nodes. 3990 * by either [PrefixedIdentifier] or [PropertyAccess] nodes.
3991 * 3991 *
3992 * > functionExpressionInvocation ::= 3992 * functionExpressionInvocation ::=
3993 * > [Expression] [TypeArgumentList]? [ArgumentList] 3993 * [Expression] [TypeArgumentList]? [ArgumentList]
3994 * 3994 *
3995 * Clients may not extend, implement or mix-in this class. 3995 * Clients may not extend, implement or mix-in this class.
3996 */ 3996 */
3997 abstract class FunctionExpressionInvocation extends InvocationExpression { 3997 abstract class FunctionExpressionInvocation extends InvocationExpression {
3998 /** 3998 /**
3999 * Initialize a newly created function expression invocation. 3999 * Initialize a newly created function expression invocation.
4000 */ 4000 */
4001 factory FunctionExpressionInvocation( 4001 factory FunctionExpressionInvocation(
4002 Expression function, 4002 Expression function,
4003 TypeArgumentList typeArguments, 4003 TypeArgumentList typeArguments,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
4091 /** 4091 /**
4092 * Set the type arguments to be applied to the method being invoked to the 4092 * Set the type arguments to be applied to the method being invoked to the
4093 * given [typeArguments]. 4093 * given [typeArguments].
4094 */ 4094 */
4095 void set typeArguments(TypeArgumentList typeArguments); 4095 void set typeArguments(TypeArgumentList typeArguments);
4096 } 4096 }
4097 4097
4098 /** 4098 /**
4099 * A function type alias. 4099 * A function type alias.
4100 * 4100 *
4101 * > functionTypeAlias ::= 4101 * functionTypeAlias ::=
4102 * > functionPrefix [TypeParameterList]? [FormalParameterList] ';' 4102 * functionPrefix [TypeParameterList]? [FormalParameterList] ';'
4103 * > 4103 *
4104 * > functionPrefix ::= 4104 * functionPrefix ::=
4105 * > [TypeName]? [SimpleIdentifier] 4105 * [TypeName]? [SimpleIdentifier]
4106 * 4106 *
4107 * Clients may not extend, implement or mix-in this class. 4107 * Clients may not extend, implement or mix-in this class.
4108 */ 4108 */
4109 abstract class FunctionTypeAlias extends TypeAlias { 4109 abstract class FunctionTypeAlias extends TypeAlias {
4110 /** 4110 /**
4111 * Initialize a newly created function type alias. Either or both of the 4111 * Initialize a newly created function type alias. Either or both of the
4112 * [comment] and [metadata] can be `null` if the function does not have the 4112 * [comment] and [metadata] can be `null` if the function does not have the
4113 * corresponding attribute. The [returnType] can be `null` if no return type 4113 * corresponding attribute. The [returnType] can be `null` if no return type
4114 * was specified. The [typeParameters] can be `null` if the function has no 4114 * was specified. The [typeParameters] can be `null` if the function has no
4115 * type parameters. 4115 * type parameters.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
4156 /** 4156 /**
4157 * Set the type parameters for the function type to the given list of 4157 * Set the type parameters for the function type to the given list of
4158 * [typeParameters]. 4158 * [typeParameters].
4159 */ 4159 */
4160 void set typeParameters(TypeParameterList typeParameters); 4160 void set typeParameters(TypeParameterList typeParameters);
4161 } 4161 }
4162 4162
4163 /** 4163 /**
4164 * A function-typed formal parameter. 4164 * A function-typed formal parameter.
4165 * 4165 *
4166 * > functionSignature ::= 4166 * functionSignature ::=
4167 * > [TypeName]? [SimpleIdentifier] [TypeParameterList]? [FormalParameterLis t] 4167 * [TypeName]? [SimpleIdentifier] [TypeParameterList]? [FormalParameterLi st]
4168 * 4168 *
4169 * Clients may not extend, implement or mix-in this class. 4169 * Clients may not extend, implement or mix-in this class.
4170 */ 4170 */
4171 abstract class FunctionTypedFormalParameter extends NormalFormalParameter { 4171 abstract class FunctionTypedFormalParameter extends NormalFormalParameter {
4172 /** 4172 /**
4173 * Initialize a newly created formal parameter. Either or both of the 4173 * Initialize a newly created formal parameter. Either or both of the
4174 * [comment] and [metadata] can be `null` if the parameter does not have the 4174 * [comment] and [metadata] can be `null` if the parameter does not have the
4175 * corresponding attribute. The [returnType] can be `null` if no return type 4175 * corresponding attribute. The [returnType] can be `null` if no return type
4176 * was specified. 4176 * was specified.
4177 */ 4177 */
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
4215 * Set the type parameters associated with this method to the given 4215 * Set the type parameters associated with this method to the given
4216 * [typeParameters]. 4216 * [typeParameters].
4217 */ 4217 */
4218 void set typeParameters(TypeParameterList typeParameters); 4218 void set typeParameters(TypeParameterList typeParameters);
4219 } 4219 }
4220 4220
4221 /** 4221 /**
4222 * A combinator that restricts the names being imported to those that are not in 4222 * A combinator that restricts the names being imported to those that are not in
4223 * a given list. 4223 * a given list.
4224 * 4224 *
4225 * > hideCombinator ::= 4225 * hideCombinator ::=
4226 * > 'hide' [SimpleIdentifier] (',' [SimpleIdentifier])* 4226 * 'hide' [SimpleIdentifier] (',' [SimpleIdentifier])*
4227 * 4227 *
4228 * Clients may not extend, implement or mix-in this class. 4228 * Clients may not extend, implement or mix-in this class.
4229 */ 4229 */
4230 abstract class HideCombinator extends Combinator { 4230 abstract class HideCombinator extends Combinator {
4231 /** 4231 /**
4232 * Initialize a newly created import show combinator. 4232 * Initialize a newly created import show combinator.
4233 */ 4233 */
4234 factory HideCombinator(Token keyword, List<SimpleIdentifier> hiddenNames) = 4234 factory HideCombinator(Token keyword, List<SimpleIdentifier> hiddenNames) =
4235 HideCombinatorImpl; 4235 HideCombinatorImpl;
4236 4236
4237 /** 4237 /**
4238 * Return the list of names from the library that are hidden by this 4238 * Return the list of names from the library that are hidden by this
4239 * combinator. 4239 * combinator.
4240 */ 4240 */
4241 NodeList<SimpleIdentifier> get hiddenNames; 4241 NodeList<SimpleIdentifier> get hiddenNames;
4242 } 4242 }
4243 4243
4244 /** 4244 /**
4245 * A node that represents an identifier. 4245 * A node that represents an identifier.
4246 * 4246 *
4247 * > identifier ::= 4247 * identifier ::=
4248 * > [SimpleIdentifier] 4248 * [SimpleIdentifier]
4249 * > | [PrefixedIdentifier] 4249 * | [PrefixedIdentifier]
4250 * 4250 *
4251 * Clients may not extend, implement or mix-in this class. 4251 * Clients may not extend, implement or mix-in this class.
4252 */ 4252 */
4253 abstract class Identifier extends Expression { 4253 abstract class Identifier extends Expression {
4254 /** 4254 /**
4255 * Return the best element available for this operator. If resolution was able 4255 * Return the best element available for this operator. If resolution was able
4256 * to find a better element based on type propagation, that element will be 4256 * to find a better element based on type propagation, that element will be
4257 * returned. Otherwise, the element found using the result of static analysis 4257 * returned. Otherwise, the element found using the result of static analysis
4258 * will be returned. If resolution has not been performed, then `null` will be 4258 * will be returned. If resolution has not been performed, then `null` will be
4259 * returned. 4259 * returned.
(...skipping 25 matching lines...) Expand all
4285 * Return `true` if the given [name] is visible only within the library in 4285 * Return `true` if the given [name] is visible only within the library in
4286 * which it is declared. 4286 * which it is declared.
4287 */ 4287 */
4288 static bool isPrivateName(String name) => 4288 static bool isPrivateName(String name) =>
4289 StringUtilities.startsWithChar(name, 0x5F); // '_' 4289 StringUtilities.startsWithChar(name, 0x5F); // '_'
4290 } 4290 }
4291 4291
4292 /** 4292 /**
4293 * An if statement. 4293 * An if statement.
4294 * 4294 *
4295 * > ifStatement ::= 4295 * ifStatement ::=
4296 * > 'if' '(' [Expression] ')' [Statement] ('else' [Statement])? 4296 * 'if' '(' [Expression] ')' [Statement] ('else' [Statement])?
4297 * 4297 *
4298 * Clients may not extend, implement or mix-in this class. 4298 * Clients may not extend, implement or mix-in this class.
4299 */ 4299 */
4300 abstract class IfStatement extends Statement { 4300 abstract class IfStatement extends Statement {
4301 /** 4301 /**
4302 * Initialize a newly created if statement. The [elseKeyword] and 4302 * Initialize a newly created if statement. The [elseKeyword] and
4303 * [elseStatement] can be `null` if there is no else clause. 4303 * [elseStatement] can be `null` if there is no else clause.
4304 */ 4304 */
4305 factory IfStatement( 4305 factory IfStatement(
4306 Token ifKeyword, 4306 Token ifKeyword,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
4384 /** 4384 /**
4385 * Set the statement that is executed if the condition evaluates to `true` to 4385 * Set the statement that is executed if the condition evaluates to `true` to
4386 * the given [statement]. 4386 * the given [statement].
4387 */ 4387 */
4388 void set thenStatement(Statement statement); 4388 void set thenStatement(Statement statement);
4389 } 4389 }
4390 4390
4391 /** 4391 /**
4392 * The "implements" clause in an class declaration. 4392 * The "implements" clause in an class declaration.
4393 * 4393 *
4394 * > implementsClause ::= 4394 * implementsClause ::=
4395 * > 'implements' [TypeName] (',' [TypeName])* 4395 * 'implements' [TypeName] (',' [TypeName])*
4396 * 4396 *
4397 * Clients may not extend, implement or mix-in this class. 4397 * Clients may not extend, implement or mix-in this class.
4398 */ 4398 */
4399 abstract class ImplementsClause extends AstNode { 4399 abstract class ImplementsClause extends AstNode {
4400 /** 4400 /**
4401 * Initialize a newly created implements clause. 4401 * Initialize a newly created implements clause.
4402 */ 4402 */
4403 factory ImplementsClause(Token implementsKeyword, List<TypeName> interfaces) = 4403 factory ImplementsClause(Token implementsKeyword, List<TypeName> interfaces) =
4404 ImplementsClauseImpl; 4404 ImplementsClauseImpl;
4405 4405
4406 /** 4406 /**
4407 * Return the token representing the 'implements' keyword. 4407 * Return the token representing the 'implements' keyword.
4408 */ 4408 */
4409 Token get implementsKeyword; 4409 Token get implementsKeyword;
4410 4410
4411 /** 4411 /**
4412 * Set the token representing the 'implements' keyword to the given [token]. 4412 * Set the token representing the 'implements' keyword to the given [token].
4413 */ 4413 */
4414 void set implementsKeyword(Token token); 4414 void set implementsKeyword(Token token);
4415 4415
4416 /** 4416 /**
4417 * Return the list of the interfaces that are being implemented. 4417 * Return the list of the interfaces that are being implemented.
4418 */ 4418 */
4419 NodeList<TypeName> get interfaces; 4419 NodeList<TypeName> get interfaces;
4420 } 4420 }
4421 4421
4422 /** 4422 /**
4423 * An import directive. 4423 * An import directive.
4424 * 4424 *
4425 * > importDirective ::= 4425 * importDirective ::=
4426 * > [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* ';' 4426 * [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* ';'
4427 * > | [Annotation] 'import' [StringLiteral] 'deferred' 'as' identifier [Combi nator]* ';' 4427 * | [Annotation] 'import' [StringLiteral] 'deferred' 'as' identifier [Comb inator]* ';'
4428 * 4428 *
4429 * Clients may not extend, implement or mix-in this class. 4429 * Clients may not extend, implement or mix-in this class.
4430 */ 4430 */
4431 abstract class ImportDirective extends NamespaceDirective { 4431 abstract class ImportDirective extends NamespaceDirective {
4432 static Comparator<ImportDirective> COMPARATOR = 4432 static Comparator<ImportDirective> COMPARATOR =
4433 (ImportDirective import1, ImportDirective import2) { 4433 (ImportDirective import1, ImportDirective import2) {
4434 // 4434 //
4435 // uri 4435 // uri
4436 // 4436 //
4437 StringLiteral uri1 = import1.uri; 4437 StringLiteral uri1 = import1.uri;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
4573 4573
4574 /** 4574 /**
4575 * Set the prefix to be used with the imported names to the given [identifier] . 4575 * Set the prefix to be used with the imported names to the given [identifier] .
4576 */ 4576 */
4577 void set prefix(SimpleIdentifier identifier); 4577 void set prefix(SimpleIdentifier identifier);
4578 } 4578 }
4579 4579
4580 /** 4580 /**
4581 * An index expression. 4581 * An index expression.
4582 * 4582 *
4583 * > indexExpression ::= 4583 * indexExpression ::=
4584 * > [Expression] '[' [Expression] ']' 4584 * [Expression] '[' [Expression] ']'
4585 * 4585 *
4586 * Clients may not extend, implement or mix-in this class. 4586 * Clients may not extend, implement or mix-in this class.
4587 */ 4587 */
4588 abstract class IndexExpression extends Expression { 4588 abstract class IndexExpression extends Expression {
4589 /** 4589 /**
4590 * Initialize a newly created index expression. 4590 * Initialize a newly created index expression.
4591 */ 4591 */
4592 factory IndexExpression.forCascade(Token period, Token leftBracket, 4592 factory IndexExpression.forCascade(Token period, Token leftBracket,
4593 Expression index, Token rightBracket) = IndexExpressionImpl.forCascade; 4593 Expression index, Token rightBracket) = IndexExpressionImpl.forCascade;
4594 4594
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
4737 * are they mutually exclusive. In other words, it is possible for both 4737 * are they mutually exclusive. In other words, it is possible for both
4738 * methods to return `true` when invoked on the same node. 4738 * methods to return `true` when invoked on the same node.
4739 */ 4739 */
4740 // TODO(brianwilkerson) Convert this to a getter. 4740 // TODO(brianwilkerson) Convert this to a getter.
4741 bool inSetterContext(); 4741 bool inSetterContext();
4742 } 4742 }
4743 4743
4744 /** 4744 /**
4745 * An instance creation expression. 4745 * An instance creation expression.
4746 * 4746 *
4747 * > newExpression ::= 4747 * newExpression ::=
4748 * > ('new' | 'const') [TypeName] ('.' [SimpleIdentifier])? [ArgumentList] 4748 * ('new' | 'const') [TypeName] ('.' [SimpleIdentifier])? [ArgumentList]
4749 * 4749 *
4750 * Clients may not extend, implement or mix-in this class. 4750 * Clients may not extend, implement or mix-in this class.
4751 */ 4751 */
4752 abstract class InstanceCreationExpression extends Expression { 4752 abstract class InstanceCreationExpression extends Expression {
4753 /** 4753 /**
4754 * Initialize a newly created instance creation expression. 4754 * Initialize a newly created instance creation expression.
4755 */ 4755 */
4756 factory InstanceCreationExpression( 4756 factory InstanceCreationExpression(
4757 Token keyword, 4757 Token keyword,
4758 ConstructorName constructorName, 4758 ConstructorName constructorName,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
4806 /** 4806 /**
4807 * Set the element associated with the constructor based on static type 4807 * Set the element associated with the constructor based on static type
4808 * information to the given [element]. 4808 * information to the given [element].
4809 */ 4809 */
4810 void set staticElement(ConstructorElement element); 4810 void set staticElement(ConstructorElement element);
4811 } 4811 }
4812 4812
4813 /** 4813 /**
4814 * An integer literal expression. 4814 * An integer literal expression.
4815 * 4815 *
4816 * > integerLiteral ::= 4816 * integerLiteral ::=
4817 * > decimalIntegerLiteral 4817 * decimalIntegerLiteral
4818 * > | hexadecimalIntegerLiteral 4818 * | hexadecimalIntegerLiteral
4819 * > 4819 *
4820 * > decimalIntegerLiteral ::= 4820 * decimalIntegerLiteral ::=
4821 * > decimalDigit+ 4821 * decimalDigit+
4822 * > 4822 *
4823 * > hexadecimalIntegerLiteral ::= 4823 * hexadecimalIntegerLiteral ::=
4824 * > '0x' hexadecimalDigit+ 4824 * '0x' hexadecimalDigit+
4825 * > | '0X' hexadecimalDigit+ 4825 * | '0X' hexadecimalDigit+
4826 * 4826 *
4827 * Clients may not extend, implement or mix-in this class. 4827 * Clients may not extend, implement or mix-in this class.
4828 */ 4828 */
4829 abstract class IntegerLiteral extends Literal { 4829 abstract class IntegerLiteral extends Literal {
4830 /** 4830 /**
4831 * Initialize a newly created integer literal. 4831 * Initialize a newly created integer literal.
4832 */ 4832 */
4833 factory IntegerLiteral(Token literal, int value) = IntegerLiteralImpl; 4833 factory IntegerLiteral(Token literal, int value) = IntegerLiteralImpl;
4834 4834
4835 /** 4835 /**
(...skipping 13 matching lines...) Expand all
4849 4849
4850 /** 4850 /**
4851 * Set the value of the literal to the given [value]. 4851 * Set the value of the literal to the given [value].
4852 */ 4852 */
4853 void set value(int value); 4853 void set value(int value);
4854 } 4854 }
4855 4855
4856 /** 4856 /**
4857 * A node within a [StringInterpolation]. 4857 * A node within a [StringInterpolation].
4858 * 4858 *
4859 * > interpolationElement ::= 4859 * interpolationElement ::=
4860 * > [InterpolationExpression] 4860 * [InterpolationExpression]
4861 * > | [InterpolationString] 4861 * | [InterpolationString]
4862 * 4862 *
4863 * Clients may not extend, implement or mix-in this class. 4863 * Clients may not extend, implement or mix-in this class.
4864 */ 4864 */
4865 abstract class InterpolationElement extends AstNode {} 4865 abstract class InterpolationElement extends AstNode {}
4866 4866
4867 /** 4867 /**
4868 * An expression embedded in a string interpolation. 4868 * An expression embedded in a string interpolation.
4869 * 4869 *
4870 * > interpolationExpression ::= 4870 * interpolationExpression ::=
4871 * > '$' [SimpleIdentifier] 4871 * '$' [SimpleIdentifier]
4872 * > | '$' '{' [Expression] '}' 4872 * | '$' '{' [Expression] '}'
4873 * 4873 *
4874 * Clients may not extend, implement or mix-in this class. 4874 * Clients may not extend, implement or mix-in this class.
4875 */ 4875 */
4876 abstract class InterpolationExpression extends InterpolationElement { 4876 abstract class InterpolationExpression extends InterpolationElement {
4877 /** 4877 /**
4878 * Initialize a newly created interpolation expression. 4878 * Initialize a newly created interpolation expression.
4879 */ 4879 */
4880 factory InterpolationExpression( 4880 factory InterpolationExpression(
4881 Token leftBracket, Expression expression, Token rightBracket) = 4881 Token leftBracket, Expression expression, Token rightBracket) =
4882 InterpolationExpressionImpl; 4882 InterpolationExpressionImpl;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
4915 4915
4916 /** 4916 /**
4917 * Set the right curly bracket to the given [token]. 4917 * Set the right curly bracket to the given [token].
4918 */ 4918 */
4919 void set rightBracket(Token token); 4919 void set rightBracket(Token token);
4920 } 4920 }
4921 4921
4922 /** 4922 /**
4923 * A non-empty substring of an interpolated string. 4923 * A non-empty substring of an interpolated string.
4924 * 4924 *
4925 * > interpolationString ::= 4925 * interpolationString ::=
4926 * > characters 4926 * characters
4927 * 4927 *
4928 * Clients may not extend, implement or mix-in this class. 4928 * Clients may not extend, implement or mix-in this class.
4929 */ 4929 */
4930 abstract class InterpolationString extends InterpolationElement { 4930 abstract class InterpolationString extends InterpolationElement {
4931 /** 4931 /**
4932 * Initialize a newly created string of characters that are part of a string 4932 * Initialize a newly created string of characters that are part of a string
4933 * interpolation. 4933 * interpolation.
4934 */ 4934 */
4935 factory InterpolationString(Token contents, String value) = 4935 factory InterpolationString(Token contents, String value) =
4936 InterpolationStringImpl; 4936 InterpolationStringImpl;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
5029 /** 5029 /**
5030 * Return the type arguments to be applied to the method being invoked, or 5030 * Return the type arguments to be applied to the method being invoked, or
5031 * `null` if no type arguments were provided. 5031 * `null` if no type arguments were provided.
5032 */ 5032 */
5033 TypeArgumentList get typeArguments; 5033 TypeArgumentList get typeArguments;
5034 } 5034 }
5035 5035
5036 /** 5036 /**
5037 * An is expression. 5037 * An is expression.
5038 * 5038 *
5039 * > isExpression ::= 5039 * isExpression ::=
5040 * > [Expression] 'is' '!'? [TypeName] 5040 * [Expression] 'is' '!'? [TypeName]
5041 * 5041 *
5042 * Clients may not extend, implement or mix-in this class. 5042 * Clients may not extend, implement or mix-in this class.
5043 */ 5043 */
5044 abstract class IsExpression extends Expression { 5044 abstract class IsExpression extends Expression {
5045 /** 5045 /**
5046 * Initialize a newly created is expression. The [notOperator] can be `null` 5046 * Initialize a newly created is expression. The [notOperator] can be `null`
5047 * if the sense of the test is not negated. 5047 * if the sense of the test is not negated.
5048 */ 5048 */
5049 factory IsExpression(Expression expression, Token isOperator, 5049 factory IsExpression(Expression expression, Token isOperator,
5050 Token notOperator, TypeName type) = IsExpressionImpl; 5050 Token notOperator, TypeName type) = IsExpressionImpl;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
5087 5087
5088 /** 5088 /**
5089 * Set the name of the type being tested for to the given [name]. 5089 * Set the name of the type being tested for to the given [name].
5090 */ 5090 */
5091 void set type(TypeName name); 5091 void set type(TypeName name);
5092 } 5092 }
5093 5093
5094 /** 5094 /**
5095 * A label on either a [LabeledStatement] or a [NamedExpression]. 5095 * A label on either a [LabeledStatement] or a [NamedExpression].
5096 * 5096 *
5097 * > label ::= 5097 * label ::=
5098 * > [SimpleIdentifier] ':' 5098 * [SimpleIdentifier] ':'
5099 * 5099 *
5100 * Clients may not extend, implement or mix-in this class. 5100 * Clients may not extend, implement or mix-in this class.
5101 */ 5101 */
5102 abstract class Label extends AstNode { 5102 abstract class Label extends AstNode {
5103 /** 5103 /**
5104 * Initialize a newly created label. 5104 * Initialize a newly created label.
5105 */ 5105 */
5106 factory Label(SimpleIdentifier label, Token colon) = LabelImpl; 5106 factory Label(SimpleIdentifier label, Token colon) = LabelImpl;
5107 5107
5108 /** 5108 /**
(...skipping 14 matching lines...) Expand all
5123 5123
5124 /** 5124 /**
5125 * Set the label being associated with the statement to the given [label]. 5125 * Set the label being associated with the statement to the given [label].
5126 */ 5126 */
5127 void set label(SimpleIdentifier label); 5127 void set label(SimpleIdentifier label);
5128 } 5128 }
5129 5129
5130 /** 5130 /**
5131 * A statement that has a label associated with them. 5131 * A statement that has a label associated with them.
5132 * 5132 *
5133 * > labeledStatement ::= 5133 * labeledStatement ::=
5134 * > [Label]+ [Statement] 5134 * [Label]+ [Statement]
5135 * 5135 *
5136 * Clients may not extend, implement or mix-in this class. 5136 * Clients may not extend, implement or mix-in this class.
5137 */ 5137 */
5138 abstract class LabeledStatement extends Statement { 5138 abstract class LabeledStatement extends Statement {
5139 /** 5139 /**
5140 * Initialize a newly created labeled statement. 5140 * Initialize a newly created labeled statement.
5141 */ 5141 */
5142 factory LabeledStatement(List<Label> labels, Statement statement) = 5142 factory LabeledStatement(List<Label> labels, Statement statement) =
5143 LabeledStatementImpl; 5143 LabeledStatementImpl;
5144 5144
(...skipping 10 matching lines...) Expand all
5155 /** 5155 /**
5156 * Set the statement with which the labels are being associated to the given 5156 * Set the statement with which the labels are being associated to the given
5157 * [statement]. 5157 * [statement].
5158 */ 5158 */
5159 void set statement(Statement statement); 5159 void set statement(Statement statement);
5160 } 5160 }
5161 5161
5162 /** 5162 /**
5163 * A library directive. 5163 * A library directive.
5164 * 5164 *
5165 * > libraryDirective ::= 5165 * libraryDirective ::=
5166 * > [Annotation] 'library' [Identifier] ';' 5166 * [Annotation] 'library' [Identifier] ';'
5167 * 5167 *
5168 * Clients may not extend, implement or mix-in this class. 5168 * Clients may not extend, implement or mix-in this class.
5169 */ 5169 */
5170 abstract class LibraryDirective extends Directive { 5170 abstract class LibraryDirective extends Directive {
5171 /** 5171 /**
5172 * Initialize a newly created library directive. Either or both of the 5172 * Initialize a newly created library directive. Either or both of the
5173 * [comment] and [metadata] can be `null` if the directive does not have the 5173 * [comment] and [metadata] can be `null` if the directive does not have the
5174 * corresponding attribute. 5174 * corresponding attribute.
5175 */ 5175 */
5176 factory LibraryDirective( 5176 factory LibraryDirective(
(...skipping 30 matching lines...) Expand all
5207 5207
5208 /** 5208 /**
5209 * Set the semicolon terminating the directive to the given [token]. 5209 * Set the semicolon terminating the directive to the given [token].
5210 */ 5210 */
5211 void set semicolon(Token token); 5211 void set semicolon(Token token);
5212 } 5212 }
5213 5213
5214 /** 5214 /**
5215 * The identifier for a library. 5215 * The identifier for a library.
5216 * 5216 *
5217 * > libraryIdentifier ::= 5217 * libraryIdentifier ::=
5218 * > [SimpleIdentifier] ('.' [SimpleIdentifier])* 5218 * [SimpleIdentifier] ('.' [SimpleIdentifier])*
5219 * 5219 *
5220 * Clients may not extend, implement or mix-in this class. 5220 * Clients may not extend, implement or mix-in this class.
5221 */ 5221 */
5222 abstract class LibraryIdentifier extends Identifier { 5222 abstract class LibraryIdentifier extends Identifier {
5223 /** 5223 /**
5224 * Initialize a newly created prefixed identifier. 5224 * Initialize a newly created prefixed identifier.
5225 */ 5225 */
5226 factory LibraryIdentifier(List<SimpleIdentifier> components) = 5226 factory LibraryIdentifier(List<SimpleIdentifier> components) =
5227 LibraryIdentifierImpl; 5227 LibraryIdentifierImpl;
5228 5228
5229 /** 5229 /**
5230 * Return the components of the identifier. 5230 * Return the components of the identifier.
5231 */ 5231 */
5232 NodeList<SimpleIdentifier> get components; 5232 NodeList<SimpleIdentifier> get components;
5233 } 5233 }
5234 5234
5235 /** 5235 /**
5236 * A list literal. 5236 * A list literal.
5237 * 5237 *
5238 * > listLiteral ::= 5238 * listLiteral ::=
5239 * > 'const'? ('<' [TypeName] '>')? '[' ([Expression] ','?)? ']' 5239 * 'const'? ('<' [TypeName] '>')? '[' ([Expression] ','?)? ']'
5240 * 5240 *
5241 * Clients may not extend, implement or mix-in this class. 5241 * Clients may not extend, implement or mix-in this class.
5242 */ 5242 */
5243 abstract class ListLiteral extends TypedLiteral { 5243 abstract class ListLiteral extends TypedLiteral {
5244 /** 5244 /**
5245 * Initialize a newly created list literal. The [constKeyword] can be `null` 5245 * Initialize a newly created list literal. The [constKeyword] can be `null`
5246 * if the literal is not a constant. The [typeArguments] can be `null` if no 5246 * if the literal is not a constant. The [typeArguments] can be `null` if no
5247 * type arguments were declared. The list of [elements] can be `null` if the 5247 * type arguments were declared. The list of [elements] can be `null` if the
5248 * list is empty. 5248 * list is empty.
5249 */ 5249 */
(...skipping 26 matching lines...) Expand all
5276 5276
5277 /** 5277 /**
5278 * Set the right square bracket to the given [token]. 5278 * Set the right square bracket to the given [token].
5279 */ 5279 */
5280 void set rightBracket(Token token); 5280 void set rightBracket(Token token);
5281 } 5281 }
5282 5282
5283 /** 5283 /**
5284 * A node that represents a literal expression. 5284 * A node that represents a literal expression.
5285 * 5285 *
5286 * > literal ::= 5286 * literal ::=
5287 * > [BooleanLiteral] 5287 * [BooleanLiteral]
5288 * > | [DoubleLiteral] 5288 * | [DoubleLiteral]
5289 * > | [IntegerLiteral] 5289 * | [IntegerLiteral]
5290 * > | [ListLiteral] 5290 * | [ListLiteral]
5291 * > | [MapLiteral] 5291 * | [MapLiteral]
5292 * > | [NullLiteral] 5292 * | [NullLiteral]
5293 * > | [StringLiteral] 5293 * | [StringLiteral]
5294 * 5294 *
5295 * Clients may not extend, implement or mix-in this class. 5295 * Clients may not extend, implement or mix-in this class.
5296 */ 5296 */
5297 abstract class Literal extends Expression {} 5297 abstract class Literal extends Expression {}
5298 5298
5299 /** 5299 /**
5300 * A literal map. 5300 * A literal map.
5301 * 5301 *
5302 * > mapLiteral ::= 5302 * mapLiteral ::=
5303 * > 'const'? ('<' [TypeName] (',' [TypeName])* '>')? 5303 * 'const'? ('<' [TypeName] (',' [TypeName])* '>')?
5304 * > '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}' 5304 * '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}'
5305 * 5305 *
5306 * Clients may not extend, implement or mix-in this class. 5306 * Clients may not extend, implement or mix-in this class.
5307 */ 5307 */
5308 abstract class MapLiteral extends TypedLiteral { 5308 abstract class MapLiteral extends TypedLiteral {
5309 /** 5309 /**
5310 * Initialize a newly created map literal. The [constKeyword] can be `null` if 5310 * Initialize a newly created map literal. The [constKeyword] can be `null` if
5311 * the literal is not a constant. The [typeArguments] can be `null` if no type 5311 * the literal is not a constant. The [typeArguments] can be `null` if no type
5312 * arguments were declared. The [entries] can be `null` if the map is empty. 5312 * arguments were declared. The [entries] can be `null` if the map is empty.
5313 */ 5313 */
5314 factory MapLiteral( 5314 factory MapLiteral(
(...skipping 25 matching lines...) Expand all
5340 5340
5341 /** 5341 /**
5342 * Set the right curly bracket to the given [token]. 5342 * Set the right curly bracket to the given [token].
5343 */ 5343 */
5344 void set rightBracket(Token token); 5344 void set rightBracket(Token token);
5345 } 5345 }
5346 5346
5347 /** 5347 /**
5348 * A single key/value pair in a map literal. 5348 * A single key/value pair in a map literal.
5349 * 5349 *
5350 * > mapLiteralEntry ::= 5350 * mapLiteralEntry ::=
5351 * > [Expression] ':' [Expression] 5351 * [Expression] ':' [Expression]
5352 * 5352 *
5353 * Clients may not extend, implement or mix-in this class. 5353 * Clients may not extend, implement or mix-in this class.
5354 */ 5354 */
5355 abstract class MapLiteralEntry extends AstNode { 5355 abstract class MapLiteralEntry extends AstNode {
5356 /** 5356 /**
5357 * Initialize a newly created map literal entry. 5357 * Initialize a newly created map literal entry.
5358 */ 5358 */
5359 factory MapLiteralEntry(Expression key, Token separator, Expression value) = 5359 factory MapLiteralEntry(Expression key, Token separator, Expression value) =
5360 MapLiteralEntryImpl; 5360 MapLiteralEntryImpl;
5361 5361
(...skipping 28 matching lines...) Expand all
5390 /** 5390 /**
5391 * Set the expression computing the value that will be associated with the key 5391 * Set the expression computing the value that will be associated with the key
5392 * to the given [expression]. 5392 * to the given [expression].
5393 */ 5393 */
5394 void set value(Expression expression); 5394 void set value(Expression expression);
5395 } 5395 }
5396 5396
5397 /** 5397 /**
5398 * A method declaration. 5398 * A method declaration.
5399 * 5399 *
5400 * > methodDeclaration ::= 5400 * methodDeclaration ::=
5401 * > methodSignature [FunctionBody] 5401 * methodSignature [FunctionBody]
5402 * > 5402 *
5403 * > methodSignature ::= 5403 * methodSignature ::=
5404 * > 'external'? ('abstract' | 'static')? [Type]? ('get' | 'set')? 5404 * 'external'? ('abstract' | 'static')? [Type]? ('get' | 'set')?
5405 * > methodName [TypeParameterList] [FormalParameterList] 5405 * methodName [TypeParameterList] [FormalParameterList]
5406 * > 5406 *
5407 * > methodName ::= 5407 * methodName ::=
5408 * > [SimpleIdentifier] 5408 * [SimpleIdentifier]
5409 * > | 'operator' [SimpleIdentifier] 5409 * | 'operator' [SimpleIdentifier]
5410 * 5410 *
5411 * Clients may not extend, implement or mix-in this class. 5411 * Clients may not extend, implement or mix-in this class.
5412 */ 5412 */
5413 abstract class MethodDeclaration extends ClassMember { 5413 abstract class MethodDeclaration extends ClassMember {
5414 /** 5414 /**
5415 * Initialize a newly created method declaration. Either or both of the 5415 * Initialize a newly created method declaration. Either or both of the
5416 * [comment] and [metadata] can be `null` if the declaration does not have the 5416 * [comment] and [metadata] can be `null` if the declaration does not have the
5417 * corresponding attribute. The [externalKeyword] can be `null` if the method 5417 * corresponding attribute. The [externalKeyword] can be `null` if the method
5418 * is not external. The [modifierKeyword] can be `null` if the method is 5418 * is not external. The [modifierKeyword] can be `null` if the method is
5419 * neither abstract nor static. The [returnType] can be `null` if no return 5419 * neither abstract nor static. The [returnType] can be `null` if no return
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
5563 */ 5563 */
5564 void set typeParameters(TypeParameterList typeParameters); 5564 void set typeParameters(TypeParameterList typeParameters);
5565 } 5565 }
5566 5566
5567 /** 5567 /**
5568 * The invocation of either a function or a method. Invocations of functions 5568 * The invocation of either a function or a method. Invocations of functions
5569 * resulting from evaluating an expression are represented by 5569 * resulting from evaluating an expression are represented by
5570 * [FunctionExpressionInvocation] nodes. Invocations of getters and setters are 5570 * [FunctionExpressionInvocation] nodes. Invocations of getters and setters are
5571 * represented by either [PrefixedIdentifier] or [PropertyAccess] nodes. 5571 * represented by either [PrefixedIdentifier] or [PropertyAccess] nodes.
5572 * 5572 *
5573 * > methodInvocation ::= 5573 * methodInvocation ::=
5574 * > ([Expression] '.')? [SimpleIdentifier] [TypeArgumentList]? [ArgumentLis t] 5574 * ([Expression] '.')? [SimpleIdentifier] [TypeArgumentList]? [ArgumentLi st]
5575 * 5575 *
5576 * Clients may not extend, implement or mix-in this class. 5576 * Clients may not extend, implement or mix-in this class.
5577 */ 5577 */
5578 abstract class MethodInvocation extends InvocationExpression { 5578 abstract class MethodInvocation extends InvocationExpression {
5579 /** 5579 /**
5580 * Initialize a newly created method invocation. The [target] and [operator] 5580 * Initialize a newly created method invocation. The [target] and [operator]
5581 * can be `null` if there is no target. 5581 * can be `null` if there is no target.
5582 */ 5582 */
5583 factory MethodInvocation( 5583 factory MethodInvocation(
5584 Expression target, 5584 Expression target,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
5702 /** 5702 /**
5703 * Set the name of the member being declared to the given [identifier]. 5703 * Set the name of the member being declared to the given [identifier].
5704 */ 5704 */
5705 void set name(SimpleIdentifier identifier); 5705 void set name(SimpleIdentifier identifier);
5706 } 5706 }
5707 5707
5708 /** 5708 /**
5709 * An expression that has a name associated with it. They are used in method 5709 * An expression that has a name associated with it. They are used in method
5710 * invocations when there are named parameters. 5710 * invocations when there are named parameters.
5711 * 5711 *
5712 * > namedExpression ::= 5712 * namedExpression ::=
5713 * > [Label] [Expression] 5713 * [Label] [Expression]
5714 * 5714 *
5715 * Clients may not extend, implement or mix-in this class. 5715 * Clients may not extend, implement or mix-in this class.
5716 */ 5716 */
5717 abstract class NamedExpression extends Expression { 5717 abstract class NamedExpression extends Expression {
5718 /** 5718 /**
5719 * Initialize a newly created named expression.. 5719 * Initialize a newly created named expression..
5720 */ 5720 */
5721 factory NamedExpression(Label name, Expression expression) = 5721 factory NamedExpression(Label name, Expression expression) =
5722 NamedExpressionImpl; 5722 NamedExpressionImpl;
5723 5723
(...skipping 22 matching lines...) Expand all
5746 5746
5747 /** 5747 /**
5748 * Set the name associated with the expression to the given [identifier]. 5748 * Set the name associated with the expression to the given [identifier].
5749 */ 5749 */
5750 void set name(Label identifier); 5750 void set name(Label identifier);
5751 } 5751 }
5752 5752
5753 /** 5753 /**
5754 * A node that represents a directive that impacts the namespace of a library. 5754 * A node that represents a directive that impacts the namespace of a library.
5755 * 5755 *
5756 * > directive ::= 5756 * directive ::=
5757 * > [ExportDirective] 5757 * [ExportDirective]
5758 * > | [ImportDirective] 5758 * | [ImportDirective]
5759 * 5759 *
5760 * Clients may not extend, implement or mix-in this class. 5760 * Clients may not extend, implement or mix-in this class.
5761 */ 5761 */
5762 abstract class NamespaceDirective extends UriBasedDirective { 5762 abstract class NamespaceDirective extends UriBasedDirective {
5763 /** 5763 /**
5764 * Return the combinators used to control how names are imported or exported. 5764 * Return the combinators used to control how names are imported or exported.
5765 */ 5765 */
5766 NodeList<Combinator> get combinators; 5766 NodeList<Combinator> get combinators;
5767 5767
5768 /** 5768 /**
(...skipping 15 matching lines...) Expand all
5784 5784
5785 /** 5785 /**
5786 * Set the semicolon terminating the directive to the given [token]. 5786 * Set the semicolon terminating the directive to the given [token].
5787 */ 5787 */
5788 void set semicolon(Token token); 5788 void set semicolon(Token token);
5789 } 5789 }
5790 5790
5791 /** 5791 /**
5792 * The "native" clause in an class declaration. 5792 * The "native" clause in an class declaration.
5793 * 5793 *
5794 * > nativeClause ::= 5794 * nativeClause ::=
5795 * > 'native' [StringLiteral] 5795 * 'native' [StringLiteral]
5796 * 5796 *
5797 * Clients may not extend, implement or mix-in this class. 5797 * Clients may not extend, implement or mix-in this class.
5798 */ 5798 */
5799 abstract class NativeClause extends AstNode { 5799 abstract class NativeClause extends AstNode {
5800 /** 5800 /**
5801 * Initialize a newly created native clause. 5801 * Initialize a newly created native clause.
5802 */ 5802 */
5803 factory NativeClause(Token nativeKeyword, StringLiteral name) = 5803 factory NativeClause(Token nativeKeyword, StringLiteral name) =
5804 NativeClauseImpl; 5804 NativeClauseImpl;
5805 5805
(...skipping 16 matching lines...) Expand all
5822 /** 5822 /**
5823 * Set the token representing the 'native' keyword to the given [token]. 5823 * Set the token representing the 'native' keyword to the given [token].
5824 */ 5824 */
5825 void set nativeKeyword(Token token); 5825 void set nativeKeyword(Token token);
5826 } 5826 }
5827 5827
5828 /** 5828 /**
5829 * A function body that consists of a native keyword followed by a string 5829 * A function body that consists of a native keyword followed by a string
5830 * literal. 5830 * literal.
5831 * 5831 *
5832 * > nativeFunctionBody ::= 5832 * nativeFunctionBody ::=
5833 * > 'native' [SimpleStringLiteral] ';' 5833 * 'native' [SimpleStringLiteral] ';'
5834 * 5834 *
5835 * Clients may not extend, implement or mix-in this class. 5835 * Clients may not extend, implement or mix-in this class.
5836 */ 5836 */
5837 abstract class NativeFunctionBody extends FunctionBody { 5837 abstract class NativeFunctionBody extends FunctionBody {
5838 /** 5838 /**
5839 * Initialize a newly created function body consisting of the 'native' token, 5839 * Initialize a newly created function body consisting of the 'native' token,
5840 * a string literal, and a semicolon. 5840 * a string literal, and a semicolon.
5841 */ 5841 */
5842 factory NativeFunctionBody( 5842 factory NativeFunctionBody(
5843 Token nativeKeyword, StringLiteral stringLiteral, Token semicolon) = 5843 Token nativeKeyword, StringLiteral stringLiteral, Token semicolon) =
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
5930 5930
5931 /** 5931 /**
5932 * Use the given [visitor] to visit each of the nodes in this list. 5932 * Use the given [visitor] to visit each of the nodes in this list.
5933 */ 5933 */
5934 accept(AstVisitor visitor); 5934 accept(AstVisitor visitor);
5935 } 5935 }
5936 5936
5937 /** 5937 /**
5938 * A formal parameter that is required (is not optional). 5938 * A formal parameter that is required (is not optional).
5939 * 5939 *
5940 * > normalFormalParameter ::= 5940 * normalFormalParameter ::=
5941 * > [FunctionTypedFormalParameter] 5941 * [FunctionTypedFormalParameter]
5942 * > | [FieldFormalParameter] 5942 * | [FieldFormalParameter]
5943 * > | [SimpleFormalParameter] 5943 * | [SimpleFormalParameter]
5944 * 5944 *
5945 * Clients may not extend, implement or mix-in this class. 5945 * Clients may not extend, implement or mix-in this class.
5946 */ 5946 */
5947 abstract class NormalFormalParameter extends FormalParameter { 5947 abstract class NormalFormalParameter extends FormalParameter {
5948 /** 5948 /**
5949 * Return the documentation comment associated with this parameter, or `null` 5949 * Return the documentation comment associated with this parameter, or `null`
5950 * if this parameter does not have a documentation comment associated with it. 5950 * if this parameter does not have a documentation comment associated with it.
5951 */ 5951 */
5952 Comment get documentationComment; 5952 Comment get documentationComment;
5953 5953
(...skipping 16 matching lines...) Expand all
5970 /** 5970 /**
5971 * Return a list containing the comment and annotations associated with this 5971 * Return a list containing the comment and annotations associated with this
5972 * parameter, sorted in lexical order. 5972 * parameter, sorted in lexical order.
5973 */ 5973 */
5974 List<AstNode> get sortedCommentAndAnnotations; 5974 List<AstNode> get sortedCommentAndAnnotations;
5975 } 5975 }
5976 5976
5977 /** 5977 /**
5978 * A null literal expression. 5978 * A null literal expression.
5979 * 5979 *
5980 * > nullLiteral ::= 5980 * nullLiteral ::=
5981 * > 'null' 5981 * 'null'
5982 * 5982 *
5983 * Clients may not extend, implement or mix-in this class. 5983 * Clients may not extend, implement or mix-in this class.
5984 */ 5984 */
5985 abstract class NullLiteral extends Literal { 5985 abstract class NullLiteral extends Literal {
5986 /** 5986 /**
5987 * Initialize a newly created null literal. 5987 * Initialize a newly created null literal.
5988 */ 5988 */
5989 factory NullLiteral(Token literal) = NullLiteralImpl; 5989 factory NullLiteral(Token literal) = NullLiteralImpl;
5990 5990
5991 /** 5991 /**
5992 * Return the token representing the literal. 5992 * Return the token representing the literal.
5993 */ 5993 */
5994 Token get literal; 5994 Token get literal;
5995 5995
5996 /** 5996 /**
5997 * Set the token representing the literal to the given [token]. 5997 * Set the token representing the literal to the given [token].
5998 */ 5998 */
5999 void set literal(Token token); 5999 void set literal(Token token);
6000 } 6000 }
6001 6001
6002 /** 6002 /**
6003 * A parenthesized expression. 6003 * A parenthesized expression.
6004 * 6004 *
6005 * > parenthesizedExpression ::= 6005 * parenthesizedExpression ::=
6006 * > '(' [Expression] ')' 6006 * '(' [Expression] ')'
6007 * 6007 *
6008 * Clients may not extend, implement or mix-in this class. 6008 * Clients may not extend, implement or mix-in this class.
6009 */ 6009 */
6010 abstract class ParenthesizedExpression extends Expression { 6010 abstract class ParenthesizedExpression extends Expression {
6011 /** 6011 /**
6012 * Initialize a newly created parenthesized expression. 6012 * Initialize a newly created parenthesized expression.
6013 */ 6013 */
6014 factory ParenthesizedExpression(Token leftParenthesis, Expression expression, 6014 factory ParenthesizedExpression(Token leftParenthesis, Expression expression,
6015 Token rightParenthesis) = ParenthesizedExpressionImpl; 6015 Token rightParenthesis) = ParenthesizedExpressionImpl;
6016 6016
(...skipping 24 matching lines...) Expand all
6041 6041
6042 /** 6042 /**
6043 * Set the right parenthesis to the given [token]. 6043 * Set the right parenthesis to the given [token].
6044 */ 6044 */
6045 void set rightParenthesis(Token token); 6045 void set rightParenthesis(Token token);
6046 } 6046 }
6047 6047
6048 /** 6048 /**
6049 * A part directive. 6049 * A part directive.
6050 * 6050 *
6051 * > partDirective ::= 6051 * partDirective ::=
6052 * > [Annotation] 'part' [StringLiteral] ';' 6052 * [Annotation] 'part' [StringLiteral] ';'
6053 * 6053 *
6054 * Clients may not extend, implement or mix-in this class. 6054 * Clients may not extend, implement or mix-in this class.
6055 */ 6055 */
6056 abstract class PartDirective extends UriBasedDirective { 6056 abstract class PartDirective extends UriBasedDirective {
6057 /** 6057 /**
6058 * Initialize a newly created part directive. Either or both of the [comment] 6058 * Initialize a newly created part directive. Either or both of the [comment]
6059 * and [metadata] can be `null` if the directive does not have the 6059 * and [metadata] can be `null` if the directive does not have the
6060 * corresponding attribute. 6060 * corresponding attribute.
6061 */ 6061 */
6062 factory PartDirective( 6062 factory PartDirective(
(...skipping 20 matching lines...) Expand all
6083 6083
6084 /** 6084 /**
6085 * Set the semicolon terminating the directive to the given [token]. 6085 * Set the semicolon terminating the directive to the given [token].
6086 */ 6086 */
6087 void set semicolon(Token token); 6087 void set semicolon(Token token);
6088 } 6088 }
6089 6089
6090 /** 6090 /**
6091 * A part-of directive. 6091 * A part-of directive.
6092 * 6092 *
6093 * > partOfDirective ::= 6093 * partOfDirective ::=
6094 * > [Annotation] 'part' 'of' [Identifier] ';' 6094 * [Annotation] 'part' 'of' [Identifier] ';'
6095 * 6095 *
6096 * Clients may not extend, implement or mix-in this class. 6096 * Clients may not extend, implement or mix-in this class.
6097 */ 6097 */
6098 abstract class PartOfDirective extends Directive { 6098 abstract class PartOfDirective extends Directive {
6099 /** 6099 /**
6100 * Initialize a newly created part-of directive. Either or both of the 6100 * Initialize a newly created part-of directive. Either or both of the
6101 * [comment] and [metadata] can be `null` if the directive does not have the 6101 * [comment] and [metadata] can be `null` if the directive does not have the
6102 * corresponding attribute. 6102 * corresponding attribute.
6103 */ 6103 */
6104 factory PartOfDirective( 6104 factory PartOfDirective(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
6148 6148
6149 /** 6149 /**
6150 * Set the semicolon terminating the directive to the given [token]. 6150 * Set the semicolon terminating the directive to the given [token].
6151 */ 6151 */
6152 void set semicolon(Token token); 6152 void set semicolon(Token token);
6153 } 6153 }
6154 6154
6155 /** 6155 /**
6156 * A postfix unary expression. 6156 * A postfix unary expression.
6157 * 6157 *
6158 * > postfixExpression ::= 6158 * postfixExpression ::=
6159 * > [Expression] [Token] 6159 * [Expression] [Token]
6160 * 6160 *
6161 * Clients may not extend, implement or mix-in this class. 6161 * Clients may not extend, implement or mix-in this class.
6162 */ 6162 */
6163 abstract class PostfixExpression extends Expression { 6163 abstract class PostfixExpression extends Expression {
6164 /** 6164 /**
6165 * Initialize a newly created postfix expression. 6165 * Initialize a newly created postfix expression.
6166 */ 6166 */
6167 factory PostfixExpression(Expression operand, Token operator) = 6167 factory PostfixExpression(Expression operand, Token operator) =
6168 PostfixExpressionImpl; 6168 PostfixExpressionImpl;
6169 6169
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
6222 * Set the element associated with the operator based on the static type of 6222 * Set the element associated with the operator based on the static type of
6223 * the operand to the given [element]. 6223 * the operand to the given [element].
6224 */ 6224 */
6225 void set staticElement(MethodElement element); 6225 void set staticElement(MethodElement element);
6226 } 6226 }
6227 6227
6228 /** 6228 /**
6229 * An identifier that is prefixed or an access to an object property where the 6229 * An identifier that is prefixed or an access to an object property where the
6230 * target of the property access is a simple identifier. 6230 * target of the property access is a simple identifier.
6231 * 6231 *
6232 * > prefixedIdentifier ::= 6232 * prefixedIdentifier ::=
6233 * > [SimpleIdentifier] '.' [SimpleIdentifier] 6233 * [SimpleIdentifier] '.' [SimpleIdentifier]
6234 * 6234 *
6235 * Clients may not extend, implement or mix-in this class. 6235 * Clients may not extend, implement or mix-in this class.
6236 */ 6236 */
6237 abstract class PrefixedIdentifier extends Identifier { 6237 abstract class PrefixedIdentifier extends Identifier {
6238 /** 6238 /**
6239 * Initialize a newly created prefixed identifier. 6239 * Initialize a newly created prefixed identifier.
6240 */ 6240 */
6241 factory PrefixedIdentifier( 6241 factory PrefixedIdentifier(
6242 SimpleIdentifier prefix, Token period, SimpleIdentifier identifier) = 6242 SimpleIdentifier prefix, Token period, SimpleIdentifier identifier) =
6243 PrefixedIdentifierImpl; 6243 PrefixedIdentifierImpl;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
6281 /** 6281 /**
6282 * Set the prefix associated with the library in which the identifier is 6282 * Set the prefix associated with the library in which the identifier is
6283 * defined to the given [identifier]. 6283 * defined to the given [identifier].
6284 */ 6284 */
6285 void set prefix(SimpleIdentifier identifier); 6285 void set prefix(SimpleIdentifier identifier);
6286 } 6286 }
6287 6287
6288 /** 6288 /**
6289 * A prefix unary expression. 6289 * A prefix unary expression.
6290 * 6290 *
6291 * > prefixExpression ::= 6291 * prefixExpression ::=
6292 * > [Token] [Expression] 6292 * [Token] [Expression]
6293 * 6293 *
6294 * Clients may not extend, implement or mix-in this class. 6294 * Clients may not extend, implement or mix-in this class.
6295 */ 6295 */
6296 abstract class PrefixExpression extends Expression { 6296 abstract class PrefixExpression extends Expression {
6297 /** 6297 /**
6298 * Initialize a newly created prefix expression. 6298 * Initialize a newly created prefix expression.
6299 */ 6299 */
6300 factory PrefixExpression(Token operator, Expression operand) = 6300 factory PrefixExpression(Token operator, Expression operand) =
6301 PrefixExpressionImpl; 6301 PrefixExpressionImpl;
6302 6302
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
6358 void set staticElement(MethodElement element); 6358 void set staticElement(MethodElement element);
6359 } 6359 }
6360 6360
6361 /** 6361 /**
6362 * The access of a property of an object. 6362 * The access of a property of an object.
6363 * 6363 *
6364 * Note, however, that accesses to properties of objects can also be represented 6364 * Note, however, that accesses to properties of objects can also be represented
6365 * as [PrefixedIdentifier] nodes in cases where the target is also a simple 6365 * as [PrefixedIdentifier] nodes in cases where the target is also a simple
6366 * identifier. 6366 * identifier.
6367 * 6367 *
6368 * > propertyAccess ::= 6368 * propertyAccess ::=
6369 * > [Expression] '.' [SimpleIdentifier] 6369 * [Expression] '.' [SimpleIdentifier]
6370 * 6370 *
6371 * Clients may not extend, implement or mix-in this class. 6371 * Clients may not extend, implement or mix-in this class.
6372 */ 6372 */
6373 abstract class PropertyAccess extends Expression { 6373 abstract class PropertyAccess extends Expression {
6374 /** 6374 /**
6375 * Initialize a newly created property access expression. 6375 * Initialize a newly created property access expression.
6376 */ 6376 */
6377 factory PropertyAccess( 6377 factory PropertyAccess(
6378 Expression target, Token operator, SimpleIdentifier propertyName) = 6378 Expression target, Token operator, SimpleIdentifier propertyName) =
6379 PropertyAccessImpl; 6379 PropertyAccessImpl;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
6426 * Set the expression computing the object defining the property being 6426 * Set the expression computing the object defining the property being
6427 * accessed to the given [expression]. 6427 * accessed to the given [expression].
6428 */ 6428 */
6429 void set target(Expression expression); 6429 void set target(Expression expression);
6430 } 6430 }
6431 6431
6432 /** 6432 /**
6433 * The invocation of a constructor in the same class from within a constructor's 6433 * The invocation of a constructor in the same class from within a constructor's
6434 * initialization list. 6434 * initialization list.
6435 * 6435 *
6436 * > redirectingConstructorInvocation ::= 6436 * redirectingConstructorInvocation ::=
6437 * > 'this' ('.' identifier)? arguments 6437 * 'this' ('.' identifier)? arguments
6438 * 6438 *
6439 * Clients may not extend, implement or mix-in this class. 6439 * Clients may not extend, implement or mix-in this class.
6440 */ 6440 */
6441 abstract class RedirectingConstructorInvocation extends ConstructorInitializer { 6441 abstract class RedirectingConstructorInvocation extends ConstructorInitializer {
6442 /** 6442 /**
6443 * Initialize a newly created redirecting invocation to invoke the constructor 6443 * Initialize a newly created redirecting invocation to invoke the constructor
6444 * with the given name with the given arguments. The [constructorName] can be 6444 * with the given name with the given arguments. The [constructorName] can be
6445 * `null` if the constructor being invoked is the unnamed constructor. 6445 * `null` if the constructor being invoked is the unnamed constructor.
6446 */ 6446 */
6447 factory RedirectingConstructorInvocation( 6447 factory RedirectingConstructorInvocation(
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
6504 6504
6505 /** 6505 /**
6506 * Set the token for the 'this' keyword to the given [token]. 6506 * Set the token for the 'this' keyword to the given [token].
6507 */ 6507 */
6508 void set thisKeyword(Token token); 6508 void set thisKeyword(Token token);
6509 } 6509 }
6510 6510
6511 /** 6511 /**
6512 * A rethrow expression. 6512 * A rethrow expression.
6513 * 6513 *
6514 * > rethrowExpression ::= 6514 * rethrowExpression ::=
6515 * > 'rethrow' 6515 * 'rethrow'
6516 * 6516 *
6517 * Clients may not extend, implement or mix-in this class. 6517 * Clients may not extend, implement or mix-in this class.
6518 */ 6518 */
6519 abstract class RethrowExpression extends Expression { 6519 abstract class RethrowExpression extends Expression {
6520 /** 6520 /**
6521 * Initialize a newly created rethrow expression. 6521 * Initialize a newly created rethrow expression.
6522 */ 6522 */
6523 factory RethrowExpression(Token rethrowKeyword) = RethrowExpressionImpl; 6523 factory RethrowExpression(Token rethrowKeyword) = RethrowExpressionImpl;
6524 6524
6525 /** 6525 /**
6526 * Return the token representing the 'rethrow' keyword. 6526 * Return the token representing the 'rethrow' keyword.
6527 */ 6527 */
6528 Token get rethrowKeyword; 6528 Token get rethrowKeyword;
6529 6529
6530 /** 6530 /**
6531 * Set the token representing the 'rethrow' keyword to the given [token]. 6531 * Set the token representing the 'rethrow' keyword to the given [token].
6532 */ 6532 */
6533 void set rethrowKeyword(Token token); 6533 void set rethrowKeyword(Token token);
6534 } 6534 }
6535 6535
6536 /** 6536 /**
6537 * A return statement. 6537 * A return statement.
6538 * 6538 *
6539 * > returnStatement ::= 6539 * returnStatement ::=
6540 * > 'return' [Expression]? ';' 6540 * 'return' [Expression]? ';'
6541 * 6541 *
6542 * Clients may not extend, implement or mix-in this class. 6542 * Clients may not extend, implement or mix-in this class.
6543 */ 6543 */
6544 abstract class ReturnStatement extends Statement { 6544 abstract class ReturnStatement extends Statement {
6545 /** 6545 /**
6546 * Initialize a newly created return statement. The [expression] can be `null` 6546 * Initialize a newly created return statement. The [expression] can be `null`
6547 * if no explicit value was provided. 6547 * if no explicit value was provided.
6548 */ 6548 */
6549 factory ReturnStatement( 6549 factory ReturnStatement(
6550 Token returnKeyword, Expression expression, Token semicolon) = 6550 Token returnKeyword, Expression expression, Token semicolon) =
(...skipping 28 matching lines...) Expand all
6579 6579
6580 /** 6580 /**
6581 * Set the semicolon terminating the statement to the given [token]. 6581 * Set the semicolon terminating the statement to the given [token].
6582 */ 6582 */
6583 void set semicolon(Token token); 6583 void set semicolon(Token token);
6584 } 6584 }
6585 6585
6586 /** 6586 /**
6587 * A script tag that can optionally occur at the beginning of a compilation unit . 6587 * A script tag that can optionally occur at the beginning of a compilation unit .
6588 * 6588 *
6589 * > scriptTag ::= 6589 * scriptTag ::=
6590 * > '#!' (~NEWLINE)* NEWLINE 6590 * '#!' (~NEWLINE)* NEWLINE
6591 * 6591 *
6592 * Clients may not extend, implement or mix-in this class. 6592 * Clients may not extend, implement or mix-in this class.
6593 */ 6593 */
6594 abstract class ScriptTag extends AstNode { 6594 abstract class ScriptTag extends AstNode {
6595 /** 6595 /**
6596 * Initialize a newly created script tag. 6596 * Initialize a newly created script tag.
6597 */ 6597 */
6598 factory ScriptTag(Token scriptTag) = ScriptTagImpl; 6598 factory ScriptTag(Token scriptTag) = ScriptTagImpl;
6599 6599
6600 /** 6600 /**
6601 * Return the token representing this script tag. 6601 * Return the token representing this script tag.
6602 */ 6602 */
6603 Token get scriptTag; 6603 Token get scriptTag;
6604 6604
6605 /** 6605 /**
6606 * Set the token representing this script tag to the given [token]. 6606 * Set the token representing this script tag to the given [token].
6607 */ 6607 */
6608 void set scriptTag(Token token); 6608 void set scriptTag(Token token);
6609 } 6609 }
6610 6610
6611 /** 6611 /**
6612 * A combinator that restricts the names being imported to those in a given list . 6612 * A combinator that restricts the names being imported to those in a given list .
6613 * 6613 *
6614 * > showCombinator ::= 6614 * showCombinator ::=
6615 * > 'show' [SimpleIdentifier] (',' [SimpleIdentifier])* 6615 * 'show' [SimpleIdentifier] (',' [SimpleIdentifier])*
6616 * 6616 *
6617 * Clients may not extend, implement or mix-in this class. 6617 * Clients may not extend, implement or mix-in this class.
6618 */ 6618 */
6619 abstract class ShowCombinator extends Combinator { 6619 abstract class ShowCombinator extends Combinator {
6620 /** 6620 /**
6621 * Initialize a newly created import show combinator. 6621 * Initialize a newly created import show combinator.
6622 */ 6622 */
6623 factory ShowCombinator(Token keyword, List<SimpleIdentifier> shownNames) = 6623 factory ShowCombinator(Token keyword, List<SimpleIdentifier> shownNames) =
6624 ShowCombinatorImpl; 6624 ShowCombinatorImpl;
6625 6625
6626 /** 6626 /**
6627 * Return the list of names from the library that are made visible by this 6627 * Return the list of names from the library that are made visible by this
6628 * combinator. 6628 * combinator.
6629 */ 6629 */
6630 NodeList<SimpleIdentifier> get shownNames; 6630 NodeList<SimpleIdentifier> get shownNames;
6631 } 6631 }
6632 6632
6633 /** 6633 /**
6634 * A simple formal parameter. 6634 * A simple formal parameter.
6635 * 6635 *
6636 * > simpleFormalParameter ::= 6636 * simpleFormalParameter ::=
6637 * > ('final' [TypeName] | 'var' | [TypeName])? [SimpleIdentifier] 6637 * ('final' [TypeName] | 'var' | [TypeName])? [SimpleIdentifier]
6638 * 6638 *
6639 * Clients may not extend, implement or mix-in this class. 6639 * Clients may not extend, implement or mix-in this class.
6640 */ 6640 */
6641 abstract class SimpleFormalParameter extends NormalFormalParameter { 6641 abstract class SimpleFormalParameter extends NormalFormalParameter {
6642 /** 6642 /**
6643 * Initialize a newly created formal parameter. Either or both of the 6643 * Initialize a newly created formal parameter. Either or both of the
6644 * [comment] and [metadata] can be `null` if the parameter does not have the 6644 * [comment] and [metadata] can be `null` if the parameter does not have the
6645 * corresponding attribute. The [keyword] can be `null` if a type was 6645 * corresponding attribute. The [keyword] can be `null` if a type was
6646 * specified. The [type] must be `null` if the keyword is 'var'. 6646 * specified. The [type] must be `null` if the keyword is 'var'.
6647 */ 6647 */
(...skipping 24 matching lines...) Expand all
6672 6672
6673 /** 6673 /**
6674 * Set the name of the declared type of the parameter to the given [typeName]. 6674 * Set the name of the declared type of the parameter to the given [typeName].
6675 */ 6675 */
6676 void set type(TypeName typeName); 6676 void set type(TypeName typeName);
6677 } 6677 }
6678 6678
6679 /** 6679 /**
6680 * A simple identifier. 6680 * A simple identifier.
6681 * 6681 *
6682 * > simpleIdentifier ::= 6682 * simpleIdentifier ::=
6683 * > initialCharacter internalCharacter* 6683 * initialCharacter internalCharacter*
6684 * > 6684 *
6685 * > initialCharacter ::= '_' | '$' | letter 6685 * initialCharacter ::= '_' | '$' | letter
6686 * > 6686 *
6687 * > internalCharacter ::= '_' | '$' | letter | digit 6687 * internalCharacter ::= '_' | '$' | letter | digit
6688 * 6688 *
6689 * Clients may not extend, implement or mix-in this class. 6689 * Clients may not extend, implement or mix-in this class.
6690 */ 6690 */
6691 abstract class SimpleIdentifier extends Identifier { 6691 abstract class SimpleIdentifier extends Identifier {
6692 /** 6692 /**
6693 * Initialize a newly created identifier. 6693 * Initialize a newly created identifier.
6694 */ 6694 */
6695 factory SimpleIdentifier(Token token) = SimpleIdentifierImpl; 6695 factory SimpleIdentifier(Token token) = SimpleIdentifierImpl;
6696 6696
6697 /** 6697 /**
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
6762 * are they mutually exclusive. In other words, it is possible for both 6762 * are they mutually exclusive. In other words, it is possible for both
6763 * methods to return `true` when invoked on the same node. 6763 * methods to return `true` when invoked on the same node.
6764 */ 6764 */
6765 // TODO(brianwilkerson) Convert this to a getter. 6765 // TODO(brianwilkerson) Convert this to a getter.
6766 bool inSetterContext(); 6766 bool inSetterContext();
6767 } 6767 }
6768 6768
6769 /** 6769 /**
6770 * A string literal expression that does not contain any interpolations. 6770 * A string literal expression that does not contain any interpolations.
6771 * 6771 *
6772 * > simpleStringLiteral ::= 6772 * simpleStringLiteral ::=
6773 * > rawStringLiteral 6773 * rawStringLiteral
6774 * > | basicStringLiteral 6774 * | basicStringLiteral
6775 * > 6775 *
6776 * > rawStringLiteral ::= 6776 * rawStringLiteral ::=
6777 * > 'r' basicStringLiteral 6777 * 'r' basicStringLiteral
6778 * > 6778 *
6779 * > simpleStringLiteral ::= 6779 * simpleStringLiteral ::=
6780 * > multiLineStringLiteral 6780 * multiLineStringLiteral
6781 * > | singleLineStringLiteral 6781 * | singleLineStringLiteral
6782 * > 6782 *
6783 * > multiLineStringLiteral ::= 6783 * multiLineStringLiteral ::=
6784 * > "'''" characters "'''" 6784 * "'''" characters "'''"
6785 * > | '"""' characters '"""' 6785 * | '"""' characters '"""'
6786 * > 6786 *
6787 * > singleLineStringLiteral ::= 6787 * singleLineStringLiteral ::=
6788 * > "'" characters "'" 6788 * "'" characters "'"
6789 * > | '"' characters '"' 6789 * | '"' characters '"'
6790 * 6790 *
6791 * Clients may not extend, implement or mix-in this class. 6791 * Clients may not extend, implement or mix-in this class.
6792 */ 6792 */
6793 abstract class SimpleStringLiteral extends SingleStringLiteral { 6793 abstract class SimpleStringLiteral extends SingleStringLiteral {
6794 /** 6794 /**
6795 * Initialize a newly created simple string literal. 6795 * Initialize a newly created simple string literal.
6796 */ 6796 */
6797 factory SimpleStringLiteral(Token literal, String value) = 6797 factory SimpleStringLiteral(Token literal, String value) =
6798 SimpleStringLiteralImpl; 6798 SimpleStringLiteralImpl;
6799 6799
(...skipping 14 matching lines...) Expand all
6814 6814
6815 /** 6815 /**
6816 * Set the value of the literal to the given [string]. 6816 * Set the value of the literal to the given [string].
6817 */ 6817 */
6818 void set value(String string); 6818 void set value(String string);
6819 } 6819 }
6820 6820
6821 /** 6821 /**
6822 * A single string literal expression. 6822 * A single string literal expression.
6823 * 6823 *
6824 * > singleStringLiteral ::= 6824 * singleStringLiteral ::=
6825 * > [SimpleStringLiteral] 6825 * [SimpleStringLiteral]
6826 * > | [StringInterpolation] 6826 * | [StringInterpolation]
6827 * 6827 *
6828 * Clients may not extend, implement or mix-in this class. 6828 * Clients may not extend, implement or mix-in this class.
6829 */ 6829 */
6830 abstract class SingleStringLiteral extends StringLiteral { 6830 abstract class SingleStringLiteral extends StringLiteral {
6831 /** 6831 /**
6832 * Return the offset of the after-last contents character. 6832 * Return the offset of the after-last contents character.
6833 */ 6833 */
6834 int get contentsEnd; 6834 int get contentsEnd;
6835 6835
6836 /** 6836 /**
(...skipping 15 matching lines...) Expand all
6852 /** 6852 /**
6853 * Return `true` if this string literal uses single quotes (' or '''). 6853 * Return `true` if this string literal uses single quotes (' or ''').
6854 * Return `false` if this string literal uses double quotes (" or """). 6854 * Return `false` if this string literal uses double quotes (" or """).
6855 */ 6855 */
6856 bool get isSingleQuoted; 6856 bool get isSingleQuoted;
6857 } 6857 }
6858 6858
6859 /** 6859 /**
6860 * A node that represents a statement. 6860 * A node that represents a statement.
6861 * 6861 *
6862 * > statement ::= 6862 * statement ::=
6863 * > [Block] 6863 * [Block]
6864 * > | [VariableDeclarationStatement] 6864 * | [VariableDeclarationStatement]
6865 * > | [ForStatement] 6865 * | [ForStatement]
6866 * > | [ForEachStatement] 6866 * | [ForEachStatement]
6867 * > | [WhileStatement] 6867 * | [WhileStatement]
6868 * > | [DoStatement] 6868 * | [DoStatement]
6869 * > | [SwitchStatement] 6869 * | [SwitchStatement]
6870 * > | [IfStatement] 6870 * | [IfStatement]
6871 * > | [TryStatement] 6871 * | [TryStatement]
6872 * > | [BreakStatement] 6872 * | [BreakStatement]
6873 * > | [ContinueStatement] 6873 * | [ContinueStatement]
6874 * > | [ReturnStatement] 6874 * | [ReturnStatement]
6875 * > | [ExpressionStatement] 6875 * | [ExpressionStatement]
6876 * > | [FunctionDeclarationStatement] 6876 * | [FunctionDeclarationStatement]
6877 * 6877 *
6878 * Clients may not extend, implement or mix-in this class. 6878 * Clients may not extend, implement or mix-in this class.
6879 */ 6879 */
6880 abstract class Statement extends AstNode { 6880 abstract class Statement extends AstNode {
6881 /** 6881 /**
6882 * If this is a labeled statement, return the unlabeled portion of the 6882 * If this is a labeled statement, return the unlabeled portion of the
6883 * statement, otherwise return the statement itself. 6883 * statement, otherwise return the statement itself.
6884 */ 6884 */
6885 Statement get unlabeled; 6885 Statement get unlabeled;
6886 } 6886 }
6887 6887
6888 /** 6888 /**
6889 * A string interpolation literal. 6889 * A string interpolation literal.
6890 * 6890 *
6891 * > stringInterpolation ::= 6891 * stringInterpolation ::=
6892 * > ''' [InterpolationElement]* ''' 6892 * ''' [InterpolationElement]* '''
6893 * > | '"' [InterpolationElement]* '"' 6893 * | '"' [InterpolationElement]* '"'
6894 * 6894 *
6895 * Clients may not extend, implement or mix-in this class. 6895 * Clients may not extend, implement or mix-in this class.
6896 */ 6896 */
6897 abstract class StringInterpolation extends SingleStringLiteral { 6897 abstract class StringInterpolation extends SingleStringLiteral {
6898 /** 6898 /**
6899 * Initialize a newly created string interpolation expression. 6899 * Initialize a newly created string interpolation expression.
6900 */ 6900 */
6901 factory StringInterpolation(List<InterpolationElement> elements) = 6901 factory StringInterpolation(List<InterpolationElement> elements) =
6902 StringInterpolationImpl; 6902 StringInterpolationImpl;
6903 6903
6904 /** 6904 /**
6905 * Return the elements that will be composed to produce the resulting string. 6905 * Return the elements that will be composed to produce the resulting string.
6906 */ 6906 */
6907 NodeList<InterpolationElement> get elements; 6907 NodeList<InterpolationElement> get elements;
6908 } 6908 }
6909 6909
6910 /** 6910 /**
6911 * A string literal expression. 6911 * A string literal expression.
6912 * 6912 *
6913 * > stringLiteral ::= 6913 * stringLiteral ::=
6914 * > [SimpleStringLiteral] 6914 * [SimpleStringLiteral]
6915 * > | [AdjacentStrings] 6915 * | [AdjacentStrings]
6916 * > | [StringInterpolation] 6916 * | [StringInterpolation]
6917 * 6917 *
6918 * Clients may not extend, implement or mix-in this class. 6918 * Clients may not extend, implement or mix-in this class.
6919 */ 6919 */
6920 abstract class StringLiteral extends Literal { 6920 abstract class StringLiteral extends Literal {
6921 /** 6921 /**
6922 * Return the value of the string literal, or `null` if the string is not a 6922 * Return the value of the string literal, or `null` if the string is not a
6923 * constant string without any string interpolation. 6923 * constant string without any string interpolation.
6924 */ 6924 */
6925 String get stringValue; 6925 String get stringValue;
6926 } 6926 }
6927 6927
6928 /** 6928 /**
6929 * The invocation of a superclass' constructor from within a constructor's 6929 * The invocation of a superclass' constructor from within a constructor's
6930 * initialization list. 6930 * initialization list.
6931 * 6931 *
6932 * > superInvocation ::= 6932 * superInvocation ::=
6933 * > 'super' ('.' [SimpleIdentifier])? [ArgumentList] 6933 * 'super' ('.' [SimpleIdentifier])? [ArgumentList]
6934 * 6934 *
6935 * Clients may not extend, implement or mix-in this class. 6935 * Clients may not extend, implement or mix-in this class.
6936 */ 6936 */
6937 abstract class SuperConstructorInvocation extends ConstructorInitializer { 6937 abstract class SuperConstructorInvocation extends ConstructorInitializer {
6938 /** 6938 /**
6939 * Initialize a newly created super invocation to invoke the inherited 6939 * Initialize a newly created super invocation to invoke the inherited
6940 * constructor with the given name with the given arguments. The [period] and 6940 * constructor with the given name with the given arguments. The [period] and
6941 * [constructorName] can be `null` if the constructor being invoked is the 6941 * [constructorName] can be `null` if the constructor being invoked is the
6942 * unnamed constructor. 6942 * unnamed constructor.
6943 */ 6943 */
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
7001 7001
7002 /** 7002 /**
7003 * Set the token for the 'super' keyword to the given [token]. 7003 * Set the token for the 'super' keyword to the given [token].
7004 */ 7004 */
7005 void set superKeyword(Token token); 7005 void set superKeyword(Token token);
7006 } 7006 }
7007 7007
7008 /** 7008 /**
7009 * A super expression. 7009 * A super expression.
7010 * 7010 *
7011 * > superExpression ::= 7011 * superExpression ::=
7012 * > 'super' 7012 * 'super'
7013 * 7013 *
7014 * Clients may not extend, implement or mix-in this class. 7014 * Clients may not extend, implement or mix-in this class.
7015 */ 7015 */
7016 abstract class SuperExpression extends Expression { 7016 abstract class SuperExpression extends Expression {
7017 /** 7017 /**
7018 * Initialize a newly created super expression. 7018 * Initialize a newly created super expression.
7019 */ 7019 */
7020 factory SuperExpression(Token superKeyword) = SuperExpressionImpl; 7020 factory SuperExpression(Token superKeyword) = SuperExpressionImpl;
7021 7021
7022 /** 7022 /**
7023 * Return the token representing the 'super' keyword. 7023 * Return the token representing the 'super' keyword.
7024 */ 7024 */
7025 Token get superKeyword; 7025 Token get superKeyword;
7026 7026
7027 /** 7027 /**
7028 * Set the token representing the 'super' keyword to the given [token]. 7028 * Set the token representing the 'super' keyword to the given [token].
7029 */ 7029 */
7030 void set superKeyword(Token token); 7030 void set superKeyword(Token token);
7031 } 7031 }
7032 7032
7033 /** 7033 /**
7034 * A case in a switch statement. 7034 * A case in a switch statement.
7035 * 7035 *
7036 * > switchCase ::= 7036 * switchCase ::=
7037 * > [SimpleIdentifier]* 'case' [Expression] ':' [Statement]* 7037 * [SimpleIdentifier]* 'case' [Expression] ':' [Statement]*
7038 * 7038 *
7039 * Clients may not extend, implement or mix-in this class. 7039 * Clients may not extend, implement or mix-in this class.
7040 */ 7040 */
7041 abstract class SwitchCase extends SwitchMember { 7041 abstract class SwitchCase extends SwitchMember {
7042 /** 7042 /**
7043 * Initialize a newly created switch case. The list of [labels] can be `null` 7043 * Initialize a newly created switch case. The list of [labels] can be `null`
7044 * if there are no labels. 7044 * if there are no labels.
7045 */ 7045 */
7046 factory SwitchCase(List<Label> labels, Token keyword, Expression expression, 7046 factory SwitchCase(List<Label> labels, Token keyword, Expression expression,
7047 Token colon, List<Statement> statements) = SwitchCaseImpl; 7047 Token colon, List<Statement> statements) = SwitchCaseImpl;
7048 7048
7049 /** 7049 /**
7050 * Return the expression controlling whether the statements will be executed. 7050 * Return the expression controlling whether the statements will be executed.
7051 */ 7051 */
7052 Expression get expression; 7052 Expression get expression;
7053 7053
7054 /** 7054 /**
7055 * Set the expression controlling whether the statements will be executed to 7055 * Set the expression controlling whether the statements will be executed to
7056 * the given [expression]. 7056 * the given [expression].
7057 */ 7057 */
7058 void set expression(Expression expression); 7058 void set expression(Expression expression);
7059 } 7059 }
7060 7060
7061 /** 7061 /**
7062 * The default case in a switch statement. 7062 * The default case in a switch statement.
7063 * 7063 *
7064 * > switchDefault ::= 7064 * switchDefault ::=
7065 * > [SimpleIdentifier]* 'default' ':' [Statement]* 7065 * [SimpleIdentifier]* 'default' ':' [Statement]*
7066 * 7066 *
7067 * Clients may not extend, implement or mix-in this class. 7067 * Clients may not extend, implement or mix-in this class.
7068 */ 7068 */
7069 abstract class SwitchDefault extends SwitchMember { 7069 abstract class SwitchDefault extends SwitchMember {
7070 /** 7070 /**
7071 * Initialize a newly created switch default. The list of [labels] can be 7071 * Initialize a newly created switch default. The list of [labels] can be
7072 * `null` if there are no labels. 7072 * `null` if there are no labels.
7073 */ 7073 */
7074 factory SwitchDefault(List<Label> labels, Token keyword, Token colon, 7074 factory SwitchDefault(List<Label> labels, Token keyword, Token colon,
7075 List<Statement> statements) = SwitchDefaultImpl; 7075 List<Statement> statements) = SwitchDefaultImpl;
7076 } 7076 }
7077 7077
7078 /** 7078 /**
7079 * An element within a switch statement. 7079 * An element within a switch statement.
7080 * 7080 *
7081 * > switchMember ::= 7081 * switchMember ::=
7082 * > switchCase 7082 * switchCase
7083 * > | switchDefault 7083 * | switchDefault
7084 * 7084 *
7085 * Clients may not extend, implement or mix-in this class. 7085 * Clients may not extend, implement or mix-in this class.
7086 */ 7086 */
7087 abstract class SwitchMember extends AstNode { 7087 abstract class SwitchMember extends AstNode {
7088 /** 7088 /**
7089 * Return the colon separating the keyword or the expression from the 7089 * Return the colon separating the keyword or the expression from the
7090 * statements. 7090 * statements.
7091 */ 7091 */
7092 Token get colon; 7092 Token get colon;
7093 7093
(...skipping 22 matching lines...) Expand all
7116 /** 7116 /**
7117 * Return the statements that will be executed if this switch member is 7117 * Return the statements that will be executed if this switch member is
7118 * selected. 7118 * selected.
7119 */ 7119 */
7120 NodeList<Statement> get statements; 7120 NodeList<Statement> get statements;
7121 } 7121 }
7122 7122
7123 /** 7123 /**
7124 * A switch statement. 7124 * A switch statement.
7125 * 7125 *
7126 * > switchStatement ::= 7126 * switchStatement ::=
7127 * > 'switch' '(' [Expression] ')' '{' [SwitchCase]* [SwitchDefault]? '}' 7127 * 'switch' '(' [Expression] ')' '{' [SwitchCase]* [SwitchDefault]? '}'
7128 * 7128 *
7129 * Clients may not extend, implement or mix-in this class. 7129 * Clients may not extend, implement or mix-in this class.
7130 */ 7130 */
7131 abstract class SwitchStatement extends Statement { 7131 abstract class SwitchStatement extends Statement {
7132 /** 7132 /**
7133 * Initialize a newly created switch statement. The list of [members] can be 7133 * Initialize a newly created switch statement. The list of [members] can be
7134 * `null` if there are no switch members. 7134 * `null` if there are no switch members.
7135 */ 7135 */
7136 factory SwitchStatement( 7136 factory SwitchStatement(
7137 Token switchKeyword, 7137 Token switchKeyword,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
7206 7206
7207 /** 7207 /**
7208 * Set the token representing the 'switch' keyword to the given [token]. 7208 * Set the token representing the 'switch' keyword to the given [token].
7209 */ 7209 */
7210 void set switchKeyword(Token token); 7210 void set switchKeyword(Token token);
7211 } 7211 }
7212 7212
7213 /** 7213 /**
7214 * A symbol literal expression. 7214 * A symbol literal expression.
7215 * 7215 *
7216 * > symbolLiteral ::= 7216 * symbolLiteral ::=
7217 * > '#' (operator | (identifier ('.' identifier)*)) 7217 * '#' (operator | (identifier ('.' identifier)*))
7218 * 7218 *
7219 * Clients may not extend, implement or mix-in this class. 7219 * Clients may not extend, implement or mix-in this class.
7220 */ 7220 */
7221 abstract class SymbolLiteral extends Literal { 7221 abstract class SymbolLiteral extends Literal {
7222 /** 7222 /**
7223 * Initialize a newly created symbol literal. 7223 * Initialize a newly created symbol literal.
7224 */ 7224 */
7225 factory SymbolLiteral(Token poundSign, List<Token> components) = 7225 factory SymbolLiteral(Token poundSign, List<Token> components) =
7226 SymbolLiteralImpl; 7226 SymbolLiteralImpl;
7227 7227
7228 /** 7228 /**
7229 * Return the components of the literal. 7229 * Return the components of the literal.
7230 */ 7230 */
7231 List<Token> get components; 7231 List<Token> get components;
7232 7232
7233 /** 7233 /**
7234 * Return the token introducing the literal. 7234 * Return the token introducing the literal.
7235 */ 7235 */
7236 Token get poundSign; 7236 Token get poundSign;
7237 7237
7238 /** 7238 /**
7239 * Set the token introducing the literal to the given [token]. 7239 * Set the token introducing the literal to the given [token].
7240 */ 7240 */
7241 void set poundSign(Token token); 7241 void set poundSign(Token token);
7242 } 7242 }
7243 7243
7244 /** 7244 /**
7245 * A this expression. 7245 * A this expression.
7246 * 7246 *
7247 * > thisExpression ::= 7247 * thisExpression ::=
7248 * > 'this' 7248 * 'this'
7249 * 7249 *
7250 * Clients may not extend, implement or mix-in this class. 7250 * Clients may not extend, implement or mix-in this class.
7251 */ 7251 */
7252 abstract class ThisExpression extends Expression { 7252 abstract class ThisExpression extends Expression {
7253 /** 7253 /**
7254 * Initialize a newly created this expression. 7254 * Initialize a newly created this expression.
7255 */ 7255 */
7256 factory ThisExpression(Token thisKeyword) = ThisExpressionImpl; 7256 factory ThisExpression(Token thisKeyword) = ThisExpressionImpl;
7257 7257
7258 /** 7258 /**
7259 * Return the token representing the 'this' keyword. 7259 * Return the token representing the 'this' keyword.
7260 */ 7260 */
7261 Token get thisKeyword; 7261 Token get thisKeyword;
7262 7262
7263 /** 7263 /**
7264 * Set the token representing the 'this' keyword to the given [token]. 7264 * Set the token representing the 'this' keyword to the given [token].
7265 */ 7265 */
7266 void set thisKeyword(Token token); 7266 void set thisKeyword(Token token);
7267 } 7267 }
7268 7268
7269 /** 7269 /**
7270 * A throw expression. 7270 * A throw expression.
7271 * 7271 *
7272 * > throwExpression ::= 7272 * throwExpression ::=
7273 * > 'throw' [Expression] 7273 * 'throw' [Expression]
7274 * 7274 *
7275 * Clients may not extend, implement or mix-in this class. 7275 * Clients may not extend, implement or mix-in this class.
7276 */ 7276 */
7277 abstract class ThrowExpression extends Expression { 7277 abstract class ThrowExpression extends Expression {
7278 /** 7278 /**
7279 * Initialize a newly created throw expression. 7279 * Initialize a newly created throw expression.
7280 */ 7280 */
7281 factory ThrowExpression(Token throwKeyword, Expression expression) = 7281 factory ThrowExpression(Token throwKeyword, Expression expression) =
7282 ThrowExpressionImpl; 7282 ThrowExpressionImpl;
7283 7283
(...skipping 15 matching lines...) Expand all
7299 7299
7300 /** 7300 /**
7301 * Set the token representing the 'throw' keyword to the given [token]. 7301 * Set the token representing the 'throw' keyword to the given [token].
7302 */ 7302 */
7303 void set throwKeyword(Token token); 7303 void set throwKeyword(Token token);
7304 } 7304 }
7305 7305
7306 /** 7306 /**
7307 * The declaration of one or more top-level variables of the same type. 7307 * The declaration of one or more top-level variables of the same type.
7308 * 7308 *
7309 * > topLevelVariableDeclaration ::= 7309 * topLevelVariableDeclaration ::=
7310 * > ('final' | 'const') type? staticFinalDeclarationList ';' 7310 * ('final' | 'const') type? staticFinalDeclarationList ';'
7311 * > | variableDeclaration ';' 7311 * | variableDeclaration ';'
7312 * 7312 *
7313 * Clients may not extend, implement or mix-in this class. 7313 * Clients may not extend, implement or mix-in this class.
7314 */ 7314 */
7315 abstract class TopLevelVariableDeclaration extends CompilationUnitMember { 7315 abstract class TopLevelVariableDeclaration extends CompilationUnitMember {
7316 /** 7316 /**
7317 * Initialize a newly created top-level variable declaration. Either or both 7317 * Initialize a newly created top-level variable declaration. Either or both
7318 * of the [comment] and [metadata] can be `null` if the variable does not have 7318 * of the [comment] and [metadata] can be `null` if the variable does not have
7319 * the corresponding attribute. 7319 * the corresponding attribute.
7320 */ 7320 */
7321 factory TopLevelVariableDeclaration( 7321 factory TopLevelVariableDeclaration(
(...skipping 20 matching lines...) Expand all
7342 /** 7342 /**
7343 * Set the top-level variables being declared to the given list of 7343 * Set the top-level variables being declared to the given list of
7344 * [variables]. 7344 * [variables].
7345 */ 7345 */
7346 void set variables(VariableDeclarationList variables); 7346 void set variables(VariableDeclarationList variables);
7347 } 7347 }
7348 7348
7349 /** 7349 /**
7350 * A try statement. 7350 * A try statement.
7351 * 7351 *
7352 * > tryStatement ::= 7352 * tryStatement ::=
7353 * > 'try' [Block] ([CatchClause]+ finallyClause? | finallyClause) 7353 * 'try' [Block] ([CatchClause]+ finallyClause? | finallyClause)
7354 * > 7354 *
7355 * > finallyClause ::= 7355 * finallyClause ::=
7356 * > 'finally' [Block] 7356 * 'finally' [Block]
7357 * 7357 *
7358 * Clients may not extend, implement or mix-in this class. 7358 * Clients may not extend, implement or mix-in this class.
7359 */ 7359 */
7360 abstract class TryStatement extends Statement { 7360 abstract class TryStatement extends Statement {
7361 /** 7361 /**
7362 * Initialize a newly created try statement. The list of [catchClauses] can be 7362 * Initialize a newly created try statement. The list of [catchClauses] can be
7363 * `null` if there are no catch clauses. The [finallyKeyword] and 7363 * `null` if there are no catch clauses. The [finallyKeyword] and
7364 * [finallyBlock] can be `null` if there is no finally clause. 7364 * [finallyBlock] can be `null` if there is no finally clause.
7365 */ 7365 */
7366 factory TryStatement( 7366 factory TryStatement(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
7414 7414
7415 /** 7415 /**
7416 * Set the token representing the 'try' keyword to the given [token]. 7416 * Set the token representing the 'try' keyword to the given [token].
7417 */ 7417 */
7418 void set tryKeyword(Token token); 7418 void set tryKeyword(Token token);
7419 } 7419 }
7420 7420
7421 /** 7421 /**
7422 * The declaration of a type alias. 7422 * The declaration of a type alias.
7423 * 7423 *
7424 * > typeAlias ::= 7424 * typeAlias ::=
7425 * > 'typedef' typeAliasBody 7425 * 'typedef' typeAliasBody
7426 * > 7426 *
7427 * > typeAliasBody ::= 7427 * typeAliasBody ::=
7428 * > classTypeAlias 7428 * classTypeAlias
7429 * > | functionTypeAlias 7429 * | functionTypeAlias
7430 * 7430 *
7431 * Clients may not extend, implement or mix-in this class. 7431 * Clients may not extend, implement or mix-in this class.
7432 */ 7432 */
7433 abstract class TypeAlias extends NamedCompilationUnitMember { 7433 abstract class TypeAlias extends NamedCompilationUnitMember {
7434 /** 7434 /**
7435 * Return the semicolon terminating the declaration. 7435 * Return the semicolon terminating the declaration.
7436 */ 7436 */
7437 Token get semicolon; 7437 Token get semicolon;
7438 7438
7439 /** 7439 /**
7440 * Set the semicolon terminating the declaration to the given [token]. 7440 * Set the semicolon terminating the declaration to the given [token].
7441 */ 7441 */
7442 void set semicolon(Token token); 7442 void set semicolon(Token token);
7443 7443
7444 /** 7444 /**
7445 * Return the token representing the 'typedef' keyword. 7445 * Return the token representing the 'typedef' keyword.
7446 */ 7446 */
7447 Token get typedefKeyword; 7447 Token get typedefKeyword;
7448 7448
7449 /** 7449 /**
7450 * Set the token representing the 'typedef' keyword to the given [token]. 7450 * Set the token representing the 'typedef' keyword to the given [token].
7451 */ 7451 */
7452 void set typedefKeyword(Token token); 7452 void set typedefKeyword(Token token);
7453 } 7453 }
7454 7454
7455 /** 7455 /**
7456 * A list of type arguments. 7456 * A list of type arguments.
7457 * 7457 *
7458 * > typeArguments ::= 7458 * typeArguments ::=
7459 * > '<' typeName (',' typeName)* '>' 7459 * '<' typeName (',' typeName)* '>'
7460 * 7460 *
7461 * Clients may not extend, implement or mix-in this class. 7461 * Clients may not extend, implement or mix-in this class.
7462 */ 7462 */
7463 abstract class TypeArgumentList extends AstNode { 7463 abstract class TypeArgumentList extends AstNode {
7464 /** 7464 /**
7465 * Initialize a newly created list of type arguments. 7465 * Initialize a newly created list of type arguments.
7466 */ 7466 */
7467 factory TypeArgumentList( 7467 factory TypeArgumentList(
7468 Token leftBracket, List<TypeName> arguments, Token rightBracket) = 7468 Token leftBracket, List<TypeName> arguments, Token rightBracket) =
7469 TypeArgumentListImpl; 7469 TypeArgumentListImpl;
(...skipping 20 matching lines...) Expand all
7490 7490
7491 /** 7491 /**
7492 * Set the right bracket to the given [token]. 7492 * Set the right bracket to the given [token].
7493 */ 7493 */
7494 void set rightBracket(Token token); 7494 void set rightBracket(Token token);
7495 } 7495 }
7496 7496
7497 /** 7497 /**
7498 * A literal that has a type associated with it. 7498 * A literal that has a type associated with it.
7499 * 7499 *
7500 * > typedLiteral ::= 7500 * typedLiteral ::=
7501 * > [ListLiteral] 7501 * [ListLiteral]
7502 * > | [MapLiteral] 7502 * | [MapLiteral]
7503 * 7503 *
7504 * Clients may not extend, implement or mix-in this class. 7504 * Clients may not extend, implement or mix-in this class.
7505 */ 7505 */
7506 abstract class TypedLiteral extends Literal { 7506 abstract class TypedLiteral extends Literal {
7507 /** 7507 /**
7508 * Return the token representing the 'const' keyword, or `null` if the literal 7508 * Return the token representing the 'const' keyword, or `null` if the literal
7509 * is not a constant. 7509 * is not a constant.
7510 */ 7510 */
7511 Token get constKeyword; 7511 Token get constKeyword;
7512 7512
(...skipping 11 matching lines...) Expand all
7524 /** 7524 /**
7525 * Set the type argument associated with this literal to the given 7525 * Set the type argument associated with this literal to the given
7526 * [typeArguments]. 7526 * [typeArguments].
7527 */ 7527 */
7528 void set typeArguments(TypeArgumentList typeArguments); 7528 void set typeArguments(TypeArgumentList typeArguments);
7529 } 7529 }
7530 7530
7531 /** 7531 /**
7532 * The name of a type, which can optionally include type arguments. 7532 * The name of a type, which can optionally include type arguments.
7533 * 7533 *
7534 * > typeName ::= 7534 * typeName ::=
7535 * > [Identifier] typeArguments? 7535 * [Identifier] typeArguments?
7536 * 7536 *
7537 * Clients may not extend, implement or mix-in this class. 7537 * Clients may not extend, implement or mix-in this class.
7538 */ 7538 */
7539 abstract class TypeName extends AstNode { 7539 abstract class TypeName extends AstNode {
7540 /** 7540 /**
7541 * Initialize a newly created type name. The [typeArguments] can be `null` if 7541 * Initialize a newly created type name. The [typeArguments] can be `null` if
7542 * there are no type arguments. 7542 * there are no type arguments.
7543 */ 7543 */
7544 factory TypeName(Identifier name, TypeArgumentList typeArguments) = 7544 factory TypeName(Identifier name, TypeArgumentList typeArguments) =
7545 TypeNameImpl; 7545 TypeNameImpl;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
7582 /** 7582 /**
7583 * Set the type arguments associated with the type to the given 7583 * Set the type arguments associated with the type to the given
7584 * [typeArguments]. 7584 * [typeArguments].
7585 */ 7585 */
7586 void set typeArguments(TypeArgumentList typeArguments); 7586 void set typeArguments(TypeArgumentList typeArguments);
7587 } 7587 }
7588 7588
7589 /** 7589 /**
7590 * A type parameter. 7590 * A type parameter.
7591 * 7591 *
7592 * > typeParameter ::= 7592 * typeParameter ::=
7593 * > [SimpleIdentifier] ('extends' [TypeName])? 7593 * [SimpleIdentifier] ('extends' [TypeName])?
7594 * 7594 *
7595 * Clients may not extend, implement or mix-in this class. 7595 * Clients may not extend, implement or mix-in this class.
7596 */ 7596 */
7597 abstract class TypeParameter extends Declaration { 7597 abstract class TypeParameter extends Declaration {
7598 /** 7598 /**
7599 * Initialize a newly created type parameter. Either or both of the [comment] 7599 * Initialize a newly created type parameter. Either or both of the [comment]
7600 * and [metadata] can be `null` if the parameter does not have the 7600 * and [metadata] can be `null` if the parameter does not have the
7601 * corresponding attribute. The [extendsKeyword] and [bound] can be `null` if 7601 * corresponding attribute. The [extendsKeyword] and [bound] can be `null` if
7602 * the parameter does not have an upper bound. 7602 * the parameter does not have an upper bound.
7603 */ 7603 */
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
7638 7638
7639 /** 7639 /**
7640 * Set the name of the type parameter to the given [identifier]. 7640 * Set the name of the type parameter to the given [identifier].
7641 */ 7641 */
7642 void set name(SimpleIdentifier identifier); 7642 void set name(SimpleIdentifier identifier);
7643 } 7643 }
7644 7644
7645 /** 7645 /**
7646 * Type parameters within a declaration. 7646 * Type parameters within a declaration.
7647 * 7647 *
7648 * > typeParameterList ::= 7648 * typeParameterList ::=
7649 * > '<' [TypeParameter] (',' [TypeParameter])* '>' 7649 * '<' [TypeParameter] (',' [TypeParameter])* '>'
7650 * 7650 *
7651 * Clients may not extend, implement or mix-in this class. 7651 * Clients may not extend, implement or mix-in this class.
7652 */ 7652 */
7653 abstract class TypeParameterList extends AstNode { 7653 abstract class TypeParameterList extends AstNode {
7654 /** 7654 /**
7655 * Initialize a newly created list of type parameters. 7655 * Initialize a newly created list of type parameters.
7656 */ 7656 */
7657 factory TypeParameterList( 7657 factory TypeParameterList(
7658 Token leftBracket, 7658 Token leftBracket,
7659 List<TypeParameter> typeParameters, 7659 List<TypeParameter> typeParameters,
(...skipping 11 matching lines...) Expand all
7671 7671
7672 /** 7672 /**
7673 * Return the type parameters for the type. 7673 * Return the type parameters for the type.
7674 */ 7674 */
7675 NodeList<TypeParameter> get typeParameters; 7675 NodeList<TypeParameter> get typeParameters;
7676 } 7676 }
7677 7677
7678 /** 7678 /**
7679 * A directive that references a URI. 7679 * A directive that references a URI.
7680 * 7680 *
7681 * > uriBasedDirective ::= 7681 * uriBasedDirective ::=
7682 * > [ExportDirective] 7682 * [ExportDirective]
7683 * > | [ImportDirective] 7683 * | [ImportDirective]
7684 * > | [PartDirective] 7684 * | [PartDirective]
7685 * 7685 *
7686 * Clients may not extend, implement or mix-in this class. 7686 * Clients may not extend, implement or mix-in this class.
7687 */ 7687 */
7688 abstract class UriBasedDirective extends Directive { 7688 abstract class UriBasedDirective extends Directive {
7689 /** 7689 /**
7690 * Return the source to which the URI was resolved. 7690 * Return the source to which the URI was resolved.
7691 */ 7691 */
7692 Source get source; 7692 Source get source;
7693 7693
7694 /** 7694 /**
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
7744 UriValidationCodeImpl.URI_WITH_INTERPOLATION; 7744 UriValidationCodeImpl.URI_WITH_INTERPOLATION;
7745 7745
7746 static const UriValidationCode URI_WITH_DART_EXT_SCHEME = 7746 static const UriValidationCode URI_WITH_DART_EXT_SCHEME =
7747 UriValidationCodeImpl.URI_WITH_DART_EXT_SCHEME; 7747 UriValidationCodeImpl.URI_WITH_DART_EXT_SCHEME;
7748 } 7748 }
7749 7749
7750 /** 7750 /**
7751 * An identifier that has an initial value associated with it. Instances of this 7751 * An identifier that has an initial value associated with it. Instances of this
7752 * class are always children of the class [VariableDeclarationList]. 7752 * class are always children of the class [VariableDeclarationList].
7753 * 7753 *
7754 * > variableDeclaration ::= 7754 * variableDeclaration ::=
7755 * > [SimpleIdentifier] ('=' [Expression])? 7755 * [SimpleIdentifier] ('=' [Expression])?
7756 * 7756 *
7757 * TODO(paulberry): the grammar does not allow metadata to be associated with 7757 * TODO(paulberry): the grammar does not allow metadata to be associated with
7758 * a VariableDeclaration, and currently we don't record comments for it either. 7758 * a VariableDeclaration, and currently we don't record comments for it either.
7759 * Consider changing the class hierarchy so that [VariableDeclaration] does not 7759 * Consider changing the class hierarchy so that [VariableDeclaration] does not
7760 * extend [Declaration]. 7760 * extend [Declaration].
7761 * 7761 *
7762 * Clients may not extend, implement or mix-in this class. 7762 * Clients may not extend, implement or mix-in this class.
7763 */ 7763 */
7764 abstract class VariableDeclaration extends Declaration { 7764 abstract class VariableDeclaration extends Declaration {
7765 /** 7765 /**
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
7816 7816
7817 /** 7817 /**
7818 * Set the name of the variable being declared to the given [identifier]. 7818 * Set the name of the variable being declared to the given [identifier].
7819 */ 7819 */
7820 void set name(SimpleIdentifier identifier); 7820 void set name(SimpleIdentifier identifier);
7821 } 7821 }
7822 7822
7823 /** 7823 /**
7824 * The declaration of one or more variables of the same type. 7824 * The declaration of one or more variables of the same type.
7825 * 7825 *
7826 * > variableDeclarationList ::= 7826 * variableDeclarationList ::=
7827 * > finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])* 7827 * finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])*
7828 * > 7828 *
7829 * > finalConstVarOrType ::= 7829 * finalConstVarOrType ::=
7830 * > | 'final' [TypeName]? 7830 * | 'final' [TypeName]?
7831 * > | 'const' [TypeName]? 7831 * | 'const' [TypeName]?
7832 * > | 'var' 7832 * | 'var'
7833 * > | [TypeName] 7833 * | [TypeName]
7834 * 7834 *
7835 * Clients may not extend, implement or mix-in this class. 7835 * Clients may not extend, implement or mix-in this class.
7836 */ 7836 */
7837 abstract class VariableDeclarationList extends AnnotatedNode { 7837 abstract class VariableDeclarationList extends AnnotatedNode {
7838 /** 7838 /**
7839 * Initialize a newly created variable declaration list. Either or both of the 7839 * Initialize a newly created variable declaration list. Either or both of the
7840 * [comment] and [metadata] can be `null` if the variable list does not have 7840 * [comment] and [metadata] can be `null` if the variable list does not have
7841 * the corresponding attribute. The [keyword] can be `null` if a type was 7841 * the corresponding attribute. The [keyword] can be `null` if a type was
7842 * specified. The [type] must be `null` if the keyword is 'var'. 7842 * specified. The [type] must be `null` if the keyword is 'var'.
7843 */ 7843 */
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
7888 /** 7888 /**
7889 * Return a list containing the individual variables being declared. 7889 * Return a list containing the individual variables being declared.
7890 */ 7890 */
7891 NodeList<VariableDeclaration> get variables; 7891 NodeList<VariableDeclaration> get variables;
7892 } 7892 }
7893 7893
7894 /** 7894 /**
7895 * A list of variables that are being declared in a context where a statement is 7895 * A list of variables that are being declared in a context where a statement is
7896 * required. 7896 * required.
7897 * 7897 *
7898 * > variableDeclarationStatement ::= 7898 * variableDeclarationStatement ::=
7899 * > [VariableDeclarationList] ';' 7899 * [VariableDeclarationList] ';'
7900 * 7900 *
7901 * Clients may not extend, implement or mix-in this class. 7901 * Clients may not extend, implement or mix-in this class.
7902 */ 7902 */
7903 abstract class VariableDeclarationStatement extends Statement { 7903 abstract class VariableDeclarationStatement extends Statement {
7904 /** 7904 /**
7905 * Initialize a newly created variable declaration statement. 7905 * Initialize a newly created variable declaration statement.
7906 */ 7906 */
7907 factory VariableDeclarationStatement( 7907 factory VariableDeclarationStatement(
7908 VariableDeclarationList variableList, Token semicolon) = 7908 VariableDeclarationList variableList, Token semicolon) =
7909 VariableDeclarationStatementImpl; 7909 VariableDeclarationStatementImpl;
(...skipping 15 matching lines...) Expand all
7925 7925
7926 /** 7926 /**
7927 * Set the variables being declared to the given list of [variables]. 7927 * Set the variables being declared to the given list of [variables].
7928 */ 7928 */
7929 void set variables(VariableDeclarationList variables); 7929 void set variables(VariableDeclarationList variables);
7930 } 7930 }
7931 7931
7932 /** 7932 /**
7933 * A while statement. 7933 * A while statement.
7934 * 7934 *
7935 * > whileStatement ::= 7935 * whileStatement ::=
7936 * > 'while' '(' [Expression] ')' [Statement] 7936 * 'while' '(' [Expression] ')' [Statement]
7937 * 7937 *
7938 * Clients may not extend, implement or mix-in this class. 7938 * Clients may not extend, implement or mix-in this class.
7939 */ 7939 */
7940 abstract class WhileStatement extends Statement { 7940 abstract class WhileStatement extends Statement {
7941 /** 7941 /**
7942 * Initialize a newly created while statement. 7942 * Initialize a newly created while statement.
7943 */ 7943 */
7944 factory WhileStatement( 7944 factory WhileStatement(
7945 Token whileKeyword, 7945 Token whileKeyword,
7946 Token leftParenthesis, 7946 Token leftParenthesis,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
7997 7997
7998 /** 7998 /**
7999 * Set the token representing the 'while' keyword to the given [token]. 7999 * Set the token representing the 'while' keyword to the given [token].
8000 */ 8000 */
8001 void set whileKeyword(Token token); 8001 void set whileKeyword(Token token);
8002 } 8002 }
8003 8003
8004 /** 8004 /**
8005 * The with clause in a class declaration. 8005 * The with clause in a class declaration.
8006 * 8006 *
8007 * > withClause ::= 8007 * withClause ::=
8008 * > 'with' [TypeName] (',' [TypeName])* 8008 * 'with' [TypeName] (',' [TypeName])*
8009 * 8009 *
8010 * Clients may not extend, implement or mix-in this class. 8010 * Clients may not extend, implement or mix-in this class.
8011 */ 8011 */
8012 abstract class WithClause extends AstNode { 8012 abstract class WithClause extends AstNode {
8013 /** 8013 /**
8014 * Initialize a newly created with clause. 8014 * Initialize a newly created with clause.
8015 */ 8015 */
8016 factory WithClause(Token withKeyword, List<TypeName> mixinTypes) = 8016 factory WithClause(Token withKeyword, List<TypeName> mixinTypes) =
8017 WithClauseImpl; 8017 WithClauseImpl;
8018 8018
8019 /** 8019 /**
8020 * Return the names of the mixins that were specified. 8020 * Return the names of the mixins that were specified.
8021 */ 8021 */
8022 NodeList<TypeName> get mixinTypes; 8022 NodeList<TypeName> get mixinTypes;
8023 8023
8024 /** 8024 /**
8025 * Return the token representing the 'with' keyword. 8025 * Return the token representing the 'with' keyword.
8026 */ 8026 */
8027 Token get withKeyword; 8027 Token get withKeyword;
8028 8028
8029 /** 8029 /**
8030 * Set the token representing the 'with' keyword to the given [token]. 8030 * Set the token representing the 'with' keyword to the given [token].
8031 */ 8031 */
8032 void set withKeyword(Token token); 8032 void set withKeyword(Token token);
8033 } 8033 }
8034 8034
8035 /** 8035 /**
8036 * A yield statement. 8036 * A yield statement.
8037 * 8037 *
8038 * > yieldStatement ::= 8038 * yieldStatement ::=
8039 * > 'yield' '*'? [Expression] ‘;’ 8039 * 'yield' '*'? [Expression] ‘;’
8040 * 8040 *
8041 * Clients may not extend, implement or mix-in this class. 8041 * Clients may not extend, implement or mix-in this class.
8042 */ 8042 */
8043 abstract class YieldStatement extends Statement { 8043 abstract class YieldStatement extends Statement {
8044 /** 8044 /**
8045 * Initialize a newly created yield expression. The [star] can be `null` if no 8045 * Initialize a newly created yield expression. The [star] can be `null` if no
8046 * star was provided. 8046 * star was provided.
8047 */ 8047 */
8048 factory YieldStatement(Token yieldKeyword, Token star, Expression expression, 8048 factory YieldStatement(Token yieldKeyword, Token star, Expression expression,
8049 Token semicolon) = YieldStatementImpl; 8049 Token semicolon) = YieldStatementImpl;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
8081 /** 8081 /**
8082 * Return the 'yield' keyword. 8082 * Return the 'yield' keyword.
8083 */ 8083 */
8084 Token get yieldKeyword; 8084 Token get yieldKeyword;
8085 8085
8086 /** 8086 /**
8087 * Return the 'yield' keyword to the given [token]. 8087 * Return the 'yield' keyword to the given [token].
8088 */ 8088 */
8089 void set yieldKeyword(Token token); 8089 void set yieldKeyword(Token token);
8090 } 8090 }
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