| OLD | NEW |
| 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 library analyzer.src.dart.ast.ast; | 5 library analyzer.src.dart.ast.ast; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 import 'package:analyzer/src/generated/utilities_dart.dart'; | 22 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * Two or more string literals that are implicitly concatenated because of being | 25 * Two or more string literals that are implicitly concatenated because of being |
| 26 * adjacent (separated only by whitespace). | 26 * adjacent (separated only by whitespace). |
| 27 * | 27 * |
| 28 * While the grammar only allows adjacent strings when all of the strings are of | 28 * While the grammar only allows adjacent strings when all of the strings are of |
| 29 * the same kind (single line or multi-line), this class doesn't enforce that | 29 * the same kind (single line or multi-line), this class doesn't enforce that |
| 30 * restriction. | 30 * restriction. |
| 31 * | 31 * |
| 32 * > adjacentStrings ::= | 32 * adjacentStrings ::= |
| 33 * > [StringLiteral] [StringLiteral]+ | 33 * [StringLiteral] [StringLiteral]+ |
| 34 */ | 34 */ |
| 35 class AdjacentStringsImpl extends StringLiteralImpl implements AdjacentStrings { | 35 class AdjacentStringsImpl extends StringLiteralImpl implements AdjacentStrings { |
| 36 /** | 36 /** |
| 37 * The strings that are implicitly concatenated. | 37 * The strings that are implicitly concatenated. |
| 38 */ | 38 */ |
| 39 NodeList<StringLiteral> _strings; | 39 NodeList<StringLiteral> _strings; |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * Initialize a newly created list of adjacent strings. To be syntactically | 42 * Initialize a newly created list of adjacent strings. To be syntactically |
| 43 * valid, the list of [strings] must contain at least two elements. | 43 * valid, the list of [strings] must contain at least two elements. |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 return true; | 174 return true; |
| 175 } | 175 } |
| 176 Annotation firstAnnotation = _metadata[0]; | 176 Annotation firstAnnotation = _metadata[0]; |
| 177 return _comment.offset < firstAnnotation.offset; | 177 return _comment.offset < firstAnnotation.offset; |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 | 180 |
| 181 /** | 181 /** |
| 182 * An annotation that can be associated with an AST node. | 182 * An annotation that can be associated with an AST node. |
| 183 * | 183 * |
| 184 * > metadata ::= | 184 * metadata ::= |
| 185 * > annotation* | 185 * annotation* |
| 186 * > | 186 * |
| 187 * > annotation ::= | 187 * annotation ::= |
| 188 * > '@' [Identifier] ('.' [SimpleIdentifier])? [ArgumentList]? | 188 * '@' [Identifier] ('.' [SimpleIdentifier])? [ArgumentList]? |
| 189 */ | 189 */ |
| 190 class AnnotationImpl extends AstNodeImpl implements Annotation { | 190 class AnnotationImpl extends AstNodeImpl implements Annotation { |
| 191 /** | 191 /** |
| 192 * The at sign that introduced the annotation. | 192 * The at sign that introduced the annotation. |
| 193 */ | 193 */ |
| 194 Token atSign; | 194 Token atSign; |
| 195 | 195 |
| 196 /** | 196 /** |
| 197 * The name of the class defining the constructor that is being invoked or the | 197 * The name of the class defining the constructor that is being invoked or the |
| 198 * name of the field that is being referenced. | 198 * name of the field that is being referenced. |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 _safelyVisitChild(_name, visitor); | 309 _safelyVisitChild(_name, visitor); |
| 310 _safelyVisitChild(_constructorName, visitor); | 310 _safelyVisitChild(_constructorName, visitor); |
| 311 _safelyVisitChild(_arguments, visitor); | 311 _safelyVisitChild(_arguments, visitor); |
| 312 } | 312 } |
| 313 } | 313 } |
| 314 | 314 |
| 315 /** | 315 /** |
| 316 * A list of arguments in the invocation of an executable element (that is, a | 316 * A list of arguments in the invocation of an executable element (that is, a |
| 317 * function, method, or constructor). | 317 * function, method, or constructor). |
| 318 * | 318 * |
| 319 * > argumentList ::= | 319 * argumentList ::= |
| 320 * > '(' arguments? ')' | 320 * '(' arguments? ')' |
| 321 * > | 321 * |
| 322 * > arguments ::= | 322 * arguments ::= |
| 323 * > [NamedExpression] (',' [NamedExpression])* | 323 * [NamedExpression] (',' [NamedExpression])* |
| 324 * > | [Expression] (',' [Expression])* (',' [NamedExpression])* | 324 * | [Expression] (',' [Expression])* (',' [NamedExpression])* |
| 325 */ | 325 */ |
| 326 class ArgumentListImpl extends AstNodeImpl implements ArgumentList { | 326 class ArgumentListImpl extends AstNodeImpl implements ArgumentList { |
| 327 /** | 327 /** |
| 328 * The left parenthesis. | 328 * The left parenthesis. |
| 329 */ | 329 */ |
| 330 Token leftParenthesis; | 330 Token leftParenthesis; |
| 331 | 331 |
| 332 /** | 332 /** |
| 333 * The expressions producing the values of the arguments. | 333 * The expressions producing the values of the arguments. |
| 334 */ | 334 */ |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 // The expression isn't a child of this node. | 461 // The expression isn't a child of this node. |
| 462 return null; | 462 return null; |
| 463 } | 463 } |
| 464 return _correspondingStaticParameters[index]; | 464 return _correspondingStaticParameters[index]; |
| 465 } | 465 } |
| 466 } | 466 } |
| 467 | 467 |
| 468 /** | 468 /** |
| 469 * An as expression. | 469 * An as expression. |
| 470 * | 470 * |
| 471 * > asExpression ::= | 471 * asExpression ::= |
| 472 * > [Expression] 'as' [TypeName] | 472 * [Expression] 'as' [TypeName] |
| 473 */ | 473 */ |
| 474 class AsExpressionImpl extends ExpressionImpl implements AsExpression { | 474 class AsExpressionImpl extends ExpressionImpl implements AsExpression { |
| 475 /** | 475 /** |
| 476 * The expression used to compute the value being cast. | 476 * The expression used to compute the value being cast. |
| 477 */ | 477 */ |
| 478 Expression _expression; | 478 Expression _expression; |
| 479 | 479 |
| 480 /** | 480 /** |
| 481 * The 'as' operator. | 481 * The 'as' operator. |
| 482 */ | 482 */ |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 @override | 530 @override |
| 531 void visitChildren(AstVisitor visitor) { | 531 void visitChildren(AstVisitor visitor) { |
| 532 _safelyVisitChild(_expression, visitor); | 532 _safelyVisitChild(_expression, visitor); |
| 533 _safelyVisitChild(_type, visitor); | 533 _safelyVisitChild(_type, visitor); |
| 534 } | 534 } |
| 535 } | 535 } |
| 536 | 536 |
| 537 /** | 537 /** |
| 538 * An assert statement. | 538 * An assert statement. |
| 539 * | 539 * |
| 540 * > assertStatement ::= | 540 * assertStatement ::= |
| 541 * > 'assert' '(' [Expression] ')' ';' | 541 * 'assert' '(' [Expression] ')' ';' |
| 542 */ | 542 */ |
| 543 class AssertStatementImpl extends StatementImpl implements AssertStatement { | 543 class AssertStatementImpl extends StatementImpl implements AssertStatement { |
| 544 /** | 544 /** |
| 545 * The token representing the 'assert' keyword. | 545 * The token representing the 'assert' keyword. |
| 546 */ | 546 */ |
| 547 Token assertKeyword; | 547 Token assertKeyword; |
| 548 | 548 |
| 549 /** | 549 /** |
| 550 * The left parenthesis. | 550 * The left parenthesis. |
| 551 */ | 551 */ |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 @override | 630 @override |
| 631 void visitChildren(AstVisitor visitor) { | 631 void visitChildren(AstVisitor visitor) { |
| 632 _safelyVisitChild(_condition, visitor); | 632 _safelyVisitChild(_condition, visitor); |
| 633 _safelyVisitChild(message, visitor); | 633 _safelyVisitChild(message, visitor); |
| 634 } | 634 } |
| 635 } | 635 } |
| 636 | 636 |
| 637 /** | 637 /** |
| 638 * An assignment expression. | 638 * An assignment expression. |
| 639 * | 639 * |
| 640 * > assignmentExpression ::= | 640 * assignmentExpression ::= |
| 641 * > [Expression] operator [Expression] | 641 * [Expression] operator [Expression] |
| 642 */ | 642 */ |
| 643 class AssignmentExpressionImpl extends ExpressionImpl | 643 class AssignmentExpressionImpl extends ExpressionImpl |
| 644 implements AssignmentExpression { | 644 implements AssignmentExpression { |
| 645 /** | 645 /** |
| 646 * The expression used to compute the left hand side. | 646 * The expression used to compute the left hand side. |
| 647 */ | 647 */ |
| 648 Expression _leftHandSide; | 648 Expression _leftHandSide; |
| 649 | 649 |
| 650 /** | 650 /** |
| 651 * The assignment operator being applied. | 651 * The assignment operator being applied. |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 void _safelyVisitChild(AstNode child, AstVisitor visitor) { | 934 void _safelyVisitChild(AstNode child, AstVisitor visitor) { |
| 935 if (child != null) { | 935 if (child != null) { |
| 936 child.accept(visitor); | 936 child.accept(visitor); |
| 937 } | 937 } |
| 938 } | 938 } |
| 939 } | 939 } |
| 940 | 940 |
| 941 /** | 941 /** |
| 942 * An await expression. | 942 * An await expression. |
| 943 * | 943 * |
| 944 * > awaitExpression ::= | 944 * awaitExpression ::= |
| 945 * > 'await' [Expression] | 945 * 'await' [Expression] |
| 946 */ | 946 */ |
| 947 class AwaitExpressionImpl extends ExpressionImpl implements AwaitExpression { | 947 class AwaitExpressionImpl extends ExpressionImpl implements AwaitExpression { |
| 948 /** | 948 /** |
| 949 * The 'await' keyword. | 949 * The 'await' keyword. |
| 950 */ | 950 */ |
| 951 Token awaitKeyword; | 951 Token awaitKeyword; |
| 952 | 952 |
| 953 /** | 953 /** |
| 954 * The expression whose value is being waited on. | 954 * The expression whose value is being waited on. |
| 955 */ | 955 */ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 | 993 |
| 994 @override | 994 @override |
| 995 void visitChildren(AstVisitor visitor) { | 995 void visitChildren(AstVisitor visitor) { |
| 996 _safelyVisitChild(_expression, visitor); | 996 _safelyVisitChild(_expression, visitor); |
| 997 } | 997 } |
| 998 } | 998 } |
| 999 | 999 |
| 1000 /** | 1000 /** |
| 1001 * A binary (infix) expression. | 1001 * A binary (infix) expression. |
| 1002 * | 1002 * |
| 1003 * > binaryExpression ::= | 1003 * binaryExpression ::= |
| 1004 * > [Expression] [Token] [Expression] | 1004 * [Expression] [Token] [Expression] |
| 1005 */ | 1005 */ |
| 1006 class BinaryExpressionImpl extends ExpressionImpl implements BinaryExpression { | 1006 class BinaryExpressionImpl extends ExpressionImpl implements BinaryExpression { |
| 1007 /** | 1007 /** |
| 1008 * The expression used to compute the left operand. | 1008 * The expression used to compute the left operand. |
| 1009 */ | 1009 */ |
| 1010 Expression _leftOperand; | 1010 Expression _leftOperand; |
| 1011 | 1011 |
| 1012 /** | 1012 /** |
| 1013 * The binary operator being applied. | 1013 * The binary operator being applied. |
| 1014 */ | 1014 */ |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 @override | 1121 @override |
| 1122 void visitChildren(AstVisitor visitor) { | 1122 void visitChildren(AstVisitor visitor) { |
| 1123 _safelyVisitChild(_leftOperand, visitor); | 1123 _safelyVisitChild(_leftOperand, visitor); |
| 1124 _safelyVisitChild(_rightOperand, visitor); | 1124 _safelyVisitChild(_rightOperand, visitor); |
| 1125 } | 1125 } |
| 1126 } | 1126 } |
| 1127 | 1127 |
| 1128 /** | 1128 /** |
| 1129 * A function body that consists of a block of statements. | 1129 * A function body that consists of a block of statements. |
| 1130 * | 1130 * |
| 1131 * > blockFunctionBody ::= | 1131 * blockFunctionBody ::= |
| 1132 * > ('async' | 'async' '*' | 'sync' '*')? [Block] | 1132 * ('async' | 'async' '*' | 'sync' '*')? [Block] |
| 1133 */ | 1133 */ |
| 1134 class BlockFunctionBodyImpl extends FunctionBodyImpl | 1134 class BlockFunctionBodyImpl extends FunctionBodyImpl |
| 1135 implements BlockFunctionBody { | 1135 implements BlockFunctionBody { |
| 1136 /** | 1136 /** |
| 1137 * The token representing the 'async' or 'sync' keyword, or `null` if there is | 1137 * The token representing the 'async' or 'sync' keyword, or `null` if there is |
| 1138 * no such keyword. | 1138 * no such keyword. |
| 1139 */ | 1139 */ |
| 1140 Token keyword; | 1140 Token keyword; |
| 1141 | 1141 |
| 1142 /** | 1142 /** |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 | 1197 |
| 1198 @override | 1198 @override |
| 1199 void visitChildren(AstVisitor visitor) { | 1199 void visitChildren(AstVisitor visitor) { |
| 1200 _safelyVisitChild(_block, visitor); | 1200 _safelyVisitChild(_block, visitor); |
| 1201 } | 1201 } |
| 1202 } | 1202 } |
| 1203 | 1203 |
| 1204 /** | 1204 /** |
| 1205 * A sequence of statements. | 1205 * A sequence of statements. |
| 1206 * | 1206 * |
| 1207 * > block ::= | 1207 * block ::= |
| 1208 * > '{' statement* '}' | 1208 * '{' statement* '}' |
| 1209 */ | 1209 */ |
| 1210 class BlockImpl extends StatementImpl implements Block { | 1210 class BlockImpl extends StatementImpl implements Block { |
| 1211 /** | 1211 /** |
| 1212 * The left curly bracket. | 1212 * The left curly bracket. |
| 1213 */ | 1213 */ |
| 1214 Token leftBracket; | 1214 Token leftBracket; |
| 1215 | 1215 |
| 1216 /** | 1216 /** |
| 1217 * The statements contained in the block. | 1217 * The statements contained in the block. |
| 1218 */ | 1218 */ |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 | 1250 |
| 1251 @override | 1251 @override |
| 1252 void visitChildren(AstVisitor visitor) { | 1252 void visitChildren(AstVisitor visitor) { |
| 1253 _statements.accept(visitor); | 1253 _statements.accept(visitor); |
| 1254 } | 1254 } |
| 1255 } | 1255 } |
| 1256 | 1256 |
| 1257 /** | 1257 /** |
| 1258 * A boolean literal expression. | 1258 * A boolean literal expression. |
| 1259 * | 1259 * |
| 1260 * > booleanLiteral ::= | 1260 * booleanLiteral ::= |
| 1261 * > 'false' | 'true' | 1261 * 'false' | 'true' |
| 1262 */ | 1262 */ |
| 1263 class BooleanLiteralImpl extends LiteralImpl implements BooleanLiteral { | 1263 class BooleanLiteralImpl extends LiteralImpl implements BooleanLiteral { |
| 1264 /** | 1264 /** |
| 1265 * The token representing the literal. | 1265 * The token representing the literal. |
| 1266 */ | 1266 */ |
| 1267 Token literal; | 1267 Token literal; |
| 1268 | 1268 |
| 1269 /** | 1269 /** |
| 1270 * The value of the literal. | 1270 * The value of the literal. |
| 1271 */ | 1271 */ |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1293 | 1293 |
| 1294 @override | 1294 @override |
| 1295 void visitChildren(AstVisitor visitor) { | 1295 void visitChildren(AstVisitor visitor) { |
| 1296 // There are no children to visit. | 1296 // There are no children to visit. |
| 1297 } | 1297 } |
| 1298 } | 1298 } |
| 1299 | 1299 |
| 1300 /** | 1300 /** |
| 1301 * A break statement. | 1301 * A break statement. |
| 1302 * | 1302 * |
| 1303 * > breakStatement ::= | 1303 * breakStatement ::= |
| 1304 * > 'break' [SimpleIdentifier]? ';' | 1304 * 'break' [SimpleIdentifier]? ';' |
| 1305 */ | 1305 */ |
| 1306 class BreakStatementImpl extends StatementImpl implements BreakStatement { | 1306 class BreakStatementImpl extends StatementImpl implements BreakStatement { |
| 1307 /** | 1307 /** |
| 1308 * The token representing the 'break' keyword. | 1308 * The token representing the 'break' keyword. |
| 1309 */ | 1309 */ |
| 1310 Token breakKeyword; | 1310 Token breakKeyword; |
| 1311 | 1311 |
| 1312 /** | 1312 /** |
| 1313 * The label associated with the statement, or `null` if there is no label. | 1313 * The label associated with the statement, or `null` if there is no label. |
| 1314 */ | 1314 */ |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 void visitChildren(AstVisitor visitor) { | 1364 void visitChildren(AstVisitor visitor) { |
| 1365 _safelyVisitChild(_label, visitor); | 1365 _safelyVisitChild(_label, visitor); |
| 1366 } | 1366 } |
| 1367 } | 1367 } |
| 1368 | 1368 |
| 1369 /** | 1369 /** |
| 1370 * A sequence of cascaded expressions: expressions that share a common target. | 1370 * A sequence of cascaded expressions: expressions that share a common target. |
| 1371 * There are three kinds of expressions that can be used in a cascade | 1371 * There are three kinds of expressions that can be used in a cascade |
| 1372 * expression: [IndexExpression], [MethodInvocation] and [PropertyAccess]. | 1372 * expression: [IndexExpression], [MethodInvocation] and [PropertyAccess]. |
| 1373 * | 1373 * |
| 1374 * > cascadeExpression ::= | 1374 * cascadeExpression ::= |
| 1375 * > [Expression] cascadeSection* | 1375 * [Expression] cascadeSection* |
| 1376 * > | 1376 * |
| 1377 * > cascadeSection ::= | 1377 * cascadeSection ::= |
| 1378 * > '..' (cascadeSelector arguments*) (assignableSelector arguments*)* | 1378 * '..' (cascadeSelector arguments*) (assignableSelector arguments*)* |
| 1379 * > (assignmentOperator expressionWithoutCascade)? | 1379 * (assignmentOperator expressionWithoutCascade)? |
| 1380 * > | 1380 * |
| 1381 * > cascadeSelector ::= | 1381 * cascadeSelector ::= |
| 1382 * > '[ ' expression '] ' | 1382 * '[ ' expression '] ' |
| 1383 * > | identifier | 1383 * | identifier |
| 1384 */ | 1384 */ |
| 1385 class CascadeExpressionImpl extends ExpressionImpl | 1385 class CascadeExpressionImpl extends ExpressionImpl |
| 1386 implements CascadeExpression { | 1386 implements CascadeExpression { |
| 1387 /** | 1387 /** |
| 1388 * The target of the cascade sections. | 1388 * The target of the cascade sections. |
| 1389 */ | 1389 */ |
| 1390 Expression _target; | 1390 Expression _target; |
| 1391 | 1391 |
| 1392 /** | 1392 /** |
| 1393 * The cascade sections sharing the common target. | 1393 * The cascade sections sharing the common target. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1434 @override | 1434 @override |
| 1435 void visitChildren(AstVisitor visitor) { | 1435 void visitChildren(AstVisitor visitor) { |
| 1436 _safelyVisitChild(_target, visitor); | 1436 _safelyVisitChild(_target, visitor); |
| 1437 _cascadeSections.accept(visitor); | 1437 _cascadeSections.accept(visitor); |
| 1438 } | 1438 } |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 /** | 1441 /** |
| 1442 * A catch clause within a try statement. | 1442 * A catch clause within a try statement. |
| 1443 * | 1443 * |
| 1444 * > onPart ::= | 1444 * onPart ::= |
| 1445 * > catchPart [Block] | 1445 * catchPart [Block] |
| 1446 * > | 'on' type catchPart? [Block] | 1446 * | 'on' type catchPart? [Block] |
| 1447 * > | 1447 * |
| 1448 * > catchPart ::= | 1448 * catchPart ::= |
| 1449 * > 'catch' '(' [SimpleIdentifier] (',' [SimpleIdentifier])? ')' | 1449 * 'catch' '(' [SimpleIdentifier] (',' [SimpleIdentifier])? ')' |
| 1450 */ | 1450 */ |
| 1451 class CatchClauseImpl extends AstNodeImpl implements CatchClause { | 1451 class CatchClauseImpl extends AstNodeImpl implements CatchClause { |
| 1452 /** | 1452 /** |
| 1453 * The token representing the 'on' keyword, or `null` if there is no 'on' | 1453 * The token representing the 'on' keyword, or `null` if there is no 'on' |
| 1454 * keyword. | 1454 * keyword. |
| 1455 */ | 1455 */ |
| 1456 Token onKeyword; | 1456 Token onKeyword; |
| 1457 | 1457 |
| 1458 /** | 1458 /** |
| 1459 * The type of exceptions caught by this catch clause, or `null` if this catch | 1459 * The type of exceptions caught by this catch clause, or `null` if this catch |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1617 void addAll(Iterable items) { | 1617 void addAll(Iterable items) { |
| 1618 if (items != null) { | 1618 if (items != null) { |
| 1619 _entities.addAll(items); | 1619 _entities.addAll(items); |
| 1620 } | 1620 } |
| 1621 } | 1621 } |
| 1622 } | 1622 } |
| 1623 | 1623 |
| 1624 /** | 1624 /** |
| 1625 * The declaration of a class. | 1625 * The declaration of a class. |
| 1626 * | 1626 * |
| 1627 * > classDeclaration ::= | 1627 * classDeclaration ::= |
| 1628 * > 'abstract'? 'class' [SimpleIdentifier] [TypeParameterList]? | 1628 * 'abstract'? 'class' [SimpleIdentifier] [TypeParameterList]? |
| 1629 * > ([ExtendsClause] [WithClause]?)? | 1629 * ([ExtendsClause] [WithClause]?)? |
| 1630 * > [ImplementsClause]? | 1630 * [ImplementsClause]? |
| 1631 * > '{' [ClassMember]* '}' | 1631 * '{' [ClassMember]* '}' |
| 1632 */ | 1632 */ |
| 1633 class ClassDeclarationImpl extends NamedCompilationUnitMemberImpl | 1633 class ClassDeclarationImpl extends NamedCompilationUnitMemberImpl |
| 1634 implements ClassDeclaration { | 1634 implements ClassDeclaration { |
| 1635 /** | 1635 /** |
| 1636 * The 'abstract' keyword, or `null` if the keyword was absent. | 1636 * The 'abstract' keyword, or `null` if the keyword was absent. |
| 1637 */ | 1637 */ |
| 1638 Token abstractKeyword; | 1638 Token abstractKeyword; |
| 1639 | 1639 |
| 1640 /** | 1640 /** |
| 1641 * The token representing the 'class' keyword. | 1641 * The token representing the 'class' keyword. |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1867 * [comment] and [metadata] can be `null` if the member does not have the | 1867 * [comment] and [metadata] can be `null` if the member does not have the |
| 1868 * corresponding attribute. | 1868 * corresponding attribute. |
| 1869 */ | 1869 */ |
| 1870 ClassMemberImpl(Comment comment, List<Annotation> metadata) | 1870 ClassMemberImpl(Comment comment, List<Annotation> metadata) |
| 1871 : super(comment, metadata); | 1871 : super(comment, metadata); |
| 1872 } | 1872 } |
| 1873 | 1873 |
| 1874 /** | 1874 /** |
| 1875 * A class type alias. | 1875 * A class type alias. |
| 1876 * | 1876 * |
| 1877 * > classTypeAlias ::= | 1877 * classTypeAlias ::= |
| 1878 * > [SimpleIdentifier] [TypeParameterList]? '=' 'abstract'? mixinApplicatio
n | 1878 * [SimpleIdentifier] [TypeParameterList]? '=' 'abstract'? mixinApplicati
on |
| 1879 * > | 1879 * |
| 1880 * > mixinApplication ::= | 1880 * mixinApplication ::= |
| 1881 * > [TypeName] [WithClause] [ImplementsClause]? ';' | 1881 * [TypeName] [WithClause] [ImplementsClause]? ';' |
| 1882 */ | 1882 */ |
| 1883 class ClassTypeAliasImpl extends TypeAliasImpl implements ClassTypeAlias { | 1883 class ClassTypeAliasImpl extends TypeAliasImpl implements ClassTypeAlias { |
| 1884 /** | 1884 /** |
| 1885 * The type parameters for the class, or `null` if the class does not have any | 1885 * The type parameters for the class, or `null` if the class does not have any |
| 1886 * type parameters. | 1886 * type parameters. |
| 1887 */ | 1887 */ |
| 1888 TypeParameterList _typeParameters; | 1888 TypeParameterList _typeParameters; |
| 1889 | 1889 |
| 1890 /** | 1890 /** |
| 1891 * The token for the '=' separating the name from the definition. | 1891 * The token for the '=' separating the name from the definition. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2010 _safelyVisitChild(_typeParameters, visitor); | 2010 _safelyVisitChild(_typeParameters, visitor); |
| 2011 _safelyVisitChild(_superclass, visitor); | 2011 _safelyVisitChild(_superclass, visitor); |
| 2012 _safelyVisitChild(_withClause, visitor); | 2012 _safelyVisitChild(_withClause, visitor); |
| 2013 _safelyVisitChild(_implementsClause, visitor); | 2013 _safelyVisitChild(_implementsClause, visitor); |
| 2014 } | 2014 } |
| 2015 } | 2015 } |
| 2016 | 2016 |
| 2017 /** | 2017 /** |
| 2018 * A combinator associated with an import or export directive. | 2018 * A combinator associated with an import or export directive. |
| 2019 * | 2019 * |
| 2020 * > combinator ::= | 2020 * combinator ::= |
| 2021 * > [HideCombinator] | 2021 * [HideCombinator] |
| 2022 * > | [ShowCombinator] | 2022 * | [ShowCombinator] |
| 2023 */ | 2023 */ |
| 2024 abstract class CombinatorImpl extends AstNodeImpl implements Combinator { | 2024 abstract class CombinatorImpl extends AstNodeImpl implements Combinator { |
| 2025 /** | 2025 /** |
| 2026 * The 'hide' or 'show' keyword specifying what kind of processing is to be | 2026 * The 'hide' or 'show' keyword specifying what kind of processing is to be |
| 2027 * done on the names. | 2027 * done on the names. |
| 2028 */ | 2028 */ |
| 2029 Token keyword; | 2029 Token keyword; |
| 2030 | 2030 |
| 2031 /** | 2031 /** |
| 2032 * Initialize a newly created combinator. | 2032 * Initialize a newly created combinator. |
| 2033 */ | 2033 */ |
| 2034 CombinatorImpl(this.keyword); | 2034 CombinatorImpl(this.keyword); |
| 2035 | 2035 |
| 2036 @override | 2036 @override |
| 2037 Token get beginToken => keyword; | 2037 Token get beginToken => keyword; |
| 2038 } | 2038 } |
| 2039 | 2039 |
| 2040 /** | 2040 /** |
| 2041 * A comment within the source code. | 2041 * A comment within the source code. |
| 2042 * | 2042 * |
| 2043 * > comment ::= | 2043 * comment ::= |
| 2044 * > endOfLineComment | 2044 * endOfLineComment |
| 2045 * > | blockComment | 2045 * | blockComment |
| 2046 * > | documentationComment | 2046 * | documentationComment |
| 2047 * > | 2047 * |
| 2048 * > endOfLineComment ::= | 2048 * endOfLineComment ::= |
| 2049 * > '//' (CHARACTER - EOL)* EOL | 2049 * '//' (CHARACTER - EOL)* EOL |
| 2050 * > | 2050 * |
| 2051 * > blockComment ::= | 2051 * blockComment ::= |
| 2052 * > '/ *' CHARACTER* '*/' | 2052 * '/ *' CHARACTER* '*/' |
| 2053 * > | 2053 * |
| 2054 * > documentationComment ::= | 2054 * documentationComment ::= |
| 2055 * > '/ **' (CHARACTER | [CommentReference])* '*/' | 2055 * '/ **' (CHARACTER | [CommentReference])* '*/' |
| 2056 * > | ('///' (CHARACTER - EOL)* EOL)+ | 2056 * | ('///' (CHARACTER - EOL)* EOL)+ |
| 2057 */ | 2057 */ |
| 2058 class CommentImpl extends AstNodeImpl implements Comment { | 2058 class CommentImpl extends AstNodeImpl implements Comment { |
| 2059 /** | 2059 /** |
| 2060 * The tokens representing the comment. | 2060 * The tokens representing the comment. |
| 2061 */ | 2061 */ |
| 2062 final List<Token> tokens; | 2062 final List<Token> tokens; |
| 2063 | 2063 |
| 2064 /** | 2064 /** |
| 2065 * The type of the comment. | 2065 * The type of the comment. |
| 2066 */ | 2066 */ |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2136 /** | 2136 /** |
| 2137 * Create an end-of-line comment consisting of the given [tokens]. | 2137 * Create an end-of-line comment consisting of the given [tokens]. |
| 2138 */ | 2138 */ |
| 2139 static Comment createEndOfLineComment(List<Token> tokens) => | 2139 static Comment createEndOfLineComment(List<Token> tokens) => |
| 2140 new CommentImpl(tokens, CommentType.END_OF_LINE, null); | 2140 new CommentImpl(tokens, CommentType.END_OF_LINE, null); |
| 2141 } | 2141 } |
| 2142 | 2142 |
| 2143 /** | 2143 /** |
| 2144 * A reference to a Dart element that is found within a documentation comment. | 2144 * A reference to a Dart element that is found within a documentation comment. |
| 2145 * | 2145 * |
| 2146 * > commentReference ::= | 2146 * commentReference ::= |
| 2147 * > '[' 'new'? [Identifier] ']' | 2147 * '[' 'new'? [Identifier] ']' |
| 2148 */ | 2148 */ |
| 2149 class CommentReferenceImpl extends AstNodeImpl implements CommentReference { | 2149 class CommentReferenceImpl extends AstNodeImpl implements CommentReference { |
| 2150 /** | 2150 /** |
| 2151 * The token representing the 'new' keyword, or `null` if there was no 'new' | 2151 * The token representing the 'new' keyword, or `null` if there was no 'new' |
| 2152 * keyword. | 2152 * keyword. |
| 2153 */ | 2153 */ |
| 2154 Token newKeyword; | 2154 Token newKeyword; |
| 2155 | 2155 |
| 2156 /** | 2156 /** |
| 2157 * The identifier being referenced. | 2157 * The identifier being referenced. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2228 | 2228 |
| 2229 /** | 2229 /** |
| 2230 * A compilation unit. | 2230 * A compilation unit. |
| 2231 * | 2231 * |
| 2232 * While the grammar restricts the order of the directives and declarations | 2232 * While the grammar restricts the order of the directives and declarations |
| 2233 * within a compilation unit, this class does not enforce those restrictions. | 2233 * within a compilation unit, this class does not enforce those restrictions. |
| 2234 * In particular, the children of a compilation unit will be visited in lexical | 2234 * In particular, the children of a compilation unit will be visited in lexical |
| 2235 * order even if lexical order does not conform to the restrictions of the | 2235 * order even if lexical order does not conform to the restrictions of the |
| 2236 * grammar. | 2236 * grammar. |
| 2237 * | 2237 * |
| 2238 * > compilationUnit ::= | 2238 * compilationUnit ::= |
| 2239 * > directives declarations | 2239 * directives declarations |
| 2240 * > | 2240 * |
| 2241 * > directives ::= | 2241 * directives ::= |
| 2242 * > [ScriptTag]? [LibraryDirective]? namespaceDirective* [PartDirective]* | 2242 * [ScriptTag]? [LibraryDirective]? namespaceDirective* [PartDirective]* |
| 2243 * > | [PartOfDirective] | 2243 * | [PartOfDirective] |
| 2244 * > | 2244 * |
| 2245 * > namespaceDirective ::= | 2245 * namespaceDirective ::= |
| 2246 * > [ImportDirective] | 2246 * [ImportDirective] |
| 2247 * > | [ExportDirective] | 2247 * | [ExportDirective] |
| 2248 * > | 2248 * |
| 2249 * > declarations ::= | 2249 * declarations ::= |
| 2250 * > [CompilationUnitMember]* | 2250 * [CompilationUnitMember]* |
| 2251 */ | 2251 */ |
| 2252 class CompilationUnitImpl extends AstNodeImpl implements CompilationUnit { | 2252 class CompilationUnitImpl extends AstNodeImpl implements CompilationUnit { |
| 2253 /** | 2253 /** |
| 2254 * The first token in the token stream that was parsed to form this | 2254 * The first token in the token stream that was parsed to form this |
| 2255 * compilation unit. | 2255 * compilation unit. |
| 2256 */ | 2256 */ |
| 2257 Token beginToken; | 2257 Token beginToken; |
| 2258 | 2258 |
| 2259 /** | 2259 /** |
| 2260 * The script tag at the beginning of the compilation unit, or `null` if there | 2260 * The script tag at the beginning of the compilation unit, or `null` if there |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2379 child.accept(visitor); | 2379 child.accept(visitor); |
| 2380 } | 2380 } |
| 2381 } | 2381 } |
| 2382 } | 2382 } |
| 2383 } | 2383 } |
| 2384 | 2384 |
| 2385 /** | 2385 /** |
| 2386 * A node that declares one or more names within the scope of a compilation | 2386 * A node that declares one or more names within the scope of a compilation |
| 2387 * unit. | 2387 * unit. |
| 2388 * | 2388 * |
| 2389 * > compilationUnitMember ::= | 2389 * compilationUnitMember ::= |
| 2390 * > [ClassDeclaration] | 2390 * [ClassDeclaration] |
| 2391 * > | [TypeAlias] | 2391 * | [TypeAlias] |
| 2392 * > | [FunctionDeclaration] | 2392 * | [FunctionDeclaration] |
| 2393 * > | [MethodDeclaration] | 2393 * | [MethodDeclaration] |
| 2394 * > | [VariableDeclaration] | 2394 * | [VariableDeclaration] |
| 2395 * > | [VariableDeclaration] | 2395 * | [VariableDeclaration] |
| 2396 */ | 2396 */ |
| 2397 abstract class CompilationUnitMemberImpl extends DeclarationImpl | 2397 abstract class CompilationUnitMemberImpl extends DeclarationImpl |
| 2398 implements CompilationUnitMember { | 2398 implements CompilationUnitMember { |
| 2399 /** | 2399 /** |
| 2400 * Initialize a newly created generic compilation unit member. Either or both | 2400 * Initialize a newly created generic compilation unit member. Either or both |
| 2401 * of the [comment] and [metadata] can be `null` if the member does not have | 2401 * of the [comment] and [metadata] can be `null` if the member does not have |
| 2402 * the corresponding attribute. | 2402 * the corresponding attribute. |
| 2403 */ | 2403 */ |
| 2404 CompilationUnitMemberImpl(Comment comment, List<Annotation> metadata) | 2404 CompilationUnitMemberImpl(Comment comment, List<Annotation> metadata) |
| 2405 : super(comment, metadata); | 2405 : super(comment, metadata); |
| 2406 } | 2406 } |
| 2407 | 2407 |
| 2408 /** | 2408 /** |
| 2409 * A conditional expression. | 2409 * A conditional expression. |
| 2410 * | 2410 * |
| 2411 * > conditionalExpression ::= | 2411 * conditionalExpression ::= |
| 2412 * > [Expression] '?' [Expression] ':' [Expression] | 2412 * [Expression] '?' [Expression] ':' [Expression] |
| 2413 */ | 2413 */ |
| 2414 class ConditionalExpressionImpl extends ExpressionImpl | 2414 class ConditionalExpressionImpl extends ExpressionImpl |
| 2415 implements ConditionalExpression { | 2415 implements ConditionalExpression { |
| 2416 /** | 2416 /** |
| 2417 * The condition used to determine which of the expressions is executed next. | 2417 * The condition used to determine which of the expressions is executed next. |
| 2418 */ | 2418 */ |
| 2419 Expression _condition; | 2419 Expression _condition; |
| 2420 | 2420 |
| 2421 /** | 2421 /** |
| 2422 * The token used to separate the condition from the then expression. | 2422 * The token used to separate the condition from the then expression. |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2581 void visitChildren(AstVisitor visitor) { | 2581 void visitChildren(AstVisitor visitor) { |
| 2582 _safelyVisitChild(_name, visitor); | 2582 _safelyVisitChild(_name, visitor); |
| 2583 _safelyVisitChild(_value, visitor); | 2583 _safelyVisitChild(_value, visitor); |
| 2584 _safelyVisitChild(_libraryUri, visitor); | 2584 _safelyVisitChild(_libraryUri, visitor); |
| 2585 } | 2585 } |
| 2586 } | 2586 } |
| 2587 | 2587 |
| 2588 /** | 2588 /** |
| 2589 * A constructor declaration. | 2589 * A constructor declaration. |
| 2590 * | 2590 * |
| 2591 * > constructorDeclaration ::= | 2591 * constructorDeclaration ::= |
| 2592 * > constructorSignature [FunctionBody]? | 2592 * constructorSignature [FunctionBody]? |
| 2593 * > | constructorName formalParameterList ':' 'this' ('.' [SimpleIdentifier])
? arguments | 2593 * | constructorName formalParameterList ':' 'this' ('.' [SimpleIdentifier]
)? arguments |
| 2594 * > | 2594 * |
| 2595 * > constructorSignature ::= | 2595 * constructorSignature ::= |
| 2596 * > 'external'? constructorName formalParameterList initializerList? | 2596 * 'external'? constructorName formalParameterList initializerList? |
| 2597 * > | 'external'? 'factory' factoryName formalParameterList initializerList? | 2597 * | 'external'? 'factory' factoryName formalParameterList initializerList? |
| 2598 * > | 'external'? 'const' constructorName formalParameterList initializerLis
t? | 2598 * | 'external'? 'const' constructorName formalParameterList initializerLi
st? |
| 2599 * > | 2599 * |
| 2600 * > constructorName ::= | 2600 * constructorName ::= |
| 2601 * > [SimpleIdentifier] ('.' [SimpleIdentifier])? | 2601 * [SimpleIdentifier] ('.' [SimpleIdentifier])? |
| 2602 * > | 2602 * |
| 2603 * > factoryName ::= | 2603 * factoryName ::= |
| 2604 * > [Identifier] ('.' [SimpleIdentifier])? | 2604 * [Identifier] ('.' [SimpleIdentifier])? |
| 2605 * > | 2605 * |
| 2606 * > initializerList ::= | 2606 * initializerList ::= |
| 2607 * > ':' [ConstructorInitializer] (',' [ConstructorInitializer])* | 2607 * ':' [ConstructorInitializer] (',' [ConstructorInitializer])* |
| 2608 */ | 2608 */ |
| 2609 class ConstructorDeclarationImpl extends ClassMemberImpl | 2609 class ConstructorDeclarationImpl extends ClassMemberImpl |
| 2610 implements ConstructorDeclaration { | 2610 implements ConstructorDeclaration { |
| 2611 /** | 2611 /** |
| 2612 * The token for the 'external' keyword, or `null` if the constructor is not | 2612 * The token for the 'external' keyword, or `null` if the constructor is not |
| 2613 * external. | 2613 * external. |
| 2614 */ | 2614 */ |
| 2615 Token externalKeyword; | 2615 Token externalKeyword; |
| 2616 | 2616 |
| 2617 /** | 2617 /** |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2806 _safelyVisitChild(_parameters, visitor); | 2806 _safelyVisitChild(_parameters, visitor); |
| 2807 _initializers.accept(visitor); | 2807 _initializers.accept(visitor); |
| 2808 _safelyVisitChild(_redirectedConstructor, visitor); | 2808 _safelyVisitChild(_redirectedConstructor, visitor); |
| 2809 _safelyVisitChild(_body, visitor); | 2809 _safelyVisitChild(_body, visitor); |
| 2810 } | 2810 } |
| 2811 } | 2811 } |
| 2812 | 2812 |
| 2813 /** | 2813 /** |
| 2814 * The initialization of a field within a constructor's initialization list. | 2814 * The initialization of a field within a constructor's initialization list. |
| 2815 * | 2815 * |
| 2816 * > fieldInitializer ::= | 2816 * fieldInitializer ::= |
| 2817 * > ('this' '.')? [SimpleIdentifier] '=' [Expression] | 2817 * ('this' '.')? [SimpleIdentifier] '=' [Expression] |
| 2818 */ | 2818 */ |
| 2819 class ConstructorFieldInitializerImpl extends ConstructorInitializerImpl | 2819 class ConstructorFieldInitializerImpl extends ConstructorInitializerImpl |
| 2820 implements ConstructorFieldInitializer { | 2820 implements ConstructorFieldInitializer { |
| 2821 /** | 2821 /** |
| 2822 * The token for the 'this' keyword, or `null` if there is no 'this' keyword. | 2822 * The token for the 'this' keyword, or `null` if there is no 'this' keyword. |
| 2823 */ | 2823 */ |
| 2824 Token thisKeyword; | 2824 Token thisKeyword; |
| 2825 | 2825 |
| 2826 /** | 2826 /** |
| 2827 * The token for the period after the 'this' keyword, or `null` if there is no | 2827 * The token for the period after the 'this' keyword, or `null` if there is no |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2896 @override | 2896 @override |
| 2897 void visitChildren(AstVisitor visitor) { | 2897 void visitChildren(AstVisitor visitor) { |
| 2898 _safelyVisitChild(_fieldName, visitor); | 2898 _safelyVisitChild(_fieldName, visitor); |
| 2899 _safelyVisitChild(_expression, visitor); | 2899 _safelyVisitChild(_expression, visitor); |
| 2900 } | 2900 } |
| 2901 } | 2901 } |
| 2902 | 2902 |
| 2903 /** | 2903 /** |
| 2904 * A node that can occur in the initializer list of a constructor declaration. | 2904 * A node that can occur in the initializer list of a constructor declaration. |
| 2905 * | 2905 * |
| 2906 * > constructorInitializer ::= | 2906 * constructorInitializer ::= |
| 2907 * > [SuperConstructorInvocation] | 2907 * [SuperConstructorInvocation] |
| 2908 * > | [ConstructorFieldInitializer] | 2908 * | [ConstructorFieldInitializer] |
| 2909 * > | [RedirectingConstructorInvocation] | 2909 * | [RedirectingConstructorInvocation] |
| 2910 */ | 2910 */ |
| 2911 abstract class ConstructorInitializerImpl extends AstNodeImpl | 2911 abstract class ConstructorInitializerImpl extends AstNodeImpl |
| 2912 implements ConstructorInitializer {} | 2912 implements ConstructorInitializer {} |
| 2913 | 2913 |
| 2914 /** | 2914 /** |
| 2915 * The name of the constructor. | 2915 * The name of the constructor. |
| 2916 * | 2916 * |
| 2917 * > constructorName ::= | 2917 * constructorName ::= |
| 2918 * > type ('.' identifier)? | 2918 * type ('.' identifier)? |
| 2919 */ | 2919 */ |
| 2920 class ConstructorNameImpl extends AstNodeImpl implements ConstructorName { | 2920 class ConstructorNameImpl extends AstNodeImpl implements ConstructorName { |
| 2921 /** | 2921 /** |
| 2922 * The name of the type defining the constructor. | 2922 * The name of the type defining the constructor. |
| 2923 */ | 2923 */ |
| 2924 TypeName _type; | 2924 TypeName _type; |
| 2925 | 2925 |
| 2926 /** | 2926 /** |
| 2927 * The token for the period before the constructor name, or `null` if the | 2927 * The token for the period before the constructor name, or `null` if the |
| 2928 * specified constructor is the unnamed constructor. | 2928 * specified constructor is the unnamed constructor. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2988 @override | 2988 @override |
| 2989 void visitChildren(AstVisitor visitor) { | 2989 void visitChildren(AstVisitor visitor) { |
| 2990 _safelyVisitChild(_type, visitor); | 2990 _safelyVisitChild(_type, visitor); |
| 2991 _safelyVisitChild(_name, visitor); | 2991 _safelyVisitChild(_name, visitor); |
| 2992 } | 2992 } |
| 2993 } | 2993 } |
| 2994 | 2994 |
| 2995 /** | 2995 /** |
| 2996 * A continue statement. | 2996 * A continue statement. |
| 2997 * | 2997 * |
| 2998 * > continueStatement ::= | 2998 * continueStatement ::= |
| 2999 * > 'continue' [SimpleIdentifier]? ';' | 2999 * 'continue' [SimpleIdentifier]? ';' |
| 3000 */ | 3000 */ |
| 3001 class ContinueStatementImpl extends StatementImpl implements ContinueStatement { | 3001 class ContinueStatementImpl extends StatementImpl implements ContinueStatement { |
| 3002 /** | 3002 /** |
| 3003 * The token representing the 'continue' keyword. | 3003 * The token representing the 'continue' keyword. |
| 3004 */ | 3004 */ |
| 3005 Token continueKeyword; | 3005 Token continueKeyword; |
| 3006 | 3006 |
| 3007 /** | 3007 /** |
| 3008 * The label associated with the statement, or `null` if there is no label. | 3008 * The label associated with the statement, or `null` if there is no label. |
| 3009 */ | 3009 */ |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3071 * [metadata] can be `null` if the declaration does not have the corresponding | 3071 * [metadata] can be `null` if the declaration does not have the corresponding |
| 3072 * attribute. | 3072 * attribute. |
| 3073 */ | 3073 */ |
| 3074 DeclarationImpl(Comment comment, List<Annotation> metadata) | 3074 DeclarationImpl(Comment comment, List<Annotation> metadata) |
| 3075 : super(comment, metadata); | 3075 : super(comment, metadata); |
| 3076 } | 3076 } |
| 3077 | 3077 |
| 3078 /** | 3078 /** |
| 3079 * The declaration of a single identifier. | 3079 * The declaration of a single identifier. |
| 3080 * | 3080 * |
| 3081 * > declaredIdentifier ::= | 3081 * declaredIdentifier ::= |
| 3082 * > [Annotation] finalConstVarOrType [SimpleIdentifier] | 3082 * [Annotation] finalConstVarOrType [SimpleIdentifier] |
| 3083 */ | 3083 */ |
| 3084 class DeclaredIdentifierImpl extends DeclarationImpl | 3084 class DeclaredIdentifierImpl extends DeclarationImpl |
| 3085 implements DeclaredIdentifier { | 3085 implements DeclaredIdentifier { |
| 3086 /** | 3086 /** |
| 3087 * The token representing either the 'final', 'const' or 'var' keyword, or | 3087 * The token representing either the 'final', 'const' or 'var' keyword, or |
| 3088 * `null` if no keyword was used. | 3088 * `null` if no keyword was used. |
| 3089 */ | 3089 */ |
| 3090 Token keyword; | 3090 Token keyword; |
| 3091 | 3091 |
| 3092 /** | 3092 /** |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3173 _safelyVisitChild(_type, visitor); | 3173 _safelyVisitChild(_type, visitor); |
| 3174 _safelyVisitChild(_identifier, visitor); | 3174 _safelyVisitChild(_identifier, visitor); |
| 3175 } | 3175 } |
| 3176 } | 3176 } |
| 3177 | 3177 |
| 3178 /** | 3178 /** |
| 3179 * A formal parameter with a default value. There are two kinds of parameters | 3179 * A formal parameter with a default value. There are two kinds of parameters |
| 3180 * that are both represented by this class: named formal parameters and | 3180 * that are both represented by this class: named formal parameters and |
| 3181 * positional formal parameters. | 3181 * positional formal parameters. |
| 3182 * | 3182 * |
| 3183 * > defaultFormalParameter ::= | 3183 * defaultFormalParameter ::= |
| 3184 * > [NormalFormalParameter] ('=' [Expression])? | 3184 * [NormalFormalParameter] ('=' [Expression])? |
| 3185 * > | 3185 * |
| 3186 * > defaultNamedParameter ::= | 3186 * defaultNamedParameter ::= |
| 3187 * > [NormalFormalParameter] (':' [Expression])? | 3187 * [NormalFormalParameter] (':' [Expression])? |
| 3188 */ | 3188 */ |
| 3189 class DefaultFormalParameterImpl extends FormalParameterImpl | 3189 class DefaultFormalParameterImpl extends FormalParameterImpl |
| 3190 implements DefaultFormalParameter { | 3190 implements DefaultFormalParameter { |
| 3191 /** | 3191 /** |
| 3192 * The formal parameter with which the default value is associated. | 3192 * The formal parameter with which the default value is associated. |
| 3193 */ | 3193 */ |
| 3194 NormalFormalParameter _parameter; | 3194 NormalFormalParameter _parameter; |
| 3195 | 3195 |
| 3196 /** | 3196 /** |
| 3197 * The kind of this parameter. | 3197 * The kind of this parameter. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3269 @override | 3269 @override |
| 3270 void visitChildren(AstVisitor visitor) { | 3270 void visitChildren(AstVisitor visitor) { |
| 3271 _safelyVisitChild(_parameter, visitor); | 3271 _safelyVisitChild(_parameter, visitor); |
| 3272 _safelyVisitChild(_defaultValue, visitor); | 3272 _safelyVisitChild(_defaultValue, visitor); |
| 3273 } | 3273 } |
| 3274 } | 3274 } |
| 3275 | 3275 |
| 3276 /** | 3276 /** |
| 3277 * A node that represents a directive. | 3277 * A node that represents a directive. |
| 3278 * | 3278 * |
| 3279 * > directive ::= | 3279 * directive ::= |
| 3280 * > [ExportDirective] | 3280 * [ExportDirective] |
| 3281 * > | [ImportDirective] | 3281 * | [ImportDirective] |
| 3282 * > | [LibraryDirective] | 3282 * | [LibraryDirective] |
| 3283 * > | [PartDirective] | 3283 * | [PartDirective] |
| 3284 * > | [PartOfDirective] | 3284 * | [PartOfDirective] |
| 3285 */ | 3285 */ |
| 3286 abstract class DirectiveImpl extends AnnotatedNodeImpl implements Directive { | 3286 abstract class DirectiveImpl extends AnnotatedNodeImpl implements Directive { |
| 3287 /** | 3287 /** |
| 3288 * The element associated with this directive, or `null` if the AST structure | 3288 * The element associated with this directive, or `null` if the AST structure |
| 3289 * has not been resolved or if this directive could not be resolved. | 3289 * has not been resolved or if this directive could not be resolved. |
| 3290 */ | 3290 */ |
| 3291 Element element; | 3291 Element element; |
| 3292 | 3292 |
| 3293 /** | 3293 /** |
| 3294 * Initialize a newly create directive. Either or both of the [comment] and | 3294 * Initialize a newly create directive. Either or both of the [comment] and |
| 3295 * [metadata] can be `null` if the directive does not have the corresponding | 3295 * [metadata] can be `null` if the directive does not have the corresponding |
| 3296 * attribute. | 3296 * attribute. |
| 3297 */ | 3297 */ |
| 3298 DirectiveImpl(Comment comment, List<Annotation> metadata) | 3298 DirectiveImpl(Comment comment, List<Annotation> metadata) |
| 3299 : super(comment, metadata); | 3299 : super(comment, metadata); |
| 3300 } | 3300 } |
| 3301 | 3301 |
| 3302 /** | 3302 /** |
| 3303 * A do statement. | 3303 * A do statement. |
| 3304 * | 3304 * |
| 3305 * > doStatement ::= | 3305 * doStatement ::= |
| 3306 * > 'do' [Statement] 'while' '(' [Expression] ')' ';' | 3306 * 'do' [Statement] 'while' '(' [Expression] ')' ';' |
| 3307 */ | 3307 */ |
| 3308 class DoStatementImpl extends StatementImpl implements DoStatement { | 3308 class DoStatementImpl extends StatementImpl implements DoStatement { |
| 3309 /** | 3309 /** |
| 3310 * The token representing the 'do' keyword. | 3310 * The token representing the 'do' keyword. |
| 3311 */ | 3311 */ |
| 3312 Token doKeyword; | 3312 Token doKeyword; |
| 3313 | 3313 |
| 3314 /** | 3314 /** |
| 3315 * The body of the loop. | 3315 * The body of the loop. |
| 3316 */ | 3316 */ |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3394 @override | 3394 @override |
| 3395 void visitChildren(AstVisitor visitor) { | 3395 void visitChildren(AstVisitor visitor) { |
| 3396 _safelyVisitChild(_body, visitor); | 3396 _safelyVisitChild(_body, visitor); |
| 3397 _safelyVisitChild(_condition, visitor); | 3397 _safelyVisitChild(_condition, visitor); |
| 3398 } | 3398 } |
| 3399 } | 3399 } |
| 3400 | 3400 |
| 3401 /** | 3401 /** |
| 3402 * A dotted name, used in a configuration within an import or export directive. | 3402 * A dotted name, used in a configuration within an import or export directive. |
| 3403 * | 3403 * |
| 3404 * > dottedName ::= | 3404 * dottedName ::= |
| 3405 * > [SimpleIdentifier] ('.' [SimpleIdentifier])* | 3405 * [SimpleIdentifier] ('.' [SimpleIdentifier])* |
| 3406 */ | 3406 */ |
| 3407 class DottedNameImpl extends AstNodeImpl implements DottedName { | 3407 class DottedNameImpl extends AstNodeImpl implements DottedName { |
| 3408 /** | 3408 /** |
| 3409 * The components of the identifier. | 3409 * The components of the identifier. |
| 3410 */ | 3410 */ |
| 3411 NodeList<SimpleIdentifier> _components; | 3411 NodeList<SimpleIdentifier> _components; |
| 3412 | 3412 |
| 3413 /** | 3413 /** |
| 3414 * Initialize a newly created dotted name. | 3414 * Initialize a newly created dotted name. |
| 3415 */ | 3415 */ |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3435 | 3435 |
| 3436 @override | 3436 @override |
| 3437 void visitChildren(AstVisitor visitor) { | 3437 void visitChildren(AstVisitor visitor) { |
| 3438 _components.accept(visitor); | 3438 _components.accept(visitor); |
| 3439 } | 3439 } |
| 3440 } | 3440 } |
| 3441 | 3441 |
| 3442 /** | 3442 /** |
| 3443 * A floating point literal expression. | 3443 * A floating point literal expression. |
| 3444 * | 3444 * |
| 3445 * > doubleLiteral ::= | 3445 * doubleLiteral ::= |
| 3446 * > decimalDigit+ ('.' decimalDigit*)? exponent? | 3446 * decimalDigit+ ('.' decimalDigit*)? exponent? |
| 3447 * > | '.' decimalDigit+ exponent? | 3447 * | '.' decimalDigit+ exponent? |
| 3448 * > | 3448 * |
| 3449 * > exponent ::= | 3449 * exponent ::= |
| 3450 * > ('e' | 'E') ('+' | '-')? decimalDigit+ | 3450 * ('e' | 'E') ('+' | '-')? decimalDigit+ |
| 3451 */ | 3451 */ |
| 3452 class DoubleLiteralImpl extends LiteralImpl implements DoubleLiteral { | 3452 class DoubleLiteralImpl extends LiteralImpl implements DoubleLiteral { |
| 3453 /** | 3453 /** |
| 3454 * The token representing the literal. | 3454 * The token representing the literal. |
| 3455 */ | 3455 */ |
| 3456 Token literal; | 3456 Token literal; |
| 3457 | 3457 |
| 3458 /** | 3458 /** |
| 3459 * The value of the literal. | 3459 * The value of the literal. |
| 3460 */ | 3460 */ |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3480 @override | 3480 @override |
| 3481 void visitChildren(AstVisitor visitor) { | 3481 void visitChildren(AstVisitor visitor) { |
| 3482 // There are no children to visit. | 3482 // There are no children to visit. |
| 3483 } | 3483 } |
| 3484 } | 3484 } |
| 3485 | 3485 |
| 3486 /** | 3486 /** |
| 3487 * An empty function body, which can only appear in constructors or abstract | 3487 * An empty function body, which can only appear in constructors or abstract |
| 3488 * methods. | 3488 * methods. |
| 3489 * | 3489 * |
| 3490 * > emptyFunctionBody ::= | 3490 * emptyFunctionBody ::= |
| 3491 * > ';' | 3491 * ';' |
| 3492 */ | 3492 */ |
| 3493 class EmptyFunctionBodyImpl extends FunctionBodyImpl | 3493 class EmptyFunctionBodyImpl extends FunctionBodyImpl |
| 3494 implements EmptyFunctionBody { | 3494 implements EmptyFunctionBody { |
| 3495 /** | 3495 /** |
| 3496 * The token representing the semicolon that marks the end of the function | 3496 * The token representing the semicolon that marks the end of the function |
| 3497 * body. | 3497 * body. |
| 3498 */ | 3498 */ |
| 3499 Token semicolon; | 3499 Token semicolon; |
| 3500 | 3500 |
| 3501 /** | 3501 /** |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3517 | 3517 |
| 3518 @override | 3518 @override |
| 3519 void visitChildren(AstVisitor visitor) { | 3519 void visitChildren(AstVisitor visitor) { |
| 3520 // Empty function bodies have no children. | 3520 // Empty function bodies have no children. |
| 3521 } | 3521 } |
| 3522 } | 3522 } |
| 3523 | 3523 |
| 3524 /** | 3524 /** |
| 3525 * An empty statement. | 3525 * An empty statement. |
| 3526 * | 3526 * |
| 3527 * > emptyStatement ::= | 3527 * emptyStatement ::= |
| 3528 * > ';' | 3528 * ';' |
| 3529 */ | 3529 */ |
| 3530 class EmptyStatementImpl extends StatementImpl implements EmptyStatement { | 3530 class EmptyStatementImpl extends StatementImpl implements EmptyStatement { |
| 3531 /** | 3531 /** |
| 3532 * The semicolon terminating the statement. | 3532 * The semicolon terminating the statement. |
| 3533 */ | 3533 */ |
| 3534 Token semicolon; | 3534 Token semicolon; |
| 3535 | 3535 |
| 3536 /** | 3536 /** |
| 3537 * Initialize a newly created empty statement. | 3537 * Initialize a newly created empty statement. |
| 3538 */ | 3538 */ |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3605 @override | 3605 @override |
| 3606 void visitChildren(AstVisitor visitor) { | 3606 void visitChildren(AstVisitor visitor) { |
| 3607 super.visitChildren(visitor); | 3607 super.visitChildren(visitor); |
| 3608 _safelyVisitChild(_name, visitor); | 3608 _safelyVisitChild(_name, visitor); |
| 3609 } | 3609 } |
| 3610 } | 3610 } |
| 3611 | 3611 |
| 3612 /** | 3612 /** |
| 3613 * The declaration of an enumeration. | 3613 * The declaration of an enumeration. |
| 3614 * | 3614 * |
| 3615 * > enumType ::= | 3615 * enumType ::= |
| 3616 * > metadata 'enum' [SimpleIdentifier] '{' [SimpleIdentifier] (',' [SimpleI
dentifier])* (',')? '}' | 3616 * metadata 'enum' [SimpleIdentifier] '{' [SimpleIdentifier] (',' [Simple
Identifier])* (',')? '}' |
| 3617 */ | 3617 */ |
| 3618 class EnumDeclarationImpl extends NamedCompilationUnitMemberImpl | 3618 class EnumDeclarationImpl extends NamedCompilationUnitMemberImpl |
| 3619 implements EnumDeclaration { | 3619 implements EnumDeclaration { |
| 3620 /** | 3620 /** |
| 3621 * The 'enum' keyword. | 3621 * The 'enum' keyword. |
| 3622 */ | 3622 */ |
| 3623 Token enumKeyword; | 3623 Token enumKeyword; |
| 3624 | 3624 |
| 3625 /** | 3625 /** |
| 3626 * The left curly bracket. | 3626 * The left curly bracket. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3695 class EphemeralIdentifier extends SimpleIdentifierImpl { | 3695 class EphemeralIdentifier extends SimpleIdentifierImpl { |
| 3696 EphemeralIdentifier(AstNode parent, int location) | 3696 EphemeralIdentifier(AstNode parent, int location) |
| 3697 : super(new StringToken(TokenType.IDENTIFIER, "", location)) { | 3697 : super(new StringToken(TokenType.IDENTIFIER, "", location)) { |
| 3698 (parent as AstNodeImpl)._becomeParentOf(this); | 3698 (parent as AstNodeImpl)._becomeParentOf(this); |
| 3699 } | 3699 } |
| 3700 } | 3700 } |
| 3701 | 3701 |
| 3702 /** | 3702 /** |
| 3703 * An export directive. | 3703 * An export directive. |
| 3704 * | 3704 * |
| 3705 * > exportDirective ::= | 3705 * exportDirective ::= |
| 3706 * > [Annotation] 'export' [StringLiteral] [Combinator]* ';' | 3706 * [Annotation] 'export' [StringLiteral] [Combinator]* ';' |
| 3707 */ | 3707 */ |
| 3708 class ExportDirectiveImpl extends NamespaceDirectiveImpl | 3708 class ExportDirectiveImpl extends NamespaceDirectiveImpl |
| 3709 implements ExportDirective { | 3709 implements ExportDirective { |
| 3710 /** | 3710 /** |
| 3711 * Initialize a newly created export directive. Either or both of the | 3711 * Initialize a newly created export directive. Either or both of the |
| 3712 * [comment] and [metadata] can be `null` if the directive does not have the | 3712 * [comment] and [metadata] can be `null` if the directive does not have the |
| 3713 * corresponding attribute. The list of [combinators] can be `null` if there | 3713 * corresponding attribute. The list of [combinators] can be `null` if there |
| 3714 * are no combinators. | 3714 * are no combinators. |
| 3715 */ | 3715 */ |
| 3716 ExportDirectiveImpl( | 3716 ExportDirectiveImpl( |
| (...skipping 30 matching lines...) Expand all Loading... |
| 3747 @override | 3747 @override |
| 3748 void visitChildren(AstVisitor visitor) { | 3748 void visitChildren(AstVisitor visitor) { |
| 3749 super.visitChildren(visitor); | 3749 super.visitChildren(visitor); |
| 3750 combinators.accept(visitor); | 3750 combinators.accept(visitor); |
| 3751 } | 3751 } |
| 3752 } | 3752 } |
| 3753 | 3753 |
| 3754 /** | 3754 /** |
| 3755 * A function body consisting of a single expression. | 3755 * A function body consisting of a single expression. |
| 3756 * | 3756 * |
| 3757 * > expressionFunctionBody ::= | 3757 * expressionFunctionBody ::= |
| 3758 * > 'async'? '=>' [Expression] ';' | 3758 * 'async'? '=>' [Expression] ';' |
| 3759 */ | 3759 */ |
| 3760 class ExpressionFunctionBodyImpl extends FunctionBodyImpl | 3760 class ExpressionFunctionBodyImpl extends FunctionBodyImpl |
| 3761 implements ExpressionFunctionBody { | 3761 implements ExpressionFunctionBody { |
| 3762 /** | 3762 /** |
| 3763 * The token representing the 'async' keyword, or `null` if there is no such | 3763 * The token representing the 'async' keyword, or `null` if there is no such |
| 3764 * keyword. | 3764 * keyword. |
| 3765 */ | 3765 */ |
| 3766 Token keyword; | 3766 Token keyword; |
| 3767 | 3767 |
| 3768 /** | 3768 /** |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3833 | 3833 |
| 3834 @override | 3834 @override |
| 3835 void visitChildren(AstVisitor visitor) { | 3835 void visitChildren(AstVisitor visitor) { |
| 3836 _safelyVisitChild(_expression, visitor); | 3836 _safelyVisitChild(_expression, visitor); |
| 3837 } | 3837 } |
| 3838 } | 3838 } |
| 3839 | 3839 |
| 3840 /** | 3840 /** |
| 3841 * A node that represents an expression. | 3841 * A node that represents an expression. |
| 3842 * | 3842 * |
| 3843 * > expression ::= | 3843 * expression ::= |
| 3844 * > [AssignmentExpression] | 3844 * [AssignmentExpression] |
| 3845 * > | [ConditionalExpression] cascadeSection* | 3845 * | [ConditionalExpression] cascadeSection* |
| 3846 * > | [ThrowExpression] | 3846 * | [ThrowExpression] |
| 3847 */ | 3847 */ |
| 3848 abstract class ExpressionImpl extends AstNodeImpl implements Expression { | 3848 abstract class ExpressionImpl extends AstNodeImpl implements Expression { |
| 3849 /** | 3849 /** |
| 3850 * The static type of this expression, or `null` if the AST structure has not | 3850 * The static type of this expression, or `null` if the AST structure has not |
| 3851 * been resolved. | 3851 * been resolved. |
| 3852 */ | 3852 */ |
| 3853 DartType staticType; | 3853 DartType staticType; |
| 3854 | 3854 |
| 3855 /** | 3855 /** |
| 3856 * The propagated type of this expression, or `null` if type propagation has | 3856 * The propagated type of this expression, or `null` if type propagation has |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3932 } else if (parent is PostfixExpressionImpl) { | 3932 } else if (parent is PostfixExpressionImpl) { |
| 3933 return parent._staticParameterElementForOperand; | 3933 return parent._staticParameterElementForOperand; |
| 3934 } | 3934 } |
| 3935 return null; | 3935 return null; |
| 3936 } | 3936 } |
| 3937 } | 3937 } |
| 3938 | 3938 |
| 3939 /** | 3939 /** |
| 3940 * An expression used as a statement. | 3940 * An expression used as a statement. |
| 3941 * | 3941 * |
| 3942 * > expressionStatement ::= | 3942 * expressionStatement ::= |
| 3943 * > [Expression]? ';' | 3943 * [Expression]? ';' |
| 3944 */ | 3944 */ |
| 3945 class ExpressionStatementImpl extends StatementImpl | 3945 class ExpressionStatementImpl extends StatementImpl |
| 3946 implements ExpressionStatement { | 3946 implements ExpressionStatement { |
| 3947 /** | 3947 /** |
| 3948 * The expression that comprises the statement. | 3948 * The expression that comprises the statement. |
| 3949 */ | 3949 */ |
| 3950 Expression _expression; | 3950 Expression _expression; |
| 3951 | 3951 |
| 3952 /** | 3952 /** |
| 3953 * The semicolon terminating the statement, or `null` if the expression is a | 3953 * The semicolon terminating the statement, or `null` if the expression is a |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3993 | 3993 |
| 3994 @override | 3994 @override |
| 3995 void visitChildren(AstVisitor visitor) { | 3995 void visitChildren(AstVisitor visitor) { |
| 3996 _safelyVisitChild(_expression, visitor); | 3996 _safelyVisitChild(_expression, visitor); |
| 3997 } | 3997 } |
| 3998 } | 3998 } |
| 3999 | 3999 |
| 4000 /** | 4000 /** |
| 4001 * The "extends" clause in a class declaration. | 4001 * The "extends" clause in a class declaration. |
| 4002 * | 4002 * |
| 4003 * > extendsClause ::= | 4003 * extendsClause ::= |
| 4004 * > 'extends' [TypeName] | 4004 * 'extends' [TypeName] |
| 4005 */ | 4005 */ |
| 4006 class ExtendsClauseImpl extends AstNodeImpl implements ExtendsClause { | 4006 class ExtendsClauseImpl extends AstNodeImpl implements ExtendsClause { |
| 4007 /** | 4007 /** |
| 4008 * The token representing the 'extends' keyword. | 4008 * The token representing the 'extends' keyword. |
| 4009 */ | 4009 */ |
| 4010 Token extendsKeyword; | 4010 Token extendsKeyword; |
| 4011 | 4011 |
| 4012 /** | 4012 /** |
| 4013 * The name of the class that is being extended. | 4013 * The name of the class that is being extended. |
| 4014 */ | 4014 */ |
| (...skipping 29 matching lines...) Expand all Loading... |
| 4044 | 4044 |
| 4045 @override | 4045 @override |
| 4046 void visitChildren(AstVisitor visitor) { | 4046 void visitChildren(AstVisitor visitor) { |
| 4047 _safelyVisitChild(_superclass, visitor); | 4047 _safelyVisitChild(_superclass, visitor); |
| 4048 } | 4048 } |
| 4049 } | 4049 } |
| 4050 | 4050 |
| 4051 /** | 4051 /** |
| 4052 * The declaration of one or more fields of the same type. | 4052 * The declaration of one or more fields of the same type. |
| 4053 * | 4053 * |
| 4054 * > fieldDeclaration ::= | 4054 * fieldDeclaration ::= |
| 4055 * > 'static'? [VariableDeclarationList] ';' | 4055 * 'static'? [VariableDeclarationList] ';' |
| 4056 */ | 4056 */ |
| 4057 class FieldDeclarationImpl extends ClassMemberImpl implements FieldDeclaration { | 4057 class FieldDeclarationImpl extends ClassMemberImpl implements FieldDeclaration { |
| 4058 /** | 4058 /** |
| 4059 * The token representing the 'static' keyword, or `null` if the fields are | 4059 * The token representing the 'static' keyword, or `null` if the fields are |
| 4060 * not static. | 4060 * not static. |
| 4061 */ | 4061 */ |
| 4062 Token staticKeyword; | 4062 Token staticKeyword; |
| 4063 | 4063 |
| 4064 /** | 4064 /** |
| 4065 * The fields being declared. | 4065 * The fields being declared. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4118 @override | 4118 @override |
| 4119 void visitChildren(AstVisitor visitor) { | 4119 void visitChildren(AstVisitor visitor) { |
| 4120 super.visitChildren(visitor); | 4120 super.visitChildren(visitor); |
| 4121 _safelyVisitChild(_fieldList, visitor); | 4121 _safelyVisitChild(_fieldList, visitor); |
| 4122 } | 4122 } |
| 4123 } | 4123 } |
| 4124 | 4124 |
| 4125 /** | 4125 /** |
| 4126 * A field formal parameter. | 4126 * A field formal parameter. |
| 4127 * | 4127 * |
| 4128 * > fieldFormalParameter ::= | 4128 * fieldFormalParameter ::= |
| 4129 * > ('final' [TypeName] | 'const' [TypeName] | 'var' | [TypeName])? | 4129 * ('final' [TypeName] | 'const' [TypeName] | 'var' | [TypeName])? |
| 4130 * > 'this' '.' [SimpleIdentifier] ([TypeParameterList]? [FormalParameterLis
t])? | 4130 * 'this' '.' [SimpleIdentifier] ([TypeParameterList]? [FormalParameterLi
st])? |
| 4131 */ | 4131 */ |
| 4132 class FieldFormalParameterImpl extends NormalFormalParameterImpl | 4132 class FieldFormalParameterImpl extends NormalFormalParameterImpl |
| 4133 implements FieldFormalParameter { | 4133 implements FieldFormalParameter { |
| 4134 /** | 4134 /** |
| 4135 * The token representing either the 'final', 'const' or 'var' keyword, or | 4135 * The token representing either the 'final', 'const' or 'var' keyword, or |
| 4136 * `null` if no keyword was used. | 4136 * `null` if no keyword was used. |
| 4137 */ | 4137 */ |
| 4138 Token keyword; | 4138 Token keyword; |
| 4139 | 4139 |
| 4140 /** | 4140 /** |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4260 _safelyVisitChild(_type, visitor); | 4260 _safelyVisitChild(_type, visitor); |
| 4261 _safelyVisitChild(identifier, visitor); | 4261 _safelyVisitChild(identifier, visitor); |
| 4262 _safelyVisitChild(_typeParameters, visitor); | 4262 _safelyVisitChild(_typeParameters, visitor); |
| 4263 _safelyVisitChild(_parameters, visitor); | 4263 _safelyVisitChild(_parameters, visitor); |
| 4264 } | 4264 } |
| 4265 } | 4265 } |
| 4266 | 4266 |
| 4267 /** | 4267 /** |
| 4268 * A for-each statement. | 4268 * A for-each statement. |
| 4269 * | 4269 * |
| 4270 * > forEachStatement ::= | 4270 * forEachStatement ::= |
| 4271 * > 'await'? 'for' '(' [DeclaredIdentifier] 'in' [Expression] ')' [Block] | 4271 * 'await'? 'for' '(' [DeclaredIdentifier] 'in' [Expression] ')' [Block] |
| 4272 * > | 'await'? 'for' '(' [SimpleIdentifier] 'in' [Expression] ')' [Block] | 4272 * | 'await'? 'for' '(' [SimpleIdentifier] 'in' [Expression] ')' [Block] |
| 4273 */ | 4273 */ |
| 4274 class ForEachStatementImpl extends StatementImpl implements ForEachStatement { | 4274 class ForEachStatementImpl extends StatementImpl implements ForEachStatement { |
| 4275 /** | 4275 /** |
| 4276 * The token representing the 'await' keyword, or `null` if there is no | 4276 * The token representing the 'await' keyword, or `null` if there is no |
| 4277 * 'await' keyword. | 4277 * 'await' keyword. |
| 4278 */ | 4278 */ |
| 4279 Token awaitKeyword; | 4279 Token awaitKeyword; |
| 4280 | 4280 |
| 4281 /** | 4281 /** |
| 4282 * The token representing the 'for' keyword. | 4282 * The token representing the 'for' keyword. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4415 _safelyVisitChild(_loopVariable, visitor); | 4415 _safelyVisitChild(_loopVariable, visitor); |
| 4416 _safelyVisitChild(_identifier, visitor); | 4416 _safelyVisitChild(_identifier, visitor); |
| 4417 _safelyVisitChild(_iterable, visitor); | 4417 _safelyVisitChild(_iterable, visitor); |
| 4418 _safelyVisitChild(_body, visitor); | 4418 _safelyVisitChild(_body, visitor); |
| 4419 } | 4419 } |
| 4420 } | 4420 } |
| 4421 | 4421 |
| 4422 /** | 4422 /** |
| 4423 * A node representing a parameter to a function. | 4423 * A node representing a parameter to a function. |
| 4424 * | 4424 * |
| 4425 * > formalParameter ::= | 4425 * formalParameter ::= |
| 4426 * > [NormalFormalParameter] | 4426 * [NormalFormalParameter] |
| 4427 * > | [DefaultFormalParameter] | 4427 * | [DefaultFormalParameter] |
| 4428 */ | 4428 */ |
| 4429 abstract class FormalParameterImpl extends AstNodeImpl | 4429 abstract class FormalParameterImpl extends AstNodeImpl |
| 4430 implements FormalParameter { | 4430 implements FormalParameter { |
| 4431 @override | 4431 @override |
| 4432 ParameterElement get element { | 4432 ParameterElement get element { |
| 4433 SimpleIdentifier identifier = this.identifier; | 4433 SimpleIdentifier identifier = this.identifier; |
| 4434 if (identifier == null) { | 4434 if (identifier == null) { |
| 4435 return null; | 4435 return null; |
| 4436 } | 4436 } |
| 4437 return identifier.staticElement as ParameterElement; | 4437 return identifier.staticElement as ParameterElement; |
| 4438 } | 4438 } |
| 4439 } | 4439 } |
| 4440 | 4440 |
| 4441 /** | 4441 /** |
| 4442 * The formal parameter list of a method declaration, function declaration, or | 4442 * The formal parameter list of a method declaration, function declaration, or |
| 4443 * function type alias. | 4443 * function type alias. |
| 4444 * | 4444 * |
| 4445 * While the grammar requires all optional formal parameters to follow all of | 4445 * While the grammar requires all optional formal parameters to follow all of |
| 4446 * the normal formal parameters and at most one grouping of optional formal | 4446 * the normal formal parameters and at most one grouping of optional formal |
| 4447 * parameters, this class does not enforce those constraints. All parameters are | 4447 * parameters, this class does not enforce those constraints. All parameters are |
| 4448 * flattened into a single list, which can have any or all kinds of parameters | 4448 * flattened into a single list, which can have any or all kinds of parameters |
| 4449 * (normal, named, and positional) in any order. | 4449 * (normal, named, and positional) in any order. |
| 4450 * | 4450 * |
| 4451 * > formalParameterList ::= | 4451 * formalParameterList ::= |
| 4452 * > '(' ')' | 4452 * '(' ')' |
| 4453 * > | '(' normalFormalParameters (',' optionalFormalParameters)? ')' | 4453 * | '(' normalFormalParameters (',' optionalFormalParameters)? ')' |
| 4454 * > | '(' optionalFormalParameters ')' | 4454 * | '(' optionalFormalParameters ')' |
| 4455 * > | 4455 * |
| 4456 * > normalFormalParameters ::= | 4456 * normalFormalParameters ::= |
| 4457 * > [NormalFormalParameter] (',' [NormalFormalParameter])* | 4457 * [NormalFormalParameter] (',' [NormalFormalParameter])* |
| 4458 * > | 4458 * |
| 4459 * > optionalFormalParameters ::= | 4459 * optionalFormalParameters ::= |
| 4460 * > optionalPositionalFormalParameters | 4460 * optionalPositionalFormalParameters |
| 4461 * > | namedFormalParameters | 4461 * | namedFormalParameters |
| 4462 * > | 4462 * |
| 4463 * > optionalPositionalFormalParameters ::= | 4463 * optionalPositionalFormalParameters ::= |
| 4464 * > '[' [DefaultFormalParameter] (',' [DefaultFormalParameter])* ']' | 4464 * '[' [DefaultFormalParameter] (',' [DefaultFormalParameter])* ']' |
| 4465 * > | 4465 * |
| 4466 * > namedFormalParameters ::= | 4466 * namedFormalParameters ::= |
| 4467 * > '{' [DefaultFormalParameter] (',' [DefaultFormalParameter])* '}' | 4467 * '{' [DefaultFormalParameter] (',' [DefaultFormalParameter])* '}' |
| 4468 */ | 4468 */ |
| 4469 class FormalParameterListImpl extends AstNodeImpl | 4469 class FormalParameterListImpl extends AstNodeImpl |
| 4470 implements FormalParameterList { | 4470 implements FormalParameterList { |
| 4471 /** | 4471 /** |
| 4472 * The left parenthesis. | 4472 * The left parenthesis. |
| 4473 */ | 4473 */ |
| 4474 Token leftParenthesis; | 4474 Token leftParenthesis; |
| 4475 | 4475 |
| 4476 /** | 4476 /** |
| 4477 * The parameters associated with the method. | 4477 * The parameters associated with the method. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4548 | 4548 |
| 4549 @override | 4549 @override |
| 4550 void visitChildren(AstVisitor visitor) { | 4550 void visitChildren(AstVisitor visitor) { |
| 4551 _parameters.accept(visitor); | 4551 _parameters.accept(visitor); |
| 4552 } | 4552 } |
| 4553 } | 4553 } |
| 4554 | 4554 |
| 4555 /** | 4555 /** |
| 4556 * A for statement. | 4556 * A for statement. |
| 4557 * | 4557 * |
| 4558 * > forStatement ::= | 4558 * forStatement ::= |
| 4559 * > 'for' '(' forLoopParts ')' [Statement] | 4559 * 'for' '(' forLoopParts ')' [Statement] |
| 4560 * > | 4560 * |
| 4561 * > forLoopParts ::= | 4561 * forLoopParts ::= |
| 4562 * > forInitializerStatement ';' [Expression]? ';' [Expression]? | 4562 * forInitializerStatement ';' [Expression]? ';' [Expression]? |
| 4563 * > | 4563 * |
| 4564 * > forInitializerStatement ::= | 4564 * forInitializerStatement ::= |
| 4565 * > [DefaultFormalParameter] | 4565 * [DefaultFormalParameter] |
| 4566 * > | [Expression]? | 4566 * | [Expression]? |
| 4567 */ | 4567 */ |
| 4568 class ForStatementImpl extends StatementImpl implements ForStatement { | 4568 class ForStatementImpl extends StatementImpl implements ForStatement { |
| 4569 /** | 4569 /** |
| 4570 * The token representing the 'for' keyword. | 4570 * The token representing the 'for' keyword. |
| 4571 */ | 4571 */ |
| 4572 Token forKeyword; | 4572 Token forKeyword; |
| 4573 | 4573 |
| 4574 /** | 4574 /** |
| 4575 * The left parenthesis. | 4575 * The left parenthesis. |
| 4576 */ | 4576 */ |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4708 _safelyVisitChild(_initialization, visitor); | 4708 _safelyVisitChild(_initialization, visitor); |
| 4709 _safelyVisitChild(_condition, visitor); | 4709 _safelyVisitChild(_condition, visitor); |
| 4710 _updaters.accept(visitor); | 4710 _updaters.accept(visitor); |
| 4711 _safelyVisitChild(_body, visitor); | 4711 _safelyVisitChild(_body, visitor); |
| 4712 } | 4712 } |
| 4713 } | 4713 } |
| 4714 | 4714 |
| 4715 /** | 4715 /** |
| 4716 * A node representing the body of a function or method. | 4716 * A node representing the body of a function or method. |
| 4717 * | 4717 * |
| 4718 * > functionBody ::= | 4718 * functionBody ::= |
| 4719 * > [BlockFunctionBody] | 4719 * [BlockFunctionBody] |
| 4720 * > | [EmptyFunctionBody] | 4720 * | [EmptyFunctionBody] |
| 4721 * > | [ExpressionFunctionBody] | 4721 * | [ExpressionFunctionBody] |
| 4722 */ | 4722 */ |
| 4723 abstract class FunctionBodyImpl extends AstNodeImpl implements FunctionBody { | 4723 abstract class FunctionBodyImpl extends AstNodeImpl implements FunctionBody { |
| 4724 /** | 4724 /** |
| 4725 * Additional information about local variables and parameters that are | 4725 * Additional information about local variables and parameters that are |
| 4726 * declared within this function body or any enclosing function body. `null` | 4726 * declared within this function body or any enclosing function body. `null` |
| 4727 * if resolution has not yet been performed. | 4727 * if resolution has not yet been performed. |
| 4728 */ | 4728 */ |
| 4729 LocalVariableInfo localVariableInfo; | 4729 LocalVariableInfo localVariableInfo; |
| 4730 | 4730 |
| 4731 /** | 4731 /** |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4768 if (localVariableInfo == null) { | 4768 if (localVariableInfo == null) { |
| 4769 throw new StateError('Resolution has not yet been performed'); | 4769 throw new StateError('Resolution has not yet been performed'); |
| 4770 } | 4770 } |
| 4771 return localVariableInfo.potentiallyMutatedInScope.contains(variable); | 4771 return localVariableInfo.potentiallyMutatedInScope.contains(variable); |
| 4772 } | 4772 } |
| 4773 } | 4773 } |
| 4774 | 4774 |
| 4775 /** | 4775 /** |
| 4776 * A top-level declaration. | 4776 * A top-level declaration. |
| 4777 * | 4777 * |
| 4778 * > functionDeclaration ::= | 4778 * functionDeclaration ::= |
| 4779 * > 'external' functionSignature | 4779 * 'external' functionSignature |
| 4780 * > | functionSignature [FunctionBody] | 4780 * | functionSignature [FunctionBody] |
| 4781 * > | 4781 * |
| 4782 * > functionSignature ::= | 4782 * functionSignature ::= |
| 4783 * > [Type]? ('get' | 'set')? [SimpleIdentifier] [FormalParameterList] | 4783 * [Type]? ('get' | 'set')? [SimpleIdentifier] [FormalParameterList] |
| 4784 */ | 4784 */ |
| 4785 class FunctionDeclarationImpl extends NamedCompilationUnitMemberImpl | 4785 class FunctionDeclarationImpl extends NamedCompilationUnitMemberImpl |
| 4786 implements FunctionDeclaration { | 4786 implements FunctionDeclaration { |
| 4787 /** | 4787 /** |
| 4788 * The token representing the 'external' keyword, or `null` if this is not an | 4788 * The token representing the 'external' keyword, or `null` if this is not an |
| 4789 * external function. | 4789 * external function. |
| 4790 */ | 4790 */ |
| 4791 Token externalKeyword; | 4791 Token externalKeyword; |
| 4792 | 4792 |
| 4793 /** | 4793 /** |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4933 | 4933 |
| 4934 @override | 4934 @override |
| 4935 void visitChildren(AstVisitor visitor) { | 4935 void visitChildren(AstVisitor visitor) { |
| 4936 _safelyVisitChild(_functionDeclaration, visitor); | 4936 _safelyVisitChild(_functionDeclaration, visitor); |
| 4937 } | 4937 } |
| 4938 } | 4938 } |
| 4939 | 4939 |
| 4940 /** | 4940 /** |
| 4941 * A function expression. | 4941 * A function expression. |
| 4942 * | 4942 * |
| 4943 * > functionExpression ::= | 4943 * functionExpression ::= |
| 4944 * > [TypeParameterList]? [FormalParameterList] [FunctionBody] | 4944 * [TypeParameterList]? [FormalParameterList] [FunctionBody] |
| 4945 */ | 4945 */ |
| 4946 class FunctionExpressionImpl extends ExpressionImpl | 4946 class FunctionExpressionImpl extends ExpressionImpl |
| 4947 implements FunctionExpression { | 4947 implements FunctionExpression { |
| 4948 /** | 4948 /** |
| 4949 * The type parameters associated with the method, or `null` if the method is | 4949 * The type parameters associated with the method, or `null` if the method is |
| 4950 * not a generic method. | 4950 * not a generic method. |
| 4951 */ | 4951 */ |
| 4952 TypeParameterList _typeParameters; | 4952 TypeParameterList _typeParameters; |
| 4953 | 4953 |
| 4954 /** | 4954 /** |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5044 _safelyVisitChild(_body, visitor); | 5044 _safelyVisitChild(_body, visitor); |
| 5045 } | 5045 } |
| 5046 } | 5046 } |
| 5047 | 5047 |
| 5048 /** | 5048 /** |
| 5049 * The invocation of a function resulting from evaluating an expression. | 5049 * The invocation of a function resulting from evaluating an expression. |
| 5050 * Invocations of methods and other forms of functions are represented by | 5050 * Invocations of methods and other forms of functions are represented by |
| 5051 * [MethodInvocation] nodes. Invocations of getters and setters are represented | 5051 * [MethodInvocation] nodes. Invocations of getters and setters are represented |
| 5052 * by either [PrefixedIdentifier] or [PropertyAccess] nodes. | 5052 * by either [PrefixedIdentifier] or [PropertyAccess] nodes. |
| 5053 * | 5053 * |
| 5054 * > functionExpressionInvocation ::= | 5054 * functionExpressionInvocation ::= |
| 5055 * > [Expression] [TypeArgumentList]? [ArgumentList] | 5055 * [Expression] [TypeArgumentList]? [ArgumentList] |
| 5056 */ | 5056 */ |
| 5057 class FunctionExpressionInvocationImpl extends InvocationExpressionImpl | 5057 class FunctionExpressionInvocationImpl extends InvocationExpressionImpl |
| 5058 implements FunctionExpressionInvocation { | 5058 implements FunctionExpressionInvocation { |
| 5059 /** | 5059 /** |
| 5060 * The expression producing the function being invoked. | 5060 * The expression producing the function being invoked. |
| 5061 */ | 5061 */ |
| 5062 Expression _function; | 5062 Expression _function; |
| 5063 | 5063 |
| 5064 /** | 5064 /** |
| 5065 * The element associated with the function being invoked based on static type | 5065 * The element associated with the function being invoked based on static type |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5121 void visitChildren(AstVisitor visitor) { | 5121 void visitChildren(AstVisitor visitor) { |
| 5122 _safelyVisitChild(_function, visitor); | 5122 _safelyVisitChild(_function, visitor); |
| 5123 _safelyVisitChild(_typeArguments, visitor); | 5123 _safelyVisitChild(_typeArguments, visitor); |
| 5124 _safelyVisitChild(_argumentList, visitor); | 5124 _safelyVisitChild(_argumentList, visitor); |
| 5125 } | 5125 } |
| 5126 } | 5126 } |
| 5127 | 5127 |
| 5128 /** | 5128 /** |
| 5129 * A function type alias. | 5129 * A function type alias. |
| 5130 * | 5130 * |
| 5131 * > functionTypeAlias ::= | 5131 * functionTypeAlias ::= |
| 5132 * > functionPrefix [TypeParameterList]? [FormalParameterList] ';' | 5132 * functionPrefix [TypeParameterList]? [FormalParameterList] ';' |
| 5133 * > | 5133 * |
| 5134 * > functionPrefix ::= | 5134 * functionPrefix ::= |
| 5135 * > [TypeName]? [SimpleIdentifier] | 5135 * [TypeName]? [SimpleIdentifier] |
| 5136 */ | 5136 */ |
| 5137 class FunctionTypeAliasImpl extends TypeAliasImpl implements FunctionTypeAlias { | 5137 class FunctionTypeAliasImpl extends TypeAliasImpl implements FunctionTypeAlias { |
| 5138 /** | 5138 /** |
| 5139 * The name of the return type of the function type being defined, or `null` | 5139 * The name of the return type of the function type being defined, or `null` |
| 5140 * if no return type was given. | 5140 * if no return type was given. |
| 5141 */ | 5141 */ |
| 5142 TypeName _returnType; | 5142 TypeName _returnType; |
| 5143 | 5143 |
| 5144 /** | 5144 /** |
| 5145 * The type parameters for the function type, or `null` if the function type | 5145 * The type parameters for the function type, or `null` if the function type |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5220 _safelyVisitChild(_returnType, visitor); | 5220 _safelyVisitChild(_returnType, visitor); |
| 5221 _safelyVisitChild(_name, visitor); | 5221 _safelyVisitChild(_name, visitor); |
| 5222 _safelyVisitChild(_typeParameters, visitor); | 5222 _safelyVisitChild(_typeParameters, visitor); |
| 5223 _safelyVisitChild(_parameters, visitor); | 5223 _safelyVisitChild(_parameters, visitor); |
| 5224 } | 5224 } |
| 5225 } | 5225 } |
| 5226 | 5226 |
| 5227 /** | 5227 /** |
| 5228 * A function-typed formal parameter. | 5228 * A function-typed formal parameter. |
| 5229 * | 5229 * |
| 5230 * > functionSignature ::= | 5230 * functionSignature ::= |
| 5231 * > [TypeName]? [SimpleIdentifier] [TypeParameterList]? [FormalParameterLis
t] | 5231 * [TypeName]? [SimpleIdentifier] [TypeParameterList]? [FormalParameterLi
st] |
| 5232 */ | 5232 */ |
| 5233 class FunctionTypedFormalParameterImpl extends NormalFormalParameterImpl | 5233 class FunctionTypedFormalParameterImpl extends NormalFormalParameterImpl |
| 5234 implements FunctionTypedFormalParameter { | 5234 implements FunctionTypedFormalParameter { |
| 5235 /** | 5235 /** |
| 5236 * The return type of the function, or `null` if the function does not have a | 5236 * The return type of the function, or `null` if the function does not have a |
| 5237 * return type. | 5237 * return type. |
| 5238 */ | 5238 */ |
| 5239 TypeName _returnType; | 5239 TypeName _returnType; |
| 5240 | 5240 |
| 5241 /** | 5241 /** |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5323 _safelyVisitChild(identifier, visitor); | 5323 _safelyVisitChild(identifier, visitor); |
| 5324 _safelyVisitChild(_typeParameters, visitor); | 5324 _safelyVisitChild(_typeParameters, visitor); |
| 5325 _safelyVisitChild(_parameters, visitor); | 5325 _safelyVisitChild(_parameters, visitor); |
| 5326 } | 5326 } |
| 5327 } | 5327 } |
| 5328 | 5328 |
| 5329 /** | 5329 /** |
| 5330 * A combinator that restricts the names being imported to those that are not in | 5330 * A combinator that restricts the names being imported to those that are not in |
| 5331 * a given list. | 5331 * a given list. |
| 5332 * | 5332 * |
| 5333 * > hideCombinator ::= | 5333 * hideCombinator ::= |
| 5334 * > 'hide' [SimpleIdentifier] (',' [SimpleIdentifier])* | 5334 * 'hide' [SimpleIdentifier] (',' [SimpleIdentifier])* |
| 5335 */ | 5335 */ |
| 5336 class HideCombinatorImpl extends CombinatorImpl implements HideCombinator { | 5336 class HideCombinatorImpl extends CombinatorImpl implements HideCombinator { |
| 5337 /** | 5337 /** |
| 5338 * The list of names from the library that are hidden by this combinator. | 5338 * The list of names from the library that are hidden by this combinator. |
| 5339 */ | 5339 */ |
| 5340 NodeList<SimpleIdentifier> _hiddenNames; | 5340 NodeList<SimpleIdentifier> _hiddenNames; |
| 5341 | 5341 |
| 5342 /** | 5342 /** |
| 5343 * Initialize a newly created import show combinator. | 5343 * Initialize a newly created import show combinator. |
| 5344 */ | 5344 */ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 5363 | 5363 |
| 5364 @override | 5364 @override |
| 5365 void visitChildren(AstVisitor visitor) { | 5365 void visitChildren(AstVisitor visitor) { |
| 5366 _hiddenNames.accept(visitor); | 5366 _hiddenNames.accept(visitor); |
| 5367 } | 5367 } |
| 5368 } | 5368 } |
| 5369 | 5369 |
| 5370 /** | 5370 /** |
| 5371 * A node that represents an identifier. | 5371 * A node that represents an identifier. |
| 5372 * | 5372 * |
| 5373 * > identifier ::= | 5373 * identifier ::= |
| 5374 * > [SimpleIdentifier] | 5374 * [SimpleIdentifier] |
| 5375 * > | [PrefixedIdentifier] | 5375 * | [PrefixedIdentifier] |
| 5376 */ | 5376 */ |
| 5377 abstract class IdentifierImpl extends ExpressionImpl implements Identifier { | 5377 abstract class IdentifierImpl extends ExpressionImpl implements Identifier { |
| 5378 /** | 5378 /** |
| 5379 * Return the best element available for this operator. If resolution was able | 5379 * Return the best element available for this operator. If resolution was able |
| 5380 * to find a better element based on type propagation, that element will be | 5380 * to find a better element based on type propagation, that element will be |
| 5381 * returned. Otherwise, the element found using the result of static analysis | 5381 * returned. Otherwise, the element found using the result of static analysis |
| 5382 * will be returned. If resolution has not been performed, then `null` will be | 5382 * will be returned. If resolution has not been performed, then `null` will be |
| 5383 * returned. | 5383 * returned. |
| 5384 */ | 5384 */ |
| 5385 Element get bestElement; | 5385 Element get bestElement; |
| 5386 | 5386 |
| 5387 @override | 5387 @override |
| 5388 bool get isAssignable => true; | 5388 bool get isAssignable => true; |
| 5389 } | 5389 } |
| 5390 | 5390 |
| 5391 /** | 5391 /** |
| 5392 * An if statement. | 5392 * An if statement. |
| 5393 * | 5393 * |
| 5394 * > ifStatement ::= | 5394 * ifStatement ::= |
| 5395 * > 'if' '(' [Expression] ')' [Statement] ('else' [Statement])? | 5395 * 'if' '(' [Expression] ')' [Statement] ('else' [Statement])? |
| 5396 */ | 5396 */ |
| 5397 class IfStatementImpl extends StatementImpl implements IfStatement { | 5397 class IfStatementImpl extends StatementImpl implements IfStatement { |
| 5398 /** | 5398 /** |
| 5399 * The token representing the 'if' keyword. | 5399 * The token representing the 'if' keyword. |
| 5400 */ | 5400 */ |
| 5401 Token ifKeyword; | 5401 Token ifKeyword; |
| 5402 | 5402 |
| 5403 /** | 5403 /** |
| 5404 * The left parenthesis. | 5404 * The left parenthesis. |
| 5405 */ | 5405 */ |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5501 void visitChildren(AstVisitor visitor) { | 5501 void visitChildren(AstVisitor visitor) { |
| 5502 _safelyVisitChild(_condition, visitor); | 5502 _safelyVisitChild(_condition, visitor); |
| 5503 _safelyVisitChild(_thenStatement, visitor); | 5503 _safelyVisitChild(_thenStatement, visitor); |
| 5504 _safelyVisitChild(_elseStatement, visitor); | 5504 _safelyVisitChild(_elseStatement, visitor); |
| 5505 } | 5505 } |
| 5506 } | 5506 } |
| 5507 | 5507 |
| 5508 /** | 5508 /** |
| 5509 * The "implements" clause in an class declaration. | 5509 * The "implements" clause in an class declaration. |
| 5510 * | 5510 * |
| 5511 * > implementsClause ::= | 5511 * implementsClause ::= |
| 5512 * > 'implements' [TypeName] (',' [TypeName])* | 5512 * 'implements' [TypeName] (',' [TypeName])* |
| 5513 */ | 5513 */ |
| 5514 class ImplementsClauseImpl extends AstNodeImpl implements ImplementsClause { | 5514 class ImplementsClauseImpl extends AstNodeImpl implements ImplementsClause { |
| 5515 /** | 5515 /** |
| 5516 * The token representing the 'implements' keyword. | 5516 * The token representing the 'implements' keyword. |
| 5517 */ | 5517 */ |
| 5518 Token implementsKeyword; | 5518 Token implementsKeyword; |
| 5519 | 5519 |
| 5520 /** | 5520 /** |
| 5521 * The interfaces that are being implemented. | 5521 * The interfaces that are being implemented. |
| 5522 */ | 5522 */ |
| (...skipping 26 matching lines...) Expand all Loading... |
| 5549 | 5549 |
| 5550 @override | 5550 @override |
| 5551 void visitChildren(AstVisitor visitor) { | 5551 void visitChildren(AstVisitor visitor) { |
| 5552 _interfaces.accept(visitor); | 5552 _interfaces.accept(visitor); |
| 5553 } | 5553 } |
| 5554 } | 5554 } |
| 5555 | 5555 |
| 5556 /** | 5556 /** |
| 5557 * An import directive. | 5557 * An import directive. |
| 5558 * | 5558 * |
| 5559 * > importDirective ::= | 5559 * importDirective ::= |
| 5560 * > [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]*
';' | 5560 * [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]*
';' |
| 5561 * > | [Annotation] 'import' [StringLiteral] 'deferred' 'as' identifier [Combi
nator]* ';' | 5561 * | [Annotation] 'import' [StringLiteral] 'deferred' 'as' identifier [Comb
inator]* ';' |
| 5562 */ | 5562 */ |
| 5563 class ImportDirectiveImpl extends NamespaceDirectiveImpl | 5563 class ImportDirectiveImpl extends NamespaceDirectiveImpl |
| 5564 implements ImportDirective { | 5564 implements ImportDirective { |
| 5565 /** | 5565 /** |
| 5566 * The token representing the 'deferred' keyword, or `null` if the imported is | 5566 * The token representing the 'deferred' keyword, or `null` if the imported is |
| 5567 * not deferred. | 5567 * not deferred. |
| 5568 */ | 5568 */ |
| 5569 Token deferredKeyword; | 5569 Token deferredKeyword; |
| 5570 | 5570 |
| 5571 /** | 5571 /** |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5640 void visitChildren(AstVisitor visitor) { | 5640 void visitChildren(AstVisitor visitor) { |
| 5641 super.visitChildren(visitor); | 5641 super.visitChildren(visitor); |
| 5642 _safelyVisitChild(_prefix, visitor); | 5642 _safelyVisitChild(_prefix, visitor); |
| 5643 combinators.accept(visitor); | 5643 combinators.accept(visitor); |
| 5644 } | 5644 } |
| 5645 } | 5645 } |
| 5646 | 5646 |
| 5647 /** | 5647 /** |
| 5648 * An index expression. | 5648 * An index expression. |
| 5649 * | 5649 * |
| 5650 * > indexExpression ::= | 5650 * indexExpression ::= |
| 5651 * > [Expression] '[' [Expression] ']' | 5651 * [Expression] '[' [Expression] ']' |
| 5652 */ | 5652 */ |
| 5653 class IndexExpressionImpl extends ExpressionImpl implements IndexExpression { | 5653 class IndexExpressionImpl extends ExpressionImpl implements IndexExpression { |
| 5654 /** | 5654 /** |
| 5655 * The expression used to compute the object being indexed, or `null` if this | 5655 * The expression used to compute the object being indexed, or `null` if this |
| 5656 * index expression is part of a cascade expression. | 5656 * index expression is part of a cascade expression. |
| 5657 */ | 5657 */ |
| 5658 Expression _target; | 5658 Expression _target; |
| 5659 | 5659 |
| 5660 /** | 5660 /** |
| 5661 * The period ("..") before a cascaded index expression, or `null` if this | 5661 * The period ("..") before a cascaded index expression, or `null` if this |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5853 @override | 5853 @override |
| 5854 void visitChildren(AstVisitor visitor) { | 5854 void visitChildren(AstVisitor visitor) { |
| 5855 _safelyVisitChild(_target, visitor); | 5855 _safelyVisitChild(_target, visitor); |
| 5856 _safelyVisitChild(_index, visitor); | 5856 _safelyVisitChild(_index, visitor); |
| 5857 } | 5857 } |
| 5858 } | 5858 } |
| 5859 | 5859 |
| 5860 /** | 5860 /** |
| 5861 * An instance creation expression. | 5861 * An instance creation expression. |
| 5862 * | 5862 * |
| 5863 * > newExpression ::= | 5863 * newExpression ::= |
| 5864 * > ('new' | 'const') [TypeName] ('.' [SimpleIdentifier])? [ArgumentList] | 5864 * ('new' | 'const') [TypeName] ('.' [SimpleIdentifier])? [ArgumentList] |
| 5865 */ | 5865 */ |
| 5866 class InstanceCreationExpressionImpl extends ExpressionImpl | 5866 class InstanceCreationExpressionImpl extends ExpressionImpl |
| 5867 implements InstanceCreationExpression { | 5867 implements InstanceCreationExpression { |
| 5868 /** | 5868 /** |
| 5869 * The 'new' or 'const' keyword used to indicate how an object should be | 5869 * The 'new' or 'const' keyword used to indicate how an object should be |
| 5870 * created. | 5870 * created. |
| 5871 */ | 5871 */ |
| 5872 Token keyword; | 5872 Token keyword; |
| 5873 | 5873 |
| 5874 /** | 5874 /** |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5939 @override | 5939 @override |
| 5940 void visitChildren(AstVisitor visitor) { | 5940 void visitChildren(AstVisitor visitor) { |
| 5941 _safelyVisitChild(_constructorName, visitor); | 5941 _safelyVisitChild(_constructorName, visitor); |
| 5942 _safelyVisitChild(_argumentList, visitor); | 5942 _safelyVisitChild(_argumentList, visitor); |
| 5943 } | 5943 } |
| 5944 } | 5944 } |
| 5945 | 5945 |
| 5946 /** | 5946 /** |
| 5947 * An integer literal expression. | 5947 * An integer literal expression. |
| 5948 * | 5948 * |
| 5949 * > integerLiteral ::= | 5949 * integerLiteral ::= |
| 5950 * > decimalIntegerLiteral | 5950 * decimalIntegerLiteral |
| 5951 * > | hexadecimalIntegerLiteral | 5951 * | hexadecimalIntegerLiteral |
| 5952 * > | 5952 * |
| 5953 * > decimalIntegerLiteral ::= | 5953 * decimalIntegerLiteral ::= |
| 5954 * > decimalDigit+ | 5954 * decimalDigit+ |
| 5955 * > | 5955 * |
| 5956 * > hexadecimalIntegerLiteral ::= | 5956 * hexadecimalIntegerLiteral ::= |
| 5957 * > '0x' hexadecimalDigit+ | 5957 * '0x' hexadecimalDigit+ |
| 5958 * > | '0X' hexadecimalDigit+ | 5958 * | '0X' hexadecimalDigit+ |
| 5959 */ | 5959 */ |
| 5960 class IntegerLiteralImpl extends LiteralImpl implements IntegerLiteral { | 5960 class IntegerLiteralImpl extends LiteralImpl implements IntegerLiteral { |
| 5961 /** | 5961 /** |
| 5962 * The token representing the literal. | 5962 * The token representing the literal. |
| 5963 */ | 5963 */ |
| 5964 Token literal; | 5964 Token literal; |
| 5965 | 5965 |
| 5966 /** | 5966 /** |
| 5967 * The value of the literal. | 5967 * The value of the literal. |
| 5968 */ | 5968 */ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 5987 | 5987 |
| 5988 @override | 5988 @override |
| 5989 void visitChildren(AstVisitor visitor) { | 5989 void visitChildren(AstVisitor visitor) { |
| 5990 // There are no children to visit. | 5990 // There are no children to visit. |
| 5991 } | 5991 } |
| 5992 } | 5992 } |
| 5993 | 5993 |
| 5994 /** | 5994 /** |
| 5995 * A node within a [StringInterpolation]. | 5995 * A node within a [StringInterpolation]. |
| 5996 * | 5996 * |
| 5997 * > interpolationElement ::= | 5997 * interpolationElement ::= |
| 5998 * > [InterpolationExpression] | 5998 * [InterpolationExpression] |
| 5999 * > | [InterpolationString] | 5999 * | [InterpolationString] |
| 6000 */ | 6000 */ |
| 6001 abstract class InterpolationElementImpl extends AstNodeImpl | 6001 abstract class InterpolationElementImpl extends AstNodeImpl |
| 6002 implements InterpolationElement {} | 6002 implements InterpolationElement {} |
| 6003 | 6003 |
| 6004 /** | 6004 /** |
| 6005 * An expression embedded in a string interpolation. | 6005 * An expression embedded in a string interpolation. |
| 6006 * | 6006 * |
| 6007 * > interpolationExpression ::= | 6007 * interpolationExpression ::= |
| 6008 * > '$' [SimpleIdentifier] | 6008 * '$' [SimpleIdentifier] |
| 6009 * > | '$' '{' [Expression] '}' | 6009 * | '$' '{' [Expression] '}' |
| 6010 */ | 6010 */ |
| 6011 class InterpolationExpressionImpl extends InterpolationElementImpl | 6011 class InterpolationExpressionImpl extends InterpolationElementImpl |
| 6012 implements InterpolationExpression { | 6012 implements InterpolationExpression { |
| 6013 /** | 6013 /** |
| 6014 * The token used to introduce the interpolation expression; either '$' if the | 6014 * The token used to introduce the interpolation expression; either '$' if the |
| 6015 * expression is a simple identifier or '${' if the expression is a full | 6015 * expression is a simple identifier or '${' if the expression is a full |
| 6016 * expression. | 6016 * expression. |
| 6017 */ | 6017 */ |
| 6018 Token leftBracket; | 6018 Token leftBracket; |
| 6019 | 6019 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6066 | 6066 |
| 6067 @override | 6067 @override |
| 6068 void visitChildren(AstVisitor visitor) { | 6068 void visitChildren(AstVisitor visitor) { |
| 6069 _safelyVisitChild(_expression, visitor); | 6069 _safelyVisitChild(_expression, visitor); |
| 6070 } | 6070 } |
| 6071 } | 6071 } |
| 6072 | 6072 |
| 6073 /** | 6073 /** |
| 6074 * A non-empty substring of an interpolated string. | 6074 * A non-empty substring of an interpolated string. |
| 6075 * | 6075 * |
| 6076 * > interpolationString ::= | 6076 * interpolationString ::= |
| 6077 * > characters | 6077 * characters |
| 6078 */ | 6078 */ |
| 6079 class InterpolationStringImpl extends InterpolationElementImpl | 6079 class InterpolationStringImpl extends InterpolationElementImpl |
| 6080 implements InterpolationString { | 6080 implements InterpolationString { |
| 6081 /** | 6081 /** |
| 6082 * The characters that will be added to the string. | 6082 * The characters that will be added to the string. |
| 6083 */ | 6083 */ |
| 6084 Token contents; | 6084 Token contents; |
| 6085 | 6085 |
| 6086 /** | 6086 /** |
| 6087 * The value of the literal. | 6087 * The value of the literal. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6168 | 6168 |
| 6169 @override | 6169 @override |
| 6170 void set typeArguments(TypeArgumentList typeArguments) { | 6170 void set typeArguments(TypeArgumentList typeArguments) { |
| 6171 _typeArguments = _becomeParentOf(typeArguments); | 6171 _typeArguments = _becomeParentOf(typeArguments); |
| 6172 } | 6172 } |
| 6173 } | 6173 } |
| 6174 | 6174 |
| 6175 /** | 6175 /** |
| 6176 * An is expression. | 6176 * An is expression. |
| 6177 * | 6177 * |
| 6178 * > isExpression ::= | 6178 * isExpression ::= |
| 6179 * > [Expression] 'is' '!'? [TypeName] | 6179 * [Expression] 'is' '!'? [TypeName] |
| 6180 */ | 6180 */ |
| 6181 class IsExpressionImpl extends ExpressionImpl implements IsExpression { | 6181 class IsExpressionImpl extends ExpressionImpl implements IsExpression { |
| 6182 /** | 6182 /** |
| 6183 * The expression used to compute the value whose type is being tested. | 6183 * The expression used to compute the value whose type is being tested. |
| 6184 */ | 6184 */ |
| 6185 Expression _expression; | 6185 Expression _expression; |
| 6186 | 6186 |
| 6187 /** | 6187 /** |
| 6188 * The is operator. | 6188 * The is operator. |
| 6189 */ | 6189 */ |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6247 @override | 6247 @override |
| 6248 void visitChildren(AstVisitor visitor) { | 6248 void visitChildren(AstVisitor visitor) { |
| 6249 _safelyVisitChild(_expression, visitor); | 6249 _safelyVisitChild(_expression, visitor); |
| 6250 _safelyVisitChild(_type, visitor); | 6250 _safelyVisitChild(_type, visitor); |
| 6251 } | 6251 } |
| 6252 } | 6252 } |
| 6253 | 6253 |
| 6254 /** | 6254 /** |
| 6255 * A statement that has a label associated with them. | 6255 * A statement that has a label associated with them. |
| 6256 * | 6256 * |
| 6257 * > labeledStatement ::= | 6257 * labeledStatement ::= |
| 6258 * > [Label]+ [Statement] | 6258 * [Label]+ [Statement] |
| 6259 */ | 6259 */ |
| 6260 class LabeledStatementImpl extends StatementImpl implements LabeledStatement { | 6260 class LabeledStatementImpl extends StatementImpl implements LabeledStatement { |
| 6261 /** | 6261 /** |
| 6262 * The labels being associated with the statement. | 6262 * The labels being associated with the statement. |
| 6263 */ | 6263 */ |
| 6264 NodeList<Label> _labels; | 6264 NodeList<Label> _labels; |
| 6265 | 6265 |
| 6266 /** | 6266 /** |
| 6267 * The statement with which the labels are being associated. | 6267 * The statement with which the labels are being associated. |
| 6268 */ | 6268 */ |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6312 @override | 6312 @override |
| 6313 void visitChildren(AstVisitor visitor) { | 6313 void visitChildren(AstVisitor visitor) { |
| 6314 _labels.accept(visitor); | 6314 _labels.accept(visitor); |
| 6315 _safelyVisitChild(_statement, visitor); | 6315 _safelyVisitChild(_statement, visitor); |
| 6316 } | 6316 } |
| 6317 } | 6317 } |
| 6318 | 6318 |
| 6319 /** | 6319 /** |
| 6320 * A label on either a [LabeledStatement] or a [NamedExpression]. | 6320 * A label on either a [LabeledStatement] or a [NamedExpression]. |
| 6321 * | 6321 * |
| 6322 * > label ::= | 6322 * label ::= |
| 6323 * > [SimpleIdentifier] ':' | 6323 * [SimpleIdentifier] ':' |
| 6324 */ | 6324 */ |
| 6325 class LabelImpl extends AstNodeImpl implements Label { | 6325 class LabelImpl extends AstNodeImpl implements Label { |
| 6326 /** | 6326 /** |
| 6327 * The label being associated with the statement. | 6327 * The label being associated with the statement. |
| 6328 */ | 6328 */ |
| 6329 SimpleIdentifier _label; | 6329 SimpleIdentifier _label; |
| 6330 | 6330 |
| 6331 /** | 6331 /** |
| 6332 * The colon that separates the label from the statement. | 6332 * The colon that separates the label from the statement. |
| 6333 */ | 6333 */ |
| (...skipping 28 matching lines...) Expand all Loading... |
| 6362 | 6362 |
| 6363 @override | 6363 @override |
| 6364 void visitChildren(AstVisitor visitor) { | 6364 void visitChildren(AstVisitor visitor) { |
| 6365 _safelyVisitChild(_label, visitor); | 6365 _safelyVisitChild(_label, visitor); |
| 6366 } | 6366 } |
| 6367 } | 6367 } |
| 6368 | 6368 |
| 6369 /** | 6369 /** |
| 6370 * A library directive. | 6370 * A library directive. |
| 6371 * | 6371 * |
| 6372 * > libraryDirective ::= | 6372 * libraryDirective ::= |
| 6373 * > [Annotation] 'library' [Identifier] ';' | 6373 * [Annotation] 'library' [Identifier] ';' |
| 6374 */ | 6374 */ |
| 6375 class LibraryDirectiveImpl extends DirectiveImpl implements LibraryDirective { | 6375 class LibraryDirectiveImpl extends DirectiveImpl implements LibraryDirective { |
| 6376 /** | 6376 /** |
| 6377 * The token representing the 'library' keyword. | 6377 * The token representing the 'library' keyword. |
| 6378 */ | 6378 */ |
| 6379 Token libraryKeyword; | 6379 Token libraryKeyword; |
| 6380 | 6380 |
| 6381 /** | 6381 /** |
| 6382 * The name of the library being defined. | 6382 * The name of the library being defined. |
| 6383 */ | 6383 */ |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6426 @override | 6426 @override |
| 6427 void visitChildren(AstVisitor visitor) { | 6427 void visitChildren(AstVisitor visitor) { |
| 6428 super.visitChildren(visitor); | 6428 super.visitChildren(visitor); |
| 6429 _safelyVisitChild(_name, visitor); | 6429 _safelyVisitChild(_name, visitor); |
| 6430 } | 6430 } |
| 6431 } | 6431 } |
| 6432 | 6432 |
| 6433 /** | 6433 /** |
| 6434 * The identifier for a library. | 6434 * The identifier for a library. |
| 6435 * | 6435 * |
| 6436 * > libraryIdentifier ::= | 6436 * libraryIdentifier ::= |
| 6437 * > [SimpleIdentifier] ('.' [SimpleIdentifier])* | 6437 * [SimpleIdentifier] ('.' [SimpleIdentifier])* |
| 6438 */ | 6438 */ |
| 6439 class LibraryIdentifierImpl extends IdentifierImpl | 6439 class LibraryIdentifierImpl extends IdentifierImpl |
| 6440 implements LibraryIdentifier { | 6440 implements LibraryIdentifier { |
| 6441 /** | 6441 /** |
| 6442 * The components of the identifier. | 6442 * The components of the identifier. |
| 6443 */ | 6443 */ |
| 6444 NodeList<SimpleIdentifier> _components; | 6444 NodeList<SimpleIdentifier> _components; |
| 6445 | 6445 |
| 6446 /** | 6446 /** |
| 6447 * Initialize a newly created prefixed identifier. | 6447 * Initialize a newly created prefixed identifier. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6495 | 6495 |
| 6496 @override | 6496 @override |
| 6497 void visitChildren(AstVisitor visitor) { | 6497 void visitChildren(AstVisitor visitor) { |
| 6498 _components.accept(visitor); | 6498 _components.accept(visitor); |
| 6499 } | 6499 } |
| 6500 } | 6500 } |
| 6501 | 6501 |
| 6502 /** | 6502 /** |
| 6503 * A list literal. | 6503 * A list literal. |
| 6504 * | 6504 * |
| 6505 * > listLiteral ::= | 6505 * listLiteral ::= |
| 6506 * > 'const'? ('<' [TypeName] '>')? '[' ([Expression] ','?)? ']' | 6506 * 'const'? ('<' [TypeName] '>')? '[' ([Expression] ','?)? ']' |
| 6507 */ | 6507 */ |
| 6508 class ListLiteralImpl extends TypedLiteralImpl implements ListLiteral { | 6508 class ListLiteralImpl extends TypedLiteralImpl implements ListLiteral { |
| 6509 /** | 6509 /** |
| 6510 * The left square bracket. | 6510 * The left square bracket. |
| 6511 */ | 6511 */ |
| 6512 Token leftBracket; | 6512 Token leftBracket; |
| 6513 | 6513 |
| 6514 /** | 6514 /** |
| 6515 * The expressions used to compute the elements of the list. | 6515 * The expressions used to compute the elements of the list. |
| 6516 */ | 6516 */ |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6564 @override | 6564 @override |
| 6565 void visitChildren(AstVisitor visitor) { | 6565 void visitChildren(AstVisitor visitor) { |
| 6566 super.visitChildren(visitor); | 6566 super.visitChildren(visitor); |
| 6567 _elements.accept(visitor); | 6567 _elements.accept(visitor); |
| 6568 } | 6568 } |
| 6569 } | 6569 } |
| 6570 | 6570 |
| 6571 /** | 6571 /** |
| 6572 * A node that represents a literal expression. | 6572 * A node that represents a literal expression. |
| 6573 * | 6573 * |
| 6574 * > literal ::= | 6574 * literal ::= |
| 6575 * > [BooleanLiteral] | 6575 * [BooleanLiteral] |
| 6576 * > | [DoubleLiteral] | 6576 * | [DoubleLiteral] |
| 6577 * > | [IntegerLiteral] | 6577 * | [IntegerLiteral] |
| 6578 * > | [ListLiteral] | 6578 * | [ListLiteral] |
| 6579 * > | [MapLiteral] | 6579 * | [MapLiteral] |
| 6580 * > | [NullLiteral] | 6580 * | [NullLiteral] |
| 6581 * > | [StringLiteral] | 6581 * | [StringLiteral] |
| 6582 */ | 6582 */ |
| 6583 abstract class LiteralImpl extends ExpressionImpl implements Literal { | 6583 abstract class LiteralImpl extends ExpressionImpl implements Literal { |
| 6584 @override | 6584 @override |
| 6585 int get precedence => 16; | 6585 int get precedence => 16; |
| 6586 } | 6586 } |
| 6587 | 6587 |
| 6588 /** | 6588 /** |
| 6589 * Additional information about local variables within a function or method | 6589 * Additional information about local variables within a function or method |
| 6590 * produced at resolution time. | 6590 * produced at resolution time. |
| 6591 */ | 6591 */ |
| 6592 class LocalVariableInfo { | 6592 class LocalVariableInfo { |
| 6593 /** | 6593 /** |
| 6594 * The set of local variables and parameters that are potentially mutated | 6594 * The set of local variables and parameters that are potentially mutated |
| 6595 * within a local function other than the function in which they are declared. | 6595 * within a local function other than the function in which they are declared. |
| 6596 */ | 6596 */ |
| 6597 final Set<VariableElement> potentiallyMutatedInClosure = | 6597 final Set<VariableElement> potentiallyMutatedInClosure = |
| 6598 new Set<VariableElement>(); | 6598 new Set<VariableElement>(); |
| 6599 | 6599 |
| 6600 /** | 6600 /** |
| 6601 * The set of local variables and parameters that are potentiall mutated | 6601 * The set of local variables and parameters that are potentiall mutated |
| 6602 * within the scope of their declarations. | 6602 * within the scope of their declarations. |
| 6603 */ | 6603 */ |
| 6604 final Set<VariableElement> potentiallyMutatedInScope = | 6604 final Set<VariableElement> potentiallyMutatedInScope = |
| 6605 new Set<VariableElement>(); | 6605 new Set<VariableElement>(); |
| 6606 } | 6606 } |
| 6607 | 6607 |
| 6608 /** | 6608 /** |
| 6609 * A single key/value pair in a map literal. | 6609 * A single key/value pair in a map literal. |
| 6610 * | 6610 * |
| 6611 * > mapLiteralEntry ::= | 6611 * mapLiteralEntry ::= |
| 6612 * > [Expression] ':' [Expression] | 6612 * [Expression] ':' [Expression] |
| 6613 */ | 6613 */ |
| 6614 class MapLiteralEntryImpl extends AstNodeImpl implements MapLiteralEntry { | 6614 class MapLiteralEntryImpl extends AstNodeImpl implements MapLiteralEntry { |
| 6615 /** | 6615 /** |
| 6616 * The expression computing the key with which the value will be associated. | 6616 * The expression computing the key with which the value will be associated. |
| 6617 */ | 6617 */ |
| 6618 Expression _key; | 6618 Expression _key; |
| 6619 | 6619 |
| 6620 /** | 6620 /** |
| 6621 * The colon that separates the key from the value. | 6621 * The colon that separates the key from the value. |
| 6622 */ | 6622 */ |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6667 @override | 6667 @override |
| 6668 void visitChildren(AstVisitor visitor) { | 6668 void visitChildren(AstVisitor visitor) { |
| 6669 _safelyVisitChild(_key, visitor); | 6669 _safelyVisitChild(_key, visitor); |
| 6670 _safelyVisitChild(_value, visitor); | 6670 _safelyVisitChild(_value, visitor); |
| 6671 } | 6671 } |
| 6672 } | 6672 } |
| 6673 | 6673 |
| 6674 /** | 6674 /** |
| 6675 * A literal map. | 6675 * A literal map. |
| 6676 * | 6676 * |
| 6677 * > mapLiteral ::= | 6677 * mapLiteral ::= |
| 6678 * > 'const'? ('<' [TypeName] (',' [TypeName])* '>')? | 6678 * 'const'? ('<' [TypeName] (',' [TypeName])* '>')? |
| 6679 * > '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}' | 6679 * '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}' |
| 6680 */ | 6680 */ |
| 6681 class MapLiteralImpl extends TypedLiteralImpl implements MapLiteral { | 6681 class MapLiteralImpl extends TypedLiteralImpl implements MapLiteral { |
| 6682 /** | 6682 /** |
| 6683 * The left curly bracket. | 6683 * The left curly bracket. |
| 6684 */ | 6684 */ |
| 6685 Token leftBracket; | 6685 Token leftBracket; |
| 6686 | 6686 |
| 6687 /** | 6687 /** |
| 6688 * The entries in the map. | 6688 * The entries in the map. |
| 6689 */ | 6689 */ |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6736 @override | 6736 @override |
| 6737 void visitChildren(AstVisitor visitor) { | 6737 void visitChildren(AstVisitor visitor) { |
| 6738 super.visitChildren(visitor); | 6738 super.visitChildren(visitor); |
| 6739 _entries.accept(visitor); | 6739 _entries.accept(visitor); |
| 6740 } | 6740 } |
| 6741 } | 6741 } |
| 6742 | 6742 |
| 6743 /** | 6743 /** |
| 6744 * A method declaration. | 6744 * A method declaration. |
| 6745 * | 6745 * |
| 6746 * > methodDeclaration ::= | 6746 * methodDeclaration ::= |
| 6747 * > methodSignature [FunctionBody] | 6747 * methodSignature [FunctionBody] |
| 6748 * > | 6748 * |
| 6749 * > methodSignature ::= | 6749 * methodSignature ::= |
| 6750 * > 'external'? ('abstract' | 'static')? [Type]? ('get' | 'set')? | 6750 * 'external'? ('abstract' | 'static')? [Type]? ('get' | 'set')? |
| 6751 * > methodName [TypeParameterList] [FormalParameterList] | 6751 * methodName [TypeParameterList] [FormalParameterList] |
| 6752 * > | 6752 * |
| 6753 * > methodName ::= | 6753 * methodName ::= |
| 6754 * > [SimpleIdentifier] | 6754 * [SimpleIdentifier] |
| 6755 * > | 'operator' [SimpleIdentifier] | 6755 * | 'operator' [SimpleIdentifier] |
| 6756 */ | 6756 */ |
| 6757 class MethodDeclarationImpl extends ClassMemberImpl | 6757 class MethodDeclarationImpl extends ClassMemberImpl |
| 6758 implements MethodDeclaration { | 6758 implements MethodDeclaration { |
| 6759 /** | 6759 /** |
| 6760 * The token for the 'external' keyword, or `null` if the constructor is not | 6760 * The token for the 'external' keyword, or `null` if the constructor is not |
| 6761 * external. | 6761 * external. |
| 6762 */ | 6762 */ |
| 6763 Token externalKeyword; | 6763 Token externalKeyword; |
| 6764 | 6764 |
| 6765 /** | 6765 /** |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6955 _safelyVisitChild(_body, visitor); | 6955 _safelyVisitChild(_body, visitor); |
| 6956 } | 6956 } |
| 6957 } | 6957 } |
| 6958 | 6958 |
| 6959 /** | 6959 /** |
| 6960 * The invocation of either a function or a method. Invocations of functions | 6960 * The invocation of either a function or a method. Invocations of functions |
| 6961 * resulting from evaluating an expression are represented by | 6961 * resulting from evaluating an expression are represented by |
| 6962 * [FunctionExpressionInvocation] nodes. Invocations of getters and setters are | 6962 * [FunctionExpressionInvocation] nodes. Invocations of getters and setters are |
| 6963 * represented by either [PrefixedIdentifier] or [PropertyAccess] nodes. | 6963 * represented by either [PrefixedIdentifier] or [PropertyAccess] nodes. |
| 6964 * | 6964 * |
| 6965 * > methodInvocation ::= | 6965 * methodInvocation ::= |
| 6966 * > ([Expression] '.')? [SimpleIdentifier] [TypeArgumentList]? [ArgumentLis
t] | 6966 * ([Expression] '.')? [SimpleIdentifier] [TypeArgumentList]? [ArgumentLi
st] |
| 6967 */ | 6967 */ |
| 6968 class MethodInvocationImpl extends InvocationExpressionImpl | 6968 class MethodInvocationImpl extends InvocationExpressionImpl |
| 6969 implements MethodInvocation { | 6969 implements MethodInvocation { |
| 6970 /** | 6970 /** |
| 6971 * The expression producing the object on which the method is defined, or | 6971 * The expression producing the object on which the method is defined, or |
| 6972 * `null` if there is no target (that is, the target is implicitly `this`). | 6972 * `null` if there is no target (that is, the target is implicitly `this`). |
| 6973 */ | 6973 */ |
| 6974 Expression _target; | 6974 Expression _target; |
| 6975 | 6975 |
| 6976 /** | 6976 /** |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7101 @override | 7101 @override |
| 7102 void set name(SimpleIdentifier identifier) { | 7102 void set name(SimpleIdentifier identifier) { |
| 7103 _name = _becomeParentOf(identifier); | 7103 _name = _becomeParentOf(identifier); |
| 7104 } | 7104 } |
| 7105 } | 7105 } |
| 7106 | 7106 |
| 7107 /** | 7107 /** |
| 7108 * An expression that has a name associated with it. They are used in method | 7108 * An expression that has a name associated with it. They are used in method |
| 7109 * invocations when there are named parameters. | 7109 * invocations when there are named parameters. |
| 7110 * | 7110 * |
| 7111 * > namedExpression ::= | 7111 * namedExpression ::= |
| 7112 * > [Label] [Expression] | 7112 * [Label] [Expression] |
| 7113 */ | 7113 */ |
| 7114 class NamedExpressionImpl extends ExpressionImpl implements NamedExpression { | 7114 class NamedExpressionImpl extends ExpressionImpl implements NamedExpression { |
| 7115 /** | 7115 /** |
| 7116 * The name associated with the expression. | 7116 * The name associated with the expression. |
| 7117 */ | 7117 */ |
| 7118 Label _name; | 7118 Label _name; |
| 7119 | 7119 |
| 7120 /** | 7120 /** |
| 7121 * The expression with which the name is associated. | 7121 * The expression with which the name is associated. |
| 7122 */ | 7122 */ |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7174 @override | 7174 @override |
| 7175 void visitChildren(AstVisitor visitor) { | 7175 void visitChildren(AstVisitor visitor) { |
| 7176 _safelyVisitChild(_name, visitor); | 7176 _safelyVisitChild(_name, visitor); |
| 7177 _safelyVisitChild(_expression, visitor); | 7177 _safelyVisitChild(_expression, visitor); |
| 7178 } | 7178 } |
| 7179 } | 7179 } |
| 7180 | 7180 |
| 7181 /** | 7181 /** |
| 7182 * A node that represents a directive that impacts the namespace of a library. | 7182 * A node that represents a directive that impacts the namespace of a library. |
| 7183 * | 7183 * |
| 7184 * > directive ::= | 7184 * directive ::= |
| 7185 * > [ExportDirective] | 7185 * [ExportDirective] |
| 7186 * > | [ImportDirective] | 7186 * | [ImportDirective] |
| 7187 */ | 7187 */ |
| 7188 abstract class NamespaceDirectiveImpl extends UriBasedDirectiveImpl | 7188 abstract class NamespaceDirectiveImpl extends UriBasedDirectiveImpl |
| 7189 implements NamespaceDirective { | 7189 implements NamespaceDirective { |
| 7190 /** | 7190 /** |
| 7191 * The token representing the 'import' or 'export' keyword. | 7191 * The token representing the 'import' or 'export' keyword. |
| 7192 */ | 7192 */ |
| 7193 Token keyword; | 7193 Token keyword; |
| 7194 | 7194 |
| 7195 /** | 7195 /** |
| 7196 * The configurations used to control which library will actually be loaded at | 7196 * The configurations used to control which library will actually be loaded at |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7239 @override | 7239 @override |
| 7240 Token get firstTokenAfterCommentAndMetadata => keyword; | 7240 Token get firstTokenAfterCommentAndMetadata => keyword; |
| 7241 | 7241 |
| 7242 @override | 7242 @override |
| 7243 LibraryElement get uriElement; | 7243 LibraryElement get uriElement; |
| 7244 } | 7244 } |
| 7245 | 7245 |
| 7246 /** | 7246 /** |
| 7247 * The "native" clause in an class declaration. | 7247 * The "native" clause in an class declaration. |
| 7248 * | 7248 * |
| 7249 * > nativeClause ::= | 7249 * nativeClause ::= |
| 7250 * > 'native' [StringLiteral] | 7250 * 'native' [StringLiteral] |
| 7251 */ | 7251 */ |
| 7252 class NativeClauseImpl extends AstNodeImpl implements NativeClause { | 7252 class NativeClauseImpl extends AstNodeImpl implements NativeClause { |
| 7253 /** | 7253 /** |
| 7254 * The token representing the 'native' keyword. | 7254 * The token representing the 'native' keyword. |
| 7255 */ | 7255 */ |
| 7256 Token nativeKeyword; | 7256 Token nativeKeyword; |
| 7257 | 7257 |
| 7258 /** | 7258 /** |
| 7259 * The name of the native object that implements the class. | 7259 * The name of the native object that implements the class. |
| 7260 */ | 7260 */ |
| (...skipping 30 matching lines...) Expand all Loading... |
| 7291 @override | 7291 @override |
| 7292 void visitChildren(AstVisitor visitor) { | 7292 void visitChildren(AstVisitor visitor) { |
| 7293 _safelyVisitChild(_name, visitor); | 7293 _safelyVisitChild(_name, visitor); |
| 7294 } | 7294 } |
| 7295 } | 7295 } |
| 7296 | 7296 |
| 7297 /** | 7297 /** |
| 7298 * A function body that consists of a native keyword followed by a string | 7298 * A function body that consists of a native keyword followed by a string |
| 7299 * literal. | 7299 * literal. |
| 7300 * | 7300 * |
| 7301 * > nativeFunctionBody ::= | 7301 * nativeFunctionBody ::= |
| 7302 * > 'native' [SimpleStringLiteral] ';' | 7302 * 'native' [SimpleStringLiteral] ';' |
| 7303 */ | 7303 */ |
| 7304 class NativeFunctionBodyImpl extends FunctionBodyImpl | 7304 class NativeFunctionBodyImpl extends FunctionBodyImpl |
| 7305 implements NativeFunctionBody { | 7305 implements NativeFunctionBody { |
| 7306 /** | 7306 /** |
| 7307 * The token representing 'native' that marks the start of the function body. | 7307 * The token representing 'native' that marks the start of the function body. |
| 7308 */ | 7308 */ |
| 7309 Token nativeKeyword; | 7309 Token nativeKeyword; |
| 7310 | 7310 |
| 7311 /** | 7311 /** |
| 7312 * The string literal, after the 'native' token. | 7312 * The string literal, after the 'native' token. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7473 } | 7473 } |
| 7474 E removedNode = _elements[index]; | 7474 E removedNode = _elements[index]; |
| 7475 _elements.removeAt(index); | 7475 _elements.removeAt(index); |
| 7476 return removedNode; | 7476 return removedNode; |
| 7477 } | 7477 } |
| 7478 } | 7478 } |
| 7479 | 7479 |
| 7480 /** | 7480 /** |
| 7481 * A formal parameter that is required (is not optional). | 7481 * A formal parameter that is required (is not optional). |
| 7482 * | 7482 * |
| 7483 * > normalFormalParameter ::= | 7483 * normalFormalParameter ::= |
| 7484 * > [FunctionTypedFormalParameter] | 7484 * [FunctionTypedFormalParameter] |
| 7485 * > | [FieldFormalParameter] | 7485 * | [FieldFormalParameter] |
| 7486 * > | [SimpleFormalParameter] | 7486 * | [SimpleFormalParameter] |
| 7487 */ | 7487 */ |
| 7488 abstract class NormalFormalParameterImpl extends FormalParameterImpl | 7488 abstract class NormalFormalParameterImpl extends FormalParameterImpl |
| 7489 implements NormalFormalParameter { | 7489 implements NormalFormalParameter { |
| 7490 /** | 7490 /** |
| 7491 * The documentation comment associated with this parameter, or `null` if this | 7491 * The documentation comment associated with this parameter, or `null` if this |
| 7492 * parameter does not have a documentation comment associated with it. | 7492 * parameter does not have a documentation comment associated with it. |
| 7493 */ | 7493 */ |
| 7494 Comment _comment; | 7494 Comment _comment; |
| 7495 | 7495 |
| 7496 /** | 7496 /** |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7593 return true; | 7593 return true; |
| 7594 } | 7594 } |
| 7595 Annotation firstAnnotation = _metadata[0]; | 7595 Annotation firstAnnotation = _metadata[0]; |
| 7596 return _comment.offset < firstAnnotation.offset; | 7596 return _comment.offset < firstAnnotation.offset; |
| 7597 } | 7597 } |
| 7598 } | 7598 } |
| 7599 | 7599 |
| 7600 /** | 7600 /** |
| 7601 * A null literal expression. | 7601 * A null literal expression. |
| 7602 * | 7602 * |
| 7603 * > nullLiteral ::= | 7603 * nullLiteral ::= |
| 7604 * > 'null' | 7604 * 'null' |
| 7605 */ | 7605 */ |
| 7606 class NullLiteralImpl extends LiteralImpl implements NullLiteral { | 7606 class NullLiteralImpl extends LiteralImpl implements NullLiteral { |
| 7607 /** | 7607 /** |
| 7608 * The token representing the literal. | 7608 * The token representing the literal. |
| 7609 */ | 7609 */ |
| 7610 Token literal; | 7610 Token literal; |
| 7611 | 7611 |
| 7612 /** | 7612 /** |
| 7613 * Initialize a newly created null literal. | 7613 * Initialize a newly created null literal. |
| 7614 */ | 7614 */ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 7628 | 7628 |
| 7629 @override | 7629 @override |
| 7630 void visitChildren(AstVisitor visitor) { | 7630 void visitChildren(AstVisitor visitor) { |
| 7631 // There are no children to visit. | 7631 // There are no children to visit. |
| 7632 } | 7632 } |
| 7633 } | 7633 } |
| 7634 | 7634 |
| 7635 /** | 7635 /** |
| 7636 * A parenthesized expression. | 7636 * A parenthesized expression. |
| 7637 * | 7637 * |
| 7638 * > parenthesizedExpression ::= | 7638 * parenthesizedExpression ::= |
| 7639 * > '(' [Expression] ')' | 7639 * '(' [Expression] ')' |
| 7640 */ | 7640 */ |
| 7641 class ParenthesizedExpressionImpl extends ExpressionImpl | 7641 class ParenthesizedExpressionImpl extends ExpressionImpl |
| 7642 implements ParenthesizedExpression { | 7642 implements ParenthesizedExpression { |
| 7643 /** | 7643 /** |
| 7644 * The left parenthesis. | 7644 * The left parenthesis. |
| 7645 */ | 7645 */ |
| 7646 Token leftParenthesis; | 7646 Token leftParenthesis; |
| 7647 | 7647 |
| 7648 /** | 7648 /** |
| 7649 * The expression within the parentheses. | 7649 * The expression within the parentheses. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7691 | 7691 |
| 7692 @override | 7692 @override |
| 7693 void visitChildren(AstVisitor visitor) { | 7693 void visitChildren(AstVisitor visitor) { |
| 7694 _safelyVisitChild(_expression, visitor); | 7694 _safelyVisitChild(_expression, visitor); |
| 7695 } | 7695 } |
| 7696 } | 7696 } |
| 7697 | 7697 |
| 7698 /** | 7698 /** |
| 7699 * A part directive. | 7699 * A part directive. |
| 7700 * | 7700 * |
| 7701 * > partDirective ::= | 7701 * partDirective ::= |
| 7702 * > [Annotation] 'part' [StringLiteral] ';' | 7702 * [Annotation] 'part' [StringLiteral] ';' |
| 7703 */ | 7703 */ |
| 7704 class PartDirectiveImpl extends UriBasedDirectiveImpl implements PartDirective { | 7704 class PartDirectiveImpl extends UriBasedDirectiveImpl implements PartDirective { |
| 7705 /** | 7705 /** |
| 7706 * The token representing the 'part' keyword. | 7706 * The token representing the 'part' keyword. |
| 7707 */ | 7707 */ |
| 7708 Token partKeyword; | 7708 Token partKeyword; |
| 7709 | 7709 |
| 7710 /** | 7710 /** |
| 7711 * The semicolon terminating the directive. | 7711 * The semicolon terminating the directive. |
| 7712 */ | 7712 */ |
| (...skipping 24 matching lines...) Expand all Loading... |
| 7737 @override | 7737 @override |
| 7738 CompilationUnitElement get uriElement => element as CompilationUnitElement; | 7738 CompilationUnitElement get uriElement => element as CompilationUnitElement; |
| 7739 | 7739 |
| 7740 @override | 7740 @override |
| 7741 accept(AstVisitor visitor) => visitor.visitPartDirective(this); | 7741 accept(AstVisitor visitor) => visitor.visitPartDirective(this); |
| 7742 } | 7742 } |
| 7743 | 7743 |
| 7744 /** | 7744 /** |
| 7745 * A part-of directive. | 7745 * A part-of directive. |
| 7746 * | 7746 * |
| 7747 * > partOfDirective ::= | 7747 * partOfDirective ::= |
| 7748 * > [Annotation] 'part' 'of' [Identifier] ';' | 7748 * [Annotation] 'part' 'of' [Identifier] ';' |
| 7749 */ | 7749 */ |
| 7750 class PartOfDirectiveImpl extends DirectiveImpl implements PartOfDirective { | 7750 class PartOfDirectiveImpl extends DirectiveImpl implements PartOfDirective { |
| 7751 /** | 7751 /** |
| 7752 * The token representing the 'part' keyword. | 7752 * The token representing the 'part' keyword. |
| 7753 */ | 7753 */ |
| 7754 Token partKeyword; | 7754 Token partKeyword; |
| 7755 | 7755 |
| 7756 /** | 7756 /** |
| 7757 * The token representing the 'of' keyword. | 7757 * The token representing the 'of' keyword. |
| 7758 */ | 7758 */ |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7814 @override | 7814 @override |
| 7815 void visitChildren(AstVisitor visitor) { | 7815 void visitChildren(AstVisitor visitor) { |
| 7816 super.visitChildren(visitor); | 7816 super.visitChildren(visitor); |
| 7817 _safelyVisitChild(_libraryName, visitor); | 7817 _safelyVisitChild(_libraryName, visitor); |
| 7818 } | 7818 } |
| 7819 } | 7819 } |
| 7820 | 7820 |
| 7821 /** | 7821 /** |
| 7822 * A postfix unary expression. | 7822 * A postfix unary expression. |
| 7823 * | 7823 * |
| 7824 * > postfixExpression ::= | 7824 * postfixExpression ::= |
| 7825 * > [Expression] [Token] | 7825 * [Expression] [Token] |
| 7826 */ | 7826 */ |
| 7827 class PostfixExpressionImpl extends ExpressionImpl | 7827 class PostfixExpressionImpl extends ExpressionImpl |
| 7828 implements PostfixExpression { | 7828 implements PostfixExpression { |
| 7829 /** | 7829 /** |
| 7830 * The expression computing the operand for the operator. | 7830 * The expression computing the operand for the operator. |
| 7831 */ | 7831 */ |
| 7832 Expression _operand; | 7832 Expression _operand; |
| 7833 | 7833 |
| 7834 /** | 7834 /** |
| 7835 * The postfix operator being applied to the operand. | 7835 * The postfix operator being applied to the operand. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7928 @override | 7928 @override |
| 7929 void visitChildren(AstVisitor visitor) { | 7929 void visitChildren(AstVisitor visitor) { |
| 7930 _safelyVisitChild(_operand, visitor); | 7930 _safelyVisitChild(_operand, visitor); |
| 7931 } | 7931 } |
| 7932 } | 7932 } |
| 7933 | 7933 |
| 7934 /** | 7934 /** |
| 7935 * An identifier that is prefixed or an access to an object property where the | 7935 * An identifier that is prefixed or an access to an object property where the |
| 7936 * target of the property access is a simple identifier. | 7936 * target of the property access is a simple identifier. |
| 7937 * | 7937 * |
| 7938 * > prefixedIdentifier ::= | 7938 * prefixedIdentifier ::= |
| 7939 * > [SimpleIdentifier] '.' [SimpleIdentifier] | 7939 * [SimpleIdentifier] '.' [SimpleIdentifier] |
| 7940 */ | 7940 */ |
| 7941 class PrefixedIdentifierImpl extends IdentifierImpl | 7941 class PrefixedIdentifierImpl extends IdentifierImpl |
| 7942 implements PrefixedIdentifier { | 7942 implements PrefixedIdentifier { |
| 7943 /** | 7943 /** |
| 7944 * The prefix associated with the library in which the identifier is defined. | 7944 * The prefix associated with the library in which the identifier is defined. |
| 7945 */ | 7945 */ |
| 7946 SimpleIdentifier _prefix; | 7946 SimpleIdentifier _prefix; |
| 7947 | 7947 |
| 7948 /** | 7948 /** |
| 7949 * The period used to separate the prefix from the identifier. | 7949 * The period used to separate the prefix from the identifier. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8041 @override | 8041 @override |
| 8042 void visitChildren(AstVisitor visitor) { | 8042 void visitChildren(AstVisitor visitor) { |
| 8043 _safelyVisitChild(_prefix, visitor); | 8043 _safelyVisitChild(_prefix, visitor); |
| 8044 _safelyVisitChild(_identifier, visitor); | 8044 _safelyVisitChild(_identifier, visitor); |
| 8045 } | 8045 } |
| 8046 } | 8046 } |
| 8047 | 8047 |
| 8048 /** | 8048 /** |
| 8049 * A prefix unary expression. | 8049 * A prefix unary expression. |
| 8050 * | 8050 * |
| 8051 * > prefixExpression ::= | 8051 * prefixExpression ::= |
| 8052 * > [Token] [Expression] | 8052 * [Token] [Expression] |
| 8053 */ | 8053 */ |
| 8054 class PrefixExpressionImpl extends ExpressionImpl implements PrefixExpression { | 8054 class PrefixExpressionImpl extends ExpressionImpl implements PrefixExpression { |
| 8055 /** | 8055 /** |
| 8056 * The prefix operator being applied to the operand. | 8056 * The prefix operator being applied to the operand. |
| 8057 */ | 8057 */ |
| 8058 Token operator; | 8058 Token operator; |
| 8059 | 8059 |
| 8060 /** | 8060 /** |
| 8061 * The expression computing the operand for the operator. | 8061 * The expression computing the operand for the operator. |
| 8062 */ | 8062 */ |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8156 } | 8156 } |
| 8157 } | 8157 } |
| 8158 | 8158 |
| 8159 /** | 8159 /** |
| 8160 * The access of a property of an object. | 8160 * The access of a property of an object. |
| 8161 * | 8161 * |
| 8162 * Note, however, that accesses to properties of objects can also be represented | 8162 * Note, however, that accesses to properties of objects can also be represented |
| 8163 * as [PrefixedIdentifier] nodes in cases where the target is also a simple | 8163 * as [PrefixedIdentifier] nodes in cases where the target is also a simple |
| 8164 * identifier. | 8164 * identifier. |
| 8165 * | 8165 * |
| 8166 * > propertyAccess ::= | 8166 * propertyAccess ::= |
| 8167 * > [Expression] '.' [SimpleIdentifier] | 8167 * [Expression] '.' [SimpleIdentifier] |
| 8168 */ | 8168 */ |
| 8169 class PropertyAccessImpl extends ExpressionImpl implements PropertyAccess { | 8169 class PropertyAccessImpl extends ExpressionImpl implements PropertyAccess { |
| 8170 /** | 8170 /** |
| 8171 * The expression computing the object defining the property being accessed. | 8171 * The expression computing the object defining the property being accessed. |
| 8172 */ | 8172 */ |
| 8173 Expression _target; | 8173 Expression _target; |
| 8174 | 8174 |
| 8175 /** | 8175 /** |
| 8176 * The property access operator. | 8176 * The property access operator. |
| 8177 */ | 8177 */ |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8254 void visitChildren(AstVisitor visitor) { | 8254 void visitChildren(AstVisitor visitor) { |
| 8255 _safelyVisitChild(_target, visitor); | 8255 _safelyVisitChild(_target, visitor); |
| 8256 _safelyVisitChild(_propertyName, visitor); | 8256 _safelyVisitChild(_propertyName, visitor); |
| 8257 } | 8257 } |
| 8258 } | 8258 } |
| 8259 | 8259 |
| 8260 /** | 8260 /** |
| 8261 * The invocation of a constructor in the same class from within a constructor's | 8261 * The invocation of a constructor in the same class from within a constructor's |
| 8262 * initialization list. | 8262 * initialization list. |
| 8263 * | 8263 * |
| 8264 * > redirectingConstructorInvocation ::= | 8264 * redirectingConstructorInvocation ::= |
| 8265 * > 'this' ('.' identifier)? arguments | 8265 * 'this' ('.' identifier)? arguments |
| 8266 */ | 8266 */ |
| 8267 class RedirectingConstructorInvocationImpl extends ConstructorInitializerImpl | 8267 class RedirectingConstructorInvocationImpl extends ConstructorInitializerImpl |
| 8268 implements RedirectingConstructorInvocation { | 8268 implements RedirectingConstructorInvocation { |
| 8269 /** | 8269 /** |
| 8270 * The token for the 'this' keyword. | 8270 * The token for the 'this' keyword. |
| 8271 */ | 8271 */ |
| 8272 Token thisKeyword; | 8272 Token thisKeyword; |
| 8273 | 8273 |
| 8274 /** | 8274 /** |
| 8275 * The token for the period before the name of the constructor that is being | 8275 * The token for the period before the name of the constructor that is being |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8342 @override | 8342 @override |
| 8343 void visitChildren(AstVisitor visitor) { | 8343 void visitChildren(AstVisitor visitor) { |
| 8344 _safelyVisitChild(_constructorName, visitor); | 8344 _safelyVisitChild(_constructorName, visitor); |
| 8345 _safelyVisitChild(_argumentList, visitor); | 8345 _safelyVisitChild(_argumentList, visitor); |
| 8346 } | 8346 } |
| 8347 } | 8347 } |
| 8348 | 8348 |
| 8349 /** | 8349 /** |
| 8350 * A rethrow expression. | 8350 * A rethrow expression. |
| 8351 * | 8351 * |
| 8352 * > rethrowExpression ::= | 8352 * rethrowExpression ::= |
| 8353 * > 'rethrow' | 8353 * 'rethrow' |
| 8354 */ | 8354 */ |
| 8355 class RethrowExpressionImpl extends ExpressionImpl | 8355 class RethrowExpressionImpl extends ExpressionImpl |
| 8356 implements RethrowExpression { | 8356 implements RethrowExpression { |
| 8357 /** | 8357 /** |
| 8358 * The token representing the 'rethrow' keyword. | 8358 * The token representing the 'rethrow' keyword. |
| 8359 */ | 8359 */ |
| 8360 Token rethrowKeyword; | 8360 Token rethrowKeyword; |
| 8361 | 8361 |
| 8362 /** | 8362 /** |
| 8363 * Initialize a newly created rethrow expression. | 8363 * Initialize a newly created rethrow expression. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 8381 | 8381 |
| 8382 @override | 8382 @override |
| 8383 void visitChildren(AstVisitor visitor) { | 8383 void visitChildren(AstVisitor visitor) { |
| 8384 // There are no children to visit. | 8384 // There are no children to visit. |
| 8385 } | 8385 } |
| 8386 } | 8386 } |
| 8387 | 8387 |
| 8388 /** | 8388 /** |
| 8389 * A return statement. | 8389 * A return statement. |
| 8390 * | 8390 * |
| 8391 * > returnStatement ::= | 8391 * returnStatement ::= |
| 8392 * > 'return' [Expression]? ';' | 8392 * 'return' [Expression]? ';' |
| 8393 */ | 8393 */ |
| 8394 class ReturnStatementImpl extends StatementImpl implements ReturnStatement { | 8394 class ReturnStatementImpl extends StatementImpl implements ReturnStatement { |
| 8395 /** | 8395 /** |
| 8396 * The token representing the 'return' keyword. | 8396 * The token representing the 'return' keyword. |
| 8397 */ | 8397 */ |
| 8398 Token returnKeyword; | 8398 Token returnKeyword; |
| 8399 | 8399 |
| 8400 /** | 8400 /** |
| 8401 * The expression computing the value to be returned, or `null` if no explicit | 8401 * The expression computing the value to be returned, or `null` if no explicit |
| 8402 * value was provided. | 8402 * value was provided. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8440 | 8440 |
| 8441 @override | 8441 @override |
| 8442 void visitChildren(AstVisitor visitor) { | 8442 void visitChildren(AstVisitor visitor) { |
| 8443 _safelyVisitChild(_expression, visitor); | 8443 _safelyVisitChild(_expression, visitor); |
| 8444 } | 8444 } |
| 8445 } | 8445 } |
| 8446 | 8446 |
| 8447 /** | 8447 /** |
| 8448 * A script tag that can optionally occur at the beginning of a compilation unit
. | 8448 * A script tag that can optionally occur at the beginning of a compilation unit
. |
| 8449 * | 8449 * |
| 8450 * > scriptTag ::= | 8450 * scriptTag ::= |
| 8451 * > '#!' (~NEWLINE)* NEWLINE | 8451 * '#!' (~NEWLINE)* NEWLINE |
| 8452 */ | 8452 */ |
| 8453 class ScriptTagImpl extends AstNodeImpl implements ScriptTag { | 8453 class ScriptTagImpl extends AstNodeImpl implements ScriptTag { |
| 8454 /** | 8454 /** |
| 8455 * The token representing this script tag. | 8455 * The token representing this script tag. |
| 8456 */ | 8456 */ |
| 8457 Token scriptTag; | 8457 Token scriptTag; |
| 8458 | 8458 |
| 8459 /** | 8459 /** |
| 8460 * Initialize a newly created script tag. | 8460 * Initialize a newly created script tag. |
| 8461 */ | 8461 */ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 8475 | 8475 |
| 8476 @override | 8476 @override |
| 8477 void visitChildren(AstVisitor visitor) { | 8477 void visitChildren(AstVisitor visitor) { |
| 8478 // There are no children to visit. | 8478 // There are no children to visit. |
| 8479 } | 8479 } |
| 8480 } | 8480 } |
| 8481 | 8481 |
| 8482 /** | 8482 /** |
| 8483 * A combinator that restricts the names being imported to those in a given list
. | 8483 * A combinator that restricts the names being imported to those in a given list
. |
| 8484 * | 8484 * |
| 8485 * > showCombinator ::= | 8485 * showCombinator ::= |
| 8486 * > 'show' [SimpleIdentifier] (',' [SimpleIdentifier])* | 8486 * 'show' [SimpleIdentifier] (',' [SimpleIdentifier])* |
| 8487 */ | 8487 */ |
| 8488 class ShowCombinatorImpl extends CombinatorImpl implements ShowCombinator { | 8488 class ShowCombinatorImpl extends CombinatorImpl implements ShowCombinator { |
| 8489 /** | 8489 /** |
| 8490 * The list of names from the library that are made visible by this combinator
. | 8490 * The list of names from the library that are made visible by this combinator
. |
| 8491 */ | 8491 */ |
| 8492 NodeList<SimpleIdentifier> _shownNames; | 8492 NodeList<SimpleIdentifier> _shownNames; |
| 8493 | 8493 |
| 8494 /** | 8494 /** |
| 8495 * Initialize a newly created import show combinator. | 8495 * Initialize a newly created import show combinator. |
| 8496 */ | 8496 */ |
| (...skipping 19 matching lines...) Expand all Loading... |
| 8516 | 8516 |
| 8517 @override | 8517 @override |
| 8518 void visitChildren(AstVisitor visitor) { | 8518 void visitChildren(AstVisitor visitor) { |
| 8519 _shownNames.accept(visitor); | 8519 _shownNames.accept(visitor); |
| 8520 } | 8520 } |
| 8521 } | 8521 } |
| 8522 | 8522 |
| 8523 /** | 8523 /** |
| 8524 * A simple formal parameter. | 8524 * A simple formal parameter. |
| 8525 * | 8525 * |
| 8526 * > simpleFormalParameter ::= | 8526 * simpleFormalParameter ::= |
| 8527 * > ('final' [TypeName] | 'var' | [TypeName])? [SimpleIdentifier] | 8527 * ('final' [TypeName] | 'var' | [TypeName])? [SimpleIdentifier] |
| 8528 */ | 8528 */ |
| 8529 class SimpleFormalParameterImpl extends NormalFormalParameterImpl | 8529 class SimpleFormalParameterImpl extends NormalFormalParameterImpl |
| 8530 implements SimpleFormalParameter { | 8530 implements SimpleFormalParameter { |
| 8531 /** | 8531 /** |
| 8532 * The token representing either the 'final', 'const' or 'var' keyword, or | 8532 * The token representing either the 'final', 'const' or 'var' keyword, or |
| 8533 * `null` if no keyword was used. | 8533 * `null` if no keyword was used. |
| 8534 */ | 8534 */ |
| 8535 Token keyword; | 8535 Token keyword; |
| 8536 | 8536 |
| 8537 /** | 8537 /** |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8597 void visitChildren(AstVisitor visitor) { | 8597 void visitChildren(AstVisitor visitor) { |
| 8598 super.visitChildren(visitor); | 8598 super.visitChildren(visitor); |
| 8599 _safelyVisitChild(_type, visitor); | 8599 _safelyVisitChild(_type, visitor); |
| 8600 _safelyVisitChild(identifier, visitor); | 8600 _safelyVisitChild(identifier, visitor); |
| 8601 } | 8601 } |
| 8602 } | 8602 } |
| 8603 | 8603 |
| 8604 /** | 8604 /** |
| 8605 * A simple identifier. | 8605 * A simple identifier. |
| 8606 * | 8606 * |
| 8607 * > simpleIdentifier ::= | 8607 * simpleIdentifier ::= |
| 8608 * > initialCharacter internalCharacter* | 8608 * initialCharacter internalCharacter* |
| 8609 * > | 8609 * |
| 8610 * > initialCharacter ::= '_' | '$' | letter | 8610 * initialCharacter ::= '_' | '$' | letter |
| 8611 * > | 8611 * |
| 8612 * > internalCharacter ::= '_' | '$' | letter | digit | 8612 * internalCharacter ::= '_' | '$' | letter | digit |
| 8613 */ | 8613 */ |
| 8614 class SimpleIdentifierImpl extends IdentifierImpl implements SimpleIdentifier { | 8614 class SimpleIdentifierImpl extends IdentifierImpl implements SimpleIdentifier { |
| 8615 /** | 8615 /** |
| 8616 * The token representing the identifier. | 8616 * The token representing the identifier. |
| 8617 */ | 8617 */ |
| 8618 Token token; | 8618 Token token; |
| 8619 | 8619 |
| 8620 /** | 8620 /** |
| 8621 * The element associated with this identifier based on static type | 8621 * The element associated with this identifier based on static type |
| 8622 * information, or `null` if the AST structure has not been resolved or if | 8622 * information, or `null` if the AST structure has not been resolved or if |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8885 return _returnOrReportElement( | 8885 return _returnOrReportElement( |
| 8886 parent, element is VariableElement, element); | 8886 parent, element is VariableElement, element); |
| 8887 } | 8887 } |
| 8888 return element; | 8888 return element; |
| 8889 } | 8889 } |
| 8890 } | 8890 } |
| 8891 | 8891 |
| 8892 /** | 8892 /** |
| 8893 * A string literal expression that does not contain any interpolations. | 8893 * A string literal expression that does not contain any interpolations. |
| 8894 * | 8894 * |
| 8895 * > simpleStringLiteral ::= | 8895 * simpleStringLiteral ::= |
| 8896 * > rawStringLiteral | 8896 * rawStringLiteral |
| 8897 * > | basicStringLiteral | 8897 * | basicStringLiteral |
| 8898 * > | 8898 * |
| 8899 * > rawStringLiteral ::= | 8899 * rawStringLiteral ::= |
| 8900 * > 'r' basicStringLiteral | 8900 * 'r' basicStringLiteral |
| 8901 * > | 8901 * |
| 8902 * > simpleStringLiteral ::= | 8902 * simpleStringLiteral ::= |
| 8903 * > multiLineStringLiteral | 8903 * multiLineStringLiteral |
| 8904 * > | singleLineStringLiteral | 8904 * | singleLineStringLiteral |
| 8905 * > | 8905 * |
| 8906 * > multiLineStringLiteral ::= | 8906 * multiLineStringLiteral ::= |
| 8907 * > "'''" characters "'''" | 8907 * "'''" characters "'''" |
| 8908 * > | '"""' characters '"""' | 8908 * | '"""' characters '"""' |
| 8909 * > | 8909 * |
| 8910 * > singleLineStringLiteral ::= | 8910 * singleLineStringLiteral ::= |
| 8911 * > "'" characters "'" | 8911 * "'" characters "'" |
| 8912 * > | '"' characters '"' | 8912 * | '"' characters '"' |
| 8913 */ | 8913 */ |
| 8914 class SimpleStringLiteralImpl extends SingleStringLiteralImpl | 8914 class SimpleStringLiteralImpl extends SingleStringLiteralImpl |
| 8915 implements SimpleStringLiteral { | 8915 implements SimpleStringLiteral { |
| 8916 /** | 8916 /** |
| 8917 * The token representing the literal. | 8917 * The token representing the literal. |
| 8918 */ | 8918 */ |
| 8919 Token literal; | 8919 Token literal; |
| 8920 | 8920 |
| 8921 /** | 8921 /** |
| 8922 * The value of the literal. | 8922 * The value of the literal. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8979 | 8979 |
| 8980 @override | 8980 @override |
| 8981 void _appendStringValue(StringBuffer buffer) { | 8981 void _appendStringValue(StringBuffer buffer) { |
| 8982 buffer.write(value); | 8982 buffer.write(value); |
| 8983 } | 8983 } |
| 8984 } | 8984 } |
| 8985 | 8985 |
| 8986 /** | 8986 /** |
| 8987 * A single string literal expression. | 8987 * A single string literal expression. |
| 8988 * | 8988 * |
| 8989 * > singleStringLiteral ::= | 8989 * singleStringLiteral ::= |
| 8990 * > [SimpleStringLiteral] | 8990 * [SimpleStringLiteral] |
| 8991 * > | [StringInterpolation] | 8991 * | [StringInterpolation] |
| 8992 */ | 8992 */ |
| 8993 abstract class SingleStringLiteralImpl extends StringLiteralImpl | 8993 abstract class SingleStringLiteralImpl extends StringLiteralImpl |
| 8994 implements SingleStringLiteral {} | 8994 implements SingleStringLiteral {} |
| 8995 | 8995 |
| 8996 /** | 8996 /** |
| 8997 * A node that represents a statement. | 8997 * A node that represents a statement. |
| 8998 * | 8998 * |
| 8999 * > statement ::= | 8999 * statement ::= |
| 9000 * > [Block] | 9000 * [Block] |
| 9001 * > | [VariableDeclarationStatement] | 9001 * | [VariableDeclarationStatement] |
| 9002 * > | [ForStatement] | 9002 * | [ForStatement] |
| 9003 * > | [ForEachStatement] | 9003 * | [ForEachStatement] |
| 9004 * > | [WhileStatement] | 9004 * | [WhileStatement] |
| 9005 * > | [DoStatement] | 9005 * | [DoStatement] |
| 9006 * > | [SwitchStatement] | 9006 * | [SwitchStatement] |
| 9007 * > | [IfStatement] | 9007 * | [IfStatement] |
| 9008 * > | [TryStatement] | 9008 * | [TryStatement] |
| 9009 * > | [BreakStatement] | 9009 * | [BreakStatement] |
| 9010 * > | [ContinueStatement] | 9010 * | [ContinueStatement] |
| 9011 * > | [ReturnStatement] | 9011 * | [ReturnStatement] |
| 9012 * > | [ExpressionStatement] | 9012 * | [ExpressionStatement] |
| 9013 * > | [FunctionDeclarationStatement] | 9013 * | [FunctionDeclarationStatement] |
| 9014 */ | 9014 */ |
| 9015 abstract class StatementImpl extends AstNodeImpl implements Statement { | 9015 abstract class StatementImpl extends AstNodeImpl implements Statement { |
| 9016 @override | 9016 @override |
| 9017 Statement get unlabeled => this; | 9017 Statement get unlabeled => this; |
| 9018 } | 9018 } |
| 9019 | 9019 |
| 9020 /** | 9020 /** |
| 9021 * A string interpolation literal. | 9021 * A string interpolation literal. |
| 9022 * | 9022 * |
| 9023 * > stringInterpolation ::= | 9023 * stringInterpolation ::= |
| 9024 * > ''' [InterpolationElement]* ''' | 9024 * ''' [InterpolationElement]* ''' |
| 9025 * > | '"' [InterpolationElement]* '"' | 9025 * | '"' [InterpolationElement]* '"' |
| 9026 */ | 9026 */ |
| 9027 class StringInterpolationImpl extends SingleStringLiteralImpl | 9027 class StringInterpolationImpl extends SingleStringLiteralImpl |
| 9028 implements StringInterpolation { | 9028 implements StringInterpolation { |
| 9029 /** | 9029 /** |
| 9030 * The elements that will be composed to produce the resulting string. | 9030 * The elements that will be composed to produce the resulting string. |
| 9031 */ | 9031 */ |
| 9032 NodeList<InterpolationElement> _elements; | 9032 NodeList<InterpolationElement> _elements; |
| 9033 | 9033 |
| 9034 /** | 9034 /** |
| 9035 * Initialize a newly created string interpolation expression. | 9035 * Initialize a newly created string interpolation expression. |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9184 } | 9184 } |
| 9185 index++; | 9185 index++; |
| 9186 } | 9186 } |
| 9187 return start; | 9187 return start; |
| 9188 } | 9188 } |
| 9189 } | 9189 } |
| 9190 | 9190 |
| 9191 /** | 9191 /** |
| 9192 * A string literal expression. | 9192 * A string literal expression. |
| 9193 * | 9193 * |
| 9194 * > stringLiteral ::= | 9194 * stringLiteral ::= |
| 9195 * > [SimpleStringLiteral] | 9195 * [SimpleStringLiteral] |
| 9196 * > | [AdjacentStrings] | 9196 * | [AdjacentStrings] |
| 9197 * > | [StringInterpolation] | 9197 * | [StringInterpolation] |
| 9198 */ | 9198 */ |
| 9199 abstract class StringLiteralImpl extends LiteralImpl implements StringLiteral { | 9199 abstract class StringLiteralImpl extends LiteralImpl implements StringLiteral { |
| 9200 @override | 9200 @override |
| 9201 String get stringValue { | 9201 String get stringValue { |
| 9202 StringBuffer buffer = new StringBuffer(); | 9202 StringBuffer buffer = new StringBuffer(); |
| 9203 try { | 9203 try { |
| 9204 _appendStringValue(buffer); | 9204 _appendStringValue(buffer); |
| 9205 } on IllegalArgumentException { | 9205 } on IllegalArgumentException { |
| 9206 return null; | 9206 return null; |
| 9207 } | 9207 } |
| 9208 return buffer.toString(); | 9208 return buffer.toString(); |
| 9209 } | 9209 } |
| 9210 | 9210 |
| 9211 /** | 9211 /** |
| 9212 * Append the value of this string literal to the given [buffer]. Throw an | 9212 * Append the value of this string literal to the given [buffer]. Throw an |
| 9213 * [IllegalArgumentException] if the string is not a constant string without | 9213 * [IllegalArgumentException] if the string is not a constant string without |
| 9214 * any string interpolation. | 9214 * any string interpolation. |
| 9215 */ | 9215 */ |
| 9216 void _appendStringValue(StringBuffer buffer); | 9216 void _appendStringValue(StringBuffer buffer); |
| 9217 } | 9217 } |
| 9218 | 9218 |
| 9219 /** | 9219 /** |
| 9220 * The invocation of a superclass' constructor from within a constructor's | 9220 * The invocation of a superclass' constructor from within a constructor's |
| 9221 * initialization list. | 9221 * initialization list. |
| 9222 * | 9222 * |
| 9223 * > superInvocation ::= | 9223 * superInvocation ::= |
| 9224 * > 'super' ('.' [SimpleIdentifier])? [ArgumentList] | 9224 * 'super' ('.' [SimpleIdentifier])? [ArgumentList] |
| 9225 */ | 9225 */ |
| 9226 class SuperConstructorInvocationImpl extends ConstructorInitializerImpl | 9226 class SuperConstructorInvocationImpl extends ConstructorInitializerImpl |
| 9227 implements SuperConstructorInvocation { | 9227 implements SuperConstructorInvocation { |
| 9228 /** | 9228 /** |
| 9229 * The token for the 'super' keyword. | 9229 * The token for the 'super' keyword. |
| 9230 */ | 9230 */ |
| 9231 Token superKeyword; | 9231 Token superKeyword; |
| 9232 | 9232 |
| 9233 /** | 9233 /** |
| 9234 * The token for the period before the name of the constructor that is being | 9234 * The token for the period before the name of the constructor that is being |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9301 @override | 9301 @override |
| 9302 void visitChildren(AstVisitor visitor) { | 9302 void visitChildren(AstVisitor visitor) { |
| 9303 _safelyVisitChild(_constructorName, visitor); | 9303 _safelyVisitChild(_constructorName, visitor); |
| 9304 _safelyVisitChild(_argumentList, visitor); | 9304 _safelyVisitChild(_argumentList, visitor); |
| 9305 } | 9305 } |
| 9306 } | 9306 } |
| 9307 | 9307 |
| 9308 /** | 9308 /** |
| 9309 * A super expression. | 9309 * A super expression. |
| 9310 * | 9310 * |
| 9311 * > superExpression ::= | 9311 * superExpression ::= |
| 9312 * > 'super' | 9312 * 'super' |
| 9313 */ | 9313 */ |
| 9314 class SuperExpressionImpl extends ExpressionImpl implements SuperExpression { | 9314 class SuperExpressionImpl extends ExpressionImpl implements SuperExpression { |
| 9315 /** | 9315 /** |
| 9316 * The token representing the 'super' keyword. | 9316 * The token representing the 'super' keyword. |
| 9317 */ | 9317 */ |
| 9318 Token superKeyword; | 9318 Token superKeyword; |
| 9319 | 9319 |
| 9320 /** | 9320 /** |
| 9321 * Initialize a newly created super expression. | 9321 * Initialize a newly created super expression. |
| 9322 */ | 9322 */ |
| (...skipping 16 matching lines...) Expand all Loading... |
| 9339 | 9339 |
| 9340 @override | 9340 @override |
| 9341 void visitChildren(AstVisitor visitor) { | 9341 void visitChildren(AstVisitor visitor) { |
| 9342 // There are no children to visit. | 9342 // There are no children to visit. |
| 9343 } | 9343 } |
| 9344 } | 9344 } |
| 9345 | 9345 |
| 9346 /** | 9346 /** |
| 9347 * A case in a switch statement. | 9347 * A case in a switch statement. |
| 9348 * | 9348 * |
| 9349 * > switchCase ::= | 9349 * switchCase ::= |
| 9350 * > [SimpleIdentifier]* 'case' [Expression] ':' [Statement]* | 9350 * [SimpleIdentifier]* 'case' [Expression] ':' [Statement]* |
| 9351 */ | 9351 */ |
| 9352 class SwitchCaseImpl extends SwitchMemberImpl implements SwitchCase { | 9352 class SwitchCaseImpl extends SwitchMemberImpl implements SwitchCase { |
| 9353 /** | 9353 /** |
| 9354 * The expression controlling whether the statements will be executed. | 9354 * The expression controlling whether the statements will be executed. |
| 9355 */ | 9355 */ |
| 9356 Expression _expression; | 9356 Expression _expression; |
| 9357 | 9357 |
| 9358 /** | 9358 /** |
| 9359 * Initialize a newly created switch case. The list of [labels] can be `null` | 9359 * Initialize a newly created switch case. The list of [labels] can be `null` |
| 9360 * if there are no labels. | 9360 * if there are no labels. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 9388 void visitChildren(AstVisitor visitor) { | 9388 void visitChildren(AstVisitor visitor) { |
| 9389 labels.accept(visitor); | 9389 labels.accept(visitor); |
| 9390 _safelyVisitChild(_expression, visitor); | 9390 _safelyVisitChild(_expression, visitor); |
| 9391 statements.accept(visitor); | 9391 statements.accept(visitor); |
| 9392 } | 9392 } |
| 9393 } | 9393 } |
| 9394 | 9394 |
| 9395 /** | 9395 /** |
| 9396 * The default case in a switch statement. | 9396 * The default case in a switch statement. |
| 9397 * | 9397 * |
| 9398 * > switchDefault ::= | 9398 * switchDefault ::= |
| 9399 * > [SimpleIdentifier]* 'default' ':' [Statement]* | 9399 * [SimpleIdentifier]* 'default' ':' [Statement]* |
| 9400 */ | 9400 */ |
| 9401 class SwitchDefaultImpl extends SwitchMemberImpl implements SwitchDefault { | 9401 class SwitchDefaultImpl extends SwitchMemberImpl implements SwitchDefault { |
| 9402 /** | 9402 /** |
| 9403 * Initialize a newly created switch default. The list of [labels] can be | 9403 * Initialize a newly created switch default. The list of [labels] can be |
| 9404 * `null` if there are no labels. | 9404 * `null` if there are no labels. |
| 9405 */ | 9405 */ |
| 9406 SwitchDefaultImpl(List<Label> labels, Token keyword, Token colon, | 9406 SwitchDefaultImpl(List<Label> labels, Token keyword, Token colon, |
| 9407 List<Statement> statements) | 9407 List<Statement> statements) |
| 9408 : super(labels, keyword, colon, statements); | 9408 : super(labels, keyword, colon, statements); |
| 9409 | 9409 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 9420 @override | 9420 @override |
| 9421 void visitChildren(AstVisitor visitor) { | 9421 void visitChildren(AstVisitor visitor) { |
| 9422 labels.accept(visitor); | 9422 labels.accept(visitor); |
| 9423 statements.accept(visitor); | 9423 statements.accept(visitor); |
| 9424 } | 9424 } |
| 9425 } | 9425 } |
| 9426 | 9426 |
| 9427 /** | 9427 /** |
| 9428 * An element within a switch statement. | 9428 * An element within a switch statement. |
| 9429 * | 9429 * |
| 9430 * > switchMember ::= | 9430 * switchMember ::= |
| 9431 * > switchCase | 9431 * switchCase |
| 9432 * > | switchDefault | 9432 * | switchDefault |
| 9433 */ | 9433 */ |
| 9434 abstract class SwitchMemberImpl extends AstNodeImpl implements SwitchMember { | 9434 abstract class SwitchMemberImpl extends AstNodeImpl implements SwitchMember { |
| 9435 /** | 9435 /** |
| 9436 * The labels associated with the switch member. | 9436 * The labels associated with the switch member. |
| 9437 */ | 9437 */ |
| 9438 NodeList<Label> _labels; | 9438 NodeList<Label> _labels; |
| 9439 | 9439 |
| 9440 /** | 9440 /** |
| 9441 * The token representing the 'case' or 'default' keyword. | 9441 * The token representing the 'case' or 'default' keyword. |
| 9442 */ | 9442 */ |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9481 @override | 9481 @override |
| 9482 NodeList<Label> get labels => _labels; | 9482 NodeList<Label> get labels => _labels; |
| 9483 | 9483 |
| 9484 @override | 9484 @override |
| 9485 NodeList<Statement> get statements => _statements; | 9485 NodeList<Statement> get statements => _statements; |
| 9486 } | 9486 } |
| 9487 | 9487 |
| 9488 /** | 9488 /** |
| 9489 * A switch statement. | 9489 * A switch statement. |
| 9490 * | 9490 * |
| 9491 * > switchStatement ::= | 9491 * switchStatement ::= |
| 9492 * > 'switch' '(' [Expression] ')' '{' [SwitchCase]* [SwitchDefault]? '}' | 9492 * 'switch' '(' [Expression] ')' '{' [SwitchCase]* [SwitchDefault]? '}' |
| 9493 */ | 9493 */ |
| 9494 class SwitchStatementImpl extends StatementImpl implements SwitchStatement { | 9494 class SwitchStatementImpl extends StatementImpl implements SwitchStatement { |
| 9495 /** | 9495 /** |
| 9496 * The token representing the 'switch' keyword. | 9496 * The token representing the 'switch' keyword. |
| 9497 */ | 9497 */ |
| 9498 Token switchKeyword; | 9498 Token switchKeyword; |
| 9499 | 9499 |
| 9500 /** | 9500 /** |
| 9501 * The left parenthesis. | 9501 * The left parenthesis. |
| 9502 */ | 9502 */ |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9577 @override | 9577 @override |
| 9578 void visitChildren(AstVisitor visitor) { | 9578 void visitChildren(AstVisitor visitor) { |
| 9579 _safelyVisitChild(_expression, visitor); | 9579 _safelyVisitChild(_expression, visitor); |
| 9580 _members.accept(visitor); | 9580 _members.accept(visitor); |
| 9581 } | 9581 } |
| 9582 } | 9582 } |
| 9583 | 9583 |
| 9584 /** | 9584 /** |
| 9585 * A symbol literal expression. | 9585 * A symbol literal expression. |
| 9586 * | 9586 * |
| 9587 * > symbolLiteral ::= | 9587 * symbolLiteral ::= |
| 9588 * > '#' (operator | (identifier ('.' identifier)*)) | 9588 * '#' (operator | (identifier ('.' identifier)*)) |
| 9589 */ | 9589 */ |
| 9590 class SymbolLiteralImpl extends LiteralImpl implements SymbolLiteral { | 9590 class SymbolLiteralImpl extends LiteralImpl implements SymbolLiteral { |
| 9591 /** | 9591 /** |
| 9592 * The token introducing the literal. | 9592 * The token introducing the literal. |
| 9593 */ | 9593 */ |
| 9594 Token poundSign; | 9594 Token poundSign; |
| 9595 | 9595 |
| 9596 /** | 9596 /** |
| 9597 * The components of the literal. | 9597 * The components of the literal. |
| 9598 */ | 9598 */ |
| (...skipping 21 matching lines...) Expand all Loading... |
| 9620 | 9620 |
| 9621 @override | 9621 @override |
| 9622 void visitChildren(AstVisitor visitor) { | 9622 void visitChildren(AstVisitor visitor) { |
| 9623 // There are no children to visit. | 9623 // There are no children to visit. |
| 9624 } | 9624 } |
| 9625 } | 9625 } |
| 9626 | 9626 |
| 9627 /** | 9627 /** |
| 9628 * A this expression. | 9628 * A this expression. |
| 9629 * | 9629 * |
| 9630 * > thisExpression ::= | 9630 * thisExpression ::= |
| 9631 * > 'this' | 9631 * 'this' |
| 9632 */ | 9632 */ |
| 9633 class ThisExpressionImpl extends ExpressionImpl implements ThisExpression { | 9633 class ThisExpressionImpl extends ExpressionImpl implements ThisExpression { |
| 9634 /** | 9634 /** |
| 9635 * The token representing the 'this' keyword. | 9635 * The token representing the 'this' keyword. |
| 9636 */ | 9636 */ |
| 9637 Token thisKeyword; | 9637 Token thisKeyword; |
| 9638 | 9638 |
| 9639 /** | 9639 /** |
| 9640 * Initialize a newly created this expression. | 9640 * Initialize a newly created this expression. |
| 9641 */ | 9641 */ |
| (...skipping 16 matching lines...) Expand all Loading... |
| 9658 | 9658 |
| 9659 @override | 9659 @override |
| 9660 void visitChildren(AstVisitor visitor) { | 9660 void visitChildren(AstVisitor visitor) { |
| 9661 // There are no children to visit. | 9661 // There are no children to visit. |
| 9662 } | 9662 } |
| 9663 } | 9663 } |
| 9664 | 9664 |
| 9665 /** | 9665 /** |
| 9666 * A throw expression. | 9666 * A throw expression. |
| 9667 * | 9667 * |
| 9668 * > throwExpression ::= | 9668 * throwExpression ::= |
| 9669 * > 'throw' [Expression] | 9669 * 'throw' [Expression] |
| 9670 */ | 9670 */ |
| 9671 class ThrowExpressionImpl extends ExpressionImpl implements ThrowExpression { | 9671 class ThrowExpressionImpl extends ExpressionImpl implements ThrowExpression { |
| 9672 /** | 9672 /** |
| 9673 * The token representing the 'throw' keyword. | 9673 * The token representing the 'throw' keyword. |
| 9674 */ | 9674 */ |
| 9675 Token throwKeyword; | 9675 Token throwKeyword; |
| 9676 | 9676 |
| 9677 /** | 9677 /** |
| 9678 * The expression computing the exception to be thrown. | 9678 * The expression computing the exception to be thrown. |
| 9679 */ | 9679 */ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9717 | 9717 |
| 9718 @override | 9718 @override |
| 9719 void visitChildren(AstVisitor visitor) { | 9719 void visitChildren(AstVisitor visitor) { |
| 9720 _safelyVisitChild(_expression, visitor); | 9720 _safelyVisitChild(_expression, visitor); |
| 9721 } | 9721 } |
| 9722 } | 9722 } |
| 9723 | 9723 |
| 9724 /** | 9724 /** |
| 9725 * The declaration of one or more top-level variables of the same type. | 9725 * The declaration of one or more top-level variables of the same type. |
| 9726 * | 9726 * |
| 9727 * > topLevelVariableDeclaration ::= | 9727 * topLevelVariableDeclaration ::= |
| 9728 * > ('final' | 'const') type? staticFinalDeclarationList ';' | 9728 * ('final' | 'const') type? staticFinalDeclarationList ';' |
| 9729 * > | variableDeclaration ';' | 9729 * | variableDeclaration ';' |
| 9730 */ | 9730 */ |
| 9731 class TopLevelVariableDeclarationImpl extends CompilationUnitMemberImpl | 9731 class TopLevelVariableDeclarationImpl extends CompilationUnitMemberImpl |
| 9732 implements TopLevelVariableDeclaration { | 9732 implements TopLevelVariableDeclaration { |
| 9733 /** | 9733 /** |
| 9734 * The top-level variables being declared. | 9734 * The top-level variables being declared. |
| 9735 */ | 9735 */ |
| 9736 VariableDeclarationList _variableList; | 9736 VariableDeclarationList _variableList; |
| 9737 | 9737 |
| 9738 /** | 9738 /** |
| 9739 * The semicolon terminating the declaration. | 9739 * The semicolon terminating the declaration. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9778 @override | 9778 @override |
| 9779 void visitChildren(AstVisitor visitor) { | 9779 void visitChildren(AstVisitor visitor) { |
| 9780 super.visitChildren(visitor); | 9780 super.visitChildren(visitor); |
| 9781 _safelyVisitChild(_variableList, visitor); | 9781 _safelyVisitChild(_variableList, visitor); |
| 9782 } | 9782 } |
| 9783 } | 9783 } |
| 9784 | 9784 |
| 9785 /** | 9785 /** |
| 9786 * A try statement. | 9786 * A try statement. |
| 9787 * | 9787 * |
| 9788 * > tryStatement ::= | 9788 * tryStatement ::= |
| 9789 * > 'try' [Block] ([CatchClause]+ finallyClause? | finallyClause) | 9789 * 'try' [Block] ([CatchClause]+ finallyClause? | finallyClause) |
| 9790 * > | 9790 * |
| 9791 * > finallyClause ::= | 9791 * finallyClause ::= |
| 9792 * > 'finally' [Block] | 9792 * 'finally' [Block] |
| 9793 */ | 9793 */ |
| 9794 class TryStatementImpl extends StatementImpl implements TryStatement { | 9794 class TryStatementImpl extends StatementImpl implements TryStatement { |
| 9795 /** | 9795 /** |
| 9796 * The token representing the 'try' keyword. | 9796 * The token representing the 'try' keyword. |
| 9797 */ | 9797 */ |
| 9798 Token tryKeyword; | 9798 Token tryKeyword; |
| 9799 | 9799 |
| 9800 /** | 9800 /** |
| 9801 * The body of the statement. | 9801 * The body of the statement. |
| 9802 */ | 9802 */ |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9880 void visitChildren(AstVisitor visitor) { | 9880 void visitChildren(AstVisitor visitor) { |
| 9881 _safelyVisitChild(_body, visitor); | 9881 _safelyVisitChild(_body, visitor); |
| 9882 _catchClauses.accept(visitor); | 9882 _catchClauses.accept(visitor); |
| 9883 _safelyVisitChild(_finallyBlock, visitor); | 9883 _safelyVisitChild(_finallyBlock, visitor); |
| 9884 } | 9884 } |
| 9885 } | 9885 } |
| 9886 | 9886 |
| 9887 /** | 9887 /** |
| 9888 * The declaration of a type alias. | 9888 * The declaration of a type alias. |
| 9889 * | 9889 * |
| 9890 * > typeAlias ::= | 9890 * typeAlias ::= |
| 9891 * > 'typedef' typeAliasBody | 9891 * 'typedef' typeAliasBody |
| 9892 * > | 9892 * |
| 9893 * > typeAliasBody ::= | 9893 * typeAliasBody ::= |
| 9894 * > classTypeAlias | 9894 * classTypeAlias |
| 9895 * > | functionTypeAlias | 9895 * | functionTypeAlias |
| 9896 */ | 9896 */ |
| 9897 abstract class TypeAliasImpl extends NamedCompilationUnitMemberImpl | 9897 abstract class TypeAliasImpl extends NamedCompilationUnitMemberImpl |
| 9898 implements TypeAlias { | 9898 implements TypeAlias { |
| 9899 /** | 9899 /** |
| 9900 * The token representing the 'typedef' keyword. | 9900 * The token representing the 'typedef' keyword. |
| 9901 */ | 9901 */ |
| 9902 Token typedefKeyword; | 9902 Token typedefKeyword; |
| 9903 | 9903 |
| 9904 /** | 9904 /** |
| 9905 * The semicolon terminating the declaration. | 9905 * The semicolon terminating the declaration. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 9918 @override | 9918 @override |
| 9919 Token get endToken => semicolon; | 9919 Token get endToken => semicolon; |
| 9920 | 9920 |
| 9921 @override | 9921 @override |
| 9922 Token get firstTokenAfterCommentAndMetadata => typedefKeyword; | 9922 Token get firstTokenAfterCommentAndMetadata => typedefKeyword; |
| 9923 } | 9923 } |
| 9924 | 9924 |
| 9925 /** | 9925 /** |
| 9926 * A list of type arguments. | 9926 * A list of type arguments. |
| 9927 * | 9927 * |
| 9928 * > typeArguments ::= | 9928 * typeArguments ::= |
| 9929 * > '<' typeName (',' typeName)* '>' | 9929 * '<' typeName (',' typeName)* '>' |
| 9930 */ | 9930 */ |
| 9931 class TypeArgumentListImpl extends AstNodeImpl implements TypeArgumentList { | 9931 class TypeArgumentListImpl extends AstNodeImpl implements TypeArgumentList { |
| 9932 /** | 9932 /** |
| 9933 * The left bracket. | 9933 * The left bracket. |
| 9934 */ | 9934 */ |
| 9935 Token leftBracket; | 9935 Token leftBracket; |
| 9936 | 9936 |
| 9937 /** | 9937 /** |
| 9938 * The type arguments associated with the type. | 9938 * The type arguments associated with the type. |
| 9939 */ | 9939 */ |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9973 | 9973 |
| 9974 @override | 9974 @override |
| 9975 void visitChildren(AstVisitor visitor) { | 9975 void visitChildren(AstVisitor visitor) { |
| 9976 _arguments.accept(visitor); | 9976 _arguments.accept(visitor); |
| 9977 } | 9977 } |
| 9978 } | 9978 } |
| 9979 | 9979 |
| 9980 /** | 9980 /** |
| 9981 * A literal that has a type associated with it. | 9981 * A literal that has a type associated with it. |
| 9982 * | 9982 * |
| 9983 * > typedLiteral ::= | 9983 * typedLiteral ::= |
| 9984 * > [ListLiteral] | 9984 * [ListLiteral] |
| 9985 * > | [MapLiteral] | 9985 * | [MapLiteral] |
| 9986 */ | 9986 */ |
| 9987 abstract class TypedLiteralImpl extends LiteralImpl implements TypedLiteral { | 9987 abstract class TypedLiteralImpl extends LiteralImpl implements TypedLiteral { |
| 9988 /** | 9988 /** |
| 9989 * The token representing the 'const' keyword, or `null` if the literal is not | 9989 * The token representing the 'const' keyword, or `null` if the literal is not |
| 9990 * a constant. | 9990 * a constant. |
| 9991 */ | 9991 */ |
| 9992 Token constKeyword; | 9992 Token constKeyword; |
| 9993 | 9993 |
| 9994 /** | 9994 /** |
| 9995 * The type argument associated with this literal, or `null` if no type | 9995 * The type argument associated with this literal, or `null` if no type |
| (...skipping 23 matching lines...) Expand all Loading... |
| 10019 | 10019 |
| 10020 @override | 10020 @override |
| 10021 void visitChildren(AstVisitor visitor) { | 10021 void visitChildren(AstVisitor visitor) { |
| 10022 _safelyVisitChild(_typeArguments, visitor); | 10022 _safelyVisitChild(_typeArguments, visitor); |
| 10023 } | 10023 } |
| 10024 } | 10024 } |
| 10025 | 10025 |
| 10026 /** | 10026 /** |
| 10027 * The name of a type, which can optionally include type arguments. | 10027 * The name of a type, which can optionally include type arguments. |
| 10028 * | 10028 * |
| 10029 * > typeName ::= | 10029 * typeName ::= |
| 10030 * > [Identifier] typeArguments? | 10030 * [Identifier] typeArguments? |
| 10031 */ | 10031 */ |
| 10032 class TypeNameImpl extends AstNodeImpl implements TypeName { | 10032 class TypeNameImpl extends AstNodeImpl implements TypeName { |
| 10033 /** | 10033 /** |
| 10034 * The name of the type. | 10034 * The name of the type. |
| 10035 */ | 10035 */ |
| 10036 Identifier _name; | 10036 Identifier _name; |
| 10037 | 10037 |
| 10038 /** | 10038 /** |
| 10039 * The type arguments associated with the type, or `null` if there are no type | 10039 * The type arguments associated with the type, or `null` if there are no type |
| 10040 * arguments. | 10040 * arguments. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10104 @override | 10104 @override |
| 10105 void visitChildren(AstVisitor visitor) { | 10105 void visitChildren(AstVisitor visitor) { |
| 10106 _safelyVisitChild(_name, visitor); | 10106 _safelyVisitChild(_name, visitor); |
| 10107 _safelyVisitChild(_typeArguments, visitor); | 10107 _safelyVisitChild(_typeArguments, visitor); |
| 10108 } | 10108 } |
| 10109 } | 10109 } |
| 10110 | 10110 |
| 10111 /** | 10111 /** |
| 10112 * A type parameter. | 10112 * A type parameter. |
| 10113 * | 10113 * |
| 10114 * > typeParameter ::= | 10114 * typeParameter ::= |
| 10115 * > [SimpleIdentifier] ('extends' [TypeName])? | 10115 * [SimpleIdentifier] ('extends' [TypeName])? |
| 10116 */ | 10116 */ |
| 10117 class TypeParameterImpl extends DeclarationImpl implements TypeParameter { | 10117 class TypeParameterImpl extends DeclarationImpl implements TypeParameter { |
| 10118 /** | 10118 /** |
| 10119 * The name of the type parameter. | 10119 * The name of the type parameter. |
| 10120 */ | 10120 */ |
| 10121 SimpleIdentifier _name; | 10121 SimpleIdentifier _name; |
| 10122 | 10122 |
| 10123 /** | 10123 /** |
| 10124 * The token representing the 'extends' keyword, or `null` if there is no | 10124 * The token representing the 'extends' keyword, or `null` if there is no |
| 10125 * explicit upper bound. | 10125 * explicit upper bound. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10187 void visitChildren(AstVisitor visitor) { | 10187 void visitChildren(AstVisitor visitor) { |
| 10188 super.visitChildren(visitor); | 10188 super.visitChildren(visitor); |
| 10189 _safelyVisitChild(_name, visitor); | 10189 _safelyVisitChild(_name, visitor); |
| 10190 _safelyVisitChild(_bound, visitor); | 10190 _safelyVisitChild(_bound, visitor); |
| 10191 } | 10191 } |
| 10192 } | 10192 } |
| 10193 | 10193 |
| 10194 /** | 10194 /** |
| 10195 * Type parameters within a declaration. | 10195 * Type parameters within a declaration. |
| 10196 * | 10196 * |
| 10197 * > typeParameterList ::= | 10197 * typeParameterList ::= |
| 10198 * > '<' [TypeParameter] (',' [TypeParameter])* '>' | 10198 * '<' [TypeParameter] (',' [TypeParameter])* '>' |
| 10199 */ | 10199 */ |
| 10200 class TypeParameterListImpl extends AstNodeImpl implements TypeParameterList { | 10200 class TypeParameterListImpl extends AstNodeImpl implements TypeParameterList { |
| 10201 /** | 10201 /** |
| 10202 * The left angle bracket. | 10202 * The left angle bracket. |
| 10203 */ | 10203 */ |
| 10204 final Token leftBracket; | 10204 final Token leftBracket; |
| 10205 | 10205 |
| 10206 /** | 10206 /** |
| 10207 * The type parameters in the list. | 10207 * The type parameters in the list. |
| 10208 */ | 10208 */ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10241 | 10241 |
| 10242 @override | 10242 @override |
| 10243 void visitChildren(AstVisitor visitor) { | 10243 void visitChildren(AstVisitor visitor) { |
| 10244 _typeParameters.accept(visitor); | 10244 _typeParameters.accept(visitor); |
| 10245 } | 10245 } |
| 10246 } | 10246 } |
| 10247 | 10247 |
| 10248 /** | 10248 /** |
| 10249 * A directive that references a URI. | 10249 * A directive that references a URI. |
| 10250 * | 10250 * |
| 10251 * > uriBasedDirective ::= | 10251 * uriBasedDirective ::= |
| 10252 * > [ExportDirective] | 10252 * [ExportDirective] |
| 10253 * > | [ImportDirective] | 10253 * | [ImportDirective] |
| 10254 * > | [PartDirective] | 10254 * | [PartDirective] |
| 10255 */ | 10255 */ |
| 10256 abstract class UriBasedDirectiveImpl extends DirectiveImpl | 10256 abstract class UriBasedDirectiveImpl extends DirectiveImpl |
| 10257 implements UriBasedDirective { | 10257 implements UriBasedDirective { |
| 10258 /** | 10258 /** |
| 10259 * The prefix of a URI using the `dart-ext` scheme to reference a native code | 10259 * The prefix of a URI using the `dart-ext` scheme to reference a native code |
| 10260 * library. | 10260 * library. |
| 10261 */ | 10261 */ |
| 10262 static String _DART_EXT_SCHEME = "dart-ext:"; | 10262 static String _DART_EXT_SCHEME = "dart-ext:"; |
| 10263 | 10263 |
| 10264 /** | 10264 /** |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10347 const UriValidationCodeImpl(this.name); | 10347 const UriValidationCodeImpl(this.name); |
| 10348 | 10348 |
| 10349 @override | 10349 @override |
| 10350 String toString() => name; | 10350 String toString() => name; |
| 10351 } | 10351 } |
| 10352 | 10352 |
| 10353 /** | 10353 /** |
| 10354 * An identifier that has an initial value associated with it. Instances of this | 10354 * An identifier that has an initial value associated with it. Instances of this |
| 10355 * class are always children of the class [VariableDeclarationList]. | 10355 * class are always children of the class [VariableDeclarationList]. |
| 10356 * | 10356 * |
| 10357 * > variableDeclaration ::= | 10357 * variableDeclaration ::= |
| 10358 * > [SimpleIdentifier] ('=' [Expression])? | 10358 * [SimpleIdentifier] ('=' [Expression])? |
| 10359 * | 10359 * |
| 10360 * TODO(paulberry): the grammar does not allow metadata to be associated with | 10360 * TODO(paulberry): the grammar does not allow metadata to be associated with |
| 10361 * a VariableDeclaration, and currently we don't record comments for it either. | 10361 * a VariableDeclaration, and currently we don't record comments for it either. |
| 10362 * Consider changing the class hierarchy so that [VariableDeclaration] does not | 10362 * Consider changing the class hierarchy so that [VariableDeclaration] does not |
| 10363 * extend [Declaration]. | 10363 * extend [Declaration]. |
| 10364 */ | 10364 */ |
| 10365 class VariableDeclarationImpl extends DeclarationImpl | 10365 class VariableDeclarationImpl extends DeclarationImpl |
| 10366 implements VariableDeclaration { | 10366 implements VariableDeclaration { |
| 10367 /** | 10367 /** |
| 10368 * The name of the variable being declared. | 10368 * The name of the variable being declared. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10465 void visitChildren(AstVisitor visitor) { | 10465 void visitChildren(AstVisitor visitor) { |
| 10466 super.visitChildren(visitor); | 10466 super.visitChildren(visitor); |
| 10467 _safelyVisitChild(_name, visitor); | 10467 _safelyVisitChild(_name, visitor); |
| 10468 _safelyVisitChild(_initializer, visitor); | 10468 _safelyVisitChild(_initializer, visitor); |
| 10469 } | 10469 } |
| 10470 } | 10470 } |
| 10471 | 10471 |
| 10472 /** | 10472 /** |
| 10473 * The declaration of one or more variables of the same type. | 10473 * The declaration of one or more variables of the same type. |
| 10474 * | 10474 * |
| 10475 * > variableDeclarationList ::= | 10475 * variableDeclarationList ::= |
| 10476 * > finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])* | 10476 * finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])* |
| 10477 * > | 10477 * |
| 10478 * > finalConstVarOrType ::= | 10478 * finalConstVarOrType ::= |
| 10479 * > | 'final' [TypeName]? | 10479 * | 'final' [TypeName]? |
| 10480 * > | 'const' [TypeName]? | 10480 * | 'const' [TypeName]? |
| 10481 * > | 'var' | 10481 * | 'var' |
| 10482 * > | [TypeName] | 10482 * | [TypeName] |
| 10483 */ | 10483 */ |
| 10484 class VariableDeclarationListImpl extends AnnotatedNodeImpl | 10484 class VariableDeclarationListImpl extends AnnotatedNodeImpl |
| 10485 implements VariableDeclarationList { | 10485 implements VariableDeclarationList { |
| 10486 /** | 10486 /** |
| 10487 * The token representing the 'final', 'const' or 'var' keyword, or `null` if | 10487 * The token representing the 'final', 'const' or 'var' keyword, or `null` if |
| 10488 * no keyword was included. | 10488 * no keyword was included. |
| 10489 */ | 10489 */ |
| 10490 Token keyword; | 10490 Token keyword; |
| 10491 | 10491 |
| 10492 /** | 10492 /** |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10561 super.visitChildren(visitor); | 10561 super.visitChildren(visitor); |
| 10562 _safelyVisitChild(_type, visitor); | 10562 _safelyVisitChild(_type, visitor); |
| 10563 _variables.accept(visitor); | 10563 _variables.accept(visitor); |
| 10564 } | 10564 } |
| 10565 } | 10565 } |
| 10566 | 10566 |
| 10567 /** | 10567 /** |
| 10568 * A list of variables that are being declared in a context where a statement is | 10568 * A list of variables that are being declared in a context where a statement is |
| 10569 * required. | 10569 * required. |
| 10570 * | 10570 * |
| 10571 * > variableDeclarationStatement ::= | 10571 * variableDeclarationStatement ::= |
| 10572 * > [VariableDeclarationList] ';' | 10572 * [VariableDeclarationList] ';' |
| 10573 */ | 10573 */ |
| 10574 class VariableDeclarationStatementImpl extends StatementImpl | 10574 class VariableDeclarationStatementImpl extends StatementImpl |
| 10575 implements VariableDeclarationStatement { | 10575 implements VariableDeclarationStatement { |
| 10576 /** | 10576 /** |
| 10577 * The variables being declared. | 10577 * The variables being declared. |
| 10578 */ | 10578 */ |
| 10579 VariableDeclarationList _variableList; | 10579 VariableDeclarationList _variableList; |
| 10580 | 10580 |
| 10581 /** | 10581 /** |
| 10582 * The semicolon terminating the statement. | 10582 * The semicolon terminating the statement. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10614 | 10614 |
| 10615 @override | 10615 @override |
| 10616 void visitChildren(AstVisitor visitor) { | 10616 void visitChildren(AstVisitor visitor) { |
| 10617 _safelyVisitChild(_variableList, visitor); | 10617 _safelyVisitChild(_variableList, visitor); |
| 10618 } | 10618 } |
| 10619 } | 10619 } |
| 10620 | 10620 |
| 10621 /** | 10621 /** |
| 10622 * A while statement. | 10622 * A while statement. |
| 10623 * | 10623 * |
| 10624 * > whileStatement ::= | 10624 * whileStatement ::= |
| 10625 * > 'while' '(' [Expression] ')' [Statement] | 10625 * 'while' '(' [Expression] ')' [Statement] |
| 10626 */ | 10626 */ |
| 10627 class WhileStatementImpl extends StatementImpl implements WhileStatement { | 10627 class WhileStatementImpl extends StatementImpl implements WhileStatement { |
| 10628 /** | 10628 /** |
| 10629 * The token representing the 'while' keyword. | 10629 * The token representing the 'while' keyword. |
| 10630 */ | 10630 */ |
| 10631 Token whileKeyword; | 10631 Token whileKeyword; |
| 10632 | 10632 |
| 10633 /** | 10633 /** |
| 10634 * The left parenthesis. | 10634 * The left parenthesis. |
| 10635 */ | 10635 */ |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10695 @override | 10695 @override |
| 10696 void visitChildren(AstVisitor visitor) { | 10696 void visitChildren(AstVisitor visitor) { |
| 10697 _safelyVisitChild(_condition, visitor); | 10697 _safelyVisitChild(_condition, visitor); |
| 10698 _safelyVisitChild(_body, visitor); | 10698 _safelyVisitChild(_body, visitor); |
| 10699 } | 10699 } |
| 10700 } | 10700 } |
| 10701 | 10701 |
| 10702 /** | 10702 /** |
| 10703 * The with clause in a class declaration. | 10703 * The with clause in a class declaration. |
| 10704 * | 10704 * |
| 10705 * > withClause ::= | 10705 * withClause ::= |
| 10706 * > 'with' [TypeName] (',' [TypeName])* | 10706 * 'with' [TypeName] (',' [TypeName])* |
| 10707 */ | 10707 */ |
| 10708 class WithClauseImpl extends AstNodeImpl implements WithClause { | 10708 class WithClauseImpl extends AstNodeImpl implements WithClause { |
| 10709 /** | 10709 /** |
| 10710 * The token representing the 'with' keyword. | 10710 * The token representing the 'with' keyword. |
| 10711 */ | 10711 */ |
| 10712 Token withKeyword; | 10712 Token withKeyword; |
| 10713 | 10713 |
| 10714 /** | 10714 /** |
| 10715 * The names of the mixins that were specified. | 10715 * The names of the mixins that were specified. |
| 10716 */ | 10716 */ |
| (...skipping 26 matching lines...) Expand all Loading... |
| 10743 | 10743 |
| 10744 @override | 10744 @override |
| 10745 void visitChildren(AstVisitor visitor) { | 10745 void visitChildren(AstVisitor visitor) { |
| 10746 _mixinTypes.accept(visitor); | 10746 _mixinTypes.accept(visitor); |
| 10747 } | 10747 } |
| 10748 } | 10748 } |
| 10749 | 10749 |
| 10750 /** | 10750 /** |
| 10751 * A yield statement. | 10751 * A yield statement. |
| 10752 * | 10752 * |
| 10753 * > yieldStatement ::= | 10753 * yieldStatement ::= |
| 10754 * > 'yield' '*'? [Expression] ‘;’ | 10754 * 'yield' '*'? [Expression] ‘;’ |
| 10755 */ | 10755 */ |
| 10756 class YieldStatementImpl extends StatementImpl implements YieldStatement { | 10756 class YieldStatementImpl extends StatementImpl implements YieldStatement { |
| 10757 /** | 10757 /** |
| 10758 * The 'yield' keyword. | 10758 * The 'yield' keyword. |
| 10759 */ | 10759 */ |
| 10760 Token yieldKeyword; | 10760 Token yieldKeyword; |
| 10761 | 10761 |
| 10762 /** | 10762 /** |
| 10763 * The star optionally following the 'yield' keyword. | 10763 * The star optionally following the 'yield' keyword. |
| 10764 */ | 10764 */ |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10815 } | 10815 } |
| 10816 | 10816 |
| 10817 @override | 10817 @override |
| 10818 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); | 10818 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); |
| 10819 | 10819 |
| 10820 @override | 10820 @override |
| 10821 void visitChildren(AstVisitor visitor) { | 10821 void visitChildren(AstVisitor visitor) { |
| 10822 _safelyVisitChild(_expression, visitor); | 10822 _safelyVisitChild(_expression, visitor); |
| 10823 } | 10823 } |
| 10824 } | 10824 } |
| OLD | NEW |