| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 ..addAll(_metadata); | 148 ..addAll(_metadata); |
| 149 } else { | 149 } else { |
| 150 result.addAll(sortedCommentAndAnnotations); | 150 result.addAll(sortedCommentAndAnnotations); |
| 151 } | 151 } |
| 152 return result; | 152 return result; |
| 153 } | 153 } |
| 154 | 154 |
| 155 @override | 155 @override |
| 156 void visitChildren(AstVisitor visitor) { | 156 void visitChildren(AstVisitor visitor) { |
| 157 if (_commentIsBeforeAnnotations()) { | 157 if (_commentIsBeforeAnnotations()) { |
| 158 _safelyVisitChild(_comment, visitor); | 158 _comment?.accept(visitor); |
| 159 _metadata.accept(visitor); | 159 _metadata.accept(visitor); |
| 160 } else { | 160 } else { |
| 161 for (AstNode child in sortedCommentAndAnnotations) { | 161 for (AstNode child in sortedCommentAndAnnotations) { |
| 162 child.accept(visitor); | 162 child.accept(visitor); |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 | 166 |
| 167 /** | 167 /** |
| 168 * Return `true` if there are no annotations before the comment. Note that a | 168 * Return `true` if there are no annotations before the comment. Note that a |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 @override | 302 @override |
| 303 void set name(Identifier name) { | 303 void set name(Identifier name) { |
| 304 _name = _becomeParentOf(name); | 304 _name = _becomeParentOf(name); |
| 305 } | 305 } |
| 306 | 306 |
| 307 @override | 307 @override |
| 308 accept(AstVisitor visitor) => visitor.visitAnnotation(this); | 308 accept(AstVisitor visitor) => visitor.visitAnnotation(this); |
| 309 | 309 |
| 310 @override | 310 @override |
| 311 void visitChildren(AstVisitor visitor) { | 311 void visitChildren(AstVisitor visitor) { |
| 312 _safelyVisitChild(_name, visitor); | 312 _name?.accept(visitor); |
| 313 _safelyVisitChild(_constructorName, visitor); | 313 _constructorName?.accept(visitor); |
| 314 _safelyVisitChild(_arguments, visitor); | 314 _arguments?.accept(visitor); |
| 315 } | 315 } |
| 316 } | 316 } |
| 317 | 317 |
| 318 /** | 318 /** |
| 319 * A list of arguments in the invocation of an executable element (that is, a | 319 * A list of arguments in the invocation of an executable element (that is, a |
| 320 * function, method, or constructor). | 320 * function, method, or constructor). |
| 321 * | 321 * |
| 322 * argumentList ::= | 322 * argumentList ::= |
| 323 * '(' arguments? ')' | 323 * '(' arguments? ')' |
| 324 * | 324 * |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 @override | 528 @override |
| 529 void set type(TypeName name) { | 529 void set type(TypeName name) { |
| 530 _type = _becomeParentOf(name); | 530 _type = _becomeParentOf(name); |
| 531 } | 531 } |
| 532 | 532 |
| 533 @override | 533 @override |
| 534 accept(AstVisitor visitor) => visitor.visitAsExpression(this); | 534 accept(AstVisitor visitor) => visitor.visitAsExpression(this); |
| 535 | 535 |
| 536 @override | 536 @override |
| 537 void visitChildren(AstVisitor visitor) { | 537 void visitChildren(AstVisitor visitor) { |
| 538 _safelyVisitChild(_expression, visitor); | 538 _expression?.accept(visitor); |
| 539 _safelyVisitChild(_type, visitor); | 539 _type?.accept(visitor); |
| 540 } | 540 } |
| 541 } | 541 } |
| 542 | 542 |
| 543 /** | 543 /** |
| 544 * An assert statement. | 544 * An assert statement. |
| 545 * | 545 * |
| 546 * assertStatement ::= | 546 * assertStatement ::= |
| 547 * 'assert' '(' [Expression] ')' ';' | 547 * 'assert' '(' [Expression] ')' ';' |
| 548 */ | 548 */ |
| 549 class AssertStatementImpl extends StatementImpl implements AssertStatement { | 549 class AssertStatementImpl extends StatementImpl implements AssertStatement { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 @override | 633 @override |
| 634 void set message(Expression expression) { | 634 void set message(Expression expression) { |
| 635 _message = _becomeParentOf(expression); | 635 _message = _becomeParentOf(expression); |
| 636 } | 636 } |
| 637 | 637 |
| 638 @override | 638 @override |
| 639 accept(AstVisitor visitor) => visitor.visitAssertStatement(this); | 639 accept(AstVisitor visitor) => visitor.visitAssertStatement(this); |
| 640 | 640 |
| 641 @override | 641 @override |
| 642 void visitChildren(AstVisitor visitor) { | 642 void visitChildren(AstVisitor visitor) { |
| 643 _safelyVisitChild(_condition, visitor); | 643 _condition?.accept(visitor); |
| 644 _safelyVisitChild(message, visitor); | 644 message?.accept(visitor); |
| 645 } | 645 } |
| 646 } | 646 } |
| 647 | 647 |
| 648 /** | 648 /** |
| 649 * An assignment expression. | 649 * An assignment expression. |
| 650 * | 650 * |
| 651 * assignmentExpression ::= | 651 * assignmentExpression ::= |
| 652 * [Expression] operator [Expression] | 652 * [Expression] operator [Expression] |
| 653 */ | 653 */ |
| 654 class AssignmentExpressionImpl extends ExpressionImpl | 654 class AssignmentExpressionImpl extends ExpressionImpl |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 return null; | 820 return null; |
| 821 } | 821 } |
| 822 return parameters[0]; | 822 return parameters[0]; |
| 823 } | 823 } |
| 824 | 824 |
| 825 @override | 825 @override |
| 826 accept(AstVisitor visitor) => visitor.visitAssignmentExpression(this); | 826 accept(AstVisitor visitor) => visitor.visitAssignmentExpression(this); |
| 827 | 827 |
| 828 @override | 828 @override |
| 829 void visitChildren(AstVisitor visitor) { | 829 void visitChildren(AstVisitor visitor) { |
| 830 _safelyVisitChild(_leftHandSide, visitor); | 830 _leftHandSide?.accept(visitor); |
| 831 _safelyVisitChild(_rightHandSide, visitor); | 831 _rightHandSide?.accept(visitor); |
| 832 } | 832 } |
| 833 } | 833 } |
| 834 | 834 |
| 835 /** | 835 /** |
| 836 * A node in the AST structure for a Dart program. | 836 * A node in the AST structure for a Dart program. |
| 837 */ | 837 */ |
| 838 abstract class AstNodeImpl implements AstNode { | 838 abstract class AstNodeImpl implements AstNode { |
| 839 /** | 839 /** |
| 840 * The parent of the node, or `null` if the node is the root of an AST | 840 * The parent of the node, or `null` if the node is the root of an AST |
| 841 * structure. | 841 * structure. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 | 934 |
| 935 /** | 935 /** |
| 936 * Make this node the parent of the given [child] node. Return the child node. | 936 * Make this node the parent of the given [child] node. Return the child node. |
| 937 */ | 937 */ |
| 938 AstNode _becomeParentOf(AstNode child) { | 938 AstNode _becomeParentOf(AstNode child) { |
| 939 if (child != null) { | 939 if (child != null) { |
| 940 (child as AstNodeImpl)._parent = this; | 940 (child as AstNodeImpl)._parent = this; |
| 941 } | 941 } |
| 942 return child; | 942 return child; |
| 943 } | 943 } |
| 944 | |
| 945 /** | |
| 946 * If the given [child] is not `null`, use the given [visitor] to visit it. | |
| 947 */ | |
| 948 void _safelyVisitChild(AstNode child, AstVisitor visitor) { | |
| 949 if (child != null) { | |
| 950 child.accept(visitor); | |
| 951 } | |
| 952 } | |
| 953 } | 944 } |
| 954 | 945 |
| 955 /** | 946 /** |
| 956 * An await expression. | 947 * An await expression. |
| 957 * | 948 * |
| 958 * awaitExpression ::= | 949 * awaitExpression ::= |
| 959 * 'await' [Expression] | 950 * 'await' [Expression] |
| 960 */ | 951 */ |
| 961 class AwaitExpressionImpl extends ExpressionImpl implements AwaitExpression { | 952 class AwaitExpressionImpl extends ExpressionImpl implements AwaitExpression { |
| 962 /** | 953 /** |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 } | 992 } |
| 1002 | 993 |
| 1003 @override | 994 @override |
| 1004 int get precedence => 0; | 995 int get precedence => 0; |
| 1005 | 996 |
| 1006 @override | 997 @override |
| 1007 accept(AstVisitor visitor) => visitor.visitAwaitExpression(this); | 998 accept(AstVisitor visitor) => visitor.visitAwaitExpression(this); |
| 1008 | 999 |
| 1009 @override | 1000 @override |
| 1010 void visitChildren(AstVisitor visitor) { | 1001 void visitChildren(AstVisitor visitor) { |
| 1011 _safelyVisitChild(_expression, visitor); | 1002 _expression?.accept(visitor); |
| 1012 } | 1003 } |
| 1013 } | 1004 } |
| 1014 | 1005 |
| 1015 /** | 1006 /** |
| 1016 * A binary (infix) expression. | 1007 * A binary (infix) expression. |
| 1017 * | 1008 * |
| 1018 * binaryExpression ::= | 1009 * binaryExpression ::= |
| 1019 * [Expression] [Token] [Expression] | 1010 * [Expression] [Token] [Expression] |
| 1020 */ | 1011 */ |
| 1021 class BinaryExpressionImpl extends ExpressionImpl implements BinaryExpression { | 1012 class BinaryExpressionImpl extends ExpressionImpl implements BinaryExpression { |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 return null; | 1122 return null; |
| 1132 } | 1123 } |
| 1133 return parameters[0]; | 1124 return parameters[0]; |
| 1134 } | 1125 } |
| 1135 | 1126 |
| 1136 @override | 1127 @override |
| 1137 accept(AstVisitor visitor) => visitor.visitBinaryExpression(this); | 1128 accept(AstVisitor visitor) => visitor.visitBinaryExpression(this); |
| 1138 | 1129 |
| 1139 @override | 1130 @override |
| 1140 void visitChildren(AstVisitor visitor) { | 1131 void visitChildren(AstVisitor visitor) { |
| 1141 _safelyVisitChild(_leftOperand, visitor); | 1132 _leftOperand?.accept(visitor); |
| 1142 _safelyVisitChild(_rightOperand, visitor); | 1133 _rightOperand?.accept(visitor); |
| 1143 } | 1134 } |
| 1144 } | 1135 } |
| 1145 | 1136 |
| 1146 /** | 1137 /** |
| 1147 * A function body that consists of a block of statements. | 1138 * A function body that consists of a block of statements. |
| 1148 * | 1139 * |
| 1149 * blockFunctionBody ::= | 1140 * blockFunctionBody ::= |
| 1150 * ('async' | 'async' '*' | 'sync' '*')? [Block] | 1141 * ('async' | 'async' '*' | 'sync' '*')? [Block] |
| 1151 */ | 1142 */ |
| 1152 class BlockFunctionBodyImpl extends FunctionBodyImpl | 1143 class BlockFunctionBodyImpl extends FunctionBodyImpl |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 bool get isGenerator => star != null; | 1201 bool get isGenerator => star != null; |
| 1211 | 1202 |
| 1212 @override | 1203 @override |
| 1213 bool get isSynchronous => keyword == null || keyword.lexeme != Parser.ASYNC; | 1204 bool get isSynchronous => keyword == null || keyword.lexeme != Parser.ASYNC; |
| 1214 | 1205 |
| 1215 @override | 1206 @override |
| 1216 accept(AstVisitor visitor) => visitor.visitBlockFunctionBody(this); | 1207 accept(AstVisitor visitor) => visitor.visitBlockFunctionBody(this); |
| 1217 | 1208 |
| 1218 @override | 1209 @override |
| 1219 void visitChildren(AstVisitor visitor) { | 1210 void visitChildren(AstVisitor visitor) { |
| 1220 _safelyVisitChild(_block, visitor); | 1211 _block?.accept(visitor); |
| 1221 } | 1212 } |
| 1222 } | 1213 } |
| 1223 | 1214 |
| 1224 /** | 1215 /** |
| 1225 * A sequence of statements. | 1216 * A sequence of statements. |
| 1226 * | 1217 * |
| 1227 * block ::= | 1218 * block ::= |
| 1228 * '{' statement* '}' | 1219 * '{' statement* '}' |
| 1229 */ | 1220 */ |
| 1230 class BlockImpl extends StatementImpl implements Block { | 1221 class BlockImpl extends StatementImpl implements Block { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 @override | 1373 @override |
| 1383 void set label(SimpleIdentifier identifier) { | 1374 void set label(SimpleIdentifier identifier) { |
| 1384 _label = _becomeParentOf(identifier); | 1375 _label = _becomeParentOf(identifier); |
| 1385 } | 1376 } |
| 1386 | 1377 |
| 1387 @override | 1378 @override |
| 1388 accept(AstVisitor visitor) => visitor.visitBreakStatement(this); | 1379 accept(AstVisitor visitor) => visitor.visitBreakStatement(this); |
| 1389 | 1380 |
| 1390 @override | 1381 @override |
| 1391 void visitChildren(AstVisitor visitor) { | 1382 void visitChildren(AstVisitor visitor) { |
| 1392 _safelyVisitChild(_label, visitor); | 1383 _label?.accept(visitor); |
| 1393 } | 1384 } |
| 1394 } | 1385 } |
| 1395 | 1386 |
| 1396 /** | 1387 /** |
| 1397 * A sequence of cascaded expressions: expressions that share a common target. | 1388 * A sequence of cascaded expressions: expressions that share a common target. |
| 1398 * There are three kinds of expressions that can be used in a cascade | 1389 * There are three kinds of expressions that can be used in a cascade |
| 1399 * expression: [IndexExpression], [MethodInvocation] and [PropertyAccess]. | 1390 * expression: [IndexExpression], [MethodInvocation] and [PropertyAccess]. |
| 1400 * | 1391 * |
| 1401 * cascadeExpression ::= | 1392 * cascadeExpression ::= |
| 1402 * [Expression] cascadeSection* | 1393 * [Expression] cascadeSection* |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 @override | 1444 @override |
| 1454 void set target(Expression target) { | 1445 void set target(Expression target) { |
| 1455 _target = _becomeParentOf(target); | 1446 _target = _becomeParentOf(target); |
| 1456 } | 1447 } |
| 1457 | 1448 |
| 1458 @override | 1449 @override |
| 1459 accept(AstVisitor visitor) => visitor.visitCascadeExpression(this); | 1450 accept(AstVisitor visitor) => visitor.visitCascadeExpression(this); |
| 1460 | 1451 |
| 1461 @override | 1452 @override |
| 1462 void visitChildren(AstVisitor visitor) { | 1453 void visitChildren(AstVisitor visitor) { |
| 1463 _safelyVisitChild(_target, visitor); | 1454 _target?.accept(visitor); |
| 1464 _cascadeSections.accept(visitor); | 1455 _cascadeSections.accept(visitor); |
| 1465 } | 1456 } |
| 1466 } | 1457 } |
| 1467 | 1458 |
| 1468 /** | 1459 /** |
| 1469 * A catch clause within a try statement. | 1460 * A catch clause within a try statement. |
| 1470 * | 1461 * |
| 1471 * onPart ::= | 1462 * onPart ::= |
| 1472 * catchPart [Block] | 1463 * catchPart [Block] |
| 1473 * | 'on' type catchPart? [Block] | 1464 * | 'on' type catchPart? [Block] |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1607 @override | 1598 @override |
| 1608 void set stackTraceParameter(SimpleIdentifier parameter) { | 1599 void set stackTraceParameter(SimpleIdentifier parameter) { |
| 1609 _stackTraceParameter = _becomeParentOf(parameter); | 1600 _stackTraceParameter = _becomeParentOf(parameter); |
| 1610 } | 1601 } |
| 1611 | 1602 |
| 1612 @override | 1603 @override |
| 1613 accept(AstVisitor visitor) => visitor.visitCatchClause(this); | 1604 accept(AstVisitor visitor) => visitor.visitCatchClause(this); |
| 1614 | 1605 |
| 1615 @override | 1606 @override |
| 1616 void visitChildren(AstVisitor visitor) { | 1607 void visitChildren(AstVisitor visitor) { |
| 1617 _safelyVisitChild(_exceptionType, visitor); | 1608 _exceptionType?.accept(visitor); |
| 1618 _safelyVisitChild(_exceptionParameter, visitor); | 1609 _exceptionParameter?.accept(visitor); |
| 1619 _safelyVisitChild(_stackTraceParameter, visitor); | 1610 _stackTraceParameter?.accept(visitor); |
| 1620 _safelyVisitChild(_body, visitor); | 1611 _body?.accept(visitor); |
| 1621 } | 1612 } |
| 1622 } | 1613 } |
| 1623 | 1614 |
| 1624 /** | 1615 /** |
| 1625 * Helper class to allow iteration of child entities of an AST node. | 1616 * Helper class to allow iteration of child entities of an AST node. |
| 1626 */ | 1617 */ |
| 1627 class ChildEntities extends Object with IterableMixin implements Iterable { | 1618 class ChildEntities extends Object with IterableMixin implements Iterable { |
| 1628 /** | 1619 /** |
| 1629 * The list of child entities to be iterated over. | 1620 * The list of child entities to be iterated over. |
| 1630 */ | 1621 */ |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1877 return method; | 1868 return method; |
| 1878 } | 1869 } |
| 1879 } | 1870 } |
| 1880 } | 1871 } |
| 1881 return null; | 1872 return null; |
| 1882 } | 1873 } |
| 1883 | 1874 |
| 1884 @override | 1875 @override |
| 1885 void visitChildren(AstVisitor visitor) { | 1876 void visitChildren(AstVisitor visitor) { |
| 1886 super.visitChildren(visitor); | 1877 super.visitChildren(visitor); |
| 1887 _safelyVisitChild(_name, visitor); | 1878 _name?.accept(visitor); |
| 1888 _safelyVisitChild(_typeParameters, visitor); | 1879 _typeParameters?.accept(visitor); |
| 1889 _safelyVisitChild(_extendsClause, visitor); | 1880 _extendsClause?.accept(visitor); |
| 1890 _safelyVisitChild(_withClause, visitor); | 1881 _withClause?.accept(visitor); |
| 1891 _safelyVisitChild(_implementsClause, visitor); | 1882 _implementsClause?.accept(visitor); |
| 1892 _safelyVisitChild(_nativeClause, visitor); | 1883 _nativeClause?.accept(visitor); |
| 1893 members.accept(visitor); | 1884 members.accept(visitor); |
| 1894 } | 1885 } |
| 1895 } | 1886 } |
| 1896 | 1887 |
| 1897 /** | 1888 /** |
| 1898 * A node that declares a name within the scope of a class. | 1889 * A node that declares a name within the scope of a class. |
| 1899 */ | 1890 */ |
| 1900 abstract class ClassMemberImpl extends DeclarationImpl implements ClassMember { | 1891 abstract class ClassMemberImpl extends DeclarationImpl implements ClassMember { |
| 1901 /** | 1892 /** |
| 1902 * Initialize a newly created member of a class. Either or both of the | 1893 * Initialize a newly created member of a class. Either or both of the |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2037 void set withClause(WithClause withClause) { | 2028 void set withClause(WithClause withClause) { |
| 2038 _withClause = _becomeParentOf(withClause); | 2029 _withClause = _becomeParentOf(withClause); |
| 2039 } | 2030 } |
| 2040 | 2031 |
| 2041 @override | 2032 @override |
| 2042 accept(AstVisitor visitor) => visitor.visitClassTypeAlias(this); | 2033 accept(AstVisitor visitor) => visitor.visitClassTypeAlias(this); |
| 2043 | 2034 |
| 2044 @override | 2035 @override |
| 2045 void visitChildren(AstVisitor visitor) { | 2036 void visitChildren(AstVisitor visitor) { |
| 2046 super.visitChildren(visitor); | 2037 super.visitChildren(visitor); |
| 2047 _safelyVisitChild(_name, visitor); | 2038 _name?.accept(visitor); |
| 2048 _safelyVisitChild(_typeParameters, visitor); | 2039 _typeParameters?.accept(visitor); |
| 2049 _safelyVisitChild(_superclass, visitor); | 2040 _superclass?.accept(visitor); |
| 2050 _safelyVisitChild(_withClause, visitor); | 2041 _withClause?.accept(visitor); |
| 2051 _safelyVisitChild(_implementsClause, visitor); | 2042 _implementsClause?.accept(visitor); |
| 2052 } | 2043 } |
| 2053 } | 2044 } |
| 2054 | 2045 |
| 2055 /** | 2046 /** |
| 2056 * A combinator associated with an import or export directive. | 2047 * A combinator associated with an import or export directive. |
| 2057 * | 2048 * |
| 2058 * combinator ::= | 2049 * combinator ::= |
| 2059 * [HideCombinator] | 2050 * [HideCombinator] |
| 2060 * | [ShowCombinator] | 2051 * | [ShowCombinator] |
| 2061 */ | 2052 */ |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2223 @override | 2214 @override |
| 2224 void set identifier(Identifier identifier) { | 2215 void set identifier(Identifier identifier) { |
| 2225 _identifier = _becomeParentOf(identifier); | 2216 _identifier = _becomeParentOf(identifier); |
| 2226 } | 2217 } |
| 2227 | 2218 |
| 2228 @override | 2219 @override |
| 2229 accept(AstVisitor visitor) => visitor.visitCommentReference(this); | 2220 accept(AstVisitor visitor) => visitor.visitCommentReference(this); |
| 2230 | 2221 |
| 2231 @override | 2222 @override |
| 2232 void visitChildren(AstVisitor visitor) { | 2223 void visitChildren(AstVisitor visitor) { |
| 2233 _safelyVisitChild(_identifier, visitor); | 2224 _identifier?.accept(visitor); |
| 2234 } | 2225 } |
| 2235 } | 2226 } |
| 2236 | 2227 |
| 2237 /** | 2228 /** |
| 2238 * The possible types of comments that are recognized by the parser. | 2229 * The possible types of comments that are recognized by the parser. |
| 2239 */ | 2230 */ |
| 2240 class CommentType { | 2231 class CommentType { |
| 2241 /** | 2232 /** |
| 2242 * A block comment. | 2233 * A block comment. |
| 2243 */ | 2234 */ |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2408 Directive lastDirective = _directives[_directives.length - 1]; | 2399 Directive lastDirective = _directives[_directives.length - 1]; |
| 2409 CompilationUnitMember firstDeclaration = _declarations[0]; | 2400 CompilationUnitMember firstDeclaration = _declarations[0]; |
| 2410 return lastDirective.offset < firstDeclaration.offset; | 2401 return lastDirective.offset < firstDeclaration.offset; |
| 2411 } | 2402 } |
| 2412 | 2403 |
| 2413 @override | 2404 @override |
| 2414 accept(AstVisitor visitor) => visitor.visitCompilationUnit(this); | 2405 accept(AstVisitor visitor) => visitor.visitCompilationUnit(this); |
| 2415 | 2406 |
| 2416 @override | 2407 @override |
| 2417 void visitChildren(AstVisitor visitor) { | 2408 void visitChildren(AstVisitor visitor) { |
| 2418 _safelyVisitChild(_scriptTag, visitor); | 2409 _scriptTag?.accept(visitor); |
| 2419 if (_directivesAreBeforeDeclarations) { | 2410 if (_directivesAreBeforeDeclarations) { |
| 2420 _directives.accept(visitor); | 2411 _directives.accept(visitor); |
| 2421 _declarations.accept(visitor); | 2412 _declarations.accept(visitor); |
| 2422 } else { | 2413 } else { |
| 2423 for (AstNode child in sortedDirectivesAndDeclarations) { | 2414 for (AstNode child in sortedDirectivesAndDeclarations) { |
| 2424 child.accept(visitor); | 2415 child.accept(visitor); |
| 2425 } | 2416 } |
| 2426 } | 2417 } |
| 2427 } | 2418 } |
| 2428 } | 2419 } |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2534 @override | 2525 @override |
| 2535 void set thenExpression(Expression expression) { | 2526 void set thenExpression(Expression expression) { |
| 2536 _thenExpression = _becomeParentOf(expression); | 2527 _thenExpression = _becomeParentOf(expression); |
| 2537 } | 2528 } |
| 2538 | 2529 |
| 2539 @override | 2530 @override |
| 2540 accept(AstVisitor visitor) => visitor.visitConditionalExpression(this); | 2531 accept(AstVisitor visitor) => visitor.visitConditionalExpression(this); |
| 2541 | 2532 |
| 2542 @override | 2533 @override |
| 2543 void visitChildren(AstVisitor visitor) { | 2534 void visitChildren(AstVisitor visitor) { |
| 2544 _safelyVisitChild(_condition, visitor); | 2535 _condition?.accept(visitor); |
| 2545 _safelyVisitChild(_thenExpression, visitor); | 2536 _thenExpression?.accept(visitor); |
| 2546 _safelyVisitChild(_elseExpression, visitor); | 2537 _elseExpression?.accept(visitor); |
| 2547 } | 2538 } |
| 2548 } | 2539 } |
| 2549 | 2540 |
| 2550 /** | 2541 /** |
| 2551 * A configuration in either an import or export directive. | 2542 * A configuration in either an import or export directive. |
| 2552 * | 2543 * |
| 2553 * configuration ::= | 2544 * configuration ::= |
| 2554 * 'if' '(' test ')' uri | 2545 * 'if' '(' test ')' uri |
| 2555 * | 2546 * |
| 2556 * test ::= | 2547 * test ::= |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2623 @override | 2614 @override |
| 2624 void set value(StringLiteral value) { | 2615 void set value(StringLiteral value) { |
| 2625 _value = _becomeParentOf(value); | 2616 _value = _becomeParentOf(value); |
| 2626 } | 2617 } |
| 2627 | 2618 |
| 2628 @override | 2619 @override |
| 2629 accept(AstVisitor visitor) => visitor.visitConfiguration(this); | 2620 accept(AstVisitor visitor) => visitor.visitConfiguration(this); |
| 2630 | 2621 |
| 2631 @override | 2622 @override |
| 2632 void visitChildren(AstVisitor visitor) { | 2623 void visitChildren(AstVisitor visitor) { |
| 2633 _safelyVisitChild(_name, visitor); | 2624 _name?.accept(visitor); |
| 2634 _safelyVisitChild(_value, visitor); | 2625 _value?.accept(visitor); |
| 2635 _safelyVisitChild(_libraryUri, visitor); | 2626 _libraryUri?.accept(visitor); |
| 2636 } | 2627 } |
| 2637 } | 2628 } |
| 2638 | 2629 |
| 2639 /** | 2630 /** |
| 2640 * A constructor declaration. | 2631 * A constructor declaration. |
| 2641 * | 2632 * |
| 2642 * constructorDeclaration ::= | 2633 * constructorDeclaration ::= |
| 2643 * constructorSignature [FunctionBody]? | 2634 * constructorSignature [FunctionBody]? |
| 2644 * | constructorName formalParameterList ':' 'this' ('.' [SimpleIdentifier]
)? arguments | 2635 * | constructorName formalParameterList ':' 'this' ('.' [SimpleIdentifier]
)? arguments |
| 2645 * | 2636 * |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2851 void set returnType(Identifier typeName) { | 2842 void set returnType(Identifier typeName) { |
| 2852 _returnType = _becomeParentOf(typeName); | 2843 _returnType = _becomeParentOf(typeName); |
| 2853 } | 2844 } |
| 2854 | 2845 |
| 2855 @override | 2846 @override |
| 2856 accept(AstVisitor visitor) => visitor.visitConstructorDeclaration(this); | 2847 accept(AstVisitor visitor) => visitor.visitConstructorDeclaration(this); |
| 2857 | 2848 |
| 2858 @override | 2849 @override |
| 2859 void visitChildren(AstVisitor visitor) { | 2850 void visitChildren(AstVisitor visitor) { |
| 2860 super.visitChildren(visitor); | 2851 super.visitChildren(visitor); |
| 2861 _safelyVisitChild(_returnType, visitor); | 2852 _returnType?.accept(visitor); |
| 2862 _safelyVisitChild(_name, visitor); | 2853 _name?.accept(visitor); |
| 2863 _safelyVisitChild(_parameters, visitor); | 2854 _parameters?.accept(visitor); |
| 2864 _initializers.accept(visitor); | 2855 _initializers.accept(visitor); |
| 2865 _safelyVisitChild(_redirectedConstructor, visitor); | 2856 _redirectedConstructor?.accept(visitor); |
| 2866 _safelyVisitChild(_body, visitor); | 2857 _body?.accept(visitor); |
| 2867 } | 2858 } |
| 2868 } | 2859 } |
| 2869 | 2860 |
| 2870 /** | 2861 /** |
| 2871 * The initialization of a field within a constructor's initialization list. | 2862 * The initialization of a field within a constructor's initialization list. |
| 2872 * | 2863 * |
| 2873 * fieldInitializer ::= | 2864 * fieldInitializer ::= |
| 2874 * ('this' '.')? [SimpleIdentifier] '=' [Expression] | 2865 * ('this' '.')? [SimpleIdentifier] '=' [Expression] |
| 2875 */ | 2866 */ |
| 2876 class ConstructorFieldInitializerImpl extends ConstructorInitializerImpl | 2867 class ConstructorFieldInitializerImpl extends ConstructorInitializerImpl |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2948 @override | 2939 @override |
| 2949 void set fieldName(SimpleIdentifier identifier) { | 2940 void set fieldName(SimpleIdentifier identifier) { |
| 2950 _fieldName = _becomeParentOf(identifier); | 2941 _fieldName = _becomeParentOf(identifier); |
| 2951 } | 2942 } |
| 2952 | 2943 |
| 2953 @override | 2944 @override |
| 2954 accept(AstVisitor visitor) => visitor.visitConstructorFieldInitializer(this); | 2945 accept(AstVisitor visitor) => visitor.visitConstructorFieldInitializer(this); |
| 2955 | 2946 |
| 2956 @override | 2947 @override |
| 2957 void visitChildren(AstVisitor visitor) { | 2948 void visitChildren(AstVisitor visitor) { |
| 2958 _safelyVisitChild(_fieldName, visitor); | 2949 _fieldName?.accept(visitor); |
| 2959 _safelyVisitChild(_expression, visitor); | 2950 _expression?.accept(visitor); |
| 2960 } | 2951 } |
| 2961 } | 2952 } |
| 2962 | 2953 |
| 2963 /** | 2954 /** |
| 2964 * A node that can occur in the initializer list of a constructor declaration. | 2955 * A node that can occur in the initializer list of a constructor declaration. |
| 2965 * | 2956 * |
| 2966 * constructorInitializer ::= | 2957 * constructorInitializer ::= |
| 2967 * [SuperConstructorInvocation] | 2958 * [SuperConstructorInvocation] |
| 2968 * | [ConstructorFieldInitializer] | 2959 * | [ConstructorFieldInitializer] |
| 2969 * | [RedirectingConstructorInvocation] | 2960 * | [RedirectingConstructorInvocation] |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3042 @override | 3033 @override |
| 3043 void set type(TypeName type) { | 3034 void set type(TypeName type) { |
| 3044 _type = _becomeParentOf(type); | 3035 _type = _becomeParentOf(type); |
| 3045 } | 3036 } |
| 3046 | 3037 |
| 3047 @override | 3038 @override |
| 3048 accept(AstVisitor visitor) => visitor.visitConstructorName(this); | 3039 accept(AstVisitor visitor) => visitor.visitConstructorName(this); |
| 3049 | 3040 |
| 3050 @override | 3041 @override |
| 3051 void visitChildren(AstVisitor visitor) { | 3042 void visitChildren(AstVisitor visitor) { |
| 3052 _safelyVisitChild(_type, visitor); | 3043 _type?.accept(visitor); |
| 3053 _safelyVisitChild(_name, visitor); | 3044 _name?.accept(visitor); |
| 3054 } | 3045 } |
| 3055 } | 3046 } |
| 3056 | 3047 |
| 3057 /** | 3048 /** |
| 3058 * A continue statement. | 3049 * A continue statement. |
| 3059 * | 3050 * |
| 3060 * continueStatement ::= | 3051 * continueStatement ::= |
| 3061 * 'continue' [SimpleIdentifier]? ';' | 3052 * 'continue' [SimpleIdentifier]? ';' |
| 3062 */ | 3053 */ |
| 3063 class ContinueStatementImpl extends StatementImpl implements ContinueStatement { | 3054 class ContinueStatementImpl extends StatementImpl implements ContinueStatement { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3113 @override | 3104 @override |
| 3114 void set label(SimpleIdentifier identifier) { | 3105 void set label(SimpleIdentifier identifier) { |
| 3115 _label = _becomeParentOf(identifier); | 3106 _label = _becomeParentOf(identifier); |
| 3116 } | 3107 } |
| 3117 | 3108 |
| 3118 @override | 3109 @override |
| 3119 accept(AstVisitor visitor) => visitor.visitContinueStatement(this); | 3110 accept(AstVisitor visitor) => visitor.visitContinueStatement(this); |
| 3120 | 3111 |
| 3121 @override | 3112 @override |
| 3122 void visitChildren(AstVisitor visitor) { | 3113 void visitChildren(AstVisitor visitor) { |
| 3123 _safelyVisitChild(_label, visitor); | 3114 _label?.accept(visitor); |
| 3124 } | 3115 } |
| 3125 } | 3116 } |
| 3126 | 3117 |
| 3127 /** | 3118 /** |
| 3128 * A node that represents the declaration of one or more names. Each declared | 3119 * A node that represents the declaration of one or more names. Each declared |
| 3129 * name is visible within a name scope. | 3120 * name is visible within a name scope. |
| 3130 */ | 3121 */ |
| 3131 abstract class DeclarationImpl extends AnnotatedNodeImpl | 3122 abstract class DeclarationImpl extends AnnotatedNodeImpl |
| 3132 implements Declaration { | 3123 implements Declaration { |
| 3133 /** | 3124 /** |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3228 void set type(TypeName typeName) { | 3219 void set type(TypeName typeName) { |
| 3229 _type = _becomeParentOf(typeName); | 3220 _type = _becomeParentOf(typeName); |
| 3230 } | 3221 } |
| 3231 | 3222 |
| 3232 @override | 3223 @override |
| 3233 accept(AstVisitor visitor) => visitor.visitDeclaredIdentifier(this); | 3224 accept(AstVisitor visitor) => visitor.visitDeclaredIdentifier(this); |
| 3234 | 3225 |
| 3235 @override | 3226 @override |
| 3236 void visitChildren(AstVisitor visitor) { | 3227 void visitChildren(AstVisitor visitor) { |
| 3237 super.visitChildren(visitor); | 3228 super.visitChildren(visitor); |
| 3238 _safelyVisitChild(_type, visitor); | 3229 _type?.accept(visitor); |
| 3239 _safelyVisitChild(_identifier, visitor); | 3230 _identifier?.accept(visitor); |
| 3240 } | 3231 } |
| 3241 } | 3232 } |
| 3242 | 3233 |
| 3243 /** | 3234 /** |
| 3244 * A formal parameter with a default value. There are two kinds of parameters | 3235 * A formal parameter with a default value. There are two kinds of parameters |
| 3245 * that are both represented by this class: named formal parameters and | 3236 * that are both represented by this class: named formal parameters and |
| 3246 * positional formal parameters. | 3237 * positional formal parameters. |
| 3247 * | 3238 * |
| 3248 * defaultFormalParameter ::= | 3239 * defaultFormalParameter ::= |
| 3249 * [NormalFormalParameter] ('=' [Expression])? | 3240 * [NormalFormalParameter] ('=' [Expression])? |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3328 @override | 3319 @override |
| 3329 void set parameter(NormalFormalParameter formalParameter) { | 3320 void set parameter(NormalFormalParameter formalParameter) { |
| 3330 _parameter = _becomeParentOf(formalParameter); | 3321 _parameter = _becomeParentOf(formalParameter); |
| 3331 } | 3322 } |
| 3332 | 3323 |
| 3333 @override | 3324 @override |
| 3334 accept(AstVisitor visitor) => visitor.visitDefaultFormalParameter(this); | 3325 accept(AstVisitor visitor) => visitor.visitDefaultFormalParameter(this); |
| 3335 | 3326 |
| 3336 @override | 3327 @override |
| 3337 void visitChildren(AstVisitor visitor) { | 3328 void visitChildren(AstVisitor visitor) { |
| 3338 _safelyVisitChild(_parameter, visitor); | 3329 _parameter?.accept(visitor); |
| 3339 _safelyVisitChild(_defaultValue, visitor); | 3330 _defaultValue?.accept(visitor); |
| 3340 } | 3331 } |
| 3341 } | 3332 } |
| 3342 | 3333 |
| 3343 /** | 3334 /** |
| 3344 * A node that represents a directive. | 3335 * A node that represents a directive. |
| 3345 * | 3336 * |
| 3346 * directive ::= | 3337 * directive ::= |
| 3347 * [ExportDirective] | 3338 * [ExportDirective] |
| 3348 * | [ImportDirective] | 3339 * | [ImportDirective] |
| 3349 * | [LibraryDirective] | 3340 * | [LibraryDirective] |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3458 } | 3449 } |
| 3459 | 3450 |
| 3460 @override | 3451 @override |
| 3461 Token get endToken => semicolon; | 3452 Token get endToken => semicolon; |
| 3462 | 3453 |
| 3463 @override | 3454 @override |
| 3464 accept(AstVisitor visitor) => visitor.visitDoStatement(this); | 3455 accept(AstVisitor visitor) => visitor.visitDoStatement(this); |
| 3465 | 3456 |
| 3466 @override | 3457 @override |
| 3467 void visitChildren(AstVisitor visitor) { | 3458 void visitChildren(AstVisitor visitor) { |
| 3468 _safelyVisitChild(_body, visitor); | 3459 _body?.accept(visitor); |
| 3469 _safelyVisitChild(_condition, visitor); | 3460 _condition?.accept(visitor); |
| 3470 } | 3461 } |
| 3471 } | 3462 } |
| 3472 | 3463 |
| 3473 /** | 3464 /** |
| 3474 * A dotted name, used in a configuration within an import or export directive. | 3465 * A dotted name, used in a configuration within an import or export directive. |
| 3475 * | 3466 * |
| 3476 * dottedName ::= | 3467 * dottedName ::= |
| 3477 * [SimpleIdentifier] ('.' [SimpleIdentifier])* | 3468 * [SimpleIdentifier] ('.' [SimpleIdentifier])* |
| 3478 */ | 3469 */ |
| 3479 class DottedNameImpl extends AstNodeImpl implements DottedName { | 3470 class DottedNameImpl extends AstNodeImpl implements DottedName { |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3673 void set name(SimpleIdentifier name) { | 3664 void set name(SimpleIdentifier name) { |
| 3674 _name = _becomeParentOf(name); | 3665 _name = _becomeParentOf(name); |
| 3675 } | 3666 } |
| 3676 | 3667 |
| 3677 @override | 3668 @override |
| 3678 accept(AstVisitor visitor) => visitor.visitEnumConstantDeclaration(this); | 3669 accept(AstVisitor visitor) => visitor.visitEnumConstantDeclaration(this); |
| 3679 | 3670 |
| 3680 @override | 3671 @override |
| 3681 void visitChildren(AstVisitor visitor) { | 3672 void visitChildren(AstVisitor visitor) { |
| 3682 super.visitChildren(visitor); | 3673 super.visitChildren(visitor); |
| 3683 _safelyVisitChild(_name, visitor); | 3674 _name?.accept(visitor); |
| 3684 } | 3675 } |
| 3685 } | 3676 } |
| 3686 | 3677 |
| 3687 /** | 3678 /** |
| 3688 * The declaration of an enumeration. | 3679 * The declaration of an enumeration. |
| 3689 * | 3680 * |
| 3690 * enumType ::= | 3681 * enumType ::= |
| 3691 * metadata 'enum' [SimpleIdentifier] '{' [SimpleIdentifier] (',' [Simple
Identifier])* (',')? '}' | 3682 * metadata 'enum' [SimpleIdentifier] '{' [SimpleIdentifier] (',' [Simple
Identifier])* (',')? '}' |
| 3692 */ | 3683 */ |
| 3693 class EnumDeclarationImpl extends NamedCompilationUnitMemberImpl | 3684 class EnumDeclarationImpl extends NamedCompilationUnitMemberImpl |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3754 | 3745 |
| 3755 @override | 3746 @override |
| 3756 Token get firstTokenAfterCommentAndMetadata => enumKeyword; | 3747 Token get firstTokenAfterCommentAndMetadata => enumKeyword; |
| 3757 | 3748 |
| 3758 @override | 3749 @override |
| 3759 accept(AstVisitor visitor) => visitor.visitEnumDeclaration(this); | 3750 accept(AstVisitor visitor) => visitor.visitEnumDeclaration(this); |
| 3760 | 3751 |
| 3761 @override | 3752 @override |
| 3762 void visitChildren(AstVisitor visitor) { | 3753 void visitChildren(AstVisitor visitor) { |
| 3763 super.visitChildren(visitor); | 3754 super.visitChildren(visitor); |
| 3764 _safelyVisitChild(_name, visitor); | 3755 _name?.accept(visitor); |
| 3765 _constants.accept(visitor); | 3756 _constants.accept(visitor); |
| 3766 } | 3757 } |
| 3767 } | 3758 } |
| 3768 | 3759 |
| 3769 /** | 3760 /** |
| 3770 * Ephemeral identifiers are created as needed to mimic the presence of an empty | 3761 * Ephemeral identifiers are created as needed to mimic the presence of an empty |
| 3771 * identifier. | 3762 * identifier. |
| 3772 */ | 3763 */ |
| 3773 class EphemeralIdentifier extends SimpleIdentifierImpl { | 3764 class EphemeralIdentifier extends SimpleIdentifierImpl { |
| 3774 EphemeralIdentifier(AstNode parent, int location) | 3765 EphemeralIdentifier(AstNode parent, int location) |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3907 bool get isAsynchronous => keyword != null; | 3898 bool get isAsynchronous => keyword != null; |
| 3908 | 3899 |
| 3909 @override | 3900 @override |
| 3910 bool get isSynchronous => keyword == null; | 3901 bool get isSynchronous => keyword == null; |
| 3911 | 3902 |
| 3912 @override | 3903 @override |
| 3913 accept(AstVisitor visitor) => visitor.visitExpressionFunctionBody(this); | 3904 accept(AstVisitor visitor) => visitor.visitExpressionFunctionBody(this); |
| 3914 | 3905 |
| 3915 @override | 3906 @override |
| 3916 void visitChildren(AstVisitor visitor) { | 3907 void visitChildren(AstVisitor visitor) { |
| 3917 _safelyVisitChild(_expression, visitor); | 3908 _expression?.accept(visitor); |
| 3918 } | 3909 } |
| 3919 } | 3910 } |
| 3920 | 3911 |
| 3921 /** | 3912 /** |
| 3922 * A node that represents an expression. | 3913 * A node that represents an expression. |
| 3923 * | 3914 * |
| 3924 * expression ::= | 3915 * expression ::= |
| 3925 * [AssignmentExpression] | 3916 * [AssignmentExpression] |
| 3926 * | [ConditionalExpression] cascadeSection* | 3917 * | [ConditionalExpression] cascadeSection* |
| 3927 * | [ThrowExpression] | 3918 * | [ThrowExpression] |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4070 } | 4061 } |
| 4071 | 4062 |
| 4072 @override | 4063 @override |
| 4073 bool get isSynthetic => _expression.isSynthetic && semicolon.isSynthetic; | 4064 bool get isSynthetic => _expression.isSynthetic && semicolon.isSynthetic; |
| 4074 | 4065 |
| 4075 @override | 4066 @override |
| 4076 accept(AstVisitor visitor) => visitor.visitExpressionStatement(this); | 4067 accept(AstVisitor visitor) => visitor.visitExpressionStatement(this); |
| 4077 | 4068 |
| 4078 @override | 4069 @override |
| 4079 void visitChildren(AstVisitor visitor) { | 4070 void visitChildren(AstVisitor visitor) { |
| 4080 _safelyVisitChild(_expression, visitor); | 4071 _expression?.accept(visitor); |
| 4081 } | 4072 } |
| 4082 } | 4073 } |
| 4083 | 4074 |
| 4084 /** | 4075 /** |
| 4085 * The "extends" clause in a class declaration. | 4076 * The "extends" clause in a class declaration. |
| 4086 * | 4077 * |
| 4087 * extendsClause ::= | 4078 * extendsClause ::= |
| 4088 * 'extends' [TypeName] | 4079 * 'extends' [TypeName] |
| 4089 */ | 4080 */ |
| 4090 class ExtendsClauseImpl extends AstNodeImpl implements ExtendsClause { | 4081 class ExtendsClauseImpl extends AstNodeImpl implements ExtendsClause { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4122 @override | 4113 @override |
| 4123 void set superclass(TypeName name) { | 4114 void set superclass(TypeName name) { |
| 4124 _superclass = _becomeParentOf(name); | 4115 _superclass = _becomeParentOf(name); |
| 4125 } | 4116 } |
| 4126 | 4117 |
| 4127 @override | 4118 @override |
| 4128 accept(AstVisitor visitor) => visitor.visitExtendsClause(this); | 4119 accept(AstVisitor visitor) => visitor.visitExtendsClause(this); |
| 4129 | 4120 |
| 4130 @override | 4121 @override |
| 4131 void visitChildren(AstVisitor visitor) { | 4122 void visitChildren(AstVisitor visitor) { |
| 4132 _safelyVisitChild(_superclass, visitor); | 4123 _superclass?.accept(visitor); |
| 4133 } | 4124 } |
| 4134 } | 4125 } |
| 4135 | 4126 |
| 4136 /** | 4127 /** |
| 4137 * The declaration of one or more fields of the same type. | 4128 * The declaration of one or more fields of the same type. |
| 4138 * | 4129 * |
| 4139 * fieldDeclaration ::= | 4130 * fieldDeclaration ::= |
| 4140 * 'static'? [VariableDeclarationList] ';' | 4131 * 'static'? [VariableDeclarationList] ';' |
| 4141 */ | 4132 */ |
| 4142 class FieldDeclarationImpl extends ClassMemberImpl implements FieldDeclaration { | 4133 class FieldDeclarationImpl extends ClassMemberImpl implements FieldDeclaration { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4198 | 4189 |
| 4199 @override | 4190 @override |
| 4200 bool get isStatic => staticKeyword != null; | 4191 bool get isStatic => staticKeyword != null; |
| 4201 | 4192 |
| 4202 @override | 4193 @override |
| 4203 accept(AstVisitor visitor) => visitor.visitFieldDeclaration(this); | 4194 accept(AstVisitor visitor) => visitor.visitFieldDeclaration(this); |
| 4204 | 4195 |
| 4205 @override | 4196 @override |
| 4206 void visitChildren(AstVisitor visitor) { | 4197 void visitChildren(AstVisitor visitor) { |
| 4207 super.visitChildren(visitor); | 4198 super.visitChildren(visitor); |
| 4208 _safelyVisitChild(_fieldList, visitor); | 4199 _fieldList?.accept(visitor); |
| 4209 } | 4200 } |
| 4210 } | 4201 } |
| 4211 | 4202 |
| 4212 /** | 4203 /** |
| 4213 * A field formal parameter. | 4204 * A field formal parameter. |
| 4214 * | 4205 * |
| 4215 * fieldFormalParameter ::= | 4206 * fieldFormalParameter ::= |
| 4216 * ('final' [TypeName] | 'const' [TypeName] | 'var' | [TypeName])? | 4207 * ('final' [TypeName] | 'const' [TypeName] | 'var' | [TypeName])? |
| 4217 * 'this' '.' [SimpleIdentifier] ([TypeParameterList]? [FormalParameterLi
st])? | 4208 * 'this' '.' [SimpleIdentifier] ([TypeParameterList]? [FormalParameterLi
st])? |
| 4218 */ | 4209 */ |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4340 void set typeParameters(TypeParameterList typeParameters) { | 4331 void set typeParameters(TypeParameterList typeParameters) { |
| 4341 _typeParameters = _becomeParentOf(typeParameters); | 4332 _typeParameters = _becomeParentOf(typeParameters); |
| 4342 } | 4333 } |
| 4343 | 4334 |
| 4344 @override | 4335 @override |
| 4345 accept(AstVisitor visitor) => visitor.visitFieldFormalParameter(this); | 4336 accept(AstVisitor visitor) => visitor.visitFieldFormalParameter(this); |
| 4346 | 4337 |
| 4347 @override | 4338 @override |
| 4348 void visitChildren(AstVisitor visitor) { | 4339 void visitChildren(AstVisitor visitor) { |
| 4349 super.visitChildren(visitor); | 4340 super.visitChildren(visitor); |
| 4350 _safelyVisitChild(_type, visitor); | 4341 _type?.accept(visitor); |
| 4351 _safelyVisitChild(identifier, visitor); | 4342 identifier?.accept(visitor); |
| 4352 _safelyVisitChild(_typeParameters, visitor); | 4343 _typeParameters?.accept(visitor); |
| 4353 _safelyVisitChild(_parameters, visitor); | 4344 _parameters?.accept(visitor); |
| 4354 } | 4345 } |
| 4355 } | 4346 } |
| 4356 | 4347 |
| 4357 /** | 4348 /** |
| 4358 * A for-each statement. | 4349 * A for-each statement. |
| 4359 * | 4350 * |
| 4360 * forEachStatement ::= | 4351 * forEachStatement ::= |
| 4361 * 'await'? 'for' '(' [DeclaredIdentifier] 'in' [Expression] ')' [Block] | 4352 * 'await'? 'for' '(' [DeclaredIdentifier] 'in' [Expression] ')' [Block] |
| 4362 * | 'await'? 'for' '(' [SimpleIdentifier] 'in' [Expression] ')' [Block] | 4353 * | 'await'? 'for' '(' [SimpleIdentifier] 'in' [Expression] ')' [Block] |
| 4363 */ | 4354 */ |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4500 @override | 4491 @override |
| 4501 void set loopVariable(DeclaredIdentifier variable) { | 4492 void set loopVariable(DeclaredIdentifier variable) { |
| 4502 _loopVariable = _becomeParentOf(variable); | 4493 _loopVariable = _becomeParentOf(variable); |
| 4503 } | 4494 } |
| 4504 | 4495 |
| 4505 @override | 4496 @override |
| 4506 accept(AstVisitor visitor) => visitor.visitForEachStatement(this); | 4497 accept(AstVisitor visitor) => visitor.visitForEachStatement(this); |
| 4507 | 4498 |
| 4508 @override | 4499 @override |
| 4509 void visitChildren(AstVisitor visitor) { | 4500 void visitChildren(AstVisitor visitor) { |
| 4510 _safelyVisitChild(_loopVariable, visitor); | 4501 _loopVariable?.accept(visitor); |
| 4511 _safelyVisitChild(_identifier, visitor); | 4502 _identifier?.accept(visitor); |
| 4512 _safelyVisitChild(_iterable, visitor); | 4503 _iterable?.accept(visitor); |
| 4513 _safelyVisitChild(_body, visitor); | 4504 _body?.accept(visitor); |
| 4514 } | 4505 } |
| 4515 } | 4506 } |
| 4516 | 4507 |
| 4517 /** | 4508 /** |
| 4518 * A node representing a parameter to a function. | 4509 * A node representing a parameter to a function. |
| 4519 * | 4510 * |
| 4520 * formalParameter ::= | 4511 * formalParameter ::= |
| 4521 * [NormalFormalParameter] | 4512 * [NormalFormalParameter] |
| 4522 * | [DefaultFormalParameter] | 4513 * | [DefaultFormalParameter] |
| 4523 */ | 4514 */ |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4801 @override | 4792 @override |
| 4802 void set variables(VariableDeclarationList variableList) { | 4793 void set variables(VariableDeclarationList variableList) { |
| 4803 _variableList = _becomeParentOf(variableList); | 4794 _variableList = _becomeParentOf(variableList); |
| 4804 } | 4795 } |
| 4805 | 4796 |
| 4806 @override | 4797 @override |
| 4807 accept(AstVisitor visitor) => visitor.visitForStatement(this); | 4798 accept(AstVisitor visitor) => visitor.visitForStatement(this); |
| 4808 | 4799 |
| 4809 @override | 4800 @override |
| 4810 void visitChildren(AstVisitor visitor) { | 4801 void visitChildren(AstVisitor visitor) { |
| 4811 _safelyVisitChild(_variableList, visitor); | 4802 _variableList?.accept(visitor); |
| 4812 _safelyVisitChild(_initialization, visitor); | 4803 _initialization?.accept(visitor); |
| 4813 _safelyVisitChild(_condition, visitor); | 4804 _condition?.accept(visitor); |
| 4814 _updaters.accept(visitor); | 4805 _updaters.accept(visitor); |
| 4815 _safelyVisitChild(_body, visitor); | 4806 _body?.accept(visitor); |
| 4816 } | 4807 } |
| 4817 } | 4808 } |
| 4818 | 4809 |
| 4819 /** | 4810 /** |
| 4820 * A node representing the body of a function or method. | 4811 * A node representing the body of a function or method. |
| 4821 * | 4812 * |
| 4822 * functionBody ::= | 4813 * functionBody ::= |
| 4823 * [BlockFunctionBody] | 4814 * [BlockFunctionBody] |
| 4824 * | [EmptyFunctionBody] | 4815 * | [EmptyFunctionBody] |
| 4825 * | [ExpressionFunctionBody] | 4816 * | [ExpressionFunctionBody] |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4992 void set returnType(TypeName returnType) { | 4983 void set returnType(TypeName returnType) { |
| 4993 _returnType = _becomeParentOf(returnType); | 4984 _returnType = _becomeParentOf(returnType); |
| 4994 } | 4985 } |
| 4995 | 4986 |
| 4996 @override | 4987 @override |
| 4997 accept(AstVisitor visitor) => visitor.visitFunctionDeclaration(this); | 4988 accept(AstVisitor visitor) => visitor.visitFunctionDeclaration(this); |
| 4998 | 4989 |
| 4999 @override | 4990 @override |
| 5000 void visitChildren(AstVisitor visitor) { | 4991 void visitChildren(AstVisitor visitor) { |
| 5001 super.visitChildren(visitor); | 4992 super.visitChildren(visitor); |
| 5002 _safelyVisitChild(_returnType, visitor); | 4993 _returnType?.accept(visitor); |
| 5003 _safelyVisitChild(_name, visitor); | 4994 _name?.accept(visitor); |
| 5004 _safelyVisitChild(_functionExpression, visitor); | 4995 _functionExpression?.accept(visitor); |
| 5005 } | 4996 } |
| 5006 } | 4997 } |
| 5007 | 4998 |
| 5008 /** | 4999 /** |
| 5009 * A [FunctionDeclaration] used as a statement. | 5000 * A [FunctionDeclaration] used as a statement. |
| 5010 */ | 5001 */ |
| 5011 class FunctionDeclarationStatementImpl extends StatementImpl | 5002 class FunctionDeclarationStatementImpl extends StatementImpl |
| 5012 implements FunctionDeclarationStatement { | 5003 implements FunctionDeclarationStatement { |
| 5013 /** | 5004 /** |
| 5014 * The function declaration being wrapped. | 5005 * The function declaration being wrapped. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 5037 @override | 5028 @override |
| 5038 void set functionDeclaration(FunctionDeclaration functionDeclaration) { | 5029 void set functionDeclaration(FunctionDeclaration functionDeclaration) { |
| 5039 _functionDeclaration = _becomeParentOf(functionDeclaration); | 5030 _functionDeclaration = _becomeParentOf(functionDeclaration); |
| 5040 } | 5031 } |
| 5041 | 5032 |
| 5042 @override | 5033 @override |
| 5043 accept(AstVisitor visitor) => visitor.visitFunctionDeclarationStatement(this); | 5034 accept(AstVisitor visitor) => visitor.visitFunctionDeclarationStatement(this); |
| 5044 | 5035 |
| 5045 @override | 5036 @override |
| 5046 void visitChildren(AstVisitor visitor) { | 5037 void visitChildren(AstVisitor visitor) { |
| 5047 _safelyVisitChild(_functionDeclaration, visitor); | 5038 _functionDeclaration?.accept(visitor); |
| 5048 } | 5039 } |
| 5049 } | 5040 } |
| 5050 | 5041 |
| 5051 /** | 5042 /** |
| 5052 * A function expression. | 5043 * A function expression. |
| 5053 * | 5044 * |
| 5054 * functionExpression ::= | 5045 * functionExpression ::= |
| 5055 * [TypeParameterList]? [FormalParameterList] [FunctionBody] | 5046 * [TypeParameterList]? [FormalParameterList] [FunctionBody] |
| 5056 */ | 5047 */ |
| 5057 class FunctionExpressionImpl extends ExpressionImpl | 5048 class FunctionExpressionImpl extends ExpressionImpl |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5144 @override | 5135 @override |
| 5145 void set typeParameters(TypeParameterList typeParameters) { | 5136 void set typeParameters(TypeParameterList typeParameters) { |
| 5146 _typeParameters = _becomeParentOf(typeParameters); | 5137 _typeParameters = _becomeParentOf(typeParameters); |
| 5147 } | 5138 } |
| 5148 | 5139 |
| 5149 @override | 5140 @override |
| 5150 accept(AstVisitor visitor) => visitor.visitFunctionExpression(this); | 5141 accept(AstVisitor visitor) => visitor.visitFunctionExpression(this); |
| 5151 | 5142 |
| 5152 @override | 5143 @override |
| 5153 void visitChildren(AstVisitor visitor) { | 5144 void visitChildren(AstVisitor visitor) { |
| 5154 _safelyVisitChild(_typeParameters, visitor); | 5145 _typeParameters?.accept(visitor); |
| 5155 _safelyVisitChild(_parameters, visitor); | 5146 _parameters?.accept(visitor); |
| 5156 _safelyVisitChild(_body, visitor); | 5147 _body?.accept(visitor); |
| 5157 } | 5148 } |
| 5158 } | 5149 } |
| 5159 | 5150 |
| 5160 /** | 5151 /** |
| 5161 * The invocation of a function resulting from evaluating an expression. | 5152 * The invocation of a function resulting from evaluating an expression. |
| 5162 * Invocations of methods and other forms of functions are represented by | 5153 * Invocations of methods and other forms of functions are represented by |
| 5163 * [MethodInvocation] nodes. Invocations of getters and setters are represented | 5154 * [MethodInvocation] nodes. Invocations of getters and setters are represented |
| 5164 * by either [PrefixedIdentifier] or [PropertyAccess] nodes. | 5155 * by either [PrefixedIdentifier] or [PropertyAccess] nodes. |
| 5165 * | 5156 * |
| 5166 * functionExpressionInvocation ::= | 5157 * functionExpressionInvocation ::= |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5226 } | 5217 } |
| 5227 | 5218 |
| 5228 @override | 5219 @override |
| 5229 int get precedence => 15; | 5220 int get precedence => 15; |
| 5230 | 5221 |
| 5231 @override | 5222 @override |
| 5232 accept(AstVisitor visitor) => visitor.visitFunctionExpressionInvocation(this); | 5223 accept(AstVisitor visitor) => visitor.visitFunctionExpressionInvocation(this); |
| 5233 | 5224 |
| 5234 @override | 5225 @override |
| 5235 void visitChildren(AstVisitor visitor) { | 5226 void visitChildren(AstVisitor visitor) { |
| 5236 _safelyVisitChild(_function, visitor); | 5227 _function?.accept(visitor); |
| 5237 _safelyVisitChild(_typeArguments, visitor); | 5228 _typeArguments?.accept(visitor); |
| 5238 _safelyVisitChild(_argumentList, visitor); | 5229 _argumentList?.accept(visitor); |
| 5239 } | 5230 } |
| 5240 } | 5231 } |
| 5241 | 5232 |
| 5242 /** | 5233 /** |
| 5243 * A function type alias. | 5234 * A function type alias. |
| 5244 * | 5235 * |
| 5245 * functionTypeAlias ::= | 5236 * functionTypeAlias ::= |
| 5246 * functionPrefix [TypeParameterList]? [FormalParameterList] ';' | 5237 * functionPrefix [TypeParameterList]? [FormalParameterList] ';' |
| 5247 * | 5238 * |
| 5248 * functionPrefix ::= | 5239 * functionPrefix ::= |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5324 void set typeParameters(TypeParameterList typeParameters) { | 5315 void set typeParameters(TypeParameterList typeParameters) { |
| 5325 _typeParameters = _becomeParentOf(typeParameters); | 5316 _typeParameters = _becomeParentOf(typeParameters); |
| 5326 } | 5317 } |
| 5327 | 5318 |
| 5328 @override | 5319 @override |
| 5329 accept(AstVisitor visitor) => visitor.visitFunctionTypeAlias(this); | 5320 accept(AstVisitor visitor) => visitor.visitFunctionTypeAlias(this); |
| 5330 | 5321 |
| 5331 @override | 5322 @override |
| 5332 void visitChildren(AstVisitor visitor) { | 5323 void visitChildren(AstVisitor visitor) { |
| 5333 super.visitChildren(visitor); | 5324 super.visitChildren(visitor); |
| 5334 _safelyVisitChild(_returnType, visitor); | 5325 _returnType?.accept(visitor); |
| 5335 _safelyVisitChild(_name, visitor); | 5326 _name?.accept(visitor); |
| 5336 _safelyVisitChild(_typeParameters, visitor); | 5327 _typeParameters?.accept(visitor); |
| 5337 _safelyVisitChild(_parameters, visitor); | 5328 _parameters?.accept(visitor); |
| 5338 } | 5329 } |
| 5339 } | 5330 } |
| 5340 | 5331 |
| 5341 /** | 5332 /** |
| 5342 * A function-typed formal parameter. | 5333 * A function-typed formal parameter. |
| 5343 * | 5334 * |
| 5344 * functionSignature ::= | 5335 * functionSignature ::= |
| 5345 * [TypeName]? [SimpleIdentifier] [TypeParameterList]? [FormalParameterLi
st] | 5336 * [TypeName]? [SimpleIdentifier] [TypeParameterList]? [FormalParameterLi
st] |
| 5346 */ | 5337 */ |
| 5347 class FunctionTypedFormalParameterImpl extends NormalFormalParameterImpl | 5338 class FunctionTypedFormalParameterImpl extends NormalFormalParameterImpl |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5426 void set typeParameters(TypeParameterList typeParameters) { | 5417 void set typeParameters(TypeParameterList typeParameters) { |
| 5427 _typeParameters = _becomeParentOf(typeParameters); | 5418 _typeParameters = _becomeParentOf(typeParameters); |
| 5428 } | 5419 } |
| 5429 | 5420 |
| 5430 @override | 5421 @override |
| 5431 accept(AstVisitor visitor) => visitor.visitFunctionTypedFormalParameter(this); | 5422 accept(AstVisitor visitor) => visitor.visitFunctionTypedFormalParameter(this); |
| 5432 | 5423 |
| 5433 @override | 5424 @override |
| 5434 void visitChildren(AstVisitor visitor) { | 5425 void visitChildren(AstVisitor visitor) { |
| 5435 super.visitChildren(visitor); | 5426 super.visitChildren(visitor); |
| 5436 _safelyVisitChild(_returnType, visitor); | 5427 _returnType?.accept(visitor); |
| 5437 _safelyVisitChild(identifier, visitor); | 5428 identifier?.accept(visitor); |
| 5438 _safelyVisitChild(_typeParameters, visitor); | 5429 _typeParameters?.accept(visitor); |
| 5439 _safelyVisitChild(_parameters, visitor); | 5430 _parameters?.accept(visitor); |
| 5440 } | 5431 } |
| 5441 } | 5432 } |
| 5442 | 5433 |
| 5443 /** | 5434 /** |
| 5444 * A combinator that restricts the names being imported to those that are not in | 5435 * A combinator that restricts the names being imported to those that are not in |
| 5445 * a given list. | 5436 * a given list. |
| 5446 * | 5437 * |
| 5447 * hideCombinator ::= | 5438 * hideCombinator ::= |
| 5448 * 'hide' [SimpleIdentifier] (',' [SimpleIdentifier])* | 5439 * 'hide' [SimpleIdentifier] (',' [SimpleIdentifier])* |
| 5449 */ | 5440 */ |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5610 @override | 5601 @override |
| 5611 void set thenStatement(Statement statement) { | 5602 void set thenStatement(Statement statement) { |
| 5612 _thenStatement = _becomeParentOf(statement); | 5603 _thenStatement = _becomeParentOf(statement); |
| 5613 } | 5604 } |
| 5614 | 5605 |
| 5615 @override | 5606 @override |
| 5616 accept(AstVisitor visitor) => visitor.visitIfStatement(this); | 5607 accept(AstVisitor visitor) => visitor.visitIfStatement(this); |
| 5617 | 5608 |
| 5618 @override | 5609 @override |
| 5619 void visitChildren(AstVisitor visitor) { | 5610 void visitChildren(AstVisitor visitor) { |
| 5620 _safelyVisitChild(_condition, visitor); | 5611 _condition?.accept(visitor); |
| 5621 _safelyVisitChild(_thenStatement, visitor); | 5612 _thenStatement?.accept(visitor); |
| 5622 _safelyVisitChild(_elseStatement, visitor); | 5613 _elseStatement?.accept(visitor); |
| 5623 } | 5614 } |
| 5624 } | 5615 } |
| 5625 | 5616 |
| 5626 /** | 5617 /** |
| 5627 * The "implements" clause in an class declaration. | 5618 * The "implements" clause in an class declaration. |
| 5628 * | 5619 * |
| 5629 * implementsClause ::= | 5620 * implementsClause ::= |
| 5630 * 'implements' [TypeName] (',' [TypeName])* | 5621 * 'implements' [TypeName] (',' [TypeName])* |
| 5631 */ | 5622 */ |
| 5632 class ImplementsClauseImpl extends AstNodeImpl implements ImplementsClause { | 5623 class ImplementsClauseImpl extends AstNodeImpl implements ImplementsClause { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5752 } | 5743 } |
| 5753 return element.importedLibrary; | 5744 return element.importedLibrary; |
| 5754 } | 5745 } |
| 5755 | 5746 |
| 5756 @override | 5747 @override |
| 5757 accept(AstVisitor visitor) => visitor.visitImportDirective(this); | 5748 accept(AstVisitor visitor) => visitor.visitImportDirective(this); |
| 5758 | 5749 |
| 5759 @override | 5750 @override |
| 5760 void visitChildren(AstVisitor visitor) { | 5751 void visitChildren(AstVisitor visitor) { |
| 5761 super.visitChildren(visitor); | 5752 super.visitChildren(visitor); |
| 5762 _safelyVisitChild(_prefix, visitor); | 5753 _prefix?.accept(visitor); |
| 5763 combinators.accept(visitor); | 5754 combinators.accept(visitor); |
| 5764 } | 5755 } |
| 5765 } | 5756 } |
| 5766 | 5757 |
| 5767 /** | 5758 /** |
| 5768 * An index expression. | 5759 * An index expression. |
| 5769 * | 5760 * |
| 5770 * indexExpression ::= | 5761 * indexExpression ::= |
| 5771 * [Expression] '[' [Expression] ']' | 5762 * [Expression] '[' [Expression] ']' |
| 5772 */ | 5763 */ |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5971 } else if (parent is PostfixExpression) { | 5962 } else if (parent is PostfixExpression) { |
| 5972 return true; | 5963 return true; |
| 5973 } else if (parent is AssignmentExpression) { | 5964 } else if (parent is AssignmentExpression) { |
| 5974 return identical(parent.leftHandSide, this); | 5965 return identical(parent.leftHandSide, this); |
| 5975 } | 5966 } |
| 5976 return false; | 5967 return false; |
| 5977 } | 5968 } |
| 5978 | 5969 |
| 5979 @override | 5970 @override |
| 5980 void visitChildren(AstVisitor visitor) { | 5971 void visitChildren(AstVisitor visitor) { |
| 5981 _safelyVisitChild(_target, visitor); | 5972 _target?.accept(visitor); |
| 5982 _safelyVisitChild(_index, visitor); | 5973 _index?.accept(visitor); |
| 5983 } | 5974 } |
| 5984 } | 5975 } |
| 5985 | 5976 |
| 5986 /** | 5977 /** |
| 5987 * An instance creation expression. | 5978 * An instance creation expression. |
| 5988 * | 5979 * |
| 5989 * newExpression ::= | 5980 * newExpression ::= |
| 5990 * ('new' | 'const') [TypeName] ('.' [SimpleIdentifier])? [ArgumentList] | 5981 * ('new' | 'const') [TypeName] ('.' [SimpleIdentifier])? [ArgumentList] |
| 5991 */ | 5982 */ |
| 5992 class InstanceCreationExpressionImpl extends ExpressionImpl | 5983 class InstanceCreationExpressionImpl extends ExpressionImpl |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6059 (keyword as KeywordToken).keyword == Keyword.CONST; | 6050 (keyword as KeywordToken).keyword == Keyword.CONST; |
| 6060 | 6051 |
| 6061 @override | 6052 @override |
| 6062 int get precedence => 16; | 6053 int get precedence => 16; |
| 6063 | 6054 |
| 6064 @override | 6055 @override |
| 6065 accept(AstVisitor visitor) => visitor.visitInstanceCreationExpression(this); | 6056 accept(AstVisitor visitor) => visitor.visitInstanceCreationExpression(this); |
| 6066 | 6057 |
| 6067 @override | 6058 @override |
| 6068 void visitChildren(AstVisitor visitor) { | 6059 void visitChildren(AstVisitor visitor) { |
| 6069 _safelyVisitChild(_constructorName, visitor); | 6060 _constructorName?.accept(visitor); |
| 6070 _safelyVisitChild(_argumentList, visitor); | 6061 _argumentList?.accept(visitor); |
| 6071 } | 6062 } |
| 6072 } | 6063 } |
| 6073 | 6064 |
| 6074 /** | 6065 /** |
| 6075 * An integer literal expression. | 6066 * An integer literal expression. |
| 6076 * | 6067 * |
| 6077 * integerLiteral ::= | 6068 * integerLiteral ::= |
| 6078 * decimalIntegerLiteral | 6069 * decimalIntegerLiteral |
| 6079 * | hexadecimalIntegerLiteral | 6070 * | hexadecimalIntegerLiteral |
| 6080 * | 6071 * |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6191 @override | 6182 @override |
| 6192 void set expression(Expression expression) { | 6183 void set expression(Expression expression) { |
| 6193 _expression = _becomeParentOf(expression); | 6184 _expression = _becomeParentOf(expression); |
| 6194 } | 6185 } |
| 6195 | 6186 |
| 6196 @override | 6187 @override |
| 6197 accept(AstVisitor visitor) => visitor.visitInterpolationExpression(this); | 6188 accept(AstVisitor visitor) => visitor.visitInterpolationExpression(this); |
| 6198 | 6189 |
| 6199 @override | 6190 @override |
| 6200 void visitChildren(AstVisitor visitor) { | 6191 void visitChildren(AstVisitor visitor) { |
| 6201 _safelyVisitChild(_expression, visitor); | 6192 _expression?.accept(visitor); |
| 6202 } | 6193 } |
| 6203 } | 6194 } |
| 6204 | 6195 |
| 6205 /** | 6196 /** |
| 6206 * A non-empty substring of an interpolated string. | 6197 * A non-empty substring of an interpolated string. |
| 6207 * | 6198 * |
| 6208 * interpolationString ::= | 6199 * interpolationString ::= |
| 6209 * characters | 6200 * characters |
| 6210 */ | 6201 */ |
| 6211 class InterpolationStringImpl extends InterpolationElementImpl | 6202 class InterpolationStringImpl extends InterpolationElementImpl |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6373 @override | 6364 @override |
| 6374 void set type(TypeName name) { | 6365 void set type(TypeName name) { |
| 6375 _type = _becomeParentOf(name); | 6366 _type = _becomeParentOf(name); |
| 6376 } | 6367 } |
| 6377 | 6368 |
| 6378 @override | 6369 @override |
| 6379 accept(AstVisitor visitor) => visitor.visitIsExpression(this); | 6370 accept(AstVisitor visitor) => visitor.visitIsExpression(this); |
| 6380 | 6371 |
| 6381 @override | 6372 @override |
| 6382 void visitChildren(AstVisitor visitor) { | 6373 void visitChildren(AstVisitor visitor) { |
| 6383 _safelyVisitChild(_expression, visitor); | 6374 _expression?.accept(visitor); |
| 6384 _safelyVisitChild(_type, visitor); | 6375 _type?.accept(visitor); |
| 6385 } | 6376 } |
| 6386 } | 6377 } |
| 6387 | 6378 |
| 6388 /** | 6379 /** |
| 6389 * A statement that has a label associated with them. | 6380 * A statement that has a label associated with them. |
| 6390 * | 6381 * |
| 6391 * labeledStatement ::= | 6382 * labeledStatement ::= |
| 6392 * [Label]+ [Statement] | 6383 * [Label]+ [Statement] |
| 6393 */ | 6384 */ |
| 6394 class LabeledStatementImpl extends StatementImpl implements LabeledStatement { | 6385 class LabeledStatementImpl extends StatementImpl implements LabeledStatement { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6439 | 6430 |
| 6440 @override | 6431 @override |
| 6441 Statement get unlabeled => _statement.unlabeled; | 6432 Statement get unlabeled => _statement.unlabeled; |
| 6442 | 6433 |
| 6443 @override | 6434 @override |
| 6444 accept(AstVisitor visitor) => visitor.visitLabeledStatement(this); | 6435 accept(AstVisitor visitor) => visitor.visitLabeledStatement(this); |
| 6445 | 6436 |
| 6446 @override | 6437 @override |
| 6447 void visitChildren(AstVisitor visitor) { | 6438 void visitChildren(AstVisitor visitor) { |
| 6448 _labels.accept(visitor); | 6439 _labels.accept(visitor); |
| 6449 _safelyVisitChild(_statement, visitor); | 6440 _statement?.accept(visitor); |
| 6450 } | 6441 } |
| 6451 } | 6442 } |
| 6452 | 6443 |
| 6453 /** | 6444 /** |
| 6454 * A label on either a [LabeledStatement] or a [NamedExpression]. | 6445 * A label on either a [LabeledStatement] or a [NamedExpression]. |
| 6455 * | 6446 * |
| 6456 * label ::= | 6447 * label ::= |
| 6457 * [SimpleIdentifier] ':' | 6448 * [SimpleIdentifier] ':' |
| 6458 */ | 6449 */ |
| 6459 class LabelImpl extends AstNodeImpl implements Label { | 6450 class LabelImpl extends AstNodeImpl implements Label { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 6490 @override | 6481 @override |
| 6491 void set label(SimpleIdentifier label) { | 6482 void set label(SimpleIdentifier label) { |
| 6492 _label = _becomeParentOf(label); | 6483 _label = _becomeParentOf(label); |
| 6493 } | 6484 } |
| 6494 | 6485 |
| 6495 @override | 6486 @override |
| 6496 accept(AstVisitor visitor) => visitor.visitLabel(this); | 6487 accept(AstVisitor visitor) => visitor.visitLabel(this); |
| 6497 | 6488 |
| 6498 @override | 6489 @override |
| 6499 void visitChildren(AstVisitor visitor) { | 6490 void visitChildren(AstVisitor visitor) { |
| 6500 _safelyVisitChild(_label, visitor); | 6491 _label?.accept(visitor); |
| 6501 } | 6492 } |
| 6502 } | 6493 } |
| 6503 | 6494 |
| 6504 /** | 6495 /** |
| 6505 * A library directive. | 6496 * A library directive. |
| 6506 * | 6497 * |
| 6507 * libraryDirective ::= | 6498 * libraryDirective ::= |
| 6508 * [Annotation] 'library' [Identifier] ';' | 6499 * [Annotation] 'library' [Identifier] ';' |
| 6509 */ | 6500 */ |
| 6510 class LibraryDirectiveImpl extends DirectiveImpl implements LibraryDirective { | 6501 class LibraryDirectiveImpl extends DirectiveImpl implements LibraryDirective { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6556 void set name(LibraryIdentifier name) { | 6547 void set name(LibraryIdentifier name) { |
| 6557 _name = _becomeParentOf(name); | 6548 _name = _becomeParentOf(name); |
| 6558 } | 6549 } |
| 6559 | 6550 |
| 6560 @override | 6551 @override |
| 6561 accept(AstVisitor visitor) => visitor.visitLibraryDirective(this); | 6552 accept(AstVisitor visitor) => visitor.visitLibraryDirective(this); |
| 6562 | 6553 |
| 6563 @override | 6554 @override |
| 6564 void visitChildren(AstVisitor visitor) { | 6555 void visitChildren(AstVisitor visitor) { |
| 6565 super.visitChildren(visitor); | 6556 super.visitChildren(visitor); |
| 6566 _safelyVisitChild(_name, visitor); | 6557 _name?.accept(visitor); |
| 6567 } | 6558 } |
| 6568 } | 6559 } |
| 6569 | 6560 |
| 6570 /** | 6561 /** |
| 6571 * The identifier for a library. | 6562 * The identifier for a library. |
| 6572 * | 6563 * |
| 6573 * libraryIdentifier ::= | 6564 * libraryIdentifier ::= |
| 6574 * [SimpleIdentifier] ('.' [SimpleIdentifier])* | 6565 * [SimpleIdentifier] ('.' [SimpleIdentifier])* |
| 6575 */ | 6566 */ |
| 6576 class LibraryIdentifierImpl extends IdentifierImpl | 6567 class LibraryIdentifierImpl extends IdentifierImpl |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6799 @override | 6790 @override |
| 6800 void set value(Expression expression) { | 6791 void set value(Expression expression) { |
| 6801 _value = _becomeParentOf(expression); | 6792 _value = _becomeParentOf(expression); |
| 6802 } | 6793 } |
| 6803 | 6794 |
| 6804 @override | 6795 @override |
| 6805 accept(AstVisitor visitor) => visitor.visitMapLiteralEntry(this); | 6796 accept(AstVisitor visitor) => visitor.visitMapLiteralEntry(this); |
| 6806 | 6797 |
| 6807 @override | 6798 @override |
| 6808 void visitChildren(AstVisitor visitor) { | 6799 void visitChildren(AstVisitor visitor) { |
| 6809 _safelyVisitChild(_key, visitor); | 6800 _key?.accept(visitor); |
| 6810 _safelyVisitChild(_value, visitor); | 6801 _value?.accept(visitor); |
| 6811 } | 6802 } |
| 6812 } | 6803 } |
| 6813 | 6804 |
| 6814 /** | 6805 /** |
| 6815 * A literal map. | 6806 * A literal map. |
| 6816 * | 6807 * |
| 6817 * mapLiteral ::= | 6808 * mapLiteral ::= |
| 6818 * 'const'? ('<' [TypeName] (',' [TypeName])* '>')? | 6809 * 'const'? ('<' [TypeName] (',' [TypeName])* '>')? |
| 6819 * '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}' | 6810 * '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}' |
| 6820 */ | 6811 */ |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7087 void set typeParameters(TypeParameterList typeParameters) { | 7078 void set typeParameters(TypeParameterList typeParameters) { |
| 7088 _typeParameters = _becomeParentOf(typeParameters); | 7079 _typeParameters = _becomeParentOf(typeParameters); |
| 7089 } | 7080 } |
| 7090 | 7081 |
| 7091 @override | 7082 @override |
| 7092 accept(AstVisitor visitor) => visitor.visitMethodDeclaration(this); | 7083 accept(AstVisitor visitor) => visitor.visitMethodDeclaration(this); |
| 7093 | 7084 |
| 7094 @override | 7085 @override |
| 7095 void visitChildren(AstVisitor visitor) { | 7086 void visitChildren(AstVisitor visitor) { |
| 7096 super.visitChildren(visitor); | 7087 super.visitChildren(visitor); |
| 7097 _safelyVisitChild(_returnType, visitor); | 7088 _returnType?.accept(visitor); |
| 7098 _safelyVisitChild(_name, visitor); | 7089 _name?.accept(visitor); |
| 7099 _safelyVisitChild(_typeParameters, visitor); | 7090 _typeParameters?.accept(visitor); |
| 7100 _safelyVisitChild(_parameters, visitor); | 7091 _parameters?.accept(visitor); |
| 7101 _safelyVisitChild(_body, visitor); | 7092 _body?.accept(visitor); |
| 7102 } | 7093 } |
| 7103 } | 7094 } |
| 7104 | 7095 |
| 7105 /** | 7096 /** |
| 7106 * The invocation of either a function or a method. Invocations of functions | 7097 * The invocation of either a function or a method. Invocations of functions |
| 7107 * resulting from evaluating an expression are represented by | 7098 * resulting from evaluating an expression are represented by |
| 7108 * [FunctionExpressionInvocation] nodes. Invocations of getters and setters are | 7099 * [FunctionExpressionInvocation] nodes. Invocations of getters and setters are |
| 7109 * represented by either [PrefixedIdentifier] or [PropertyAccess] nodes. | 7100 * represented by either [PrefixedIdentifier] or [PropertyAccess] nodes. |
| 7110 * | 7101 * |
| 7111 * methodInvocation ::= | 7102 * methodInvocation ::= |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7207 @override | 7198 @override |
| 7208 void set target(Expression expression) { | 7199 void set target(Expression expression) { |
| 7209 _target = _becomeParentOf(expression); | 7200 _target = _becomeParentOf(expression); |
| 7210 } | 7201 } |
| 7211 | 7202 |
| 7212 @override | 7203 @override |
| 7213 accept(AstVisitor visitor) => visitor.visitMethodInvocation(this); | 7204 accept(AstVisitor visitor) => visitor.visitMethodInvocation(this); |
| 7214 | 7205 |
| 7215 @override | 7206 @override |
| 7216 void visitChildren(AstVisitor visitor) { | 7207 void visitChildren(AstVisitor visitor) { |
| 7217 _safelyVisitChild(_target, visitor); | 7208 _target?.accept(visitor); |
| 7218 _safelyVisitChild(_methodName, visitor); | 7209 _methodName?.accept(visitor); |
| 7219 _safelyVisitChild(_typeArguments, visitor); | 7210 _typeArguments?.accept(visitor); |
| 7220 _safelyVisitChild(_argumentList, visitor); | 7211 _argumentList?.accept(visitor); |
| 7221 } | 7212 } |
| 7222 } | 7213 } |
| 7223 | 7214 |
| 7224 /** | 7215 /** |
| 7225 * A node that declares a single name within the scope of a compilation unit. | 7216 * A node that declares a single name within the scope of a compilation unit. |
| 7226 */ | 7217 */ |
| 7227 abstract class NamedCompilationUnitMemberImpl extends CompilationUnitMemberImpl | 7218 abstract class NamedCompilationUnitMemberImpl extends CompilationUnitMemberImpl |
| 7228 implements NamedCompilationUnitMember { | 7219 implements NamedCompilationUnitMember { |
| 7229 /** | 7220 /** |
| 7230 * The name of the member being declared. | 7221 * The name of the member being declared. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7313 } | 7304 } |
| 7314 | 7305 |
| 7315 @override | 7306 @override |
| 7316 int get precedence => 0; | 7307 int get precedence => 0; |
| 7317 | 7308 |
| 7318 @override | 7309 @override |
| 7319 accept(AstVisitor visitor) => visitor.visitNamedExpression(this); | 7310 accept(AstVisitor visitor) => visitor.visitNamedExpression(this); |
| 7320 | 7311 |
| 7321 @override | 7312 @override |
| 7322 void visitChildren(AstVisitor visitor) { | 7313 void visitChildren(AstVisitor visitor) { |
| 7323 _safelyVisitChild(_name, visitor); | 7314 _name?.accept(visitor); |
| 7324 _safelyVisitChild(_expression, visitor); | 7315 _expression?.accept(visitor); |
| 7325 } | 7316 } |
| 7326 } | 7317 } |
| 7327 | 7318 |
| 7328 /** | 7319 /** |
| 7329 * A node that represents a directive that impacts the namespace of a library. | 7320 * A node that represents a directive that impacts the namespace of a library. |
| 7330 * | 7321 * |
| 7331 * directive ::= | 7322 * directive ::= |
| 7332 * [ExportDirective] | 7323 * [ExportDirective] |
| 7333 * | [ImportDirective] | 7324 * | [ImportDirective] |
| 7334 */ | 7325 */ |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7433 @override | 7424 @override |
| 7434 void set name(StringLiteral name) { | 7425 void set name(StringLiteral name) { |
| 7435 _name = _becomeParentOf(name); | 7426 _name = _becomeParentOf(name); |
| 7436 } | 7427 } |
| 7437 | 7428 |
| 7438 @override | 7429 @override |
| 7439 accept(AstVisitor visitor) => visitor.visitNativeClause(this); | 7430 accept(AstVisitor visitor) => visitor.visitNativeClause(this); |
| 7440 | 7431 |
| 7441 @override | 7432 @override |
| 7442 void visitChildren(AstVisitor visitor) { | 7433 void visitChildren(AstVisitor visitor) { |
| 7443 _safelyVisitChild(_name, visitor); | 7434 _name?.accept(visitor); |
| 7444 } | 7435 } |
| 7445 } | 7436 } |
| 7446 | 7437 |
| 7447 /** | 7438 /** |
| 7448 * A function body that consists of a native keyword followed by a string | 7439 * A function body that consists of a native keyword followed by a string |
| 7449 * literal. | 7440 * literal. |
| 7450 * | 7441 * |
| 7451 * nativeFunctionBody ::= | 7442 * nativeFunctionBody ::= |
| 7452 * 'native' [SimpleStringLiteral] ';' | 7443 * 'native' [SimpleStringLiteral] ';' |
| 7453 */ | 7444 */ |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7498 @override | 7489 @override |
| 7499 void set stringLiteral(StringLiteral stringLiteral) { | 7490 void set stringLiteral(StringLiteral stringLiteral) { |
| 7500 _stringLiteral = _becomeParentOf(stringLiteral); | 7491 _stringLiteral = _becomeParentOf(stringLiteral); |
| 7501 } | 7492 } |
| 7502 | 7493 |
| 7503 @override | 7494 @override |
| 7504 accept(AstVisitor visitor) => visitor.visitNativeFunctionBody(this); | 7495 accept(AstVisitor visitor) => visitor.visitNativeFunctionBody(this); |
| 7505 | 7496 |
| 7506 @override | 7497 @override |
| 7507 void visitChildren(AstVisitor visitor) { | 7498 void visitChildren(AstVisitor visitor) { |
| 7508 _safelyVisitChild(_stringLiteral, visitor); | 7499 _stringLiteral?.accept(visitor); |
| 7509 } | 7500 } |
| 7510 } | 7501 } |
| 7511 | 7502 |
| 7512 /** | 7503 /** |
| 7513 * A list of AST nodes that have a common parent. | 7504 * A list of AST nodes that have a common parent. |
| 7514 */ | 7505 */ |
| 7515 class NodeListImpl<E extends AstNode> extends Object | 7506 class NodeListImpl<E extends AstNode> extends Object |
| 7516 with ListMixin<E> | 7507 with ListMixin<E> |
| 7517 implements NodeList<E> { | 7508 implements NodeList<E> { |
| 7518 /** | 7509 /** |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7722 return result; | 7713 return result; |
| 7723 } | 7714 } |
| 7724 | 7715 |
| 7725 @override | 7716 @override |
| 7726 void visitChildren(AstVisitor visitor) { | 7717 void visitChildren(AstVisitor visitor) { |
| 7727 // | 7718 // |
| 7728 // Note that subclasses are responsible for visiting the identifier because | 7719 // Note that subclasses are responsible for visiting the identifier because |
| 7729 // they often need to visit other nodes before visiting the identifier. | 7720 // they often need to visit other nodes before visiting the identifier. |
| 7730 // | 7721 // |
| 7731 if (_commentIsBeforeAnnotations()) { | 7722 if (_commentIsBeforeAnnotations()) { |
| 7732 _safelyVisitChild(_comment, visitor); | 7723 _comment?.accept(visitor); |
| 7733 _metadata.accept(visitor); | 7724 _metadata.accept(visitor); |
| 7734 } else { | 7725 } else { |
| 7735 for (AstNode child in sortedCommentAndAnnotations) { | 7726 for (AstNode child in sortedCommentAndAnnotations) { |
| 7736 child.accept(visitor); | 7727 child.accept(visitor); |
| 7737 } | 7728 } |
| 7738 } | 7729 } |
| 7739 } | 7730 } |
| 7740 | 7731 |
| 7741 /** | 7732 /** |
| 7742 * Return `true` if the comment is lexically before any annotations. | 7733 * Return `true` if the comment is lexically before any annotations. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7837 } | 7828 } |
| 7838 | 7829 |
| 7839 @override | 7830 @override |
| 7840 int get precedence => 15; | 7831 int get precedence => 15; |
| 7841 | 7832 |
| 7842 @override | 7833 @override |
| 7843 accept(AstVisitor visitor) => visitor.visitParenthesizedExpression(this); | 7834 accept(AstVisitor visitor) => visitor.visitParenthesizedExpression(this); |
| 7844 | 7835 |
| 7845 @override | 7836 @override |
| 7846 void visitChildren(AstVisitor visitor) { | 7837 void visitChildren(AstVisitor visitor) { |
| 7847 _safelyVisitChild(_expression, visitor); | 7838 _expression?.accept(visitor); |
| 7848 } | 7839 } |
| 7849 } | 7840 } |
| 7850 | 7841 |
| 7851 /** | 7842 /** |
| 7852 * A part directive. | 7843 * A part directive. |
| 7853 * | 7844 * |
| 7854 * partDirective ::= | 7845 * partDirective ::= |
| 7855 * [Annotation] 'part' [StringLiteral] ';' | 7846 * [Annotation] 'part' [StringLiteral] ';' |
| 7856 */ | 7847 */ |
| 7857 class PartDirectiveImpl extends UriBasedDirectiveImpl implements PartDirective { | 7848 class PartDirectiveImpl extends UriBasedDirectiveImpl implements PartDirective { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7965 void set libraryName(LibraryIdentifier libraryName) { | 7956 void set libraryName(LibraryIdentifier libraryName) { |
| 7966 _libraryName = _becomeParentOf(libraryName); | 7957 _libraryName = _becomeParentOf(libraryName); |
| 7967 } | 7958 } |
| 7968 | 7959 |
| 7969 @override | 7960 @override |
| 7970 accept(AstVisitor visitor) => visitor.visitPartOfDirective(this); | 7961 accept(AstVisitor visitor) => visitor.visitPartOfDirective(this); |
| 7971 | 7962 |
| 7972 @override | 7963 @override |
| 7973 void visitChildren(AstVisitor visitor) { | 7964 void visitChildren(AstVisitor visitor) { |
| 7974 super.visitChildren(visitor); | 7965 super.visitChildren(visitor); |
| 7975 _safelyVisitChild(_libraryName, visitor); | 7966 _libraryName?.accept(visitor); |
| 7976 } | 7967 } |
| 7977 } | 7968 } |
| 7978 | 7969 |
| 7979 /** | 7970 /** |
| 7980 * A postfix unary expression. | 7971 * A postfix unary expression. |
| 7981 * | 7972 * |
| 7982 * postfixExpression ::= | 7973 * postfixExpression ::= |
| 7983 * [Expression] [Token] | 7974 * [Expression] [Token] |
| 7984 */ | 7975 */ |
| 7985 class PostfixExpressionImpl extends ExpressionImpl | 7976 class PostfixExpressionImpl extends ExpressionImpl |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8081 return null; | 8072 return null; |
| 8082 } | 8073 } |
| 8083 return parameters[0]; | 8074 return parameters[0]; |
| 8084 } | 8075 } |
| 8085 | 8076 |
| 8086 @override | 8077 @override |
| 8087 accept(AstVisitor visitor) => visitor.visitPostfixExpression(this); | 8078 accept(AstVisitor visitor) => visitor.visitPostfixExpression(this); |
| 8088 | 8079 |
| 8089 @override | 8080 @override |
| 8090 void visitChildren(AstVisitor visitor) { | 8081 void visitChildren(AstVisitor visitor) { |
| 8091 _safelyVisitChild(_operand, visitor); | 8082 _operand?.accept(visitor); |
| 8092 } | 8083 } |
| 8093 } | 8084 } |
| 8094 | 8085 |
| 8095 /** | 8086 /** |
| 8096 * An identifier that is prefixed or an access to an object property where the | 8087 * An identifier that is prefixed or an access to an object property where the |
| 8097 * target of the property access is a simple identifier. | 8088 * target of the property access is a simple identifier. |
| 8098 * | 8089 * |
| 8099 * prefixedIdentifier ::= | 8090 * prefixedIdentifier ::= |
| 8100 * [SimpleIdentifier] '.' [SimpleIdentifier] | 8091 * [SimpleIdentifier] '.' [SimpleIdentifier] |
| 8101 */ | 8092 */ |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8194 return null; | 8185 return null; |
| 8195 } | 8186 } |
| 8196 return _identifier.staticElement; | 8187 return _identifier.staticElement; |
| 8197 } | 8188 } |
| 8198 | 8189 |
| 8199 @override | 8190 @override |
| 8200 accept(AstVisitor visitor) => visitor.visitPrefixedIdentifier(this); | 8191 accept(AstVisitor visitor) => visitor.visitPrefixedIdentifier(this); |
| 8201 | 8192 |
| 8202 @override | 8193 @override |
| 8203 void visitChildren(AstVisitor visitor) { | 8194 void visitChildren(AstVisitor visitor) { |
| 8204 _safelyVisitChild(_prefix, visitor); | 8195 _prefix?.accept(visitor); |
| 8205 _safelyVisitChild(_identifier, visitor); | 8196 _identifier?.accept(visitor); |
| 8206 } | 8197 } |
| 8207 } | 8198 } |
| 8208 | 8199 |
| 8209 /** | 8200 /** |
| 8210 * A prefix unary expression. | 8201 * A prefix unary expression. |
| 8211 * | 8202 * |
| 8212 * prefixExpression ::= | 8203 * prefixExpression ::= |
| 8213 * [Token] [Expression] | 8204 * [Token] [Expression] |
| 8214 */ | 8205 */ |
| 8215 class PrefixExpressionImpl extends ExpressionImpl implements PrefixExpression { | 8206 class PrefixExpressionImpl extends ExpressionImpl implements PrefixExpression { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8306 return null; | 8297 return null; |
| 8307 } | 8298 } |
| 8308 return parameters[0]; | 8299 return parameters[0]; |
| 8309 } | 8300 } |
| 8310 | 8301 |
| 8311 @override | 8302 @override |
| 8312 accept(AstVisitor visitor) => visitor.visitPrefixExpression(this); | 8303 accept(AstVisitor visitor) => visitor.visitPrefixExpression(this); |
| 8313 | 8304 |
| 8314 @override | 8305 @override |
| 8315 void visitChildren(AstVisitor visitor) { | 8306 void visitChildren(AstVisitor visitor) { |
| 8316 _safelyVisitChild(_operand, visitor); | 8307 _operand?.accept(visitor); |
| 8317 } | 8308 } |
| 8318 } | 8309 } |
| 8319 | 8310 |
| 8320 /** | 8311 /** |
| 8321 * The access of a property of an object. | 8312 * The access of a property of an object. |
| 8322 * | 8313 * |
| 8323 * Note, however, that accesses to properties of objects can also be represented | 8314 * Note, however, that accesses to properties of objects can also be represented |
| 8324 * as [PrefixedIdentifier] nodes in cases where the target is also a simple | 8315 * as [PrefixedIdentifier] nodes in cases where the target is also a simple |
| 8325 * identifier. | 8316 * identifier. |
| 8326 * | 8317 * |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8406 @override | 8397 @override |
| 8407 void set target(Expression expression) { | 8398 void set target(Expression expression) { |
| 8408 _target = _becomeParentOf(expression); | 8399 _target = _becomeParentOf(expression); |
| 8409 } | 8400 } |
| 8410 | 8401 |
| 8411 @override | 8402 @override |
| 8412 accept(AstVisitor visitor) => visitor.visitPropertyAccess(this); | 8403 accept(AstVisitor visitor) => visitor.visitPropertyAccess(this); |
| 8413 | 8404 |
| 8414 @override | 8405 @override |
| 8415 void visitChildren(AstVisitor visitor) { | 8406 void visitChildren(AstVisitor visitor) { |
| 8416 _safelyVisitChild(_target, visitor); | 8407 _target?.accept(visitor); |
| 8417 _safelyVisitChild(_propertyName, visitor); | 8408 _propertyName?.accept(visitor); |
| 8418 } | 8409 } |
| 8419 } | 8410 } |
| 8420 | 8411 |
| 8421 /** | 8412 /** |
| 8422 * The invocation of a constructor in the same class from within a constructor's | 8413 * The invocation of a constructor in the same class from within a constructor's |
| 8423 * initialization list. | 8414 * initialization list. |
| 8424 * | 8415 * |
| 8425 * redirectingConstructorInvocation ::= | 8416 * redirectingConstructorInvocation ::= |
| 8426 * 'this' ('.' identifier)? arguments | 8417 * 'this' ('.' identifier)? arguments |
| 8427 */ | 8418 */ |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8495 | 8486 |
| 8496 @override | 8487 @override |
| 8497 Token get endToken => _argumentList.endToken; | 8488 Token get endToken => _argumentList.endToken; |
| 8498 | 8489 |
| 8499 @override | 8490 @override |
| 8500 accept(AstVisitor visitor) => | 8491 accept(AstVisitor visitor) => |
| 8501 visitor.visitRedirectingConstructorInvocation(this); | 8492 visitor.visitRedirectingConstructorInvocation(this); |
| 8502 | 8493 |
| 8503 @override | 8494 @override |
| 8504 void visitChildren(AstVisitor visitor) { | 8495 void visitChildren(AstVisitor visitor) { |
| 8505 _safelyVisitChild(_constructorName, visitor); | 8496 _constructorName?.accept(visitor); |
| 8506 _safelyVisitChild(_argumentList, visitor); | 8497 _argumentList?.accept(visitor); |
| 8507 } | 8498 } |
| 8508 } | 8499 } |
| 8509 | 8500 |
| 8510 /** | 8501 /** |
| 8511 * A rethrow expression. | 8502 * A rethrow expression. |
| 8512 * | 8503 * |
| 8513 * rethrowExpression ::= | 8504 * rethrowExpression ::= |
| 8514 * 'rethrow' | 8505 * 'rethrow' |
| 8515 */ | 8506 */ |
| 8516 class RethrowExpressionImpl extends ExpressionImpl | 8507 class RethrowExpressionImpl extends ExpressionImpl |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8594 @override | 8585 @override |
| 8595 void set expression(Expression expression) { | 8586 void set expression(Expression expression) { |
| 8596 _expression = _becomeParentOf(expression); | 8587 _expression = _becomeParentOf(expression); |
| 8597 } | 8588 } |
| 8598 | 8589 |
| 8599 @override | 8590 @override |
| 8600 accept(AstVisitor visitor) => visitor.visitReturnStatement(this); | 8591 accept(AstVisitor visitor) => visitor.visitReturnStatement(this); |
| 8601 | 8592 |
| 8602 @override | 8593 @override |
| 8603 void visitChildren(AstVisitor visitor) { | 8594 void visitChildren(AstVisitor visitor) { |
| 8604 _safelyVisitChild(_expression, visitor); | 8595 _expression?.accept(visitor); |
| 8605 } | 8596 } |
| 8606 } | 8597 } |
| 8607 | 8598 |
| 8608 /** | 8599 /** |
| 8609 * A script tag that can optionally occur at the beginning of a compilation unit
. | 8600 * A script tag that can optionally occur at the beginning of a compilation unit
. |
| 8610 * | 8601 * |
| 8611 * scriptTag ::= | 8602 * scriptTag ::= |
| 8612 * '#!' (~NEWLINE)* NEWLINE | 8603 * '#!' (~NEWLINE)* NEWLINE |
| 8613 */ | 8604 */ |
| 8614 class ScriptTagImpl extends AstNodeImpl implements ScriptTag { | 8605 class ScriptTagImpl extends AstNodeImpl implements ScriptTag { |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8750 void set type(TypeName typeName) { | 8741 void set type(TypeName typeName) { |
| 8751 _type = _becomeParentOf(typeName); | 8742 _type = _becomeParentOf(typeName); |
| 8752 } | 8743 } |
| 8753 | 8744 |
| 8754 @override | 8745 @override |
| 8755 accept(AstVisitor visitor) => visitor.visitSimpleFormalParameter(this); | 8746 accept(AstVisitor visitor) => visitor.visitSimpleFormalParameter(this); |
| 8756 | 8747 |
| 8757 @override | 8748 @override |
| 8758 void visitChildren(AstVisitor visitor) { | 8749 void visitChildren(AstVisitor visitor) { |
| 8759 super.visitChildren(visitor); | 8750 super.visitChildren(visitor); |
| 8760 _safelyVisitChild(_type, visitor); | 8751 _type?.accept(visitor); |
| 8761 _safelyVisitChild(identifier, visitor); | 8752 identifier?.accept(visitor); |
| 8762 } | 8753 } |
| 8763 } | 8754 } |
| 8764 | 8755 |
| 8765 /** | 8756 /** |
| 8766 * A simple identifier. | 8757 * A simple identifier. |
| 8767 * | 8758 * |
| 8768 * simpleIdentifier ::= | 8759 * simpleIdentifier ::= |
| 8769 * initialCharacter internalCharacter* | 8760 * initialCharacter internalCharacter* |
| 8770 * | 8761 * |
| 8771 * initialCharacter ::= '_' | '$' | letter | 8762 * initialCharacter ::= '_' | '$' | letter |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9454 } | 9445 } |
| 9455 | 9446 |
| 9456 @override | 9447 @override |
| 9457 Token get endToken => _argumentList.endToken; | 9448 Token get endToken => _argumentList.endToken; |
| 9458 | 9449 |
| 9459 @override | 9450 @override |
| 9460 accept(AstVisitor visitor) => visitor.visitSuperConstructorInvocation(this); | 9451 accept(AstVisitor visitor) => visitor.visitSuperConstructorInvocation(this); |
| 9461 | 9452 |
| 9462 @override | 9453 @override |
| 9463 void visitChildren(AstVisitor visitor) { | 9454 void visitChildren(AstVisitor visitor) { |
| 9464 _safelyVisitChild(_constructorName, visitor); | 9455 _constructorName?.accept(visitor); |
| 9465 _safelyVisitChild(_argumentList, visitor); | 9456 _argumentList?.accept(visitor); |
| 9466 } | 9457 } |
| 9467 } | 9458 } |
| 9468 | 9459 |
| 9469 /** | 9460 /** |
| 9470 * A super expression. | 9461 * A super expression. |
| 9471 * | 9462 * |
| 9472 * superExpression ::= | 9463 * superExpression ::= |
| 9473 * 'super' | 9464 * 'super' |
| 9474 */ | 9465 */ |
| 9475 class SuperExpressionImpl extends ExpressionImpl implements SuperExpression { | 9466 class SuperExpressionImpl extends ExpressionImpl implements SuperExpression { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9541 void set expression(Expression expression) { | 9532 void set expression(Expression expression) { |
| 9542 _expression = _becomeParentOf(expression); | 9533 _expression = _becomeParentOf(expression); |
| 9543 } | 9534 } |
| 9544 | 9535 |
| 9545 @override | 9536 @override |
| 9546 accept(AstVisitor visitor) => visitor.visitSwitchCase(this); | 9537 accept(AstVisitor visitor) => visitor.visitSwitchCase(this); |
| 9547 | 9538 |
| 9548 @override | 9539 @override |
| 9549 void visitChildren(AstVisitor visitor) { | 9540 void visitChildren(AstVisitor visitor) { |
| 9550 labels.accept(visitor); | 9541 labels.accept(visitor); |
| 9551 _safelyVisitChild(_expression, visitor); | 9542 _expression?.accept(visitor); |
| 9552 statements.accept(visitor); | 9543 statements.accept(visitor); |
| 9553 } | 9544 } |
| 9554 } | 9545 } |
| 9555 | 9546 |
| 9556 /** | 9547 /** |
| 9557 * The default case in a switch statement. | 9548 * The default case in a switch statement. |
| 9558 * | 9549 * |
| 9559 * switchDefault ::= | 9550 * switchDefault ::= |
| 9560 * [SimpleIdentifier]* 'default' ':' [Statement]* | 9551 * [SimpleIdentifier]* 'default' ':' [Statement]* |
| 9561 */ | 9552 */ |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9730 } | 9721 } |
| 9731 | 9722 |
| 9732 @override | 9723 @override |
| 9733 NodeList<SwitchMember> get members => _members; | 9724 NodeList<SwitchMember> get members => _members; |
| 9734 | 9725 |
| 9735 @override | 9726 @override |
| 9736 accept(AstVisitor visitor) => visitor.visitSwitchStatement(this); | 9727 accept(AstVisitor visitor) => visitor.visitSwitchStatement(this); |
| 9737 | 9728 |
| 9738 @override | 9729 @override |
| 9739 void visitChildren(AstVisitor visitor) { | 9730 void visitChildren(AstVisitor visitor) { |
| 9740 _safelyVisitChild(_expression, visitor); | 9731 _expression?.accept(visitor); |
| 9741 _members.accept(visitor); | 9732 _members.accept(visitor); |
| 9742 } | 9733 } |
| 9743 } | 9734 } |
| 9744 | 9735 |
| 9745 /** | 9736 /** |
| 9746 * A symbol literal expression. | 9737 * A symbol literal expression. |
| 9747 * | 9738 * |
| 9748 * symbolLiteral ::= | 9739 * symbolLiteral ::= |
| 9749 * '#' (operator | (identifier ('.' identifier)*)) | 9740 * '#' (operator | (identifier ('.' identifier)*)) |
| 9750 */ | 9741 */ |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9871 } | 9862 } |
| 9872 | 9863 |
| 9873 @override | 9864 @override |
| 9874 int get precedence => 0; | 9865 int get precedence => 0; |
| 9875 | 9866 |
| 9876 @override | 9867 @override |
| 9877 accept(AstVisitor visitor) => visitor.visitThrowExpression(this); | 9868 accept(AstVisitor visitor) => visitor.visitThrowExpression(this); |
| 9878 | 9869 |
| 9879 @override | 9870 @override |
| 9880 void visitChildren(AstVisitor visitor) { | 9871 void visitChildren(AstVisitor visitor) { |
| 9881 _safelyVisitChild(_expression, visitor); | 9872 _expression?.accept(visitor); |
| 9882 } | 9873 } |
| 9883 } | 9874 } |
| 9884 | 9875 |
| 9885 /** | 9876 /** |
| 9886 * The declaration of one or more top-level variables of the same type. | 9877 * The declaration of one or more top-level variables of the same type. |
| 9887 * | 9878 * |
| 9888 * topLevelVariableDeclaration ::= | 9879 * topLevelVariableDeclaration ::= |
| 9889 * ('final' | 'const') type? staticFinalDeclarationList ';' | 9880 * ('final' | 'const') type? staticFinalDeclarationList ';' |
| 9890 * | variableDeclaration ';' | 9881 * | variableDeclaration ';' |
| 9891 */ | 9882 */ |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9932 void set variables(VariableDeclarationList variables) { | 9923 void set variables(VariableDeclarationList variables) { |
| 9933 _variableList = _becomeParentOf(variables); | 9924 _variableList = _becomeParentOf(variables); |
| 9934 } | 9925 } |
| 9935 | 9926 |
| 9936 @override | 9927 @override |
| 9937 accept(AstVisitor visitor) => visitor.visitTopLevelVariableDeclaration(this); | 9928 accept(AstVisitor visitor) => visitor.visitTopLevelVariableDeclaration(this); |
| 9938 | 9929 |
| 9939 @override | 9930 @override |
| 9940 void visitChildren(AstVisitor visitor) { | 9931 void visitChildren(AstVisitor visitor) { |
| 9941 super.visitChildren(visitor); | 9932 super.visitChildren(visitor); |
| 9942 _safelyVisitChild(_variableList, visitor); | 9933 _variableList?.accept(visitor); |
| 9943 } | 9934 } |
| 9944 } | 9935 } |
| 9945 | 9936 |
| 9946 /** | 9937 /** |
| 9947 * A try statement. | 9938 * A try statement. |
| 9948 * | 9939 * |
| 9949 * tryStatement ::= | 9940 * tryStatement ::= |
| 9950 * 'try' [Block] ([CatchClause]+ finallyClause? | finallyClause) | 9941 * 'try' [Block] ([CatchClause]+ finallyClause? | finallyClause) |
| 9951 * | 9942 * |
| 9952 * finallyClause ::= | 9943 * finallyClause ::= |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10032 @override | 10023 @override |
| 10033 void set finallyBlock(Block block) { | 10024 void set finallyBlock(Block block) { |
| 10034 _finallyBlock = _becomeParentOf(block); | 10025 _finallyBlock = _becomeParentOf(block); |
| 10035 } | 10026 } |
| 10036 | 10027 |
| 10037 @override | 10028 @override |
| 10038 accept(AstVisitor visitor) => visitor.visitTryStatement(this); | 10029 accept(AstVisitor visitor) => visitor.visitTryStatement(this); |
| 10039 | 10030 |
| 10040 @override | 10031 @override |
| 10041 void visitChildren(AstVisitor visitor) { | 10032 void visitChildren(AstVisitor visitor) { |
| 10042 _safelyVisitChild(_body, visitor); | 10033 _body?.accept(visitor); |
| 10043 _catchClauses.accept(visitor); | 10034 _catchClauses.accept(visitor); |
| 10044 _safelyVisitChild(_finallyBlock, visitor); | 10035 _finallyBlock?.accept(visitor); |
| 10045 } | 10036 } |
| 10046 } | 10037 } |
| 10047 | 10038 |
| 10048 /** | 10039 /** |
| 10049 * The declaration of a type alias. | 10040 * The declaration of a type alias. |
| 10050 * | 10041 * |
| 10051 * typeAlias ::= | 10042 * typeAlias ::= |
| 10052 * 'typedef' typeAliasBody | 10043 * 'typedef' typeAliasBody |
| 10053 * | 10044 * |
| 10054 * typeAliasBody ::= | 10045 * typeAliasBody ::= |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10173 @override | 10164 @override |
| 10174 void set typeArguments(TypeArgumentList typeArguments) { | 10165 void set typeArguments(TypeArgumentList typeArguments) { |
| 10175 _typeArguments = _becomeParentOf(typeArguments); | 10166 _typeArguments = _becomeParentOf(typeArguments); |
| 10176 } | 10167 } |
| 10177 | 10168 |
| 10178 ChildEntities get _childEntities => | 10169 ChildEntities get _childEntities => |
| 10179 new ChildEntities()..add(constKeyword)..add(_typeArguments); | 10170 new ChildEntities()..add(constKeyword)..add(_typeArguments); |
| 10180 | 10171 |
| 10181 @override | 10172 @override |
| 10182 void visitChildren(AstVisitor visitor) { | 10173 void visitChildren(AstVisitor visitor) { |
| 10183 _safelyVisitChild(_typeArguments, visitor); | 10174 _typeArguments?.accept(visitor); |
| 10184 } | 10175 } |
| 10185 } | 10176 } |
| 10186 | 10177 |
| 10187 /** | 10178 /** |
| 10188 * The name of a type, which can optionally include type arguments. | 10179 * The name of a type, which can optionally include type arguments. |
| 10189 * | 10180 * |
| 10190 * typeName ::= | 10181 * typeName ::= |
| 10191 * [Identifier] typeArguments? | 10182 * [Identifier] typeArguments? |
| 10192 */ | 10183 */ |
| 10193 class TypeNameImpl extends AstNodeImpl implements TypeName { | 10184 class TypeNameImpl extends AstNodeImpl implements TypeName { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10257 @override | 10248 @override |
| 10258 void set typeArguments(TypeArgumentList typeArguments) { | 10249 void set typeArguments(TypeArgumentList typeArguments) { |
| 10259 _typeArguments = _becomeParentOf(typeArguments); | 10250 _typeArguments = _becomeParentOf(typeArguments); |
| 10260 } | 10251 } |
| 10261 | 10252 |
| 10262 @override | 10253 @override |
| 10263 accept(AstVisitor visitor) => visitor.visitTypeName(this); | 10254 accept(AstVisitor visitor) => visitor.visitTypeName(this); |
| 10264 | 10255 |
| 10265 @override | 10256 @override |
| 10266 void visitChildren(AstVisitor visitor) { | 10257 void visitChildren(AstVisitor visitor) { |
| 10267 _safelyVisitChild(_name, visitor); | 10258 _name?.accept(visitor); |
| 10268 _safelyVisitChild(_typeArguments, visitor); | 10259 _typeArguments?.accept(visitor); |
| 10269 } | 10260 } |
| 10270 } | 10261 } |
| 10271 | 10262 |
| 10272 /** | 10263 /** |
| 10273 * A type parameter. | 10264 * A type parameter. |
| 10274 * | 10265 * |
| 10275 * typeParameter ::= | 10266 * typeParameter ::= |
| 10276 * [SimpleIdentifier] ('extends' [TypeName])? | 10267 * [SimpleIdentifier] ('extends' [TypeName])? |
| 10277 */ | 10268 */ |
| 10278 class TypeParameterImpl extends DeclarationImpl implements TypeParameter { | 10269 class TypeParameterImpl extends DeclarationImpl implements TypeParameter { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10340 void set name(SimpleIdentifier identifier) { | 10331 void set name(SimpleIdentifier identifier) { |
| 10341 _name = _becomeParentOf(identifier); | 10332 _name = _becomeParentOf(identifier); |
| 10342 } | 10333 } |
| 10343 | 10334 |
| 10344 @override | 10335 @override |
| 10345 accept(AstVisitor visitor) => visitor.visitTypeParameter(this); | 10336 accept(AstVisitor visitor) => visitor.visitTypeParameter(this); |
| 10346 | 10337 |
| 10347 @override | 10338 @override |
| 10348 void visitChildren(AstVisitor visitor) { | 10339 void visitChildren(AstVisitor visitor) { |
| 10349 super.visitChildren(visitor); | 10340 super.visitChildren(visitor); |
| 10350 _safelyVisitChild(_name, visitor); | 10341 _name?.accept(visitor); |
| 10351 _safelyVisitChild(_bound, visitor); | 10342 _bound?.accept(visitor); |
| 10352 } | 10343 } |
| 10353 } | 10344 } |
| 10354 | 10345 |
| 10355 /** | 10346 /** |
| 10356 * Type parameters within a declaration. | 10347 * Type parameters within a declaration. |
| 10357 * | 10348 * |
| 10358 * typeParameterList ::= | 10349 * typeParameterList ::= |
| 10359 * '<' [TypeParameter] (',' [TypeParameter])* '>' | 10350 * '<' [TypeParameter] (',' [TypeParameter])* '>' |
| 10360 */ | 10351 */ |
| 10361 class TypeParameterListImpl extends AstNodeImpl implements TypeParameterList { | 10352 class TypeParameterListImpl extends AstNodeImpl implements TypeParameterList { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10473 parseUriWithException(Uri.encodeFull(uriContent)); | 10464 parseUriWithException(Uri.encodeFull(uriContent)); |
| 10474 } on URISyntaxException { | 10465 } on URISyntaxException { |
| 10475 return UriValidationCode.INVALID_URI; | 10466 return UriValidationCode.INVALID_URI; |
| 10476 } | 10467 } |
| 10477 return null; | 10468 return null; |
| 10478 } | 10469 } |
| 10479 | 10470 |
| 10480 @override | 10471 @override |
| 10481 void visitChildren(AstVisitor visitor) { | 10472 void visitChildren(AstVisitor visitor) { |
| 10482 super.visitChildren(visitor); | 10473 super.visitChildren(visitor); |
| 10483 _safelyVisitChild(_uri, visitor); | 10474 _uri?.accept(visitor); |
| 10484 } | 10475 } |
| 10485 } | 10476 } |
| 10486 | 10477 |
| 10487 /** | 10478 /** |
| 10488 * Validation codes returned by [UriBasedDirective.validate]. | 10479 * Validation codes returned by [UriBasedDirective.validate]. |
| 10489 */ | 10480 */ |
| 10490 class UriValidationCodeImpl implements UriValidationCode { | 10481 class UriValidationCodeImpl implements UriValidationCode { |
| 10491 static const UriValidationCode INVALID_URI = | 10482 static const UriValidationCode INVALID_URI = |
| 10492 const UriValidationCodeImpl('INVALID_URI'); | 10483 const UriValidationCodeImpl('INVALID_URI'); |
| 10493 | 10484 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10618 void set name(SimpleIdentifier identifier) { | 10609 void set name(SimpleIdentifier identifier) { |
| 10619 _name = _becomeParentOf(identifier); | 10610 _name = _becomeParentOf(identifier); |
| 10620 } | 10611 } |
| 10621 | 10612 |
| 10622 @override | 10613 @override |
| 10623 accept(AstVisitor visitor) => visitor.visitVariableDeclaration(this); | 10614 accept(AstVisitor visitor) => visitor.visitVariableDeclaration(this); |
| 10624 | 10615 |
| 10625 @override | 10616 @override |
| 10626 void visitChildren(AstVisitor visitor) { | 10617 void visitChildren(AstVisitor visitor) { |
| 10627 super.visitChildren(visitor); | 10618 super.visitChildren(visitor); |
| 10628 _safelyVisitChild(_name, visitor); | 10619 _name?.accept(visitor); |
| 10629 _safelyVisitChild(_initializer, visitor); | 10620 _initializer?.accept(visitor); |
| 10630 } | 10621 } |
| 10631 } | 10622 } |
| 10632 | 10623 |
| 10633 /** | 10624 /** |
| 10634 * The declaration of one or more variables of the same type. | 10625 * The declaration of one or more variables of the same type. |
| 10635 * | 10626 * |
| 10636 * variableDeclarationList ::= | 10627 * variableDeclarationList ::= |
| 10637 * finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])* | 10628 * finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])* |
| 10638 * | 10629 * |
| 10639 * finalConstVarOrType ::= | 10630 * finalConstVarOrType ::= |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10713 | 10704 |
| 10714 @override | 10705 @override |
| 10715 NodeList<VariableDeclaration> get variables => _variables; | 10706 NodeList<VariableDeclaration> get variables => _variables; |
| 10716 | 10707 |
| 10717 @override | 10708 @override |
| 10718 accept(AstVisitor visitor) => visitor.visitVariableDeclarationList(this); | 10709 accept(AstVisitor visitor) => visitor.visitVariableDeclarationList(this); |
| 10719 | 10710 |
| 10720 @override | 10711 @override |
| 10721 void visitChildren(AstVisitor visitor) { | 10712 void visitChildren(AstVisitor visitor) { |
| 10722 super.visitChildren(visitor); | 10713 super.visitChildren(visitor); |
| 10723 _safelyVisitChild(_type, visitor); | 10714 _type?.accept(visitor); |
| 10724 _variables.accept(visitor); | 10715 _variables.accept(visitor); |
| 10725 } | 10716 } |
| 10726 } | 10717 } |
| 10727 | 10718 |
| 10728 /** | 10719 /** |
| 10729 * A list of variables that are being declared in a context where a statement is | 10720 * A list of variables that are being declared in a context where a statement is |
| 10730 * required. | 10721 * required. |
| 10731 * | 10722 * |
| 10732 * variableDeclarationStatement ::= | 10723 * variableDeclarationStatement ::= |
| 10733 * [VariableDeclarationList] ';' | 10724 * [VariableDeclarationList] ';' |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10768 @override | 10759 @override |
| 10769 void set variables(VariableDeclarationList variables) { | 10760 void set variables(VariableDeclarationList variables) { |
| 10770 _variableList = _becomeParentOf(variables); | 10761 _variableList = _becomeParentOf(variables); |
| 10771 } | 10762 } |
| 10772 | 10763 |
| 10773 @override | 10764 @override |
| 10774 accept(AstVisitor visitor) => visitor.visitVariableDeclarationStatement(this); | 10765 accept(AstVisitor visitor) => visitor.visitVariableDeclarationStatement(this); |
| 10775 | 10766 |
| 10776 @override | 10767 @override |
| 10777 void visitChildren(AstVisitor visitor) { | 10768 void visitChildren(AstVisitor visitor) { |
| 10778 _safelyVisitChild(_variableList, visitor); | 10769 _variableList?.accept(visitor); |
| 10779 } | 10770 } |
| 10780 } | 10771 } |
| 10781 | 10772 |
| 10782 /** | 10773 /** |
| 10783 * A while statement. | 10774 * A while statement. |
| 10784 * | 10775 * |
| 10785 * whileStatement ::= | 10776 * whileStatement ::= |
| 10786 * 'while' '(' [Expression] ')' [Statement] | 10777 * 'while' '(' [Expression] ')' [Statement] |
| 10787 */ | 10778 */ |
| 10788 class WhileStatementImpl extends StatementImpl implements WhileStatement { | 10779 class WhileStatementImpl extends StatementImpl implements WhileStatement { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10848 } | 10839 } |
| 10849 | 10840 |
| 10850 @override | 10841 @override |
| 10851 Token get endToken => _body.endToken; | 10842 Token get endToken => _body.endToken; |
| 10852 | 10843 |
| 10853 @override | 10844 @override |
| 10854 accept(AstVisitor visitor) => visitor.visitWhileStatement(this); | 10845 accept(AstVisitor visitor) => visitor.visitWhileStatement(this); |
| 10855 | 10846 |
| 10856 @override | 10847 @override |
| 10857 void visitChildren(AstVisitor visitor) { | 10848 void visitChildren(AstVisitor visitor) { |
| 10858 _safelyVisitChild(_condition, visitor); | 10849 _condition?.accept(visitor); |
| 10859 _safelyVisitChild(_body, visitor); | 10850 _body?.accept(visitor); |
| 10860 } | 10851 } |
| 10861 } | 10852 } |
| 10862 | 10853 |
| 10863 /** | 10854 /** |
| 10864 * The with clause in a class declaration. | 10855 * The with clause in a class declaration. |
| 10865 * | 10856 * |
| 10866 * withClause ::= | 10857 * withClause ::= |
| 10867 * 'with' [TypeName] (',' [TypeName])* | 10858 * 'with' [TypeName] (',' [TypeName])* |
| 10868 */ | 10859 */ |
| 10869 class WithClauseImpl extends AstNodeImpl implements WithClause { | 10860 class WithClauseImpl extends AstNodeImpl implements WithClause { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10973 @override | 10964 @override |
| 10974 void set expression(Expression expression) { | 10965 void set expression(Expression expression) { |
| 10975 _expression = _becomeParentOf(expression); | 10966 _expression = _becomeParentOf(expression); |
| 10976 } | 10967 } |
| 10977 | 10968 |
| 10978 @override | 10969 @override |
| 10979 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); | 10970 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); |
| 10980 | 10971 |
| 10981 @override | 10972 @override |
| 10982 void visitChildren(AstVisitor visitor) { | 10973 void visitChildren(AstVisitor visitor) { |
| 10983 _safelyVisitChild(_expression, visitor); | 10974 _expression?.accept(visitor); |
| 10984 } | 10975 } |
| 10985 } | 10976 } |
| OLD | NEW |