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

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

Issue 975453004: Reformat (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/error_formatter.dart ('k') | pkg/analyzer/lib/src/generated/constant.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.ast; 8 library engine.ast;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 _metadata.clear(); 151 _metadata.clear();
152 _metadata.addAll(metadata); 152 _metadata.addAll(metadata);
153 } 153 }
154 154
155 /** 155 /**
156 * Return a list containing the comment and annotations associated with this 156 * Return a list containing the comment and annotations associated with this
157 * node, sorted in lexical order. 157 * node, sorted in lexical order.
158 */ 158 */
159 List<AstNode> get sortedCommentAndAnnotations { 159 List<AstNode> get sortedCommentAndAnnotations {
160 return <AstNode>[] 160 return <AstNode>[]
161 ..add(_comment) 161 ..add(_comment)
162 ..addAll(_metadata) 162 ..addAll(_metadata)
163 ..sort(AstNode.LEXICAL_ORDER); 163 ..sort(AstNode.LEXICAL_ORDER);
164 } 164 }
165 165
166 /** 166 /**
167 * Return a holder of child entities that subclasses can add to. 167 * Return a holder of child entities that subclasses can add to.
168 */ 168 */
169 ChildEntities get _childEntities { 169 ChildEntities get _childEntities {
170 ChildEntities result = new ChildEntities(); 170 ChildEntities result = new ChildEntities();
171 if (_commentIsBeforeAnnotations()) { 171 if (_commentIsBeforeAnnotations()) {
172 result 172 result
173 ..add(_comment) 173 ..add(_comment)
174 ..addAll(_metadata); 174 ..addAll(_metadata);
175 } else { 175 } else {
176 result.addAll(sortedCommentAndAnnotations); 176 result.addAll(sortedCommentAndAnnotations);
177 } 177 }
178 return result; 178 return result;
179 } 179 }
180 180
181 @override 181 @override
182 void visitChildren(AstVisitor visitor) { 182 void visitChildren(AstVisitor visitor) {
183 if (_commentIsBeforeAnnotations()) { 183 if (_commentIsBeforeAnnotations()) {
184 _safelyVisitChild(_comment, visitor); 184 _safelyVisitChild(_comment, visitor);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 */ 279 */
280 void set arguments(ArgumentList arguments) { 280 void set arguments(ArgumentList arguments) {
281 _arguments = _becomeParentOf(arguments); 281 _arguments = _becomeParentOf(arguments);
282 } 282 }
283 283
284 @override 284 @override
285 Token get beginToken => atSign; 285 Token get beginToken => atSign;
286 286
287 @override 287 @override
288 Iterable get childEntities => new ChildEntities() 288 Iterable get childEntities => new ChildEntities()
289 ..add(atSign) 289 ..add(atSign)
290 ..add(_name) 290 ..add(_name)
291 ..add(period) 291 ..add(period)
292 ..add(_constructorName) 292 ..add(_constructorName)
293 ..add(_arguments); 293 ..add(_arguments);
294 294
295 /** 295 /**
296 * Return the name of the constructor being invoked, or `null` if this 296 * Return the name of the constructor being invoked, or `null` if this
297 * annotation is not the invocation of a named constructor. 297 * annotation is not the invocation of a named constructor.
298 */ 298 */
299 SimpleIdentifier get constructorName => _constructorName; 299 SimpleIdentifier get constructorName => _constructorName;
300 300
301 /** 301 /**
302 * Set the name of the constructor being invoked to the given [name]. 302 * Set the name of the constructor being invoked to the given [name].
303 */ 303 */
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 * based on propagated type information. The list must be the same length as 405 * based on propagated type information. The list must be the same length as
406 * the number of arguments, but can contain `null` entries if a given argument 406 * the number of arguments, but can contain `null` entries if a given argument
407 * does not correspond to a formal parameter. 407 * does not correspond to a formal parameter.
408 */ 408 */
409 List<ParameterElement> _correspondingPropagatedParameters; 409 List<ParameterElement> _correspondingPropagatedParameters;
410 410
411 /** 411 /**
412 * Initialize a newly created list of arguments. The list of [arguments] can 412 * Initialize a newly created list of arguments. The list of [arguments] can
413 * be `null` if there are no arguments. 413 * be `null` if there are no arguments.
414 */ 414 */
415 ArgumentList(this.leftParenthesis, List<Expression> arguments, 415 ArgumentList(
416 this.rightParenthesis) { 416 this.leftParenthesis, List<Expression> arguments, this.rightParenthesis) {
417 _arguments = new NodeList<Expression>(this, arguments); 417 _arguments = new NodeList<Expression>(this, arguments);
418 } 418 }
419 419
420 /** 420 /**
421 * Return the expressions producing the values of the arguments. Although the 421 * Return the expressions producing the values of the arguments. Although the
422 * language requires that positional arguments appear before named arguments, 422 * language requires that positional arguments appear before named arguments,
423 * this class allows them to be intermixed. 423 * this class allows them to be intermixed.
424 */ 424 */
425 NodeList<Expression> get arguments => _arguments; 425 NodeList<Expression> get arguments => _arguments;
426 426
427 @override 427 @override
428 Token get beginToken => leftParenthesis; 428 Token get beginToken => leftParenthesis;
429 429
430 /** 430 /**
431 * TODO(paulberry): Add commas. 431 * TODO(paulberry): Add commas.
432 */ 432 */
433 @override 433 @override
434 Iterable get childEntities => new ChildEntities() 434 Iterable get childEntities => new ChildEntities()
435 ..add(leftParenthesis) 435 ..add(leftParenthesis)
436 ..addAll(_arguments) 436 ..addAll(_arguments)
437 ..add(rightParenthesis); 437 ..add(rightParenthesis);
438 438
439 /** 439 /**
440 * Set the parameter elements corresponding to each of the arguments in this 440 * Set the parameter elements corresponding to each of the arguments in this
441 * list to the given list of [parameters]. The list of parameters must be the 441 * list to the given list of [parameters]. The list of parameters must be the
442 * same length as the number of arguments, but can contain `null` entries if a 442 * same length as the number of arguments, but can contain `null` entries if a
443 * given argument does not correspond to a formal parameter. 443 * given argument does not correspond to a formal parameter.
444 */ 444 */
445 void set 445 void set correspondingPropagatedParameters(
446 correspondingPropagatedParameters(List<ParameterElement> parameters) { 446 List<ParameterElement> parameters) {
447 if (parameters.length != _arguments.length) { 447 if (parameters.length != _arguments.length) {
448 throw new IllegalArgumentException( 448 throw new IllegalArgumentException(
449 "Expected ${_arguments.length} parameters, not ${parameters.length}"); 449 "Expected ${_arguments.length} parameters, not ${parameters.length}");
450 } 450 }
451 _correspondingPropagatedParameters = parameters; 451 _correspondingPropagatedParameters = parameters;
452 } 452 }
453 453
454 /** 454 /**
455 * Set the parameter elements corresponding to each of the arguments in this 455 * Set the parameter elements corresponding to each of the arguments in this
456 * list to the given list of parameters. The list of parameters must be the 456 * list to the given list of parameters. The list of parameters must be the
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 AsExpression(Expression expression, this.asOperator, TypeName type) { 589 AsExpression(Expression expression, this.asOperator, TypeName type) {
590 _expression = _becomeParentOf(expression); 590 _expression = _becomeParentOf(expression);
591 _type = _becomeParentOf(type); 591 _type = _becomeParentOf(type);
592 } 592 }
593 593
594 @override 594 @override
595 Token get beginToken => _expression.beginToken; 595 Token get beginToken => _expression.beginToken;
596 596
597 @override 597 @override
598 Iterable get childEntities => new ChildEntities() 598 Iterable get childEntities => new ChildEntities()
599 ..add(_expression) 599 ..add(_expression)
600 ..add(asOperator) 600 ..add(asOperator)
601 ..add(_type); 601 ..add(_type);
602 602
603 @override 603 @override
604 Token get endToken => _type.endToken; 604 Token get endToken => _type.endToken;
605 605
606 /** 606 /**
607 * Return the expression used to compute the value being cast. 607 * Return the expression used to compute the value being cast.
608 */ 608 */
609 Expression get expression => _expression; 609 Expression get expression => _expression;
610 610
611 /** 611 /**
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 Token rightParenthesis; 669 Token rightParenthesis;
670 670
671 /** 671 /**
672 * The semicolon terminating the statement. 672 * The semicolon terminating the statement.
673 */ 673 */
674 Token semicolon; 674 Token semicolon;
675 675
676 /** 676 /**
677 * Initialize a newly created assert statement. 677 * Initialize a newly created assert statement.
678 */ 678 */
679 AssertStatement(this.assertKeyword, this.leftParenthesis, Expression condition , 679 AssertStatement(this.assertKeyword, this.leftParenthesis,
680 this.rightParenthesis, this.semicolon) { 680 Expression condition, this.rightParenthesis, this.semicolon) {
681 _condition = _becomeParentOf(condition); 681 _condition = _becomeParentOf(condition);
682 } 682 }
683 683
684 @override 684 @override
685 Token get beginToken => assertKeyword; 685 Token get beginToken => assertKeyword;
686 686
687 @override 687 @override
688 Iterable get childEntities => new ChildEntities() 688 Iterable get childEntities => new ChildEntities()
689 ..add(assertKeyword) 689 ..add(assertKeyword)
690 ..add(leftParenthesis) 690 ..add(leftParenthesis)
691 ..add(_condition) 691 ..add(_condition)
692 ..add(rightParenthesis) 692 ..add(rightParenthesis)
693 ..add(semicolon); 693 ..add(semicolon);
694 694
695 /** 695 /**
696 * Return the condition that is being asserted to be `true`. 696 * Return the condition that is being asserted to be `true`.
697 */ 697 */
698 Expression get condition => _condition; 698 Expression get condition => _condition;
699 699
700 /** 700 /**
701 * Set the condition that is being asserted to be `true` to the given 701 * Set the condition that is being asserted to be `true` to the given
702 * [expression]. 702 * [expression].
703 */ 703 */
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 * The element associated with the operator based on the propagated type of 765 * The element associated with the operator based on the propagated type of
766 * the left-hand-side, or `null` if the AST structure has not been resolved, 766 * the left-hand-side, or `null` if the AST structure has not been resolved,
767 * if the operator is not a compound operator, or if the operator could not be 767 * if the operator is not a compound operator, or if the operator could not be
768 * resolved. 768 * resolved.
769 */ 769 */
770 MethodElement propagatedElement; 770 MethodElement propagatedElement;
771 771
772 /** 772 /**
773 * Initialize a newly created assignment expression. 773 * Initialize a newly created assignment expression.
774 */ 774 */
775 AssignmentExpression(Expression leftHandSide, this.operator, 775 AssignmentExpression(
776 Expression rightHandSide) { 776 Expression leftHandSide, this.operator, Expression rightHandSide) {
777 if (leftHandSide == null || rightHandSide == null) { 777 if (leftHandSide == null || rightHandSide == null) {
778 String message; 778 String message;
779 if (leftHandSide == null) { 779 if (leftHandSide == null) {
780 if (rightHandSide == null) { 780 if (rightHandSide == null) {
781 message = "Both the left-hand and right-hand sides are null"; 781 message = "Both the left-hand and right-hand sides are null";
782 } else { 782 } else {
783 message = "The left-hand size is null"; 783 message = "The left-hand size is null";
784 } 784 }
785 } else { 785 } else {
786 message = "The right-hand size is null"; 786 message = "The right-hand size is null";
787 } 787 }
788 AnalysisEngine.instance.logger.logError( 788 AnalysisEngine.instance.logger.logError(
789 message, 789 message, new CaughtException(new AnalysisException(message), null));
790 new CaughtException(new AnalysisException(message), null));
791 } 790 }
792 _leftHandSide = _becomeParentOf(leftHandSide); 791 _leftHandSide = _becomeParentOf(leftHandSide);
793 _rightHandSide = _becomeParentOf(rightHandSide); 792 _rightHandSide = _becomeParentOf(rightHandSide);
794 } 793 }
795 794
796 @override 795 @override
797 Token get beginToken => _leftHandSide.beginToken; 796 Token get beginToken => _leftHandSide.beginToken;
798 797
799 /** 798 /**
800 * Return the best element available for this operator. If resolution was able 799 * Return the best element available for this operator. If resolution was able
801 * to find a better element based on type propagation, that element will be 800 * to find a better element based on type propagation, that element will be
802 * returned. Otherwise, the element found using the result of static analysis 801 * returned. Otherwise, the element found using the result of static analysis
803 * will be returned. If resolution has not been performed, then `null` will be 802 * will be returned. If resolution has not been performed, then `null` will be
804 * returned. 803 * returned.
805 */ 804 */
806 MethodElement get bestElement { 805 MethodElement get bestElement {
807 MethodElement element = propagatedElement; 806 MethodElement element = propagatedElement;
808 if (element == null) { 807 if (element == null) {
809 element = staticElement; 808 element = staticElement;
810 } 809 }
811 return element; 810 return element;
812 } 811 }
813 812
814 @override 813 @override
815 Iterable get childEntities => new ChildEntities() 814 Iterable get childEntities => new ChildEntities()
816 ..add(_leftHandSide) 815 ..add(_leftHandSide)
817 ..add(operator) 816 ..add(operator)
818 ..add(_rightHandSide); 817 ..add(_rightHandSide);
819 818
820 @override 819 @override
821 Token get endToken => _rightHandSide.endToken; 820 Token get endToken => _rightHandSide.endToken;
822 821
823 /** 822 /**
824 * Set the expression used to compute the left hand side to the given 823 * Set the expression used to compute the left hand side to the given
825 * [expression]. 824 * [expression].
826 */ 825 */
827 Expression get leftHandSide => _leftHandSide; 826 Expression get leftHandSide => _leftHandSide;
828 827
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 /** 961 /**
963 * A flag indicating whether tokens should be cloned while cloning an AST 962 * A flag indicating whether tokens should be cloned while cloning an AST
964 * structure. 963 * structure.
965 */ 964 */
966 final bool cloneTokens; 965 final bool cloneTokens;
967 966
968 /** 967 /**
969 * Initialize a newly created AST cloner to optionally clone tokens while 968 * Initialize a newly created AST cloner to optionally clone tokens while
970 * cloning AST nodes if [cloneTokens] is `true`. 969 * cloning AST nodes if [cloneTokens] is `true`.
971 */ 970 */
972 AstCloner([this.cloneTokens = false]); // TODO(brianwilkerson) Change this to be a named parameter. 971 AstCloner(
972 [this.cloneTokens = false]); // TODO(brianwilkerson) Change this to be a n amed parameter.
973 973
974 /** 974 /**
975 * Return a clone of the given [node]. 975 * Return a clone of the given [node].
976 */ 976 */
977 AstNode cloneNode(AstNode node) { 977 AstNode cloneNode(AstNode node) {
978 if (node == null) { 978 if (node == null) {
979 return null; 979 return null;
980 } 980 }
981 return node.accept(this) as AstNode; 981 return node.accept(this) as AstNode;
982 } 982 }
(...skipping 30 matching lines...) Expand all
1013 return tokens.map((Token token) => token.copy()).toList(); 1013 return tokens.map((Token token) => token.copy()).toList();
1014 } 1014 }
1015 return tokens; 1015 return tokens;
1016 } 1016 }
1017 1017
1018 @override 1018 @override
1019 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => 1019 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) =>
1020 new AdjacentStrings(cloneNodeList(node.strings)); 1020 new AdjacentStrings(cloneNodeList(node.strings));
1021 1021
1022 @override 1022 @override
1023 Annotation visitAnnotation(Annotation node) => 1023 Annotation visitAnnotation(Annotation node) => new Annotation(
1024 new Annotation( 1024 cloneToken(node.atSign), cloneNode(node.name), cloneToken(node.period),
1025 cloneToken(node.atSign), 1025 cloneNode(node.constructorName), cloneNode(node.arguments));
1026 cloneNode(node.name),
1027 cloneToken(node.period),
1028 cloneNode(node.constructorName),
1029 cloneNode(node.arguments));
1030 1026
1031 @override 1027 @override
1032 ArgumentList visitArgumentList(ArgumentList node) => 1028 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(
1033 new ArgumentList( 1029 cloneToken(node.leftParenthesis), cloneNodeList(node.arguments),
1034 cloneToken(node.leftParenthesis), 1030 cloneToken(node.rightParenthesis));
1035 cloneNodeList(node.arguments),
1036 cloneToken(node.rightParenthesis));
1037 1031
1038 @override 1032 @override
1039 AsExpression visitAsExpression(AsExpression node) => 1033 AsExpression visitAsExpression(AsExpression node) => new AsExpression(
1040 new AsExpression( 1034 cloneNode(node.expression), cloneToken(node.asOperator),
1041 cloneNode(node.expression), 1035 cloneNode(node.type));
1042 cloneToken(node.asOperator),
1043 cloneNode(node.type));
1044 1036
1045 @override 1037 @override
1046 AstNode visitAssertStatement(AssertStatement node) => 1038 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(
1047 new AssertStatement( 1039 cloneToken(node.assertKeyword), cloneToken(node.leftParenthesis),
1048 cloneToken(node.assertKeyword), 1040 cloneNode(node.condition), cloneToken(node.rightParenthesis),
1049 cloneToken(node.leftParenthesis), 1041 cloneToken(node.semicolon));
1050 cloneNode(node.condition),
1051 cloneToken(node.rightParenthesis),
1052 cloneToken(node.semicolon));
1053 1042
1054 @override 1043 @override
1055 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => 1044 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) =>
1056 new AssignmentExpression( 1045 new AssignmentExpression(cloneNode(node.leftHandSide),
1057 cloneNode(node.leftHandSide), 1046 cloneToken(node.operator), cloneNode(node.rightHandSide));
1058 cloneToken(node.operator),
1059 cloneNode(node.rightHandSide));
1060 1047
1061 @override 1048 @override
1062 AwaitExpression visitAwaitExpression(AwaitExpression node) => 1049 AwaitExpression visitAwaitExpression(AwaitExpression node) =>
1063 new AwaitExpression(cloneToken(node.awaitKeyword), cloneNode(node.expressi on)); 1050 new AwaitExpression(
1051 cloneToken(node.awaitKeyword), cloneNode(node.expression));
1064 1052
1065 @override 1053 @override
1066 BinaryExpression visitBinaryExpression(BinaryExpression node) => 1054 BinaryExpression visitBinaryExpression(BinaryExpression node) =>
1067 new BinaryExpression( 1055 new BinaryExpression(cloneNode(node.leftOperand),
1068 cloneNode(node.leftOperand), 1056 cloneToken(node.operator), cloneNode(node.rightOperand));
1069 cloneToken(node.operator),
1070 cloneNode(node.rightOperand));
1071 1057
1072 @override 1058 @override
1073 Block visitBlock(Block node) => 1059 Block visitBlock(Block node) => new Block(cloneToken(node.leftBracket),
1074 new Block( 1060 cloneNodeList(node.statements), cloneToken(node.rightBracket));
1075 cloneToken(node.leftBracket),
1076 cloneNodeList(node.statements),
1077 cloneToken(node.rightBracket));
1078 1061
1079 @override 1062 @override
1080 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => 1063 BlockFunctionBody visitBlockFunctionBody(
1081 new BlockFunctionBody( 1064 BlockFunctionBody node) => new BlockFunctionBody(
1082 cloneToken(node.keyword), 1065 cloneToken(node.keyword), cloneToken(node.star), cloneNode(node.block));
1083 cloneToken(node.star),
1084 cloneNode(node.block));
1085 1066
1086 @override 1067 @override
1087 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) => 1068 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) =>
1088 new BooleanLiteral(cloneToken(node.literal), node.value); 1069 new BooleanLiteral(cloneToken(node.literal), node.value);
1089 1070
1090 @override 1071 @override
1091 BreakStatement visitBreakStatement(BreakStatement node) => 1072 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
1092 new BreakStatement( 1073 cloneToken(node.breakKeyword), cloneNode(node.label),
1093 cloneToken(node.breakKeyword), 1074 cloneToken(node.semicolon));
1094 cloneNode(node.label),
1095 cloneToken(node.semicolon));
1096 1075
1097 @override 1076 @override
1098 CascadeExpression visitCascadeExpression(CascadeExpression node) => 1077 CascadeExpression visitCascadeExpression(CascadeExpression node) =>
1099 new CascadeExpression( 1078 new CascadeExpression(
1100 cloneNode(node.target), 1079 cloneNode(node.target), cloneNodeList(node.cascadeSections));
1101 cloneNodeList(node.cascadeSections));
1102 1080
1103 @override 1081 @override
1104 CatchClause visitCatchClause(CatchClause node) => 1082 CatchClause visitCatchClause(CatchClause node) => new CatchClause(
1105 new CatchClause( 1083 cloneToken(node.onKeyword), cloneNode(node.exceptionType),
1106 cloneToken(node.onKeyword), 1084 cloneToken(node.catchKeyword), cloneToken(node.leftParenthesis),
1107 cloneNode(node.exceptionType), 1085 cloneNode(node.exceptionParameter), cloneToken(node.comma),
1108 cloneToken(node.catchKeyword), 1086 cloneNode(node.stackTraceParameter), cloneToken(node.rightParenthesis),
1109 cloneToken(node.leftParenthesis), 1087 cloneNode(node.body));
1110 cloneNode(node.exceptionParameter),
1111 cloneToken(node.comma),
1112 cloneNode(node.stackTraceParameter),
1113 cloneToken(node.rightParenthesis),
1114 cloneNode(node.body));
1115 1088
1116 @override 1089 @override
1117 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { 1090 ClassDeclaration visitClassDeclaration(ClassDeclaration node) {
1118 ClassDeclaration copy = new ClassDeclaration( 1091 ClassDeclaration copy = new ClassDeclaration(
1119 cloneNode(node.documentationComment), 1092 cloneNode(node.documentationComment), cloneNodeList(node.metadata),
1120 cloneNodeList(node.metadata), 1093 cloneToken(node.abstractKeyword), cloneToken(node.classKeyword),
1121 cloneToken(node.abstractKeyword), 1094 cloneNode(node.name), cloneNode(node.typeParameters),
1122 cloneToken(node.classKeyword), 1095 cloneNode(node.extendsClause), cloneNode(node.withClause),
1123 cloneNode(node.name), 1096 cloneNode(node.implementsClause), cloneToken(node.leftBracket),
1124 cloneNode(node.typeParameters), 1097 cloneNodeList(node.members), cloneToken(node.rightBracket));
1125 cloneNode(node.extendsClause),
1126 cloneNode(node.withClause),
1127 cloneNode(node.implementsClause),
1128 cloneToken(node.leftBracket),
1129 cloneNodeList(node.members),
1130 cloneToken(node.rightBracket));
1131 copy.nativeClause = cloneNode(node.nativeClause); 1098 copy.nativeClause = cloneNode(node.nativeClause);
1132 return copy; 1099 return copy;
1133 } 1100 }
1134 1101
1135 @override 1102 @override
1136 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => 1103 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
1137 new ClassTypeAlias( 1104 cloneNode(node.documentationComment), cloneNodeList(node.metadata),
1138 cloneNode(node.documentationComment), 1105 cloneToken(node.typedefKeyword), cloneNode(node.name),
1139 cloneNodeList(node.metadata), 1106 cloneNode(node.typeParameters), cloneToken(node.equals),
1140 cloneToken(node.typedefKeyword), 1107 cloneToken(node.abstractKeyword), cloneNode(node.superclass),
1141 cloneNode(node.name), 1108 cloneNode(node.withClause), cloneNode(node.implementsClause),
1142 cloneNode(node.typeParameters), 1109 cloneToken(node.semicolon));
1143 cloneToken(node.equals),
1144 cloneToken(node.abstractKeyword),
1145 cloneNode(node.superclass),
1146 cloneNode(node.withClause),
1147 cloneNode(node.implementsClause),
1148 cloneToken(node.semicolon));
1149 1110
1150 @override 1111 @override
1151 Comment visitComment(Comment node) { 1112 Comment visitComment(Comment node) {
1152 if (node.isDocumentation) { 1113 if (node.isDocumentation) {
1153 return Comment.createDocumentationCommentWithReferences( 1114 return Comment.createDocumentationCommentWithReferences(
1154 cloneTokenList(node.tokens), 1115 cloneTokenList(node.tokens), cloneNodeList(node.references));
1155 cloneNodeList(node.references));
1156 } else if (node.isBlock) { 1116 } else if (node.isBlock) {
1157 return Comment.createBlockComment(cloneTokenList(node.tokens)); 1117 return Comment.createBlockComment(cloneTokenList(node.tokens));
1158 } 1118 }
1159 return Comment.createEndOfLineComment(cloneTokenList(node.tokens)); 1119 return Comment.createEndOfLineComment(cloneTokenList(node.tokens));
1160 } 1120 }
1161 1121
1162 @override 1122 @override
1163 CommentReference visitCommentReference(CommentReference node) => 1123 CommentReference visitCommentReference(CommentReference node) =>
1164 new CommentReference(cloneToken(node.newKeyword), cloneNode(node.identifie r)); 1124 new CommentReference(
1125 cloneToken(node.newKeyword), cloneNode(node.identifier));
1165 1126
1166 @override 1127 @override
1167 CompilationUnit visitCompilationUnit(CompilationUnit node) { 1128 CompilationUnit visitCompilationUnit(CompilationUnit node) {
1168 CompilationUnit clone = new CompilationUnit( 1129 CompilationUnit clone = new CompilationUnit(cloneToken(node.beginToken),
1169 cloneToken(node.beginToken), 1130 cloneNode(node.scriptTag), cloneNodeList(node.directives),
1170 cloneNode(node.scriptTag), 1131 cloneNodeList(node.declarations), cloneToken(node.endToken));
1171 cloneNodeList(node.directives),
1172 cloneNodeList(node.declarations),
1173 cloneToken(node.endToken));
1174 clone.lineInfo = node.lineInfo; 1132 clone.lineInfo = node.lineInfo;
1175 return clone; 1133 return clone;
1176 } 1134 }
1177 1135
1178 @override 1136 @override
1179 ConditionalExpression 1137 ConditionalExpression visitConditionalExpression(
1180 visitConditionalExpression(ConditionalExpression node) => 1138 ConditionalExpression node) => new ConditionalExpression(
1181 new ConditionalExpression( 1139 cloneNode(node.condition), cloneToken(node.question),
1182 cloneNode(node.condition), 1140 cloneNode(node.thenExpression), cloneToken(node.colon),
1183 cloneToken(node.question), 1141 cloneNode(node.elseExpression));
1184 cloneNode(node.thenExpression),
1185 cloneToken(node.colon),
1186 cloneNode(node.elseExpression));
1187 1142
1188 @override 1143 @override
1189 ConstructorDeclaration 1144 ConstructorDeclaration visitConstructorDeclaration(
1190 visitConstructorDeclaration(ConstructorDeclaration node) => 1145 ConstructorDeclaration node) => new ConstructorDeclaration(
1191 new ConstructorDeclaration( 1146 cloneNode(node.documentationComment), cloneNodeList(node.metadata),
1192 cloneNode(node.documentationComment), 1147 cloneToken(node.externalKeyword), cloneToken(node.constKeyword),
1193 cloneNodeList(node.metadata), 1148 cloneToken(node.factoryKeyword), cloneNode(node.returnType),
1194 cloneToken(node.externalKeyword), 1149 cloneToken(node.period), cloneNode(node.name), cloneNode(node.parameters),
1195 cloneToken(node.constKeyword), 1150 cloneToken(node.separator), cloneNodeList(node.initializers),
1196 cloneToken(node.factoryKeyword), 1151 cloneNode(node.redirectedConstructor), cloneNode(node.body));
1197 cloneNode(node.returnType),
1198 cloneToken(node.period),
1199 cloneNode(node.name),
1200 cloneNode(node.parameters),
1201 cloneToken(node.separator),
1202 cloneNodeList(node.initializers),
1203 cloneNode(node.redirectedConstructor),
1204 cloneNode(node.body));
1205 1152
1206 @override 1153 @override
1207 ConstructorFieldInitializer 1154 ConstructorFieldInitializer visitConstructorFieldInitializer(
1208 visitConstructorFieldInitializer(ConstructorFieldInitializer node) => 1155 ConstructorFieldInitializer node) => new ConstructorFieldInitializer(
1209 new ConstructorFieldInitializer( 1156 cloneToken(node.thisKeyword), cloneToken(node.period),
1210 cloneToken(node.thisKeyword), 1157 cloneNode(node.fieldName), cloneToken(node.equals),
1211 cloneToken(node.period), 1158 cloneNode(node.expression));
1212 cloneNode(node.fieldName),
1213 cloneToken(node.equals),
1214 cloneNode(node.expression));
1215 1159
1216 @override 1160 @override
1217 ConstructorName visitConstructorName(ConstructorName node) => 1161 ConstructorName visitConstructorName(ConstructorName node) =>
1218 new ConstructorName( 1162 new ConstructorName(
1219 cloneNode(node.type), 1163 cloneNode(node.type), cloneToken(node.period), cloneNode(node.name));
1220 cloneToken(node.period),
1221 cloneNode(node.name));
1222 1164
1223 @override 1165 @override
1224 ContinueStatement visitContinueStatement(ContinueStatement node) => 1166 ContinueStatement visitContinueStatement(ContinueStatement node) =>
1225 new ContinueStatement( 1167 new ContinueStatement(cloneToken(node.continueKeyword),
1226 cloneToken(node.continueKeyword), 1168 cloneNode(node.label), cloneToken(node.semicolon));
1227 cloneNode(node.label),
1228 cloneToken(node.semicolon));
1229 1169
1230 @override 1170 @override
1231 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => 1171 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) =>
1232 new DeclaredIdentifier( 1172 new DeclaredIdentifier(cloneNode(node.documentationComment),
1233 cloneNode(node.documentationComment), 1173 cloneNodeList(node.metadata), cloneToken(node.keyword),
1234 cloneNodeList(node.metadata), 1174 cloneNode(node.type), cloneNode(node.identifier));
1235 cloneToken(node.keyword),
1236 cloneNode(node.type),
1237 cloneNode(node.identifier));
1238 1175
1239 @override 1176 @override
1240 DefaultFormalParameter 1177 DefaultFormalParameter visitDefaultFormalParameter(
1241 visitDefaultFormalParameter(DefaultFormalParameter node) => 1178 DefaultFormalParameter node) => new DefaultFormalParameter(
1242 new DefaultFormalParameter( 1179 cloneNode(node.parameter), node.kind, cloneToken(node.separator),
1243 cloneNode(node.parameter), 1180 cloneNode(node.defaultValue));
1244 node.kind,
1245 cloneToken(node.separator),
1246 cloneNode(node.defaultValue));
1247 1181
1248 @override 1182 @override
1249 DoStatement visitDoStatement(DoStatement node) => 1183 DoStatement visitDoStatement(DoStatement node) => new DoStatement(
1250 new DoStatement( 1184 cloneToken(node.doKeyword), cloneNode(node.body),
1251 cloneToken(node.doKeyword), 1185 cloneToken(node.whileKeyword), cloneToken(node.leftParenthesis),
1252 cloneNode(node.body), 1186 cloneNode(node.condition), cloneToken(node.rightParenthesis),
1253 cloneToken(node.whileKeyword), 1187 cloneToken(node.semicolon));
1254 cloneToken(node.leftParenthesis),
1255 cloneNode(node.condition),
1256 cloneToken(node.rightParenthesis),
1257 cloneToken(node.semicolon));
1258 1188
1259 @override 1189 @override
1260 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) => 1190 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) =>
1261 new DoubleLiteral(cloneToken(node.literal), node.value); 1191 new DoubleLiteral(cloneToken(node.literal), node.value);
1262 1192
1263 @override 1193 @override
1264 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => 1194 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) =>
1265 new EmptyFunctionBody(cloneToken(node.semicolon)); 1195 new EmptyFunctionBody(cloneToken(node.semicolon));
1266 1196
1267 @override 1197 @override
1268 EmptyStatement visitEmptyStatement(EmptyStatement node) => 1198 EmptyStatement visitEmptyStatement(EmptyStatement node) =>
1269 new EmptyStatement(cloneToken(node.semicolon)); 1199 new EmptyStatement(cloneToken(node.semicolon));
1270 1200
1271 @override 1201 @override
1272 AstNode visitEnumConstantDeclaration(EnumConstantDeclaration node) => 1202 AstNode visitEnumConstantDeclaration(EnumConstantDeclaration node) =>
1273 new EnumConstantDeclaration( 1203 new EnumConstantDeclaration(cloneNode(node.documentationComment),
1274 cloneNode(node.documentationComment), 1204 cloneNodeList(node.metadata), cloneNode(node.name));
1275 cloneNodeList(node.metadata),
1276 cloneNode(node.name));
1277 1205
1278 @override 1206 @override
1279 EnumDeclaration visitEnumDeclaration(EnumDeclaration node) => 1207 EnumDeclaration visitEnumDeclaration(EnumDeclaration node) =>
1280 new EnumDeclaration( 1208 new EnumDeclaration(cloneNode(node.documentationComment),
1281 cloneNode(node.documentationComment), 1209 cloneNodeList(node.metadata), cloneToken(node.enumKeyword),
1282 cloneNodeList(node.metadata), 1210 cloneNode(node.name), cloneToken(node.leftBracket),
1283 cloneToken(node.enumKeyword), 1211 cloneNodeList(node.constants), cloneToken(node.rightBracket));
1284 cloneNode(node.name),
1285 cloneToken(node.leftBracket),
1286 cloneNodeList(node.constants),
1287 cloneToken(node.rightBracket));
1288 1212
1289 @override 1213 @override
1290 ExportDirective visitExportDirective(ExportDirective node) { 1214 ExportDirective visitExportDirective(ExportDirective node) {
1291 ExportDirective directive = new ExportDirective( 1215 ExportDirective directive = new ExportDirective(
1292 cloneNode(node.documentationComment), 1216 cloneNode(node.documentationComment), cloneNodeList(node.metadata),
1293 cloneNodeList(node.metadata), 1217 cloneToken(node.keyword), cloneNode(node.uri),
1294 cloneToken(node.keyword), 1218 cloneNodeList(node.combinators), cloneToken(node.semicolon));
1295 cloneNode(node.uri),
1296 cloneNodeList(node.combinators),
1297 cloneToken(node.semicolon));
1298 directive.source = node.source; 1219 directive.source = node.source;
1299 directive.uriContent = node.uriContent; 1220 directive.uriContent = node.uriContent;
1300 return directive; 1221 return directive;
1301 } 1222 }
1302 1223
1303 @override 1224 @override
1304 ExpressionFunctionBody 1225 ExpressionFunctionBody visitExpressionFunctionBody(
1305 visitExpressionFunctionBody(ExpressionFunctionBody node) => 1226 ExpressionFunctionBody node) => new ExpressionFunctionBody(
1306 new ExpressionFunctionBody( 1227 cloneToken(node.keyword), cloneToken(node.functionDefinition),
1307 cloneToken(node.keyword), 1228 cloneNode(node.expression), cloneToken(node.semicolon));
1308 cloneToken(node.functionDefinition),
1309 cloneNode(node.expression),
1310 cloneToken(node.semicolon));
1311 1229
1312 @override 1230 @override
1313 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => 1231 ExpressionStatement visitExpressionStatement(ExpressionStatement node) =>
1314 new ExpressionStatement(cloneNode(node.expression), cloneToken(node.semico lon)); 1232 new ExpressionStatement(
1233 cloneNode(node.expression), cloneToken(node.semicolon));
1315 1234
1316 @override 1235 @override
1317 ExtendsClause visitExtendsClause(ExtendsClause node) => 1236 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(
1318 new ExtendsClause(cloneToken(node.extendsKeyword), cloneNode(node.supercla ss)); 1237 cloneToken(node.extendsKeyword), cloneNode(node.superclass));
1319 1238
1320 @override 1239 @override
1321 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => 1240 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) =>
1322 new FieldDeclaration( 1241 new FieldDeclaration(cloneNode(node.documentationComment),
1323 cloneNode(node.documentationComment), 1242 cloneNodeList(node.metadata), cloneToken(node.staticKeyword),
1324 cloneNodeList(node.metadata), 1243 cloneNode(node.fields), cloneToken(node.semicolon));
1325 cloneToken(node.staticKeyword),
1326 cloneNode(node.fields),
1327 cloneToken(node.semicolon));
1328 1244
1329 @override 1245 @override
1330 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => 1246 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) =>
1331 new FieldFormalParameter( 1247 new FieldFormalParameter(cloneNode(node.documentationComment),
1332 cloneNode(node.documentationComment), 1248 cloneNodeList(node.metadata), cloneToken(node.keyword),
1333 cloneNodeList(node.metadata), 1249 cloneNode(node.type), cloneToken(node.thisKeyword),
1334 cloneToken(node.keyword), 1250 cloneToken(node.period), cloneNode(node.identifier),
1335 cloneNode(node.type),
1336 cloneToken(node.thisKeyword),
1337 cloneToken(node.period),
1338 cloneNode(node.identifier),
1339 cloneNode(node.parameters)); 1251 cloneNode(node.parameters));
1340 1252
1341 @override 1253 @override
1342 ForEachStatement visitForEachStatement(ForEachStatement node) { 1254 ForEachStatement visitForEachStatement(ForEachStatement node) {
1343 DeclaredIdentifier loopVariable = node.loopVariable; 1255 DeclaredIdentifier loopVariable = node.loopVariable;
1344 if (loopVariable == null) { 1256 if (loopVariable == null) {
1345 return new ForEachStatement.con2( 1257 return new ForEachStatement.con2(cloneToken(node.awaitKeyword),
1346 cloneToken(node.awaitKeyword), 1258 cloneToken(node.forKeyword), cloneToken(node.leftParenthesis),
1347 cloneToken(node.forKeyword), 1259 cloneNode(node.identifier), cloneToken(node.inKeyword),
1348 cloneToken(node.leftParenthesis), 1260 cloneNode(node.iterable), cloneToken(node.rightParenthesis),
1349 cloneNode(node.identifier),
1350 cloneToken(node.inKeyword),
1351 cloneNode(node.iterable),
1352 cloneToken(node.rightParenthesis),
1353 cloneNode(node.body)); 1261 cloneNode(node.body));
1354 } 1262 }
1355 return new ForEachStatement.con1( 1263 return new ForEachStatement.con1(cloneToken(node.awaitKeyword),
1356 cloneToken(node.awaitKeyword), 1264 cloneToken(node.forKeyword), cloneToken(node.leftParenthesis),
1357 cloneToken(node.forKeyword), 1265 cloneNode(loopVariable), cloneToken(node.inKeyword),
1358 cloneToken(node.leftParenthesis), 1266 cloneNode(node.iterable), cloneToken(node.rightParenthesis),
1359 cloneNode(loopVariable),
1360 cloneToken(node.inKeyword),
1361 cloneNode(node.iterable),
1362 cloneToken(node.rightParenthesis),
1363 cloneNode(node.body)); 1267 cloneNode(node.body));
1364 } 1268 }
1365 1269
1366 @override 1270 @override
1367 FormalParameterList visitFormalParameterList(FormalParameterList node) => 1271 FormalParameterList visitFormalParameterList(FormalParameterList node) =>
1368 new FormalParameterList( 1272 new FormalParameterList(cloneToken(node.leftParenthesis),
1369 cloneToken(node.leftParenthesis), 1273 cloneNodeList(node.parameters), cloneToken(node.leftDelimiter),
1370 cloneNodeList(node.parameters), 1274 cloneToken(node.rightDelimiter), cloneToken(node.rightParenthesis));
1371 cloneToken(node.leftDelimiter),
1372 cloneToken(node.rightDelimiter),
1373 cloneToken(node.rightParenthesis));
1374 1275
1375 @override 1276 @override
1376 ForStatement visitForStatement(ForStatement node) => 1277 ForStatement visitForStatement(ForStatement node) => new ForStatement(
1377 new ForStatement( 1278 cloneToken(node.forKeyword), cloneToken(node.leftParenthesis),
1378 cloneToken(node.forKeyword), 1279 cloneNode(node.variables), cloneNode(node.initialization),
1379 cloneToken(node.leftParenthesis), 1280 cloneToken(node.leftSeparator), cloneNode(node.condition),
1380 cloneNode(node.variables), 1281 cloneToken(node.rightSeparator), cloneNodeList(node.updaters),
1381 cloneNode(node.initialization), 1282 cloneToken(node.rightParenthesis), cloneNode(node.body));
1382 cloneToken(node.leftSeparator),
1383 cloneNode(node.condition),
1384 cloneToken(node.rightSeparator),
1385 cloneNodeList(node.updaters),
1386 cloneToken(node.rightParenthesis),
1387 cloneNode(node.body));
1388 1283
1389 @override 1284 @override
1390 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => 1285 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) =>
1391 new FunctionDeclaration( 1286 new FunctionDeclaration(cloneNode(node.documentationComment),
1392 cloneNode(node.documentationComment), 1287 cloneNodeList(node.metadata), cloneToken(node.externalKeyword),
1393 cloneNodeList(node.metadata), 1288 cloneNode(node.returnType), cloneToken(node.propertyKeyword),
1394 cloneToken(node.externalKeyword), 1289 cloneNode(node.name), cloneNode(node.functionExpression));
1395 cloneNode(node.returnType),
1396 cloneToken(node.propertyKeyword),
1397 cloneNode(node.name),
1398 cloneNode(node.functionExpression));
1399 1290
1400 @override 1291 @override
1401 FunctionDeclarationStatement 1292 FunctionDeclarationStatement visitFunctionDeclarationStatement(
1402 visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => 1293 FunctionDeclarationStatement node) =>
1403 new FunctionDeclarationStatement(cloneNode(node.functionDeclaration)); 1294 new FunctionDeclarationStatement(cloneNode(node.functionDeclaration));
1404 1295
1405 @override 1296 @override
1406 FunctionExpression visitFunctionExpression(FunctionExpression node) => 1297 FunctionExpression visitFunctionExpression(FunctionExpression node) =>
1407 new FunctionExpression(cloneNode(node.parameters), cloneNode(node.body)); 1298 new FunctionExpression(cloneNode(node.parameters), cloneNode(node.body));
1408 1299
1409 @override 1300 @override
1410 FunctionExpressionInvocation 1301 FunctionExpressionInvocation visitFunctionExpressionInvocation(
1411 visitFunctionExpressionInvocation(FunctionExpressionInvocation node) => 1302 FunctionExpressionInvocation node) => new FunctionExpressionInvocation(
1412 new FunctionExpressionInvocation( 1303 cloneNode(node.function), cloneNode(node.argumentList));
1413 cloneNode(node.function),
1414 cloneNode(node.argumentList));
1415 1304
1416 @override 1305 @override
1417 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => 1306 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) =>
1418 new FunctionTypeAlias( 1307 new FunctionTypeAlias(cloneNode(node.documentationComment),
1419 cloneNode(node.documentationComment), 1308 cloneNodeList(node.metadata), cloneToken(node.typedefKeyword),
1420 cloneNodeList(node.metadata), 1309 cloneNode(node.returnType), cloneNode(node.name),
1421 cloneToken(node.typedefKeyword), 1310 cloneNode(node.typeParameters), cloneNode(node.parameters),
1422 cloneNode(node.returnType),
1423 cloneNode(node.name),
1424 cloneNode(node.typeParameters),
1425 cloneNode(node.parameters),
1426 cloneToken(node.semicolon)); 1311 cloneToken(node.semicolon));
1427 1312
1428 @override 1313 @override
1429 FunctionTypedFormalParameter 1314 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(
1430 visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => 1315 FunctionTypedFormalParameter node) => new FunctionTypedFormalParameter(
1431 new FunctionTypedFormalParameter( 1316 cloneNode(node.documentationComment), cloneNodeList(node.metadata),
1432 cloneNode(node.documentationComment), 1317 cloneNode(node.returnType), cloneNode(node.identifier),
1433 cloneNodeList(node.metadata), 1318 cloneNode(node.parameters));
1434 cloneNode(node.returnType),
1435 cloneNode(node.identifier),
1436 cloneNode(node.parameters));
1437 1319
1438 @override 1320 @override
1439 HideCombinator visitHideCombinator(HideCombinator node) => 1321 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
1440 new HideCombinator(cloneToken(node.keyword), cloneNodeList(node.hiddenName s)); 1322 cloneToken(node.keyword), cloneNodeList(node.hiddenNames));
1441 1323
1442 @override 1324 @override
1443 IfStatement visitIfStatement(IfStatement node) => 1325 IfStatement visitIfStatement(IfStatement node) => new IfStatement(
1444 new IfStatement( 1326 cloneToken(node.ifKeyword), cloneToken(node.leftParenthesis),
1445 cloneToken(node.ifKeyword), 1327 cloneNode(node.condition), cloneToken(node.rightParenthesis),
1446 cloneToken(node.leftParenthesis), 1328 cloneNode(node.thenStatement), cloneToken(node.elseKeyword),
1447 cloneNode(node.condition), 1329 cloneNode(node.elseStatement));
1448 cloneToken(node.rightParenthesis),
1449 cloneNode(node.thenStatement),
1450 cloneToken(node.elseKeyword),
1451 cloneNode(node.elseStatement));
1452 1330
1453 @override 1331 @override
1454 ImplementsClause visitImplementsClause(ImplementsClause node) => 1332 ImplementsClause visitImplementsClause(ImplementsClause node) =>
1455 new ImplementsClause(cloneToken(node.implementsKeyword), cloneNodeList(nod e.interfaces)); 1333 new ImplementsClause(
1334 cloneToken(node.implementsKeyword), cloneNodeList(node.interfaces));
1456 1335
1457 @override 1336 @override
1458 ImportDirective visitImportDirective(ImportDirective node) { 1337 ImportDirective visitImportDirective(ImportDirective node) {
1459 ImportDirective directive = new ImportDirective( 1338 ImportDirective directive = new ImportDirective(
1460 cloneNode(node.documentationComment), 1339 cloneNode(node.documentationComment), cloneNodeList(node.metadata),
1461 cloneNodeList(node.metadata), 1340 cloneToken(node.keyword), cloneNode(node.uri),
1462 cloneToken(node.keyword), 1341 cloneToken(node.deferredKeyword), cloneToken(node.asKeyword),
1463 cloneNode(node.uri), 1342 cloneNode(node.prefix), cloneNodeList(node.combinators),
1464 cloneToken(node.deferredKeyword),
1465 cloneToken(node.asKeyword),
1466 cloneNode(node.prefix),
1467 cloneNodeList(node.combinators),
1468 cloneToken(node.semicolon)); 1343 cloneToken(node.semicolon));
1469 directive.source = node.source; 1344 directive.source = node.source;
1470 directive.uriContent = node.uriContent; 1345 directive.uriContent = node.uriContent;
1471 return directive; 1346 return directive;
1472 } 1347 }
1473 1348
1474 @override 1349 @override
1475 IndexExpression visitIndexExpression(IndexExpression node) { 1350 IndexExpression visitIndexExpression(IndexExpression node) {
1476 Token period = node.period; 1351 Token period = node.period;
1477 if (period == null) { 1352 if (period == null) {
1478 return new IndexExpression.forTarget( 1353 return new IndexExpression.forTarget(cloneNode(node.target),
1479 cloneNode(node.target), 1354 cloneToken(node.leftBracket), cloneNode(node.index),
1480 cloneToken(node.leftBracket),
1481 cloneNode(node.index),
1482 cloneToken(node.rightBracket)); 1355 cloneToken(node.rightBracket));
1483 } else { 1356 } else {
1484 return new IndexExpression.forCascade( 1357 return new IndexExpression.forCascade(cloneToken(period),
1485 cloneToken(period), 1358 cloneToken(node.leftBracket), cloneNode(node.index),
1486 cloneToken(node.leftBracket),
1487 cloneNode(node.index),
1488 cloneToken(node.rightBracket)); 1359 cloneToken(node.rightBracket));
1489 } 1360 }
1490 } 1361 }
1491 1362
1492 @override 1363 @override
1493 InstanceCreationExpression 1364 InstanceCreationExpression visitInstanceCreationExpression(
1494 visitInstanceCreationExpression(InstanceCreationExpression node) => 1365 InstanceCreationExpression node) => new InstanceCreationExpression(
1495 new InstanceCreationExpression( 1366 cloneToken(node.keyword), cloneNode(node.constructorName),
1496 cloneToken(node.keyword), 1367 cloneNode(node.argumentList));
1497 cloneNode(node.constructorName),
1498 cloneNode(node.argumentList));
1499 1368
1500 @override 1369 @override
1501 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) => 1370 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) =>
1502 new IntegerLiteral(cloneToken(node.literal), node.value); 1371 new IntegerLiteral(cloneToken(node.literal), node.value);
1503 1372
1504 @override 1373 @override
1505 InterpolationExpression 1374 InterpolationExpression visitInterpolationExpression(
1506 visitInterpolationExpression(InterpolationExpression node) => 1375 InterpolationExpression node) => new InterpolationExpression(
1507 new InterpolationExpression( 1376 cloneToken(node.leftBracket), cloneNode(node.expression),
1508 cloneToken(node.leftBracket), 1377 cloneToken(node.rightBracket));
1509 cloneNode(node.expression),
1510 cloneToken(node.rightBracket));
1511 1378
1512 @override 1379 @override
1513 InterpolationString visitInterpolationString(InterpolationString node) => 1380 InterpolationString visitInterpolationString(InterpolationString node) =>
1514 new InterpolationString(cloneToken(node.contents), node.value); 1381 new InterpolationString(cloneToken(node.contents), node.value);
1515 1382
1516 @override 1383 @override
1517 IsExpression visitIsExpression(IsExpression node) => 1384 IsExpression visitIsExpression(IsExpression node) => new IsExpression(
1518 new IsExpression( 1385 cloneNode(node.expression), cloneToken(node.isOperator),
1519 cloneNode(node.expression), 1386 cloneToken(node.notOperator), cloneNode(node.type));
1520 cloneToken(node.isOperator),
1521 cloneToken(node.notOperator),
1522 cloneNode(node.type));
1523 1387
1524 @override 1388 @override
1525 Label visitLabel(Label node) => 1389 Label visitLabel(Label node) =>
1526 new Label(cloneNode(node.label), cloneToken(node.colon)); 1390 new Label(cloneNode(node.label), cloneToken(node.colon));
1527 1391
1528 @override 1392 @override
1529 LabeledStatement visitLabeledStatement(LabeledStatement node) => 1393 LabeledStatement visitLabeledStatement(LabeledStatement node) =>
1530 new LabeledStatement(cloneNodeList(node.labels), cloneNode(node.statement) ); 1394 new LabeledStatement(
1395 cloneNodeList(node.labels), cloneNode(node.statement));
1531 1396
1532 @override 1397 @override
1533 LibraryDirective visitLibraryDirective(LibraryDirective node) => 1398 LibraryDirective visitLibraryDirective(LibraryDirective node) =>
1534 new LibraryDirective( 1399 new LibraryDirective(cloneNode(node.documentationComment),
1535 cloneNode(node.documentationComment), 1400 cloneNodeList(node.metadata), cloneToken(node.libraryKeyword),
1536 cloneNodeList(node.metadata), 1401 cloneNode(node.name), cloneToken(node.semicolon));
1537 cloneToken(node.libraryKeyword),
1538 cloneNode(node.name),
1539 cloneToken(node.semicolon));
1540 1402
1541 @override 1403 @override
1542 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) => 1404 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) =>
1543 new LibraryIdentifier(cloneNodeList(node.components)); 1405 new LibraryIdentifier(cloneNodeList(node.components));
1544 1406
1545 @override 1407 @override
1546 ListLiteral visitListLiteral(ListLiteral node) => 1408 ListLiteral visitListLiteral(ListLiteral node) => new ListLiteral(
1547 new ListLiteral( 1409 cloneToken(node.constKeyword), cloneNode(node.typeArguments),
1548 cloneToken(node.constKeyword), 1410 cloneToken(node.leftBracket), cloneNodeList(node.elements),
1549 cloneNode(node.typeArguments), 1411 cloneToken(node.rightBracket));
1550 cloneToken(node.leftBracket),
1551 cloneNodeList(node.elements),
1552 cloneToken(node.rightBracket));
1553 1412
1554 @override 1413 @override
1555 MapLiteral visitMapLiteral(MapLiteral node) => 1414 MapLiteral visitMapLiteral(MapLiteral node) => new MapLiteral(
1556 new MapLiteral( 1415 cloneToken(node.constKeyword), cloneNode(node.typeArguments),
1557 cloneToken(node.constKeyword), 1416 cloneToken(node.leftBracket), cloneNodeList(node.entries),
1558 cloneNode(node.typeArguments), 1417 cloneToken(node.rightBracket));
1559 cloneToken(node.leftBracket),
1560 cloneNodeList(node.entries),
1561 cloneToken(node.rightBracket));
1562 1418
1563 @override 1419 @override
1564 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => 1420 MapLiteralEntry visitMapLiteralEntry(
1565 new MapLiteralEntry( 1421 MapLiteralEntry node) => new MapLiteralEntry(
1566 cloneNode(node.key), 1422 cloneNode(node.key), cloneToken(node.separator), cloneNode(node.value));
1567 cloneToken(node.separator),
1568 cloneNode(node.value));
1569 1423
1570 @override 1424 @override
1571 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => 1425 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) =>
1572 new MethodDeclaration( 1426 new MethodDeclaration(cloneNode(node.documentationComment),
1573 cloneNode(node.documentationComment), 1427 cloneNodeList(node.metadata), cloneToken(node.externalKeyword),
1574 cloneNodeList(node.metadata), 1428 cloneToken(node.modifierKeyword), cloneNode(node.returnType),
1575 cloneToken(node.externalKeyword), 1429 cloneToken(node.propertyKeyword), cloneToken(node.operatorKeyword),
1576 cloneToken(node.modifierKeyword), 1430 cloneNode(node.name), cloneNode(node.parameters),
1577 cloneNode(node.returnType),
1578 cloneToken(node.propertyKeyword),
1579 cloneToken(node.operatorKeyword),
1580 cloneNode(node.name),
1581 cloneNode(node.parameters),
1582 cloneNode(node.body)); 1431 cloneNode(node.body));
1583 1432
1584 @override 1433 @override
1585 MethodInvocation visitMethodInvocation(MethodInvocation node) => 1434 MethodInvocation visitMethodInvocation(MethodInvocation node) =>
1586 new MethodInvocation( 1435 new MethodInvocation(cloneNode(node.target), cloneToken(node.period),
1587 cloneNode(node.target), 1436 cloneNode(node.methodName), cloneNode(node.argumentList));
1588 cloneToken(node.period),
1589 cloneNode(node.methodName),
1590 cloneNode(node.argumentList));
1591 1437
1592 @override 1438 @override
1593 NamedExpression visitNamedExpression(NamedExpression node) => 1439 NamedExpression visitNamedExpression(NamedExpression node) =>
1594 new NamedExpression(cloneNode(node.name), cloneNode(node.expression)); 1440 new NamedExpression(cloneNode(node.name), cloneNode(node.expression));
1595 1441
1596 @override 1442 @override
1597 AstNode visitNativeClause(NativeClause node) => 1443 AstNode visitNativeClause(NativeClause node) =>
1598 new NativeClause(cloneToken(node.nativeKeyword), cloneNode(node.name)); 1444 new NativeClause(cloneToken(node.nativeKeyword), cloneNode(node.name));
1599 1445
1600 @override 1446 @override
1601 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => 1447 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) =>
1602 new NativeFunctionBody( 1448 new NativeFunctionBody(cloneToken(node.nativeKeyword),
1603 cloneToken(node.nativeKeyword), 1449 cloneNode(node.stringLiteral), cloneToken(node.semicolon));
1604 cloneNode(node.stringLiteral),
1605 cloneToken(node.semicolon));
1606 1450
1607 @override 1451 @override
1608 NullLiteral visitNullLiteral(NullLiteral node) => 1452 NullLiteral visitNullLiteral(NullLiteral node) =>
1609 new NullLiteral(cloneToken(node.literal)); 1453 new NullLiteral(cloneToken(node.literal));
1610 1454
1611 @override 1455 @override
1612 ParenthesizedExpression 1456 ParenthesizedExpression visitParenthesizedExpression(
1613 visitParenthesizedExpression(ParenthesizedExpression node) => 1457 ParenthesizedExpression node) => new ParenthesizedExpression(
1614 new ParenthesizedExpression( 1458 cloneToken(node.leftParenthesis), cloneNode(node.expression),
1615 cloneToken(node.leftParenthesis), 1459 cloneToken(node.rightParenthesis));
1616 cloneNode(node.expression),
1617 cloneToken(node.rightParenthesis));
1618 1460
1619 @override 1461 @override
1620 PartDirective visitPartDirective(PartDirective node) { 1462 PartDirective visitPartDirective(PartDirective node) {
1621 PartDirective directive = new PartDirective( 1463 PartDirective directive = new PartDirective(
1622 cloneNode(node.documentationComment), 1464 cloneNode(node.documentationComment), cloneNodeList(node.metadata),
1623 cloneNodeList(node.metadata), 1465 cloneToken(node.partKeyword), cloneNode(node.uri),
1624 cloneToken(node.partKeyword),
1625 cloneNode(node.uri),
1626 cloneToken(node.semicolon)); 1466 cloneToken(node.semicolon));
1627 directive.source = node.source; 1467 directive.source = node.source;
1628 directive.uriContent = node.uriContent; 1468 directive.uriContent = node.uriContent;
1629 return directive; 1469 return directive;
1630 } 1470 }
1631 1471
1632 @override 1472 @override
1633 PartOfDirective visitPartOfDirective(PartOfDirective node) => 1473 PartOfDirective visitPartOfDirective(PartOfDirective node) =>
1634 new PartOfDirective( 1474 new PartOfDirective(cloneNode(node.documentationComment),
1635 cloneNode(node.documentationComment), 1475 cloneNodeList(node.metadata), cloneToken(node.partKeyword),
1636 cloneNodeList(node.metadata), 1476 cloneToken(node.ofKeyword), cloneNode(node.libraryName),
1637 cloneToken(node.partKeyword),
1638 cloneToken(node.ofKeyword),
1639 cloneNode(node.libraryName),
1640 cloneToken(node.semicolon)); 1477 cloneToken(node.semicolon));
1641 1478
1642 @override 1479 @override
1643 PostfixExpression visitPostfixExpression(PostfixExpression node) => 1480 PostfixExpression visitPostfixExpression(PostfixExpression node) =>
1644 new PostfixExpression(cloneNode(node.operand), cloneToken(node.operator)); 1481 new PostfixExpression(cloneNode(node.operand), cloneToken(node.operator));
1645 1482
1646 @override 1483 @override
1647 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => 1484 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) =>
1648 new PrefixedIdentifier( 1485 new PrefixedIdentifier(cloneNode(node.prefix), cloneToken(node.period),
1649 cloneNode(node.prefix),
1650 cloneToken(node.period),
1651 cloneNode(node.identifier)); 1486 cloneNode(node.identifier));
1652 1487
1653 @override 1488 @override
1654 PrefixExpression visitPrefixExpression(PrefixExpression node) => 1489 PrefixExpression visitPrefixExpression(PrefixExpression node) =>
1655 new PrefixExpression(cloneToken(node.operator), cloneNode(node.operand)); 1490 new PrefixExpression(cloneToken(node.operator), cloneNode(node.operand));
1656 1491
1657 @override 1492 @override
1658 PropertyAccess visitPropertyAccess(PropertyAccess node) => 1493 PropertyAccess visitPropertyAccess(PropertyAccess node) => new PropertyAccess(
1659 new PropertyAccess( 1494 cloneNode(node.target), cloneToken(node.operator),
1660 cloneNode(node.target), 1495 cloneNode(node.propertyName));
1661 cloneToken(node.operator),
1662 cloneNode(node.propertyName));
1663 1496
1664 @override 1497 @override
1665 RedirectingConstructorInvocation 1498 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(
1666 visitRedirectingConstructorInvocation(RedirectingConstructorInvocation nod e) => 1499 RedirectingConstructorInvocation node) =>
1667 new RedirectingConstructorInvocation( 1500 new RedirectingConstructorInvocation(cloneToken(node.thisKeyword),
1668 cloneToken(node.thisKeyword), 1501 cloneToken(node.period), cloneNode(node.constructorName),
1669 cloneToken(node.period),
1670 cloneNode(node.constructorName),
1671 cloneNode(node.argumentList)); 1502 cloneNode(node.argumentList));
1672 1503
1673 @override 1504 @override
1674 RethrowExpression visitRethrowExpression(RethrowExpression node) => 1505 RethrowExpression visitRethrowExpression(RethrowExpression node) =>
1675 new RethrowExpression(cloneToken(node.rethrowKeyword)); 1506 new RethrowExpression(cloneToken(node.rethrowKeyword));
1676 1507
1677 @override 1508 @override
1678 ReturnStatement visitReturnStatement(ReturnStatement node) => 1509 ReturnStatement visitReturnStatement(ReturnStatement node) =>
1679 new ReturnStatement( 1510 new ReturnStatement(cloneToken(node.returnKeyword),
1680 cloneToken(node.returnKeyword), 1511 cloneNode(node.expression), cloneToken(node.semicolon));
1681 cloneNode(node.expression),
1682 cloneToken(node.semicolon));
1683 1512
1684 @override 1513 @override
1685 ScriptTag visitScriptTag(ScriptTag node) => 1514 ScriptTag visitScriptTag(ScriptTag node) =>
1686 new ScriptTag(cloneToken(node.scriptTag)); 1515 new ScriptTag(cloneToken(node.scriptTag));
1687 1516
1688 @override 1517 @override
1689 ShowCombinator visitShowCombinator(ShowCombinator node) => 1518 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
1690 new ShowCombinator(cloneToken(node.keyword), cloneNodeList(node.shownNames )); 1519 cloneToken(node.keyword), cloneNodeList(node.shownNames));
1691 1520
1692 @override 1521 @override
1693 SimpleFormalParameter 1522 SimpleFormalParameter visitSimpleFormalParameter(
1694 visitSimpleFormalParameter(SimpleFormalParameter node) => 1523 SimpleFormalParameter node) => new SimpleFormalParameter(
1695 new SimpleFormalParameter( 1524 cloneNode(node.documentationComment), cloneNodeList(node.metadata),
1696 cloneNode(node.documentationComment), 1525 cloneToken(node.keyword), cloneNode(node.type),
1697 cloneNodeList(node.metadata), 1526 cloneNode(node.identifier));
1698 cloneToken(node.keyword),
1699 cloneNode(node.type),
1700 cloneNode(node.identifier));
1701 1527
1702 @override 1528 @override
1703 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) => 1529 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) =>
1704 new SimpleIdentifier(cloneToken(node.token)); 1530 new SimpleIdentifier(cloneToken(node.token));
1705 1531
1706 @override 1532 @override
1707 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) => 1533 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) =>
1708 new SimpleStringLiteral(cloneToken(node.literal), node.value); 1534 new SimpleStringLiteral(cloneToken(node.literal), node.value);
1709 1535
1710 @override 1536 @override
1711 StringInterpolation visitStringInterpolation(StringInterpolation node) => 1537 StringInterpolation visitStringInterpolation(StringInterpolation node) =>
1712 new StringInterpolation(cloneNodeList(node.elements)); 1538 new StringInterpolation(cloneNodeList(node.elements));
1713 1539
1714 @override 1540 @override
1715 SuperConstructorInvocation 1541 SuperConstructorInvocation visitSuperConstructorInvocation(
1716 visitSuperConstructorInvocation(SuperConstructorInvocation node) => 1542 SuperConstructorInvocation node) => new SuperConstructorInvocation(
1717 new SuperConstructorInvocation( 1543 cloneToken(node.superKeyword), cloneToken(node.period),
1718 cloneToken(node.superKeyword), 1544 cloneNode(node.constructorName), cloneNode(node.argumentList));
1719 cloneToken(node.period),
1720 cloneNode(node.constructorName),
1721 cloneNode(node.argumentList));
1722 1545
1723 @override 1546 @override
1724 SuperExpression visitSuperExpression(SuperExpression node) => 1547 SuperExpression visitSuperExpression(SuperExpression node) =>
1725 new SuperExpression(cloneToken(node.superKeyword)); 1548 new SuperExpression(cloneToken(node.superKeyword));
1726 1549
1727 @override 1550 @override
1728 SwitchCase visitSwitchCase(SwitchCase node) => 1551 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(
1729 new SwitchCase( 1552 cloneNodeList(node.labels), cloneToken(node.keyword),
1730 cloneNodeList(node.labels), 1553 cloneNode(node.expression), cloneToken(node.colon),
1731 cloneToken(node.keyword), 1554 cloneNodeList(node.statements));
1732 cloneNode(node.expression),
1733 cloneToken(node.colon),
1734 cloneNodeList(node.statements));
1735 1555
1736 @override 1556 @override
1737 SwitchDefault visitSwitchDefault(SwitchDefault node) => 1557 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(
1738 new SwitchDefault( 1558 cloneNodeList(node.labels), cloneToken(node.keyword),
1739 cloneNodeList(node.labels), 1559 cloneToken(node.colon), cloneNodeList(node.statements));
1740 cloneToken(node.keyword),
1741 cloneToken(node.colon),
1742 cloneNodeList(node.statements));
1743 1560
1744 @override 1561 @override
1745 SwitchStatement visitSwitchStatement(SwitchStatement node) => 1562 SwitchStatement visitSwitchStatement(SwitchStatement node) =>
1746 new SwitchStatement( 1563 new SwitchStatement(cloneToken(node.switchKeyword),
1747 cloneToken(node.switchKeyword), 1564 cloneToken(node.leftParenthesis), cloneNode(node.expression),
1748 cloneToken(node.leftParenthesis), 1565 cloneToken(node.rightParenthesis), cloneToken(node.leftBracket),
1749 cloneNode(node.expression), 1566 cloneNodeList(node.members), cloneToken(node.rightBracket));
1750 cloneToken(node.rightParenthesis),
1751 cloneToken(node.leftBracket),
1752 cloneNodeList(node.members),
1753 cloneToken(node.rightBracket));
1754 1567
1755 @override 1568 @override
1756 SymbolLiteral visitSymbolLiteral(SymbolLiteral node) => 1569 SymbolLiteral visitSymbolLiteral(SymbolLiteral node) => new SymbolLiteral(
1757 new SymbolLiteral(cloneToken(node.poundSign), cloneTokenList(node.componen ts)); 1570 cloneToken(node.poundSign), cloneTokenList(node.components));
1758 1571
1759 @override 1572 @override
1760 ThisExpression visitThisExpression(ThisExpression node) => 1573 ThisExpression visitThisExpression(ThisExpression node) =>
1761 new ThisExpression(cloneToken(node.thisKeyword)); 1574 new ThisExpression(cloneToken(node.thisKeyword));
1762 1575
1763 @override 1576 @override
1764 ThrowExpression visitThrowExpression(ThrowExpression node) => 1577 ThrowExpression visitThrowExpression(ThrowExpression node) =>
1765 new ThrowExpression(cloneToken(node.throwKeyword), cloneNode(node.expressi on)); 1578 new ThrowExpression(
1579 cloneToken(node.throwKeyword), cloneNode(node.expression));
1766 1580
1767 @override 1581 @override
1768 TopLevelVariableDeclaration 1582 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(
1769 visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => 1583 TopLevelVariableDeclaration node) => new TopLevelVariableDeclaration(
1770 new TopLevelVariableDeclaration( 1584 cloneNode(node.documentationComment), cloneNodeList(node.metadata),
1771 cloneNode(node.documentationComment), 1585 cloneNode(node.variables), cloneToken(node.semicolon));
1772 cloneNodeList(node.metadata),
1773 cloneNode(node.variables),
1774 cloneToken(node.semicolon));
1775 1586
1776 @override 1587 @override
1777 TryStatement visitTryStatement(TryStatement node) => 1588 TryStatement visitTryStatement(TryStatement node) => new TryStatement(
1778 new TryStatement( 1589 cloneToken(node.tryKeyword), cloneNode(node.body),
1779 cloneToken(node.tryKeyword), 1590 cloneNodeList(node.catchClauses), cloneToken(node.finallyKeyword),
1780 cloneNode(node.body), 1591 cloneNode(node.finallyBlock));
1781 cloneNodeList(node.catchClauses),
1782 cloneToken(node.finallyKeyword),
1783 cloneNode(node.finallyBlock));
1784 1592
1785 @override 1593 @override
1786 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => 1594 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) =>
1787 new TypeArgumentList( 1595 new TypeArgumentList(cloneToken(node.leftBracket),
1788 cloneToken(node.leftBracket), 1596 cloneNodeList(node.arguments), cloneToken(node.rightBracket));
1789 cloneNodeList(node.arguments),
1790 cloneToken(node.rightBracket));
1791 1597
1792 @override 1598 @override
1793 TypeName visitTypeName(TypeName node) => 1599 TypeName visitTypeName(TypeName node) =>
1794 new TypeName(cloneNode(node.name), cloneNode(node.typeArguments)); 1600 new TypeName(cloneNode(node.name), cloneNode(node.typeArguments));
1795 1601
1796 @override 1602 @override
1797 TypeParameter visitTypeParameter(TypeParameter node) => 1603 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(
1798 new TypeParameter( 1604 cloneNode(node.documentationComment), cloneNodeList(node.metadata),
1799 cloneNode(node.documentationComment), 1605 cloneNode(node.name), cloneToken(node.extendsKeyword),
1800 cloneNodeList(node.metadata), 1606 cloneNode(node.bound));
1801 cloneNode(node.name),
1802 cloneToken(node.extendsKeyword),
1803 cloneNode(node.bound));
1804 1607
1805 @override 1608 @override
1806 TypeParameterList visitTypeParameterList(TypeParameterList node) => 1609 TypeParameterList visitTypeParameterList(TypeParameterList node) =>
1807 new TypeParameterList( 1610 new TypeParameterList(cloneToken(node.leftBracket),
1808 cloneToken(node.leftBracket), 1611 cloneNodeList(node.typeParameters), cloneToken(node.rightBracket));
1809 cloneNodeList(node.typeParameters),
1810 cloneToken(node.rightBracket));
1811 1612
1812 @override 1613 @override
1813 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => 1614 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) =>
1814 new VariableDeclaration( 1615 new VariableDeclaration(null, cloneNodeList(node.metadata),
1815 null, 1616 cloneNode(node.name), cloneToken(node.equals),
1816 cloneNodeList(node.metadata),
1817 cloneNode(node.name),
1818 cloneToken(node.equals),
1819 cloneNode(node.initializer)); 1617 cloneNode(node.initializer));
1820 1618
1821 @override 1619 @override
1822 VariableDeclarationList 1620 VariableDeclarationList visitVariableDeclarationList(
1823 visitVariableDeclarationList(VariableDeclarationList node) => 1621 VariableDeclarationList node) => new VariableDeclarationList(null,
1824 new VariableDeclarationList( 1622 cloneNodeList(node.metadata), cloneToken(node.keyword),
1825 null, 1623 cloneNode(node.type), cloneNodeList(node.variables));
1826 cloneNodeList(node.metadata),
1827 cloneToken(node.keyword),
1828 cloneNode(node.type),
1829 cloneNodeList(node.variables));
1830 1624
1831 @override 1625 @override
1832 VariableDeclarationStatement 1626 VariableDeclarationStatement visitVariableDeclarationStatement(
1833 visitVariableDeclarationStatement(VariableDeclarationStatement node) => 1627 VariableDeclarationStatement node) => new VariableDeclarationStatement(
1834 new VariableDeclarationStatement( 1628 cloneNode(node.variables), cloneToken(node.semicolon));
1835 cloneNode(node.variables),
1836 cloneToken(node.semicolon));
1837 1629
1838 @override 1630 @override
1839 WhileStatement visitWhileStatement(WhileStatement node) => 1631 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
1840 new WhileStatement( 1632 cloneToken(node.whileKeyword), cloneToken(node.leftParenthesis),
1841 cloneToken(node.whileKeyword), 1633 cloneNode(node.condition), cloneToken(node.rightParenthesis),
1842 cloneToken(node.leftParenthesis), 1634 cloneNode(node.body));
1843 cloneNode(node.condition),
1844 cloneToken(node.rightParenthesis),
1845 cloneNode(node.body));
1846 1635
1847 @override 1636 @override
1848 WithClause visitWithClause(WithClause node) => 1637 WithClause visitWithClause(WithClause node) => new WithClause(
1849 new WithClause(cloneToken(node.withKeyword), cloneNodeList(node.mixinTypes )); 1638 cloneToken(node.withKeyword), cloneNodeList(node.mixinTypes));
1850 1639
1851 @override 1640 @override
1852 YieldStatement visitYieldStatement(YieldStatement node) => 1641 YieldStatement visitYieldStatement(YieldStatement node) => new YieldStatement(
1853 new YieldStatement( 1642 cloneToken(node.yieldKeyword), cloneToken(node.star),
1854 cloneToken(node.yieldKeyword), 1643 cloneNode(node.expression), cloneToken(node.semicolon));
1855 cloneToken(node.star),
1856 cloneNode(node.expression),
1857 cloneToken(node.semicolon));
1858 } 1644 }
1859 1645
1860 /** 1646 /**
1861 * An AstVisitor that compares the structure of two AstNodes to see whether they 1647 * An AstVisitor that compares the structure of two AstNodes to see whether they
1862 * are equal. 1648 * are equal.
1863 */ 1649 */
1864 class AstComparator implements AstVisitor<bool> { 1650 class AstComparator implements AstVisitor<bool> {
1865 /** 1651 /**
1866 * The AST node with which the node being visited is to be compared. This is 1652 * The AST node with which the node being visited is to be compared. This is
1867 * only valid at the beginning of each visit method (until [isEqualNodes] is 1653 * only valid at the beginning of each visit method (until [isEqualNodes] is
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 isEqualTokens(node.comma, other.comma) && 1806 isEqualTokens(node.comma, other.comma) &&
2021 isEqualNodes(node.stackTraceParameter, other.stackTraceParameter) && 1807 isEqualNodes(node.stackTraceParameter, other.stackTraceParameter) &&
2022 isEqualTokens(node.rightParenthesis, other.rightParenthesis) && 1808 isEqualTokens(node.rightParenthesis, other.rightParenthesis) &&
2023 isEqualNodes(node.body, other.body); 1809 isEqualNodes(node.body, other.body);
2024 } 1810 }
2025 1811
2026 @override 1812 @override
2027 bool visitClassDeclaration(ClassDeclaration node) { 1813 bool visitClassDeclaration(ClassDeclaration node) {
2028 ClassDeclaration other = _other as ClassDeclaration; 1814 ClassDeclaration other = _other as ClassDeclaration;
2029 return isEqualNodes( 1815 return isEqualNodes(
2030 node.documentationComment, 1816 node.documentationComment, other.documentationComment) &&
2031 other.documentationComment) &&
2032 _isEqualNodeLists(node.metadata, other.metadata) && 1817 _isEqualNodeLists(node.metadata, other.metadata) &&
2033 isEqualTokens(node.abstractKeyword, other.abstractKeyword) && 1818 isEqualTokens(node.abstractKeyword, other.abstractKeyword) &&
2034 isEqualTokens(node.classKeyword, other.classKeyword) && 1819 isEqualTokens(node.classKeyword, other.classKeyword) &&
2035 isEqualNodes(node.name, other.name) && 1820 isEqualNodes(node.name, other.name) &&
2036 isEqualNodes(node.typeParameters, other.typeParameters) && 1821 isEqualNodes(node.typeParameters, other.typeParameters) &&
2037 isEqualNodes(node.extendsClause, other.extendsClause) && 1822 isEqualNodes(node.extendsClause, other.extendsClause) &&
2038 isEqualNodes(node.withClause, other.withClause) && 1823 isEqualNodes(node.withClause, other.withClause) &&
2039 isEqualNodes(node.implementsClause, other.implementsClause) && 1824 isEqualNodes(node.implementsClause, other.implementsClause) &&
2040 isEqualTokens(node.leftBracket, other.leftBracket) && 1825 isEqualTokens(node.leftBracket, other.leftBracket) &&
2041 _isEqualNodeLists(node.members, other.members) && 1826 _isEqualNodeLists(node.members, other.members) &&
2042 isEqualTokens(node.rightBracket, other.rightBracket); 1827 isEqualTokens(node.rightBracket, other.rightBracket);
2043 } 1828 }
2044 1829
2045 @override 1830 @override
2046 bool visitClassTypeAlias(ClassTypeAlias node) { 1831 bool visitClassTypeAlias(ClassTypeAlias node) {
2047 ClassTypeAlias other = _other as ClassTypeAlias; 1832 ClassTypeAlias other = _other as ClassTypeAlias;
2048 return isEqualNodes( 1833 return isEqualNodes(
2049 node.documentationComment, 1834 node.documentationComment, other.documentationComment) &&
2050 other.documentationComment) &&
2051 _isEqualNodeLists(node.metadata, other.metadata) && 1835 _isEqualNodeLists(node.metadata, other.metadata) &&
2052 isEqualTokens(node.typedefKeyword, other.typedefKeyword) && 1836 isEqualTokens(node.typedefKeyword, other.typedefKeyword) &&
2053 isEqualNodes(node.name, other.name) && 1837 isEqualNodes(node.name, other.name) &&
2054 isEqualNodes(node.typeParameters, other.typeParameters) && 1838 isEqualNodes(node.typeParameters, other.typeParameters) &&
2055 isEqualTokens(node.equals, other.equals) && 1839 isEqualTokens(node.equals, other.equals) &&
2056 isEqualTokens(node.abstractKeyword, other.abstractKeyword) && 1840 isEqualTokens(node.abstractKeyword, other.abstractKeyword) &&
2057 isEqualNodes(node.superclass, other.superclass) && 1841 isEqualNodes(node.superclass, other.superclass) &&
2058 isEqualNodes(node.withClause, other.withClause) && 1842 isEqualNodes(node.withClause, other.withClause) &&
2059 isEqualNodes(node.implementsClause, other.implementsClause) && 1843 isEqualNodes(node.implementsClause, other.implementsClause) &&
2060 isEqualTokens(node.semicolon, other.semicolon); 1844 isEqualTokens(node.semicolon, other.semicolon);
(...skipping 29 matching lines...) Expand all
2090 isEqualTokens(node.question, other.question) && 1874 isEqualTokens(node.question, other.question) &&
2091 isEqualNodes(node.thenExpression, other.thenExpression) && 1875 isEqualNodes(node.thenExpression, other.thenExpression) &&
2092 isEqualTokens(node.colon, other.colon) && 1876 isEqualTokens(node.colon, other.colon) &&
2093 isEqualNodes(node.elseExpression, other.elseExpression); 1877 isEqualNodes(node.elseExpression, other.elseExpression);
2094 } 1878 }
2095 1879
2096 @override 1880 @override
2097 bool visitConstructorDeclaration(ConstructorDeclaration node) { 1881 bool visitConstructorDeclaration(ConstructorDeclaration node) {
2098 ConstructorDeclaration other = _other as ConstructorDeclaration; 1882 ConstructorDeclaration other = _other as ConstructorDeclaration;
2099 return isEqualNodes( 1883 return isEqualNodes(
2100 node.documentationComment, 1884 node.documentationComment, other.documentationComment) &&
2101 other.documentationComment) &&
2102 _isEqualNodeLists(node.metadata, other.metadata) && 1885 _isEqualNodeLists(node.metadata, other.metadata) &&
2103 isEqualTokens(node.externalKeyword, other.externalKeyword) && 1886 isEqualTokens(node.externalKeyword, other.externalKeyword) &&
2104 isEqualTokens(node.constKeyword, other.constKeyword) && 1887 isEqualTokens(node.constKeyword, other.constKeyword) &&
2105 isEqualTokens(node.factoryKeyword, other.factoryKeyword) && 1888 isEqualTokens(node.factoryKeyword, other.factoryKeyword) &&
2106 isEqualNodes(node.returnType, other.returnType) && 1889 isEqualNodes(node.returnType, other.returnType) &&
2107 isEqualTokens(node.period, other.period) && 1890 isEqualTokens(node.period, other.period) &&
2108 isEqualNodes(node.name, other.name) && 1891 isEqualNodes(node.name, other.name) &&
2109 isEqualNodes(node.parameters, other.parameters) && 1892 isEqualNodes(node.parameters, other.parameters) &&
2110 isEqualTokens(node.separator, other.separator) && 1893 isEqualTokens(node.separator, other.separator) &&
2111 _isEqualNodeLists(node.initializers, other.initializers) && 1894 _isEqualNodeLists(node.initializers, other.initializers) &&
(...skipping 24 matching lines...) Expand all
2136 ContinueStatement other = _other as ContinueStatement; 1919 ContinueStatement other = _other as ContinueStatement;
2137 return isEqualTokens(node.continueKeyword, other.continueKeyword) && 1920 return isEqualTokens(node.continueKeyword, other.continueKeyword) &&
2138 isEqualNodes(node.label, other.label) && 1921 isEqualNodes(node.label, other.label) &&
2139 isEqualTokens(node.semicolon, other.semicolon); 1922 isEqualTokens(node.semicolon, other.semicolon);
2140 } 1923 }
2141 1924
2142 @override 1925 @override
2143 bool visitDeclaredIdentifier(DeclaredIdentifier node) { 1926 bool visitDeclaredIdentifier(DeclaredIdentifier node) {
2144 DeclaredIdentifier other = _other as DeclaredIdentifier; 1927 DeclaredIdentifier other = _other as DeclaredIdentifier;
2145 return isEqualNodes( 1928 return isEqualNodes(
2146 node.documentationComment, 1929 node.documentationComment, other.documentationComment) &&
2147 other.documentationComment) &&
2148 _isEqualNodeLists(node.metadata, other.metadata) && 1930 _isEqualNodeLists(node.metadata, other.metadata) &&
2149 isEqualTokens(node.keyword, other.keyword) && 1931 isEqualTokens(node.keyword, other.keyword) &&
2150 isEqualNodes(node.type, other.type) && 1932 isEqualNodes(node.type, other.type) &&
2151 isEqualNodes(node.identifier, other.identifier); 1933 isEqualNodes(node.identifier, other.identifier);
2152 } 1934 }
2153 1935
2154 @override 1936 @override
2155 bool visitDefaultFormalParameter(DefaultFormalParameter node) { 1937 bool visitDefaultFormalParameter(DefaultFormalParameter node) {
2156 DefaultFormalParameter other = _other as DefaultFormalParameter; 1938 DefaultFormalParameter other = _other as DefaultFormalParameter;
2157 return isEqualNodes(node.parameter, other.parameter) && 1939 return isEqualNodes(node.parameter, other.parameter) &&
(...skipping 30 matching lines...) Expand all
2188 @override 1970 @override
2189 bool visitEmptyStatement(EmptyStatement node) { 1971 bool visitEmptyStatement(EmptyStatement node) {
2190 EmptyStatement other = _other as EmptyStatement; 1972 EmptyStatement other = _other as EmptyStatement;
2191 return isEqualTokens(node.semicolon, other.semicolon); 1973 return isEqualTokens(node.semicolon, other.semicolon);
2192 } 1974 }
2193 1975
2194 @override 1976 @override
2195 bool visitEnumConstantDeclaration(EnumConstantDeclaration node) { 1977 bool visitEnumConstantDeclaration(EnumConstantDeclaration node) {
2196 EnumConstantDeclaration other = _other as EnumConstantDeclaration; 1978 EnumConstantDeclaration other = _other as EnumConstantDeclaration;
2197 return isEqualNodes( 1979 return isEqualNodes(
2198 node.documentationComment, 1980 node.documentationComment, other.documentationComment) &&
2199 other.documentationComment) &&
2200 _isEqualNodeLists(node.metadata, other.metadata) && 1981 _isEqualNodeLists(node.metadata, other.metadata) &&
2201 isEqualNodes(node.name, other.name); 1982 isEqualNodes(node.name, other.name);
2202 } 1983 }
2203 1984
2204 @override 1985 @override
2205 bool visitEnumDeclaration(EnumDeclaration node) { 1986 bool visitEnumDeclaration(EnumDeclaration node) {
2206 EnumDeclaration other = _other as EnumDeclaration; 1987 EnumDeclaration other = _other as EnumDeclaration;
2207 return isEqualNodes( 1988 return isEqualNodes(
2208 node.documentationComment, 1989 node.documentationComment, other.documentationComment) &&
2209 other.documentationComment) &&
2210 _isEqualNodeLists(node.metadata, other.metadata) && 1990 _isEqualNodeLists(node.metadata, other.metadata) &&
2211 isEqualTokens(node.enumKeyword, other.enumKeyword) && 1991 isEqualTokens(node.enumKeyword, other.enumKeyword) &&
2212 isEqualNodes(node.name, other.name) && 1992 isEqualNodes(node.name, other.name) &&
2213 isEqualTokens(node.leftBracket, other.leftBracket) && 1993 isEqualTokens(node.leftBracket, other.leftBracket) &&
2214 _isEqualNodeLists(node.constants, other.constants) && 1994 _isEqualNodeLists(node.constants, other.constants) &&
2215 isEqualTokens(node.rightBracket, other.rightBracket); 1995 isEqualTokens(node.rightBracket, other.rightBracket);
2216 } 1996 }
2217 1997
2218 @override 1998 @override
2219 bool visitExportDirective(ExportDirective node) { 1999 bool visitExportDirective(ExportDirective node) {
2220 ExportDirective other = _other as ExportDirective; 2000 ExportDirective other = _other as ExportDirective;
2221 return isEqualNodes( 2001 return isEqualNodes(
2222 node.documentationComment, 2002 node.documentationComment, other.documentationComment) &&
2223 other.documentationComment) &&
2224 _isEqualNodeLists(node.metadata, other.metadata) && 2003 _isEqualNodeLists(node.metadata, other.metadata) &&
2225 isEqualTokens(node.keyword, other.keyword) && 2004 isEqualTokens(node.keyword, other.keyword) &&
2226 isEqualNodes(node.uri, other.uri) && 2005 isEqualNodes(node.uri, other.uri) &&
2227 _isEqualNodeLists(node.combinators, other.combinators) && 2006 _isEqualNodeLists(node.combinators, other.combinators) &&
2228 isEqualTokens(node.semicolon, other.semicolon); 2007 isEqualTokens(node.semicolon, other.semicolon);
2229 } 2008 }
2230 2009
2231 @override 2010 @override
2232 bool visitExpressionFunctionBody(ExpressionFunctionBody node) { 2011 bool visitExpressionFunctionBody(ExpressionFunctionBody node) {
2233 ExpressionFunctionBody other = _other as ExpressionFunctionBody; 2012 ExpressionFunctionBody other = _other as ExpressionFunctionBody;
(...skipping 13 matching lines...) Expand all
2247 bool visitExtendsClause(ExtendsClause node) { 2026 bool visitExtendsClause(ExtendsClause node) {
2248 ExtendsClause other = _other as ExtendsClause; 2027 ExtendsClause other = _other as ExtendsClause;
2249 return isEqualTokens(node.extendsKeyword, other.extendsKeyword) && 2028 return isEqualTokens(node.extendsKeyword, other.extendsKeyword) &&
2250 isEqualNodes(node.superclass, other.superclass); 2029 isEqualNodes(node.superclass, other.superclass);
2251 } 2030 }
2252 2031
2253 @override 2032 @override
2254 bool visitFieldDeclaration(FieldDeclaration node) { 2033 bool visitFieldDeclaration(FieldDeclaration node) {
2255 FieldDeclaration other = _other as FieldDeclaration; 2034 FieldDeclaration other = _other as FieldDeclaration;
2256 return isEqualNodes( 2035 return isEqualNodes(
2257 node.documentationComment, 2036 node.documentationComment, other.documentationComment) &&
2258 other.documentationComment) &&
2259 _isEqualNodeLists(node.metadata, other.metadata) && 2037 _isEqualNodeLists(node.metadata, other.metadata) &&
2260 isEqualTokens(node.staticKeyword, other.staticKeyword) && 2038 isEqualTokens(node.staticKeyword, other.staticKeyword) &&
2261 isEqualNodes(node.fields, other.fields) && 2039 isEqualNodes(node.fields, other.fields) &&
2262 isEqualTokens(node.semicolon, other.semicolon); 2040 isEqualTokens(node.semicolon, other.semicolon);
2263 } 2041 }
2264 2042
2265 @override 2043 @override
2266 bool visitFieldFormalParameter(FieldFormalParameter node) { 2044 bool visitFieldFormalParameter(FieldFormalParameter node) {
2267 FieldFormalParameter other = _other as FieldFormalParameter; 2045 FieldFormalParameter other = _other as FieldFormalParameter;
2268 return isEqualNodes( 2046 return isEqualNodes(
2269 node.documentationComment, 2047 node.documentationComment, other.documentationComment) &&
2270 other.documentationComment) &&
2271 _isEqualNodeLists(node.metadata, other.metadata) && 2048 _isEqualNodeLists(node.metadata, other.metadata) &&
2272 isEqualTokens(node.keyword, other.keyword) && 2049 isEqualTokens(node.keyword, other.keyword) &&
2273 isEqualNodes(node.type, other.type) && 2050 isEqualNodes(node.type, other.type) &&
2274 isEqualTokens(node.thisKeyword, other.thisKeyword) && 2051 isEqualTokens(node.thisKeyword, other.thisKeyword) &&
2275 isEqualTokens(node.period, other.period) && 2052 isEqualTokens(node.period, other.period) &&
2276 isEqualNodes(node.identifier, other.identifier); 2053 isEqualNodes(node.identifier, other.identifier);
2277 } 2054 }
2278 2055
2279 @override 2056 @override
2280 bool visitForEachStatement(ForEachStatement node) { 2057 bool visitForEachStatement(ForEachStatement node) {
(...skipping 29 matching lines...) Expand all
2310 isEqualTokens(node.rightSeparator, other.rightSeparator) && 2087 isEqualTokens(node.rightSeparator, other.rightSeparator) &&
2311 _isEqualNodeLists(node.updaters, other.updaters) && 2088 _isEqualNodeLists(node.updaters, other.updaters) &&
2312 isEqualTokens(node.rightParenthesis, other.rightParenthesis) && 2089 isEqualTokens(node.rightParenthesis, other.rightParenthesis) &&
2313 isEqualNodes(node.body, other.body); 2090 isEqualNodes(node.body, other.body);
2314 } 2091 }
2315 2092
2316 @override 2093 @override
2317 bool visitFunctionDeclaration(FunctionDeclaration node) { 2094 bool visitFunctionDeclaration(FunctionDeclaration node) {
2318 FunctionDeclaration other = _other as FunctionDeclaration; 2095 FunctionDeclaration other = _other as FunctionDeclaration;
2319 return isEqualNodes( 2096 return isEqualNodes(
2320 node.documentationComment, 2097 node.documentationComment, other.documentationComment) &&
2321 other.documentationComment) &&
2322 _isEqualNodeLists(node.metadata, other.metadata) && 2098 _isEqualNodeLists(node.metadata, other.metadata) &&
2323 isEqualTokens(node.externalKeyword, other.externalKeyword) && 2099 isEqualTokens(node.externalKeyword, other.externalKeyword) &&
2324 isEqualNodes(node.returnType, other.returnType) && 2100 isEqualNodes(node.returnType, other.returnType) &&
2325 isEqualTokens(node.propertyKeyword, other.propertyKeyword) && 2101 isEqualTokens(node.propertyKeyword, other.propertyKeyword) &&
2326 isEqualNodes(node.name, other.name) && 2102 isEqualNodes(node.name, other.name) &&
2327 isEqualNodes(node.functionExpression, other.functionExpression); 2103 isEqualNodes(node.functionExpression, other.functionExpression);
2328 } 2104 }
2329 2105
2330 @override 2106 @override
2331 bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { 2107 bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
(...skipping 12 matching lines...) Expand all
2344 bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { 2120 bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
2345 FunctionExpressionInvocation other = _other as FunctionExpressionInvocation; 2121 FunctionExpressionInvocation other = _other as FunctionExpressionInvocation;
2346 return isEqualNodes(node.function, other.function) && 2122 return isEqualNodes(node.function, other.function) &&
2347 isEqualNodes(node.argumentList, other.argumentList); 2123 isEqualNodes(node.argumentList, other.argumentList);
2348 } 2124 }
2349 2125
2350 @override 2126 @override
2351 bool visitFunctionTypeAlias(FunctionTypeAlias node) { 2127 bool visitFunctionTypeAlias(FunctionTypeAlias node) {
2352 FunctionTypeAlias other = _other as FunctionTypeAlias; 2128 FunctionTypeAlias other = _other as FunctionTypeAlias;
2353 return isEqualNodes( 2129 return isEqualNodes(
2354 node.documentationComment, 2130 node.documentationComment, other.documentationComment) &&
2355 other.documentationComment) &&
2356 _isEqualNodeLists(node.metadata, other.metadata) && 2131 _isEqualNodeLists(node.metadata, other.metadata) &&
2357 isEqualTokens(node.typedefKeyword, other.typedefKeyword) && 2132 isEqualTokens(node.typedefKeyword, other.typedefKeyword) &&
2358 isEqualNodes(node.returnType, other.returnType) && 2133 isEqualNodes(node.returnType, other.returnType) &&
2359 isEqualNodes(node.name, other.name) && 2134 isEqualNodes(node.name, other.name) &&
2360 isEqualNodes(node.typeParameters, other.typeParameters) && 2135 isEqualNodes(node.typeParameters, other.typeParameters) &&
2361 isEqualNodes(node.parameters, other.parameters) && 2136 isEqualNodes(node.parameters, other.parameters) &&
2362 isEqualTokens(node.semicolon, other.semicolon); 2137 isEqualTokens(node.semicolon, other.semicolon);
2363 } 2138 }
2364 2139
2365 @override 2140 @override
2366 bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { 2141 bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
2367 FunctionTypedFormalParameter other = _other as FunctionTypedFormalParameter; 2142 FunctionTypedFormalParameter other = _other as FunctionTypedFormalParameter;
2368 return isEqualNodes( 2143 return isEqualNodes(
2369 node.documentationComment, 2144 node.documentationComment, other.documentationComment) &&
2370 other.documentationComment) &&
2371 _isEqualNodeLists(node.metadata, other.metadata) && 2145 _isEqualNodeLists(node.metadata, other.metadata) &&
2372 isEqualNodes(node.returnType, other.returnType) && 2146 isEqualNodes(node.returnType, other.returnType) &&
2373 isEqualNodes(node.identifier, other.identifier) && 2147 isEqualNodes(node.identifier, other.identifier) &&
2374 isEqualNodes(node.parameters, other.parameters); 2148 isEqualNodes(node.parameters, other.parameters);
2375 } 2149 }
2376 2150
2377 @override 2151 @override
2378 bool visitHideCombinator(HideCombinator node) { 2152 bool visitHideCombinator(HideCombinator node) {
2379 HideCombinator other = _other as HideCombinator; 2153 HideCombinator other = _other as HideCombinator;
2380 return isEqualTokens(node.keyword, other.keyword) && 2154 return isEqualTokens(node.keyword, other.keyword) &&
(...skipping 16 matching lines...) Expand all
2397 bool visitImplementsClause(ImplementsClause node) { 2171 bool visitImplementsClause(ImplementsClause node) {
2398 ImplementsClause other = _other as ImplementsClause; 2172 ImplementsClause other = _other as ImplementsClause;
2399 return isEqualTokens(node.implementsKeyword, other.implementsKeyword) && 2173 return isEqualTokens(node.implementsKeyword, other.implementsKeyword) &&
2400 _isEqualNodeLists(node.interfaces, other.interfaces); 2174 _isEqualNodeLists(node.interfaces, other.interfaces);
2401 } 2175 }
2402 2176
2403 @override 2177 @override
2404 bool visitImportDirective(ImportDirective node) { 2178 bool visitImportDirective(ImportDirective node) {
2405 ImportDirective other = _other as ImportDirective; 2179 ImportDirective other = _other as ImportDirective;
2406 return isEqualNodes( 2180 return isEqualNodes(
2407 node.documentationComment, 2181 node.documentationComment, other.documentationComment) &&
2408 other.documentationComment) &&
2409 _isEqualNodeLists(node.metadata, other.metadata) && 2182 _isEqualNodeLists(node.metadata, other.metadata) &&
2410 isEqualTokens(node.keyword, other.keyword) && 2183 isEqualTokens(node.keyword, other.keyword) &&
2411 isEqualNodes(node.uri, other.uri) && 2184 isEqualNodes(node.uri, other.uri) &&
2412 isEqualTokens(node.deferredKeyword, other.deferredKeyword) && 2185 isEqualTokens(node.deferredKeyword, other.deferredKeyword) &&
2413 isEqualTokens(node.asKeyword, other.asKeyword) && 2186 isEqualTokens(node.asKeyword, other.asKeyword) &&
2414 isEqualNodes(node.prefix, other.prefix) && 2187 isEqualNodes(node.prefix, other.prefix) &&
2415 _isEqualNodeLists(node.combinators, other.combinators) && 2188 _isEqualNodeLists(node.combinators, other.combinators) &&
2416 isEqualTokens(node.semicolon, other.semicolon); 2189 isEqualTokens(node.semicolon, other.semicolon);
2417 } 2190 }
2418 2191
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 bool visitLabeledStatement(LabeledStatement node) { 2248 bool visitLabeledStatement(LabeledStatement node) {
2476 LabeledStatement other = _other as LabeledStatement; 2249 LabeledStatement other = _other as LabeledStatement;
2477 return _isEqualNodeLists(node.labels, other.labels) && 2250 return _isEqualNodeLists(node.labels, other.labels) &&
2478 isEqualNodes(node.statement, other.statement); 2251 isEqualNodes(node.statement, other.statement);
2479 } 2252 }
2480 2253
2481 @override 2254 @override
2482 bool visitLibraryDirective(LibraryDirective node) { 2255 bool visitLibraryDirective(LibraryDirective node) {
2483 LibraryDirective other = _other as LibraryDirective; 2256 LibraryDirective other = _other as LibraryDirective;
2484 return isEqualNodes( 2257 return isEqualNodes(
2485 node.documentationComment, 2258 node.documentationComment, other.documentationComment) &&
2486 other.documentationComment) &&
2487 _isEqualNodeLists(node.metadata, other.metadata) && 2259 _isEqualNodeLists(node.metadata, other.metadata) &&
2488 isEqualTokens(node.libraryKeyword, other.libraryKeyword) && 2260 isEqualTokens(node.libraryKeyword, other.libraryKeyword) &&
2489 isEqualNodes(node.name, other.name) && 2261 isEqualNodes(node.name, other.name) &&
2490 isEqualTokens(node.semicolon, other.semicolon); 2262 isEqualTokens(node.semicolon, other.semicolon);
2491 } 2263 }
2492 2264
2493 @override 2265 @override
2494 bool visitLibraryIdentifier(LibraryIdentifier node) { 2266 bool visitLibraryIdentifier(LibraryIdentifier node) {
2495 LibraryIdentifier other = _other as LibraryIdentifier; 2267 LibraryIdentifier other = _other as LibraryIdentifier;
2496 return _isEqualNodeLists(node.components, other.components); 2268 return _isEqualNodeLists(node.components, other.components);
(...skipping 24 matching lines...) Expand all
2521 MapLiteralEntry other = _other as MapLiteralEntry; 2293 MapLiteralEntry other = _other as MapLiteralEntry;
2522 return isEqualNodes(node.key, other.key) && 2294 return isEqualNodes(node.key, other.key) &&
2523 isEqualTokens(node.separator, other.separator) && 2295 isEqualTokens(node.separator, other.separator) &&
2524 isEqualNodes(node.value, other.value); 2296 isEqualNodes(node.value, other.value);
2525 } 2297 }
2526 2298
2527 @override 2299 @override
2528 bool visitMethodDeclaration(MethodDeclaration node) { 2300 bool visitMethodDeclaration(MethodDeclaration node) {
2529 MethodDeclaration other = _other as MethodDeclaration; 2301 MethodDeclaration other = _other as MethodDeclaration;
2530 return isEqualNodes( 2302 return isEqualNodes(
2531 node.documentationComment, 2303 node.documentationComment, other.documentationComment) &&
2532 other.documentationComment) &&
2533 _isEqualNodeLists(node.metadata, other.metadata) && 2304 _isEqualNodeLists(node.metadata, other.metadata) &&
2534 isEqualTokens(node.externalKeyword, other.externalKeyword) && 2305 isEqualTokens(node.externalKeyword, other.externalKeyword) &&
2535 isEqualTokens(node.modifierKeyword, other.modifierKeyword) && 2306 isEqualTokens(node.modifierKeyword, other.modifierKeyword) &&
2536 isEqualNodes(node.returnType, other.returnType) && 2307 isEqualNodes(node.returnType, other.returnType) &&
2537 isEqualTokens(node.propertyKeyword, other.propertyKeyword) && 2308 isEqualTokens(node.propertyKeyword, other.propertyKeyword) &&
2538 isEqualTokens(node.propertyKeyword, other.propertyKeyword) && 2309 isEqualTokens(node.propertyKeyword, other.propertyKeyword) &&
2539 isEqualNodes(node.name, other.name) && 2310 isEqualNodes(node.name, other.name) &&
2540 isEqualNodes(node.parameters, other.parameters) && 2311 isEqualNodes(node.parameters, other.parameters) &&
2541 isEqualNodes(node.body, other.body); 2312 isEqualNodes(node.body, other.body);
2542 } 2313 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2583 ParenthesizedExpression other = _other as ParenthesizedExpression; 2354 ParenthesizedExpression other = _other as ParenthesizedExpression;
2584 return isEqualTokens(node.leftParenthesis, other.leftParenthesis) && 2355 return isEqualTokens(node.leftParenthesis, other.leftParenthesis) &&
2585 isEqualNodes(node.expression, other.expression) && 2356 isEqualNodes(node.expression, other.expression) &&
2586 isEqualTokens(node.rightParenthesis, other.rightParenthesis); 2357 isEqualTokens(node.rightParenthesis, other.rightParenthesis);
2587 } 2358 }
2588 2359
2589 @override 2360 @override
2590 bool visitPartDirective(PartDirective node) { 2361 bool visitPartDirective(PartDirective node) {
2591 PartDirective other = _other as PartDirective; 2362 PartDirective other = _other as PartDirective;
2592 return isEqualNodes( 2363 return isEqualNodes(
2593 node.documentationComment, 2364 node.documentationComment, other.documentationComment) &&
2594 other.documentationComment) &&
2595 _isEqualNodeLists(node.metadata, other.metadata) && 2365 _isEqualNodeLists(node.metadata, other.metadata) &&
2596 isEqualTokens(node.partKeyword, other.partKeyword) && 2366 isEqualTokens(node.partKeyword, other.partKeyword) &&
2597 isEqualNodes(node.uri, other.uri) && 2367 isEqualNodes(node.uri, other.uri) &&
2598 isEqualTokens(node.semicolon, other.semicolon); 2368 isEqualTokens(node.semicolon, other.semicolon);
2599 } 2369 }
2600 2370
2601 @override 2371 @override
2602 bool visitPartOfDirective(PartOfDirective node) { 2372 bool visitPartOfDirective(PartOfDirective node) {
2603 PartOfDirective other = _other as PartOfDirective; 2373 PartOfDirective other = _other as PartOfDirective;
2604 return isEqualNodes( 2374 return isEqualNodes(
2605 node.documentationComment, 2375 node.documentationComment, other.documentationComment) &&
2606 other.documentationComment) &&
2607 _isEqualNodeLists(node.metadata, other.metadata) && 2376 _isEqualNodeLists(node.metadata, other.metadata) &&
2608 isEqualTokens(node.partKeyword, other.partKeyword) && 2377 isEqualTokens(node.partKeyword, other.partKeyword) &&
2609 isEqualTokens(node.ofKeyword, other.ofKeyword) && 2378 isEqualTokens(node.ofKeyword, other.ofKeyword) &&
2610 isEqualNodes(node.libraryName, other.libraryName) && 2379 isEqualNodes(node.libraryName, other.libraryName) &&
2611 isEqualTokens(node.semicolon, other.semicolon); 2380 isEqualTokens(node.semicolon, other.semicolon);
2612 } 2381 }
2613 2382
2614 @override 2383 @override
2615 bool visitPostfixExpression(PostfixExpression node) { 2384 bool visitPostfixExpression(PostfixExpression node) {
2616 PostfixExpression other = _other as PostfixExpression; 2385 PostfixExpression other = _other as PostfixExpression;
(...skipping 18 matching lines...) Expand all
2635 2404
2636 @override 2405 @override
2637 bool visitPropertyAccess(PropertyAccess node) { 2406 bool visitPropertyAccess(PropertyAccess node) {
2638 PropertyAccess other = _other as PropertyAccess; 2407 PropertyAccess other = _other as PropertyAccess;
2639 return isEqualNodes(node.target, other.target) && 2408 return isEqualNodes(node.target, other.target) &&
2640 isEqualTokens(node.operator, other.operator) && 2409 isEqualTokens(node.operator, other.operator) &&
2641 isEqualNodes(node.propertyName, other.propertyName); 2410 isEqualNodes(node.propertyName, other.propertyName);
2642 } 2411 }
2643 2412
2644 @override 2413 @override
2645 bool 2414 bool visitRedirectingConstructorInvocation(
2646 visitRedirectingConstructorInvocation(RedirectingConstructorInvocation nod e) { 2415 RedirectingConstructorInvocation node) {
2647 RedirectingConstructorInvocation other = 2416 RedirectingConstructorInvocation other =
2648 _other as RedirectingConstructorInvocation; 2417 _other as RedirectingConstructorInvocation;
2649 return isEqualTokens(node.thisKeyword, other.thisKeyword) && 2418 return isEqualTokens(node.thisKeyword, other.thisKeyword) &&
2650 isEqualTokens(node.period, other.period) && 2419 isEqualTokens(node.period, other.period) &&
2651 isEqualNodes(node.constructorName, other.constructorName) && 2420 isEqualNodes(node.constructorName, other.constructorName) &&
2652 isEqualNodes(node.argumentList, other.argumentList); 2421 isEqualNodes(node.argumentList, other.argumentList);
2653 } 2422 }
2654 2423
2655 @override 2424 @override
2656 bool visitRethrowExpression(RethrowExpression node) { 2425 bool visitRethrowExpression(RethrowExpression node) {
(...skipping 19 matching lines...) Expand all
2676 bool visitShowCombinator(ShowCombinator node) { 2445 bool visitShowCombinator(ShowCombinator node) {
2677 ShowCombinator other = _other as ShowCombinator; 2446 ShowCombinator other = _other as ShowCombinator;
2678 return isEqualTokens(node.keyword, other.keyword) && 2447 return isEqualTokens(node.keyword, other.keyword) &&
2679 _isEqualNodeLists(node.shownNames, other.shownNames); 2448 _isEqualNodeLists(node.shownNames, other.shownNames);
2680 } 2449 }
2681 2450
2682 @override 2451 @override
2683 bool visitSimpleFormalParameter(SimpleFormalParameter node) { 2452 bool visitSimpleFormalParameter(SimpleFormalParameter node) {
2684 SimpleFormalParameter other = _other as SimpleFormalParameter; 2453 SimpleFormalParameter other = _other as SimpleFormalParameter;
2685 return isEqualNodes( 2454 return isEqualNodes(
2686 node.documentationComment, 2455 node.documentationComment, other.documentationComment) &&
2687 other.documentationComment) &&
2688 _isEqualNodeLists(node.metadata, other.metadata) && 2456 _isEqualNodeLists(node.metadata, other.metadata) &&
2689 isEqualTokens(node.keyword, other.keyword) && 2457 isEqualTokens(node.keyword, other.keyword) &&
2690 isEqualNodes(node.type, other.type) && 2458 isEqualNodes(node.type, other.type) &&
2691 isEqualNodes(node.identifier, other.identifier); 2459 isEqualNodes(node.identifier, other.identifier);
2692 } 2460 }
2693 2461
2694 @override 2462 @override
2695 bool visitSimpleIdentifier(SimpleIdentifier node) { 2463 bool visitSimpleIdentifier(SimpleIdentifier node) {
2696 SimpleIdentifier other = _other as SimpleIdentifier; 2464 SimpleIdentifier other = _other as SimpleIdentifier;
2697 return isEqualTokens(node.token, other.token); 2465 return isEqualTokens(node.token, other.token);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
2773 bool visitThrowExpression(ThrowExpression node) { 2541 bool visitThrowExpression(ThrowExpression node) {
2774 ThrowExpression other = _other as ThrowExpression; 2542 ThrowExpression other = _other as ThrowExpression;
2775 return isEqualTokens(node.throwKeyword, other.throwKeyword) && 2543 return isEqualTokens(node.throwKeyword, other.throwKeyword) &&
2776 isEqualNodes(node.expression, other.expression); 2544 isEqualNodes(node.expression, other.expression);
2777 } 2545 }
2778 2546
2779 @override 2547 @override
2780 bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { 2548 bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
2781 TopLevelVariableDeclaration other = _other as TopLevelVariableDeclaration; 2549 TopLevelVariableDeclaration other = _other as TopLevelVariableDeclaration;
2782 return isEqualNodes( 2550 return isEqualNodes(
2783 node.documentationComment, 2551 node.documentationComment, other.documentationComment) &&
2784 other.documentationComment) &&
2785 _isEqualNodeLists(node.metadata, other.metadata) && 2552 _isEqualNodeLists(node.metadata, other.metadata) &&
2786 isEqualNodes(node.variables, other.variables) && 2553 isEqualNodes(node.variables, other.variables) &&
2787 isEqualTokens(node.semicolon, other.semicolon); 2554 isEqualTokens(node.semicolon, other.semicolon);
2788 } 2555 }
2789 2556
2790 @override 2557 @override
2791 bool visitTryStatement(TryStatement node) { 2558 bool visitTryStatement(TryStatement node) {
2792 TryStatement other = _other as TryStatement; 2559 TryStatement other = _other as TryStatement;
2793 return isEqualTokens(node.tryKeyword, other.tryKeyword) && 2560 return isEqualTokens(node.tryKeyword, other.tryKeyword) &&
2794 isEqualNodes(node.body, other.body) && 2561 isEqualNodes(node.body, other.body) &&
(...skipping 14 matching lines...) Expand all
2809 bool visitTypeName(TypeName node) { 2576 bool visitTypeName(TypeName node) {
2810 TypeName other = _other as TypeName; 2577 TypeName other = _other as TypeName;
2811 return isEqualNodes(node.name, other.name) && 2578 return isEqualNodes(node.name, other.name) &&
2812 isEqualNodes(node.typeArguments, other.typeArguments); 2579 isEqualNodes(node.typeArguments, other.typeArguments);
2813 } 2580 }
2814 2581
2815 @override 2582 @override
2816 bool visitTypeParameter(TypeParameter node) { 2583 bool visitTypeParameter(TypeParameter node) {
2817 TypeParameter other = _other as TypeParameter; 2584 TypeParameter other = _other as TypeParameter;
2818 return isEqualNodes( 2585 return isEqualNodes(
2819 node.documentationComment, 2586 node.documentationComment, other.documentationComment) &&
2820 other.documentationComment) &&
2821 _isEqualNodeLists(node.metadata, other.metadata) && 2587 _isEqualNodeLists(node.metadata, other.metadata) &&
2822 isEqualNodes(node.name, other.name) && 2588 isEqualNodes(node.name, other.name) &&
2823 isEqualTokens(node.extendsKeyword, other.extendsKeyword) && 2589 isEqualTokens(node.extendsKeyword, other.extendsKeyword) &&
2824 isEqualNodes(node.bound, other.bound); 2590 isEqualNodes(node.bound, other.bound);
2825 } 2591 }
2826 2592
2827 @override 2593 @override
2828 bool visitTypeParameterList(TypeParameterList node) { 2594 bool visitTypeParameterList(TypeParameterList node) {
2829 TypeParameterList other = _other as TypeParameterList; 2595 TypeParameterList other = _other as TypeParameterList;
2830 return isEqualTokens(node.leftBracket, other.leftBracket) && 2596 return isEqualTokens(node.leftBracket, other.leftBracket) &&
2831 _isEqualNodeLists(node.typeParameters, other.typeParameters) && 2597 _isEqualNodeLists(node.typeParameters, other.typeParameters) &&
2832 isEqualTokens(node.rightBracket, other.rightBracket); 2598 isEqualTokens(node.rightBracket, other.rightBracket);
2833 } 2599 }
2834 2600
2835 @override 2601 @override
2836 bool visitVariableDeclaration(VariableDeclaration node) { 2602 bool visitVariableDeclaration(VariableDeclaration node) {
2837 VariableDeclaration other = _other as VariableDeclaration; 2603 VariableDeclaration other = _other as VariableDeclaration;
2838 return isEqualNodes( 2604 return isEqualNodes(
2839 node.documentationComment, 2605 node.documentationComment, other.documentationComment) &&
2840 other.documentationComment) &&
2841 _isEqualNodeLists(node.metadata, other.metadata) && 2606 _isEqualNodeLists(node.metadata, other.metadata) &&
2842 isEqualNodes(node.name, other.name) && 2607 isEqualNodes(node.name, other.name) &&
2843 isEqualTokens(node.equals, other.equals) && 2608 isEqualTokens(node.equals, other.equals) &&
2844 isEqualNodes(node.initializer, other.initializer); 2609 isEqualNodes(node.initializer, other.initializer);
2845 } 2610 }
2846 2611
2847 @override 2612 @override
2848 bool visitVariableDeclarationList(VariableDeclarationList node) { 2613 bool visitVariableDeclarationList(VariableDeclarationList node) {
2849 VariableDeclarationList other = _other as VariableDeclarationList; 2614 VariableDeclarationList other = _other as VariableDeclarationList;
2850 return isEqualNodes( 2615 return isEqualNodes(
2851 node.documentationComment, 2616 node.documentationComment, other.documentationComment) &&
2852 other.documentationComment) &&
2853 _isEqualNodeLists(node.metadata, other.metadata) && 2617 _isEqualNodeLists(node.metadata, other.metadata) &&
2854 isEqualTokens(node.keyword, other.keyword) && 2618 isEqualTokens(node.keyword, other.keyword) &&
2855 isEqualNodes(node.type, other.type) && 2619 isEqualNodes(node.type, other.type) &&
2856 _isEqualNodeLists(node.variables, other.variables); 2620 _isEqualNodeLists(node.variables, other.variables);
2857 } 2621 }
2858 2622
2859 @override 2623 @override
2860 bool visitVariableDeclarationStatement(VariableDeclarationStatement node) { 2624 bool visitVariableDeclarationStatement(VariableDeclarationStatement node) {
2861 VariableDeclarationStatement other = _other as VariableDeclarationStatement; 2625 VariableDeclarationStatement other = _other as VariableDeclarationStatement;
2862 return isEqualNodes(node.variables, other.variables) && 2626 return isEqualNodes(node.variables, other.variables) &&
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
3323 R visitPartOfDirective(PartOfDirective node); 3087 R visitPartOfDirective(PartOfDirective node);
3324 3088
3325 R visitPostfixExpression(PostfixExpression node); 3089 R visitPostfixExpression(PostfixExpression node);
3326 3090
3327 R visitPrefixedIdentifier(PrefixedIdentifier node); 3091 R visitPrefixedIdentifier(PrefixedIdentifier node);
3328 3092
3329 R visitPrefixExpression(PrefixExpression node); 3093 R visitPrefixExpression(PrefixExpression node);
3330 3094
3331 R visitPropertyAccess(PropertyAccess node); 3095 R visitPropertyAccess(PropertyAccess node);
3332 3096
3333 R 3097 R visitRedirectingConstructorInvocation(
3334 visitRedirectingConstructorInvocation(RedirectingConstructorInvocation nod e); 3098 RedirectingConstructorInvocation node);
3335 3099
3336 R visitRethrowExpression(RethrowExpression node); 3100 R visitRethrowExpression(RethrowExpression node);
3337 3101
3338 R visitReturnStatement(ReturnStatement node); 3102 R visitReturnStatement(ReturnStatement node);
3339 3103
3340 R visitScriptTag(ScriptTag node); 3104 R visitScriptTag(ScriptTag node);
3341 3105
3342 R visitShowCombinator(ShowCombinator node); 3106 R visitShowCombinator(ShowCombinator node);
3343 3107
3344 R visitSimpleFormalParameter(SimpleFormalParameter node); 3108 R visitSimpleFormalParameter(SimpleFormalParameter node);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
3417 @override 3181 @override
3418 Token get beginToken { 3182 Token get beginToken {
3419 if (awaitKeyword != null) { 3183 if (awaitKeyword != null) {
3420 return awaitKeyword; 3184 return awaitKeyword;
3421 } 3185 }
3422 return _expression.beginToken; 3186 return _expression.beginToken;
3423 } 3187 }
3424 3188
3425 @override 3189 @override
3426 Iterable get childEntities => new ChildEntities() 3190 Iterable get childEntities => new ChildEntities()
3427 ..add(awaitKeyword) 3191 ..add(awaitKeyword)
3428 ..add(_expression); 3192 ..add(_expression);
3429 3193
3430 @override 3194 @override
3431 Token get endToken => _expression.endToken; 3195 Token get endToken => _expression.endToken;
3432 3196
3433 /** 3197 /**
3434 * Return the expression whose value is being waited on. 3198 * Return the expression whose value is being waited on.
3435 */ 3199 */
3436 Expression get expression => _expression; 3200 Expression get expression => _expression;
3437 3201
3438 /** 3202 /**
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3487 * The element associated with the operator based on the propagated type of 3251 * The element associated with the operator based on the propagated type of
3488 * the left operand, or `null` if the AST structure has not been resolved, if 3252 * the left operand, or `null` if the AST structure has not been resolved, if
3489 * the operator is not user definable, or if the operator could not be 3253 * the operator is not user definable, or if the operator could not be
3490 * resolved. 3254 * resolved.
3491 */ 3255 */
3492 MethodElement propagatedElement; 3256 MethodElement propagatedElement;
3493 3257
3494 /** 3258 /**
3495 * Initialize a newly created binary expression. 3259 * Initialize a newly created binary expression.
3496 */ 3260 */
3497 BinaryExpression(Expression leftOperand, this.operator, 3261 BinaryExpression(
3498 Expression rightOperand) { 3262 Expression leftOperand, this.operator, Expression rightOperand) {
3499 _leftOperand = _becomeParentOf(leftOperand); 3263 _leftOperand = _becomeParentOf(leftOperand);
3500 _rightOperand = _becomeParentOf(rightOperand); 3264 _rightOperand = _becomeParentOf(rightOperand);
3501 } 3265 }
3502 3266
3503 @override 3267 @override
3504 Token get beginToken => _leftOperand.beginToken; 3268 Token get beginToken => _leftOperand.beginToken;
3505 3269
3506 /** 3270 /**
3507 * Return the best element available for this operator. If resolution was able 3271 * Return the best element available for this operator. If resolution was able
3508 * to find a better element based on type propagation, that element will be 3272 * to find a better element based on type propagation, that element will be
3509 * returned. Otherwise, the element found using the result of static analysis 3273 * returned. Otherwise, the element found using the result of static analysis
3510 * will be returned. If resolution has not been performed, then `null` will be 3274 * will be returned. If resolution has not been performed, then `null` will be
3511 * returned. 3275 * returned.
3512 */ 3276 */
3513 MethodElement get bestElement { 3277 MethodElement get bestElement {
3514 MethodElement element = propagatedElement; 3278 MethodElement element = propagatedElement;
3515 if (element == null) { 3279 if (element == null) {
3516 element = staticElement; 3280 element = staticElement;
3517 } 3281 }
3518 return element; 3282 return element;
3519 } 3283 }
3520 3284
3521 @override 3285 @override
3522 Iterable get childEntities => new ChildEntities() 3286 Iterable get childEntities => new ChildEntities()
3523 ..add(_leftOperand) 3287 ..add(_leftOperand)
3524 ..add(operator) 3288 ..add(operator)
3525 ..add(_rightOperand); 3289 ..add(_rightOperand);
3526 3290
3527 @override 3291 @override
3528 Token get endToken => _rightOperand.endToken; 3292 Token get endToken => _rightOperand.endToken;
3529 3293
3530 /** 3294 /**
3531 * Return the expression used to compute the left operand. 3295 * Return the expression used to compute the left operand.
3532 */ 3296 */
3533 Expression get leftOperand => _leftOperand; 3297 Expression get leftOperand => _leftOperand;
3534 3298
3535 /** 3299 /**
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
3649 */ 3413 */
3650 Block(this.leftBracket, List<Statement> statements, this.rightBracket) { 3414 Block(this.leftBracket, List<Statement> statements, this.rightBracket) {
3651 _statements = new NodeList<Statement>(this, statements); 3415 _statements = new NodeList<Statement>(this, statements);
3652 } 3416 }
3653 3417
3654 @override 3418 @override
3655 Token get beginToken => leftBracket; 3419 Token get beginToken => leftBracket;
3656 3420
3657 @override 3421 @override
3658 Iterable get childEntities => new ChildEntities() 3422 Iterable get childEntities => new ChildEntities()
3659 ..add(leftBracket) 3423 ..add(leftBracket)
3660 ..addAll(_statements) 3424 ..addAll(_statements)
3661 ..add(rightBracket); 3425 ..add(rightBracket);
3662 3426
3663 @override 3427 @override
3664 Token get endToken => rightBracket; 3428 Token get endToken => rightBracket;
3665 3429
3666 /** 3430 /**
3667 * Return the statements contained in the block. 3431 * Return the statements contained in the block.
3668 */ 3432 */
3669 NodeList<Statement> get statements => _statements; 3433 NodeList<Statement> get statements => _statements;
3670 3434
3671 @override 3435 @override
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
3721 3485
3722 /** 3486 /**
3723 * Set the block representing the body of the function to the given [block]. 3487 * Set the block representing the body of the function to the given [block].
3724 */ 3488 */
3725 void set block(Block block) { 3489 void set block(Block block) {
3726 _block = _becomeParentOf(block); 3490 _block = _becomeParentOf(block);
3727 } 3491 }
3728 3492
3729 @override 3493 @override
3730 Iterable get childEntities => new ChildEntities() 3494 Iterable get childEntities => new ChildEntities()
3731 ..add(keyword) 3495 ..add(keyword)
3732 ..add(star) 3496 ..add(star)
3733 ..add(_block); 3497 ..add(_block);
3734 3498
3735 @override 3499 @override
3736 Token get endToken => _block.endToken; 3500 Token get endToken => _block.endToken;
3737 3501
3738 @override 3502 @override
3739 bool get isAsynchronous => keyword != null && keyword.lexeme == Parser.ASYNC; 3503 bool get isAsynchronous => keyword != null && keyword.lexeme == Parser.ASYNC;
3740 3504
3741 @override 3505 @override
3742 bool get isGenerator => star != null; 3506 bool get isGenerator => star != null;
3743 3507
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
3890 */ 3654 */
3891 BreakStatement(this.breakKeyword, SimpleIdentifier label, this.semicolon) { 3655 BreakStatement(this.breakKeyword, SimpleIdentifier label, this.semicolon) {
3892 _label = _becomeParentOf(label); 3656 _label = _becomeParentOf(label);
3893 } 3657 }
3894 3658
3895 @override 3659 @override
3896 Token get beginToken => breakKeyword; 3660 Token get beginToken => breakKeyword;
3897 3661
3898 @override 3662 @override
3899 Iterable get childEntities => new ChildEntities() 3663 Iterable get childEntities => new ChildEntities()
3900 ..add(breakKeyword) 3664 ..add(breakKeyword)
3901 ..add(_label) 3665 ..add(_label)
3902 ..add(semicolon); 3666 ..add(semicolon);
3903 3667
3904 @override 3668 @override
3905 Token get endToken => semicolon; 3669 Token get endToken => semicolon;
3906 3670
3907 /** 3671 /**
3908 * Return the token representing the 'break' keyword. 3672 * Return the token representing the 'break' keyword.
3909 */ 3673 */
3910 @deprecated // Use "this.breakKeyword" 3674 @deprecated // Use "this.breakKeyword"
3911 Token get keyword => breakKeyword; 3675 Token get keyword => breakKeyword;
3912 3676
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
3979 @override 3743 @override
3980 Token get beginToken => _target.beginToken; 3744 Token get beginToken => _target.beginToken;
3981 3745
3982 /** 3746 /**
3983 * Return the cascade sections sharing the common target. 3747 * Return the cascade sections sharing the common target.
3984 */ 3748 */
3985 NodeList<Expression> get cascadeSections => _cascadeSections; 3749 NodeList<Expression> get cascadeSections => _cascadeSections;
3986 3750
3987 @override 3751 @override
3988 Iterable get childEntities => new ChildEntities() 3752 Iterable get childEntities => new ChildEntities()
3989 ..add(_target) 3753 ..add(_target)
3990 ..addAll(_cascadeSections); 3754 ..addAll(_cascadeSections);
3991 3755
3992 @override 3756 @override
3993 Token get endToken => _cascadeSections.endToken; 3757 Token get endToken => _cascadeSections.endToken;
3994 3758
3995 @override 3759 @override
3996 int get precedence => 2; 3760 int get precedence => 2;
3997 3761
3998 /** 3762 /**
3999 * Return the target of the cascade sections. 3763 * Return the target of the cascade sections.
4000 */ 3764 */
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
4109 3873
4110 /** 3874 /**
4111 * Set the body of the catch block to the given [block]. 3875 * Set the body of the catch block to the given [block].
4112 */ 3876 */
4113 void set body(Block block) { 3877 void set body(Block block) {
4114 _body = _becomeParentOf(block); 3878 _body = _becomeParentOf(block);
4115 } 3879 }
4116 3880
4117 @override 3881 @override
4118 Iterable get childEntities => new ChildEntities() 3882 Iterable get childEntities => new ChildEntities()
4119 ..add(onKeyword) 3883 ..add(onKeyword)
4120 ..add(_exceptionType) 3884 ..add(_exceptionType)
4121 ..add(catchKeyword) 3885 ..add(catchKeyword)
4122 ..add(leftParenthesis) 3886 ..add(leftParenthesis)
4123 ..add(_exceptionParameter) 3887 ..add(_exceptionParameter)
4124 ..add(comma) 3888 ..add(comma)
4125 ..add(_stackTraceParameter) 3889 ..add(_stackTraceParameter)
4126 ..add(rightParenthesis) 3890 ..add(rightParenthesis)
4127 ..add(_body); 3891 ..add(_body);
4128 3892
4129 @override 3893 @override
4130 Token get endToken => _body.endToken; 3894 Token get endToken => _body.endToken;
4131 3895
4132 /** 3896 /**
4133 * Return the parameter whose value will be the exception that was thrown, or 3897 * Return the parameter whose value will be the exception that was thrown, or
4134 * `null` if there is no 'catch' keyword. 3898 * `null` if there is no 'catch' keyword.
4135 */ 3899 */
4136 SimpleIdentifier get exceptionParameter => _exceptionParameter; 3900 SimpleIdentifier get exceptionParameter => _exceptionParameter;
4137 3901
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
4291 * corresponding attribute. The [abstractKeyword] can be `null` if the class 4055 * corresponding attribute. The [abstractKeyword] can be `null` if the class
4292 * is not abstract. The [typeParameters] can be `null` if the class does not 4056 * is not abstract. The [typeParameters] can be `null` if the class does not
4293 * have any type parameters. Any or all of the [extendsClause], [withClause], 4057 * have any type parameters. Any or all of the [extendsClause], [withClause],
4294 * and [implementsClause] can be `null` if the class does not have the 4058 * and [implementsClause] can be `null` if the class does not have the
4295 * corresponding clause. The list of [members] can be `null` if the class does 4059 * corresponding clause. The list of [members] can be `null` if the class does
4296 * not have any members. 4060 * not have any members.
4297 */ 4061 */
4298 ClassDeclaration(Comment comment, List<Annotation> metadata, 4062 ClassDeclaration(Comment comment, List<Annotation> metadata,
4299 this.abstractKeyword, this.classKeyword, SimpleIdentifier name, 4063 this.abstractKeyword, this.classKeyword, SimpleIdentifier name,
4300 TypeParameterList typeParameters, ExtendsClause extendsClause, 4064 TypeParameterList typeParameters, ExtendsClause extendsClause,
4301 WithClause withClause, ImplementsClause implementsClause, this.leftBracket , 4065 WithClause withClause, ImplementsClause implementsClause,
4302 List<ClassMember> members, this.rightBracket) 4066 this.leftBracket, List<ClassMember> members, this.rightBracket)
4303 : super(comment, metadata) { 4067 : super(comment, metadata) {
4304 _name = _becomeParentOf(name); 4068 _name = _becomeParentOf(name);
4305 _typeParameters = _becomeParentOf(typeParameters); 4069 _typeParameters = _becomeParentOf(typeParameters);
4306 _extendsClause = _becomeParentOf(extendsClause); 4070 _extendsClause = _becomeParentOf(extendsClause);
4307 _withClause = _becomeParentOf(withClause); 4071 _withClause = _becomeParentOf(withClause);
4308 _implementsClause = _becomeParentOf(implementsClause); 4072 _implementsClause = _becomeParentOf(implementsClause);
4309 _members = new NodeList<ClassMember>(this, members); 4073 _members = new NodeList<ClassMember>(this, members);
4310 } 4074 }
4311 4075
4312 @override 4076 @override
4313 Iterable get childEntities => super._childEntities 4077 Iterable get childEntities => super._childEntities
4314 ..add(abstractKeyword) 4078 ..add(abstractKeyword)
4315 ..add(classKeyword) 4079 ..add(classKeyword)
4316 ..add(_name) 4080 ..add(_name)
4317 ..add(_typeParameters) 4081 ..add(_typeParameters)
4318 ..add(_extendsClause) 4082 ..add(_extendsClause)
4319 ..add(_withClause) 4083 ..add(_withClause)
4320 ..add(_implementsClause) 4084 ..add(_implementsClause)
4321 ..add(_nativeClause) 4085 ..add(_nativeClause)
4322 ..add(leftBracket) 4086 ..add(leftBracket)
4323 ..addAll(members) 4087 ..addAll(members)
4324 ..add(rightBracket); 4088 ..add(rightBracket);
4325 4089
4326 @override 4090 @override
4327 ClassElement get element => 4091 ClassElement get element =>
4328 _name != null ? (_name.staticElement as ClassElement) : null; 4092 _name != null ? (_name.staticElement as ClassElement) : null;
4329 4093
4330 @override 4094 @override
4331 Token get endToken => rightBracket; 4095 Token get endToken => rightBracket;
4332 4096
4333 /** 4097 /**
4334 * Return the extends clause for this class, or `null` if the class does not 4098 * Return the extends clause for this class, or `null` if the class does not
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
4576 : super(comment, metadata, keyword, semicolon) { 4340 : super(comment, metadata, keyword, semicolon) {
4577 _name = _becomeParentOf(name); 4341 _name = _becomeParentOf(name);
4578 _typeParameters = _becomeParentOf(typeParameters); 4342 _typeParameters = _becomeParentOf(typeParameters);
4579 _superclass = _becomeParentOf(superclass); 4343 _superclass = _becomeParentOf(superclass);
4580 _withClause = _becomeParentOf(withClause); 4344 _withClause = _becomeParentOf(withClause);
4581 _implementsClause = _becomeParentOf(implementsClause); 4345 _implementsClause = _becomeParentOf(implementsClause);
4582 } 4346 }
4583 4347
4584 @override 4348 @override
4585 Iterable get childEntities => super._childEntities 4349 Iterable get childEntities => super._childEntities
4586 ..add(typedefKeyword) 4350 ..add(typedefKeyword)
4587 ..add(_name) 4351 ..add(_name)
4588 ..add(_typeParameters) 4352 ..add(_typeParameters)
4589 ..add(equals) 4353 ..add(equals)
4590 ..add(abstractKeyword) 4354 ..add(abstractKeyword)
4591 ..add(_superclass) 4355 ..add(_superclass)
4592 ..add(_withClause) 4356 ..add(_withClause)
4593 ..add(_implementsClause) 4357 ..add(_implementsClause)
4594 ..add(semicolon); 4358 ..add(semicolon);
4595 4359
4596 @override 4360 @override
4597 ClassElement get element => 4361 ClassElement get element =>
4598 _name != null ? (_name.staticElement as ClassElement) : null; 4362 _name != null ? (_name.staticElement as ClassElement) : null;
4599 4363
4600 /** 4364 /**
4601 * Return the implements clause for this class, or `null` if there is no 4365 * Return the implements clause for this class, or `null` if there is no
4602 * implements clause. 4366 * implements clause.
4603 */ 4367 */
4604 ImplementsClause get implementsClause => _implementsClause; 4368 ImplementsClause get implementsClause => _implementsClause;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
4787 4551
4788 /** 4552 /**
4789 * Create a block comment consisting of the given [tokens]. 4553 * Create a block comment consisting of the given [tokens].
4790 */ 4554 */
4791 static Comment createBlockComment(List<Token> tokens) => 4555 static Comment createBlockComment(List<Token> tokens) =>
4792 new Comment(tokens, CommentType.BLOCK, null); 4556 new Comment(tokens, CommentType.BLOCK, null);
4793 4557
4794 /** 4558 /**
4795 * Create a documentation comment consisting of the given [tokens]. 4559 * Create a documentation comment consisting of the given [tokens].
4796 */ 4560 */
4797 static Comment createDocumentationComment(List<Token> tokens) => 4561 static Comment createDocumentationComment(List<Token> tokens) => new Comment(
4798 new Comment(tokens, CommentType.DOCUMENTATION, new List<CommentReference>( )); 4562 tokens, CommentType.DOCUMENTATION, new List<CommentReference>());
4799 4563
4800 /** 4564 /**
4801 * Create a documentation comment consisting of the given [tokens] and having 4565 * Create a documentation comment consisting of the given [tokens] and having
4802 * the given [references] embedded within it. 4566 * the given [references] embedded within it.
4803 */ 4567 */
4804 static Comment createDocumentationCommentWithReferences(List<Token> tokens, 4568 static Comment createDocumentationCommentWithReferences(
4805 List<CommentReference> references) => 4569 List<Token> tokens, List<CommentReference> references) =>
4806 new Comment(tokens, CommentType.DOCUMENTATION, references); 4570 new Comment(tokens, CommentType.DOCUMENTATION, references);
4807 4571
4808 /** 4572 /**
4809 * Create an end-of-line comment consisting of the given [tokens]. 4573 * Create an end-of-line comment consisting of the given [tokens].
4810 */ 4574 */
4811 static Comment createEndOfLineComment(List<Token> tokens) => 4575 static Comment createEndOfLineComment(List<Token> tokens) =>
4812 new Comment(tokens, CommentType.END_OF_LINE, null); 4576 new Comment(tokens, CommentType.END_OF_LINE, null);
4813 } 4577 }
4814 4578
4815 /** 4579 /**
(...skipping 20 matching lines...) Expand all
4836 */ 4600 */
4837 CommentReference(this.newKeyword, Identifier identifier) { 4601 CommentReference(this.newKeyword, Identifier identifier) {
4838 _identifier = _becomeParentOf(identifier); 4602 _identifier = _becomeParentOf(identifier);
4839 } 4603 }
4840 4604
4841 @override 4605 @override
4842 Token get beginToken => _identifier.beginToken; 4606 Token get beginToken => _identifier.beginToken;
4843 4607
4844 @override 4608 @override
4845 Iterable get childEntities => new ChildEntities() 4609 Iterable get childEntities => new ChildEntities()
4846 ..add(newKeyword) 4610 ..add(newKeyword)
4847 ..add(_identifier); 4611 ..add(_identifier);
4848 4612
4849 @override 4613 @override
4850 Token get endToken => _identifier.endToken; 4614 Token get endToken => _identifier.endToken;
4851 4615
4852 /** 4616 /**
4853 * Return the identifier being referenced. 4617 * Return the identifier being referenced.
4854 */ 4618 */
4855 Identifier get identifier => _identifier; 4619 Identifier get identifier => _identifier;
4856 4620
4857 /** 4621 /**
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
4979 _scriptTag = _becomeParentOf(scriptTag); 4743 _scriptTag = _becomeParentOf(scriptTag);
4980 _directives = new NodeList<Directive>(this, directives); 4744 _directives = new NodeList<Directive>(this, directives);
4981 _declarations = new NodeList<CompilationUnitMember>(this, declarations); 4745 _declarations = new NodeList<CompilationUnitMember>(this, declarations);
4982 } 4746 }
4983 4747
4984 @override 4748 @override
4985 Iterable get childEntities { 4749 Iterable get childEntities {
4986 ChildEntities result = new ChildEntities()..add(_scriptTag); 4750 ChildEntities result = new ChildEntities()..add(_scriptTag);
4987 if (_directivesAreBeforeDeclarations) { 4751 if (_directivesAreBeforeDeclarations) {
4988 result 4752 result
4989 ..addAll(_directives) 4753 ..addAll(_directives)
4990 ..addAll(_declarations); 4754 ..addAll(_declarations);
4991 } else { 4755 } else {
4992 result.addAll(sortedDirectivesAndDeclarations); 4756 result.addAll(sortedDirectivesAndDeclarations);
4993 } 4757 }
4994 return result; 4758 return result;
4995 } 4759 }
4996 4760
4997 /** 4761 /**
4998 * Return the declarations contained in this compilation unit. 4762 * Return the declarations contained in this compilation unit.
4999 */ 4763 */
5000 NodeList<CompilationUnitMember> get declarations => _declarations; 4764 NodeList<CompilationUnitMember> get declarations => _declarations;
(...skipping 28 matching lines...) Expand all
5029 void set scriptTag(ScriptTag scriptTag) { 4793 void set scriptTag(ScriptTag scriptTag) {
5030 _scriptTag = _becomeParentOf(scriptTag); 4794 _scriptTag = _becomeParentOf(scriptTag);
5031 } 4795 }
5032 4796
5033 /** 4797 /**
5034 * Return a list containing all of the directives and declarations in this 4798 * Return a list containing all of the directives and declarations in this
5035 * compilation unit, sorted in lexical order. 4799 * compilation unit, sorted in lexical order.
5036 */ 4800 */
5037 List<AstNode> get sortedDirectivesAndDeclarations { 4801 List<AstNode> get sortedDirectivesAndDeclarations {
5038 return <AstNode>[] 4802 return <AstNode>[]
5039 ..addAll(_directives) 4803 ..addAll(_directives)
5040 ..addAll(_declarations) 4804 ..addAll(_declarations)
5041 ..sort(AstNode.LEXICAL_ORDER); 4805 ..sort(AstNode.LEXICAL_ORDER);
5042 } 4806 }
5043 4807
5044 /** 4808 /**
5045 * Return `true` if all of the directives are lexically before any 4809 * Return `true` if all of the directives are lexically before any
5046 * declarations. 4810 * declarations.
5047 */ 4811 */
5048 bool get _directivesAreBeforeDeclarations { 4812 bool get _directivesAreBeforeDeclarations {
5049 if (_directives.isEmpty || _declarations.isEmpty) { 4813 if (_directives.isEmpty || _declarations.isEmpty) {
5050 return true; 4814 return true;
5051 } 4815 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
5132 _condition = _becomeParentOf(condition); 4896 _condition = _becomeParentOf(condition);
5133 _thenExpression = _becomeParentOf(thenExpression); 4897 _thenExpression = _becomeParentOf(thenExpression);
5134 _elseExpression = _becomeParentOf(elseExpression); 4898 _elseExpression = _becomeParentOf(elseExpression);
5135 } 4899 }
5136 4900
5137 @override 4901 @override
5138 Token get beginToken => _condition.beginToken; 4902 Token get beginToken => _condition.beginToken;
5139 4903
5140 @override 4904 @override
5141 Iterable get childEntities => new ChildEntities() 4905 Iterable get childEntities => new ChildEntities()
5142 ..add(_condition) 4906 ..add(_condition)
5143 ..add(question) 4907 ..add(question)
5144 ..add(_thenExpression) 4908 ..add(_thenExpression)
5145 ..add(colon) 4909 ..add(colon)
5146 ..add(_elseExpression); 4910 ..add(_elseExpression);
5147 4911
5148 /** 4912 /**
5149 * Return the condition used to determine which of the expressions is executed 4913 * Return the condition used to determine which of the expressions is executed
5150 * next. 4914 * next.
5151 */ 4915 */
5152 Expression get condition => _condition; 4916 Expression get condition => _condition;
5153 4917
5154 /** 4918 /**
5155 * Set the condition used to determine which of the expressions is executed 4919 * Set the condition used to determine which of the expressions is executed
5156 * next to the given [expression]. 4920 * next to the given [expression].
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
5404 // numeric or {@code null} 5168 // numeric or {@code null}
5405 if (leftOperand is int && rightOperand is int) { 5169 if (leftOperand is int && rightOperand is int) {
5406 if (rightOperand != 0) { 5170 if (rightOperand != 0) {
5407 return leftOperand ~/ rightOperand; 5171 return leftOperand ~/ rightOperand;
5408 } else { 5172 } else {
5409 return 0; 5173 return 0;
5410 } 5174 }
5411 } else if (leftOperand is double && rightOperand is double) { 5175 } else if (leftOperand is double && rightOperand is double) {
5412 return leftOperand ~/ rightOperand; 5176 return leftOperand ~/ rightOperand;
5413 } 5177 }
5414 } else { 5178 } else {}
5415 }
5416 break; 5179 break;
5417 } 5180 }
5418 // TODO(brianwilkerson) This doesn't handle numeric conversions. 5181 // TODO(brianwilkerson) This doesn't handle numeric conversions.
5419 return visitExpression(node); 5182 return visitExpression(node);
5420 } 5183 }
5421 5184
5422 @override 5185 @override
5423 Object visitBooleanLiteral(BooleanLiteral node) => node.value ? true : false; 5186 Object visitBooleanLiteral(BooleanLiteral node) => node.value ? true : false;
5424 5187
5425 @override 5188 @override
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
5506 return ~operand; 5269 return ~operand;
5507 } 5270 }
5508 } else if (node.operator.type == TokenType.MINUS) { 5271 } else if (node.operator.type == TokenType.MINUS) {
5509 if (operand == null) { 5272 if (operand == null) {
5510 return null; 5273 return null;
5511 } else if (operand is int) { 5274 } else if (operand is int) {
5512 return -operand; 5275 return -operand;
5513 } else if (operand is double) { 5276 } else if (operand is double) {
5514 return -operand; 5277 return -operand;
5515 } 5278 }
5516 } else { 5279 } else {}
5517 }
5518 break; 5280 break;
5519 } 5281 }
5520 return NOT_A_CONSTANT; 5282 return NOT_A_CONSTANT;
5521 } 5283 }
5522 5284
5523 @override 5285 @override
5524 Object visitPropertyAccess(PropertyAccess node) => _getConstantValue(null); 5286 Object visitPropertyAccess(PropertyAccess node) => _getConstantValue(null);
5525 5287
5526 @override 5288 @override
5527 Object visitSimpleIdentifier(SimpleIdentifier node) => 5289 Object visitSimpleIdentifier(SimpleIdentifier node) =>
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
5709 5471
5710 /** 5472 /**
5711 * Set the body of the constructor to the given [functionBody]. 5473 * Set the body of the constructor to the given [functionBody].
5712 */ 5474 */
5713 void set body(FunctionBody functionBody) { 5475 void set body(FunctionBody functionBody) {
5714 _body = _becomeParentOf(functionBody); 5476 _body = _becomeParentOf(functionBody);
5715 } 5477 }
5716 5478
5717 @override 5479 @override
5718 Iterable get childEntities => super._childEntities 5480 Iterable get childEntities => super._childEntities
5719 ..add(externalKeyword) 5481 ..add(externalKeyword)
5720 ..add(constKeyword) 5482 ..add(constKeyword)
5721 ..add(factoryKeyword) 5483 ..add(factoryKeyword)
5722 ..add(_returnType) 5484 ..add(_returnType)
5723 ..add(period) 5485 ..add(period)
5724 ..add(_name) 5486 ..add(_name)
5725 ..add(_parameters) 5487 ..add(_parameters)
5726 ..add(separator) 5488 ..add(separator)
5727 ..addAll(initializers) 5489 ..addAll(initializers)
5728 ..add(_redirectedConstructor) 5490 ..add(_redirectedConstructor)
5729 ..add(_body); 5491 ..add(_body);
5730 5492
5731 @override 5493 @override
5732 Token get endToken { 5494 Token get endToken {
5733 if (_body != null) { 5495 if (_body != null) {
5734 return _body.endToken; 5496 return _body.endToken;
5735 } else if (!_initializers.isEmpty) { 5497 } else if (!_initializers.isEmpty) {
5736 return _initializers.endToken; 5498 return _initializers.endToken;
5737 } 5499 }
5738 return _parameters.endToken; 5500 return _parameters.endToken;
5739 } 5501 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
5869 @override 5631 @override
5870 Token get beginToken { 5632 Token get beginToken {
5871 if (thisKeyword != null) { 5633 if (thisKeyword != null) {
5872 return thisKeyword; 5634 return thisKeyword;
5873 } 5635 }
5874 return _fieldName.beginToken; 5636 return _fieldName.beginToken;
5875 } 5637 }
5876 5638
5877 @override 5639 @override
5878 Iterable get childEntities => new ChildEntities() 5640 Iterable get childEntities => new ChildEntities()
5879 ..add(thisKeyword) 5641 ..add(thisKeyword)
5880 ..add(period) 5642 ..add(period)
5881 ..add(_fieldName) 5643 ..add(_fieldName)
5882 ..add(equals) 5644 ..add(equals)
5883 ..add(_expression); 5645 ..add(_expression);
5884 5646
5885 @override 5647 @override
5886 Token get endToken => _expression.endToken; 5648 Token get endToken => _expression.endToken;
5887 5649
5888 /** 5650 /**
5889 * Return the expression computing the value to which the field will be 5651 * Return the expression computing the value to which the field will be
5890 * initialized. 5652 * initialized.
5891 */ 5653 */
5892 Expression get expression => _expression; 5654 Expression get expression => _expression;
5893 5655
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
5936 } 5698 }
5937 } 5699 }
5938 5700
5939 /** 5701 /**
5940 * A node that can occur in the initializer list of a constructor declaration. 5702 * A node that can occur in the initializer list of a constructor declaration.
5941 * 5703 *
5942 * > constructorInitializer ::= 5704 * > constructorInitializer ::=
5943 * > [SuperConstructorInvocation] 5705 * > [SuperConstructorInvocation]
5944 * > | [ConstructorFieldInitializer] 5706 * > | [ConstructorFieldInitializer]
5945 */ 5707 */
5946 abstract class ConstructorInitializer extends AstNode { 5708 abstract class ConstructorInitializer extends AstNode {}
5947 }
5948 5709
5949 /** 5710 /**
5950 * The name of the constructor. 5711 * The name of the constructor.
5951 * 5712 *
5952 * > constructorName ::= 5713 * > constructorName ::=
5953 * > type ('.' identifier)? 5714 * > type ('.' identifier)?
5954 */ 5715 */
5955 class ConstructorName extends AstNode { 5716 class ConstructorName extends AstNode {
5956 /** 5717 /**
5957 * The name of the type defining the constructor. 5718 * The name of the type defining the constructor.
(...skipping 26 matching lines...) Expand all
5984 ConstructorName(TypeName type, this.period, SimpleIdentifier name) { 5745 ConstructorName(TypeName type, this.period, SimpleIdentifier name) {
5985 _type = _becomeParentOf(type); 5746 _type = _becomeParentOf(type);
5986 _name = _becomeParentOf(name); 5747 _name = _becomeParentOf(name);
5987 } 5748 }
5988 5749
5989 @override 5750 @override
5990 Token get beginToken => _type.beginToken; 5751 Token get beginToken => _type.beginToken;
5991 5752
5992 @override 5753 @override
5993 Iterable get childEntities => new ChildEntities() 5754 Iterable get childEntities => new ChildEntities()
5994 ..add(_type) 5755 ..add(_type)
5995 ..add(period) 5756 ..add(period)
5996 ..add(_name); 5757 ..add(_name);
5997 5758
5998 @override 5759 @override
5999 Token get endToken { 5760 Token get endToken {
6000 if (_name != null) { 5761 if (_name != null) {
6001 return _name.endToken; 5762 return _name.endToken;
6002 } 5763 }
6003 return _type.endToken; 5764 return _type.endToken;
6004 } 5765 }
6005 5766
6006 /** 5767 /**
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
6067 * AST has not yet been resolved or if the target could not be resolved. 5828 * AST has not yet been resolved or if the target could not be resolved.
6068 * Note that if the source code has errors, the target may be invalid (e.g. 5829 * Note that if the source code has errors, the target may be invalid (e.g.
6069 * the target may be in an enclosing function). 5830 * the target may be in an enclosing function).
6070 */ 5831 */
6071 AstNode target; 5832 AstNode target;
6072 5833
6073 /** 5834 /**
6074 * Initialize a newly created continue statement. The [label] can be `null` if 5835 * Initialize a newly created continue statement. The [label] can be `null` if
6075 * there is no label associated with the statement. 5836 * there is no label associated with the statement.
6076 */ 5837 */
6077 ContinueStatement(this.continueKeyword, SimpleIdentifier label, this.semicolon ) { 5838 ContinueStatement(
5839 this.continueKeyword, SimpleIdentifier label, this.semicolon) {
6078 _label = _becomeParentOf(label); 5840 _label = _becomeParentOf(label);
6079 } 5841 }
6080 5842
6081 @override 5843 @override
6082 Token get beginToken => continueKeyword; 5844 Token get beginToken => continueKeyword;
6083 5845
6084 @override 5846 @override
6085 Iterable get childEntities => new ChildEntities() 5847 Iterable get childEntities => new ChildEntities()
6086 ..add(continueKeyword) 5848 ..add(continueKeyword)
6087 ..add(_label) 5849 ..add(_label)
6088 ..add(semicolon); 5850 ..add(semicolon);
6089 5851
6090 @override 5852 @override
6091 Token get endToken => semicolon; 5853 Token get endToken => semicolon;
6092 5854
6093 /** 5855 /**
6094 * Return the token for the 'continue' keyword, or `null` if there is no 5856 * Return the token for the 'continue' keyword, or `null` if there is no
6095 * 'continue' keyword. 5857 * 'continue' keyword.
6096 */ 5858 */
6097 @deprecated // Use "this.continueKeyword" 5859 @deprecated // Use "this.continueKeyword"
6098 Token get keyword => continueKeyword; 5860 Token get keyword => continueKeyword;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
6180 */ 5942 */
6181 DeclaredIdentifier(Comment comment, List<Annotation> metadata, this.keyword, 5943 DeclaredIdentifier(Comment comment, List<Annotation> metadata, this.keyword,
6182 TypeName type, SimpleIdentifier identifier) 5944 TypeName type, SimpleIdentifier identifier)
6183 : super(comment, metadata) { 5945 : super(comment, metadata) {
6184 _type = _becomeParentOf(type); 5946 _type = _becomeParentOf(type);
6185 _identifier = _becomeParentOf(identifier); 5947 _identifier = _becomeParentOf(identifier);
6186 } 5948 }
6187 5949
6188 @override 5950 @override
6189 Iterable get childEntities => super._childEntities 5951 Iterable get childEntities => super._childEntities
6190 ..add(keyword) 5952 ..add(keyword)
6191 ..add(_type) 5953 ..add(_type)
6192 ..add(_identifier); 5954 ..add(_identifier);
6193 5955
6194 @override 5956 @override
6195 LocalVariableElement get element { 5957 LocalVariableElement get element {
6196 if (_identifier == null) { 5958 if (_identifier == null) {
6197 return null; 5959 return null;
6198 } 5960 }
6199 return _identifier.staticElement as LocalVariableElement; 5961 return _identifier.staticElement as LocalVariableElement;
6200 } 5962 }
6201 5963
6202 @override 5964 @override
(...skipping 17 matching lines...) Expand all
6220 /** 5982 /**
6221 * Set the name of the variable being declared to the given [identifier]. 5983 * Set the name of the variable being declared to the given [identifier].
6222 */ 5984 */
6223 void set identifier(SimpleIdentifier identifier) { 5985 void set identifier(SimpleIdentifier identifier) {
6224 _identifier = _becomeParentOf(identifier); 5986 _identifier = _becomeParentOf(identifier);
6225 } 5987 }
6226 5988
6227 /** 5989 /**
6228 * Return `true` if this variable was declared with the 'const' modifier. 5990 * Return `true` if this variable was declared with the 'const' modifier.
6229 */ 5991 */
6230 bool get isConst => 5992 bool get isConst => (keyword is KeywordToken) &&
6231 (keyword is KeywordToken) && (keyword as KeywordToken).keyword == Keyword. CONST; 5993 (keyword as KeywordToken).keyword == Keyword.CONST;
6232 5994
6233 /** 5995 /**
6234 * Return `true` if this variable was declared with the 'final' modifier. 5996 * Return `true` if this variable was declared with the 'final' modifier.
6235 * Variables that are declared with the 'const' modifier will return `false` 5997 * Variables that are declared with the 'const' modifier will return `false`
6236 * even though they are implicitly final. 5998 * even though they are implicitly final.
6237 */ 5999 */
6238 bool get isFinal => 6000 bool get isFinal => (keyword is KeywordToken) &&
6239 (keyword is KeywordToken) && (keyword as KeywordToken).keyword == Keyword. FINAL; 6001 (keyword as KeywordToken).keyword == Keyword.FINAL;
6240 6002
6241 /** 6003 /**
6242 * Return the name of the declared type of the parameter, or `null` if the 6004 * Return the name of the declared type of the parameter, or `null` if the
6243 * parameter does not have a declared type. 6005 * parameter does not have a declared type.
6244 */ 6006 */
6245 TypeName get type => _type; 6007 TypeName get type => _type;
6246 6008
6247 /** 6009 /**
6248 * Set the name of the declared type of the parameter to the given [typeName]. 6010 * Set the name of the declared type of the parameter to the given [typeName].
6249 */ 6011 */
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
6304 this.separator, Expression defaultValue) { 6066 this.separator, Expression defaultValue) {
6305 _parameter = _becomeParentOf(parameter); 6067 _parameter = _becomeParentOf(parameter);
6306 _defaultValue = _becomeParentOf(defaultValue); 6068 _defaultValue = _becomeParentOf(defaultValue);
6307 } 6069 }
6308 6070
6309 @override 6071 @override
6310 Token get beginToken => _parameter.beginToken; 6072 Token get beginToken => _parameter.beginToken;
6311 6073
6312 @override 6074 @override
6313 Iterable get childEntities => new ChildEntities() 6075 Iterable get childEntities => new ChildEntities()
6314 ..add(_parameter) 6076 ..add(_parameter)
6315 ..add(separator) 6077 ..add(separator)
6316 ..add(_defaultValue); 6078 ..add(_defaultValue);
6317 6079
6318 /** 6080 /**
6319 * Return the expression computing the default value for the parameter, or 6081 * Return the expression computing the default value for the parameter, or
6320 * `null` if there is no default value. 6082 * `null` if there is no default value.
6321 */ 6083 */
6322 Expression get defaultValue => _defaultValue; 6084 Expression get defaultValue => _defaultValue;
6323 6085
6324 /** 6086 /**
6325 * Set the expression computing the default value for the parameter to the 6087 * Set the expression computing the default value for the parameter to the
6326 * given [expression]. 6088 * given [expression].
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
6494 6256
6495 /** 6257 /**
6496 * Set the body of the loop to the given [statement]. 6258 * Set the body of the loop to the given [statement].
6497 */ 6259 */
6498 void set body(Statement statement) { 6260 void set body(Statement statement) {
6499 _body = _becomeParentOf(statement); 6261 _body = _becomeParentOf(statement);
6500 } 6262 }
6501 6263
6502 @override 6264 @override
6503 Iterable get childEntities => new ChildEntities() 6265 Iterable get childEntities => new ChildEntities()
6504 ..add(doKeyword) 6266 ..add(doKeyword)
6505 ..add(_body) 6267 ..add(_body)
6506 ..add(whileKeyword) 6268 ..add(whileKeyword)
6507 ..add(leftParenthesis) 6269 ..add(leftParenthesis)
6508 ..add(_condition) 6270 ..add(_condition)
6509 ..add(rightParenthesis) 6271 ..add(rightParenthesis)
6510 ..add(semicolon); 6272 ..add(semicolon);
6511 6273
6512 /** 6274 /**
6513 * Return the condition that determines when the loop will terminate. 6275 * Return the condition that determines when the loop will terminate.
6514 */ 6276 */
6515 Expression get condition => _condition; 6277 Expression get condition => _condition;
6516 6278
6517 /** 6279 /**
6518 * Set the condition that determines when the loop will terminate to the given 6280 * Set the condition that determines when the loop will terminate to the given
6519 * [expression]. 6281 * [expression].
6520 */ 6282 */
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
6803 * The name of the constant. 6565 * The name of the constant.
6804 */ 6566 */
6805 SimpleIdentifier _name; 6567 SimpleIdentifier _name;
6806 6568
6807 /** 6569 /**
6808 * Initialize a newly created enum constant declaration. Either or both of the 6570 * Initialize a newly created enum constant declaration. Either or both of the
6809 * [comment] and [metadata] can be `null` if the constant does not have the 6571 * [comment] and [metadata] can be `null` if the constant does not have the
6810 * corresponding attribute. (Technically, enum constants cannot have metadata, 6572 * corresponding attribute. (Technically, enum constants cannot have metadata,
6811 * but we allow it for consistency.) 6573 * but we allow it for consistency.)
6812 */ 6574 */
6813 EnumConstantDeclaration(Comment comment, List<Annotation> metadata, 6575 EnumConstantDeclaration(
6814 SimpleIdentifier name) 6576 Comment comment, List<Annotation> metadata, SimpleIdentifier name)
6815 : super(comment, metadata) { 6577 : super(comment, metadata) {
6816 _name = _becomeParentOf(name); 6578 _name = _becomeParentOf(name);
6817 } 6579 }
6818 6580
6819 @override 6581 @override
6820 Iterable get childEntities => super._childEntities..add(_name); 6582 Iterable get childEntities => super._childEntities..add(_name);
6821 6583
6822 @override 6584 @override
6823 FieldElement get element => 6585 FieldElement get element =>
6824 _name == null ? null : (_name.staticElement as FieldElement); 6586 _name == null ? null : (_name.staticElement as FieldElement);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
6893 SimpleIdentifier name, this.leftBracket, 6655 SimpleIdentifier name, this.leftBracket,
6894 List<EnumConstantDeclaration> constants, this.rightBracket) 6656 List<EnumConstantDeclaration> constants, this.rightBracket)
6895 : super(comment, metadata) { 6657 : super(comment, metadata) {
6896 _name = _becomeParentOf(name); 6658 _name = _becomeParentOf(name);
6897 _constants = new NodeList<EnumConstantDeclaration>(this, constants); 6659 _constants = new NodeList<EnumConstantDeclaration>(this, constants);
6898 } 6660 }
6899 6661
6900 @override 6662 @override
6901 // TODO(brianwilkerson) Add commas? 6663 // TODO(brianwilkerson) Add commas?
6902 Iterable get childEntities => super._childEntities 6664 Iterable get childEntities => super._childEntities
6903 ..add(enumKeyword) 6665 ..add(enumKeyword)
6904 ..add(_name) 6666 ..add(_name)
6905 ..add(leftBracket) 6667 ..add(leftBracket)
6906 ..addAll(_constants) 6668 ..addAll(_constants)
6907 ..add(rightBracket); 6669 ..add(rightBracket);
6908 6670
6909 /** 6671 /**
6910 * Return the enumeration constants being declared. 6672 * Return the enumeration constants being declared.
6911 */ 6673 */
6912 NodeList<EnumConstantDeclaration> get constants => _constants; 6674 NodeList<EnumConstantDeclaration> get constants => _constants;
6913 6675
6914 @override 6676 @override
6915 ClassElement get element => 6677 ClassElement get element =>
6916 _name != null ? (_name.staticElement as ClassElement) : null; 6678 _name != null ? (_name.staticElement as ClassElement) : null;
6917 6679
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
6982 * [comment] and [metadata] can be `null` if the directive does not have the 6744 * [comment] and [metadata] can be `null` if the directive does not have the
6983 * corresponding attribute. The list of [combinators] can be `null` if there 6745 * corresponding attribute. The list of [combinators] can be `null` if there
6984 * are no combinators. 6746 * are no combinators.
6985 */ 6747 */
6986 ExportDirective(Comment comment, List<Annotation> metadata, Token keyword, 6748 ExportDirective(Comment comment, List<Annotation> metadata, Token keyword,
6987 StringLiteral libraryUri, List<Combinator> combinators, Token semicolon) 6749 StringLiteral libraryUri, List<Combinator> combinators, Token semicolon)
6988 : super(comment, metadata, keyword, libraryUri, combinators, semicolon); 6750 : super(comment, metadata, keyword, libraryUri, combinators, semicolon);
6989 6751
6990 @override 6752 @override
6991 Iterable get childEntities => super._childEntities 6753 Iterable get childEntities => super._childEntities
6992 ..add(_uri) 6754 ..add(_uri)
6993 ..addAll(combinators) 6755 ..addAll(combinators)
6994 ..add(semicolon); 6756 ..add(semicolon);
6995 6757
6996 @override 6758 @override
6997 ExportElement get element => super.element as ExportElement; 6759 ExportElement get element => super.element as ExportElement;
6998 6760
6999 @override 6761 @override
7000 LibraryElement get uriElement { 6762 LibraryElement get uriElement {
7001 if (element != null) { 6763 if (element != null) {
7002 return element.exportedLibrary; 6764 return element.exportedLibrary;
7003 } 6765 }
7004 return null; 6766 return null;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
7207 @override 6969 @override
7208 Token get beginToken { 6970 Token get beginToken {
7209 if (keyword != null) { 6971 if (keyword != null) {
7210 return keyword; 6972 return keyword;
7211 } 6973 }
7212 return functionDefinition; 6974 return functionDefinition;
7213 } 6975 }
7214 6976
7215 @override 6977 @override
7216 Iterable get childEntities => new ChildEntities() 6978 Iterable get childEntities => new ChildEntities()
7217 ..add(keyword) 6979 ..add(keyword)
7218 ..add(functionDefinition) 6980 ..add(functionDefinition)
7219 ..add(_expression) 6981 ..add(_expression)
7220 ..add(semicolon); 6982 ..add(semicolon);
7221 6983
7222 @override 6984 @override
7223 Token get endToken { 6985 Token get endToken {
7224 if (semicolon != null) { 6986 if (semicolon != null) {
7225 return semicolon; 6987 return semicolon;
7226 } 6988 }
7227 return _expression.endToken; 6989 return _expression.endToken;
7228 } 6990 }
7229 6991
7230 /** 6992 /**
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
7278 */ 7040 */
7279 ExpressionStatement(Expression expression, this.semicolon) { 7041 ExpressionStatement(Expression expression, this.semicolon) {
7280 _expression = _becomeParentOf(expression); 7042 _expression = _becomeParentOf(expression);
7281 } 7043 }
7282 7044
7283 @override 7045 @override
7284 Token get beginToken => _expression.beginToken; 7046 Token get beginToken => _expression.beginToken;
7285 7047
7286 @override 7048 @override
7287 Iterable get childEntities => new ChildEntities() 7049 Iterable get childEntities => new ChildEntities()
7288 ..add(_expression) 7050 ..add(_expression)
7289 ..add(semicolon); 7051 ..add(semicolon);
7290 7052
7291 @override 7053 @override
7292 Token get endToken { 7054 Token get endToken {
7293 if (semicolon != null) { 7055 if (semicolon != null) {
7294 return semicolon; 7056 return semicolon;
7295 } 7057 }
7296 return _expression.endToken; 7058 return _expression.endToken;
7297 } 7059 }
7298 7060
7299 /** 7061 /**
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
7342 */ 7104 */
7343 ExtendsClause(this.extendsKeyword, TypeName superclass) { 7105 ExtendsClause(this.extendsKeyword, TypeName superclass) {
7344 _superclass = _becomeParentOf(superclass); 7106 _superclass = _becomeParentOf(superclass);
7345 } 7107 }
7346 7108
7347 @override 7109 @override
7348 Token get beginToken => extendsKeyword; 7110 Token get beginToken => extendsKeyword;
7349 7111
7350 @override 7112 @override
7351 Iterable get childEntities => new ChildEntities() 7113 Iterable get childEntities => new ChildEntities()
7352 ..add(extendsKeyword) 7114 ..add(extendsKeyword)
7353 ..add(_superclass); 7115 ..add(_superclass);
7354 7116
7355 @override 7117 @override
7356 Token get endToken => _superclass.endToken; 7118 Token get endToken => _superclass.endToken;
7357 7119
7358 /** 7120 /**
7359 * Return the token for the 'extends' keyword. 7121 * Return the token for the 'extends' keyword.
7360 */ 7122 */
7361 @deprecated // Use "this.extendsKeyword" 7123 @deprecated // Use "this.extendsKeyword"
7362 Token get keyword => extendsKeyword; 7124 Token get keyword => extendsKeyword;
7363 7125
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
7420 * not a static field. 7182 * not a static field.
7421 */ 7183 */
7422 FieldDeclaration(Comment comment, List<Annotation> metadata, 7184 FieldDeclaration(Comment comment, List<Annotation> metadata,
7423 this.staticKeyword, VariableDeclarationList fieldList, this.semicolon) 7185 this.staticKeyword, VariableDeclarationList fieldList, this.semicolon)
7424 : super(comment, metadata) { 7186 : super(comment, metadata) {
7425 _fieldList = _becomeParentOf(fieldList); 7187 _fieldList = _becomeParentOf(fieldList);
7426 } 7188 }
7427 7189
7428 @override 7190 @override
7429 Iterable get childEntities => super._childEntities 7191 Iterable get childEntities => super._childEntities
7430 ..add(staticKeyword) 7192 ..add(staticKeyword)
7431 ..add(_fieldList) 7193 ..add(_fieldList)
7432 ..add(semicolon); 7194 ..add(semicolon);
7433 7195
7434 @override 7196 @override
7435 Element get element => null; 7197 Element get element => null;
7436 7198
7437 @override 7199 @override
7438 Token get endToken => semicolon; 7200 Token get endToken => semicolon;
7439 7201
7440 /** 7202 /**
7441 * Return the fields being declared. 7203 * Return the fields being declared.
7442 */ 7204 */
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
7530 if (keyword != null) { 7292 if (keyword != null) {
7531 return keyword; 7293 return keyword;
7532 } else if (_type != null) { 7294 } else if (_type != null) {
7533 return _type.beginToken; 7295 return _type.beginToken;
7534 } 7296 }
7535 return thisKeyword; 7297 return thisKeyword;
7536 } 7298 }
7537 7299
7538 @override 7300 @override
7539 Iterable get childEntities => super._childEntities 7301 Iterable get childEntities => super._childEntities
7540 ..add(keyword) 7302 ..add(keyword)
7541 ..add(_type) 7303 ..add(_type)
7542 ..add(thisKeyword) 7304 ..add(thisKeyword)
7543 ..add(period) 7305 ..add(period)
7544 ..add(identifier) 7306 ..add(identifier)
7545 ..add(_parameters); 7307 ..add(_parameters);
7546 7308
7547 @override 7309 @override
7548 Token get endToken { 7310 Token get endToken {
7549 if (_parameters != null) { 7311 if (_parameters != null) {
7550 return _parameters.endToken; 7312 return _parameters.endToken;
7551 } 7313 }
7552 return identifier.endToken; 7314 return identifier.endToken;
7553 } 7315 }
7554 7316
7555 @override 7317 @override
7556 bool get isConst => 7318 bool get isConst => (keyword is KeywordToken) &&
7557 (keyword is KeywordToken) && (keyword as KeywordToken).keyword == Keyword. CONST; 7319 (keyword as KeywordToken).keyword == Keyword.CONST;
7558 7320
7559 @override 7321 @override
7560 bool get isFinal => 7322 bool get isFinal => (keyword is KeywordToken) &&
7561 (keyword is KeywordToken) && (keyword as KeywordToken).keyword == Keyword. FINAL; 7323 (keyword as KeywordToken).keyword == Keyword.FINAL;
7562 7324
7563 /** 7325 /**
7564 * Return the parameters of the function-typed parameter, or `null` if this is 7326 * Return the parameters of the function-typed parameter, or `null` if this is
7565 * not a function-typed field formal parameter. 7327 * not a function-typed field formal parameter.
7566 */ 7328 */
7567 FormalParameterList get parameters => _parameters; 7329 FormalParameterList get parameters => _parameters;
7568 7330
7569 /** 7331 /**
7570 * Set the parameters of the function-typed parameter to the given 7332 * Set the parameters of the function-typed parameter to the given
7571 * [parameters]. 7333 * [parameters].
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
7704 7466
7705 /** 7467 /**
7706 * Set the body of the loop to the given [statement]. 7468 * Set the body of the loop to the given [statement].
7707 */ 7469 */
7708 void set body(Statement statement) { 7470 void set body(Statement statement) {
7709 _body = _becomeParentOf(statement); 7471 _body = _becomeParentOf(statement);
7710 } 7472 }
7711 7473
7712 @override 7474 @override
7713 Iterable get childEntities => new ChildEntities() 7475 Iterable get childEntities => new ChildEntities()
7714 ..add(awaitKeyword) 7476 ..add(awaitKeyword)
7715 ..add(forKeyword) 7477 ..add(forKeyword)
7716 ..add(leftParenthesis) 7478 ..add(leftParenthesis)
7717 ..add(_loopVariable) 7479 ..add(_loopVariable)
7718 ..add(_identifier) 7480 ..add(_identifier)
7719 ..add(inKeyword) 7481 ..add(inKeyword)
7720 ..add(_iterable) 7482 ..add(_iterable)
7721 ..add(rightParenthesis) 7483 ..add(rightParenthesis)
7722 ..add(_body); 7484 ..add(_body);
7723 7485
7724 @override 7486 @override
7725 Token get endToken => _body.endToken; 7487 Token get endToken => _body.endToken;
7726 7488
7727 /** 7489 /**
7728 * Return the loop variable, or `null` if the loop variable is declared in the 7490 * Return the loop variable, or `null` if the loop variable is declared in the
7729 * 'for'. 7491 * 'for'.
7730 */ 7492 */
7731 SimpleIdentifier get identifier => _identifier; 7493 SimpleIdentifier get identifier => _identifier;
7732 7494
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
7899 ChildEntities result = new ChildEntities()..add(leftParenthesis); 7661 ChildEntities result = new ChildEntities()..add(leftParenthesis);
7900 bool leftDelimiterNeeded = leftDelimiter != null; 7662 bool leftDelimiterNeeded = leftDelimiter != null;
7901 for (FormalParameter parameter in _parameters) { 7663 for (FormalParameter parameter in _parameters) {
7902 if (leftDelimiterNeeded && leftDelimiter.offset < parameter.offset) { 7664 if (leftDelimiterNeeded && leftDelimiter.offset < parameter.offset) {
7903 result.add(leftDelimiter); 7665 result.add(leftDelimiter);
7904 leftDelimiterNeeded = false; 7666 leftDelimiterNeeded = false;
7905 } 7667 }
7906 result.add(parameter); 7668 result.add(parameter);
7907 } 7669 }
7908 return result 7670 return result
7909 ..add(rightDelimiter) 7671 ..add(rightDelimiter)
7910 ..add(rightParenthesis); 7672 ..add(rightParenthesis);
7911 } 7673 }
7912 7674
7913 @override 7675 @override
7914 Token get endToken => rightParenthesis; 7676 Token get endToken => rightParenthesis;
7915 7677
7916 /** 7678 /**
7917 * Return a list containing the elements representing the parameters in this 7679 * Return a list containing the elements representing the parameters in this
7918 * list. The list will contain `null`s if the parameters in this list have not 7680 * list. The list will contain `null`s if the parameters in this list have not
7919 * been resolved. 7681 * been resolved.
7920 */ 7682 */
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
8037 7799
8038 /** 7800 /**
8039 * Set the body of the loop to the given [statement]. 7801 * Set the body of the loop to the given [statement].
8040 */ 7802 */
8041 void set body(Statement statement) { 7803 void set body(Statement statement) {
8042 _body = _becomeParentOf(statement); 7804 _body = _becomeParentOf(statement);
8043 } 7805 }
8044 7806
8045 @override 7807 @override
8046 Iterable get childEntities => new ChildEntities() 7808 Iterable get childEntities => new ChildEntities()
8047 ..add(forKeyword) 7809 ..add(forKeyword)
8048 ..add(leftParenthesis) 7810 ..add(leftParenthesis)
8049 ..add(_variableList) 7811 ..add(_variableList)
8050 ..add(_initialization) 7812 ..add(_initialization)
8051 ..add(leftSeparator) 7813 ..add(leftSeparator)
8052 ..add(_condition) 7814 ..add(_condition)
8053 ..add(rightSeparator) 7815 ..add(rightSeparator)
8054 ..addAll(_updaters) 7816 ..addAll(_updaters)
8055 ..add(rightParenthesis) 7817 ..add(rightParenthesis)
8056 ..add(_body); 7818 ..add(_body);
8057 7819
8058 /** 7820 /**
8059 * Return the condition used to determine when to terminate the loop, or 7821 * Return the condition used to determine when to terminate the loop, or
8060 * `null` if there is no condition. 7822 * `null` if there is no condition.
8061 */ 7823 */
8062 Expression get condition => _condition; 7824 Expression get condition => _condition;
8063 7825
8064 /** 7826 /**
8065 * Set the condition used to determine when to terminate the loop to the given 7827 * Set the condition used to determine when to terminate the loop to the given
8066 * [expression]. 7828 * [expression].
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
8203 this.externalKeyword, TypeName returnType, this.propertyKeyword, 7965 this.externalKeyword, TypeName returnType, this.propertyKeyword,
8204 SimpleIdentifier name, FunctionExpression functionExpression) 7966 SimpleIdentifier name, FunctionExpression functionExpression)
8205 : super(comment, metadata) { 7967 : super(comment, metadata) {
8206 _returnType = _becomeParentOf(returnType); 7968 _returnType = _becomeParentOf(returnType);
8207 _name = _becomeParentOf(name); 7969 _name = _becomeParentOf(name);
8208 _functionExpression = _becomeParentOf(functionExpression); 7970 _functionExpression = _becomeParentOf(functionExpression);
8209 } 7971 }
8210 7972
8211 @override 7973 @override
8212 Iterable get childEntities => super._childEntities 7974 Iterable get childEntities => super._childEntities
8213 ..add(externalKeyword) 7975 ..add(externalKeyword)
8214 ..add(_returnType) 7976 ..add(_returnType)
8215 ..add(propertyKeyword) 7977 ..add(propertyKeyword)
8216 ..add(_name) 7978 ..add(_name)
8217 ..add(_functionExpression); 7979 ..add(_functionExpression);
8218 7980
8219 @override 7981 @override
8220 ExecutableElement get element => 7982 ExecutableElement get element =>
8221 _name != null ? (_name.staticElement as ExecutableElement) : null; 7983 _name != null ? (_name.staticElement as ExecutableElement) : null;
8222 7984
8223 @override 7985 @override
8224 Token get endToken => _functionExpression.endToken; 7986 Token get endToken => _functionExpression.endToken;
8225 7987
8226 @override 7988 @override
8227 Token get firstTokenAfterCommentAndMetadata { 7989 Token get firstTokenAfterCommentAndMetadata {
(...skipping 18 matching lines...) Expand all
8246 * Set the function expression being wrapped to the given 8008 * Set the function expression being wrapped to the given
8247 * [functionExpression]. 8009 * [functionExpression].
8248 */ 8010 */
8249 void set functionExpression(FunctionExpression functionExpression) { 8011 void set functionExpression(FunctionExpression functionExpression) {
8250 _functionExpression = _becomeParentOf(functionExpression); 8012 _functionExpression = _becomeParentOf(functionExpression);
8251 } 8013 }
8252 8014
8253 /** 8015 /**
8254 * Return `true` if this function declares a getter. 8016 * Return `true` if this function declares a getter.
8255 */ 8017 */
8256 bool get isGetter => 8018 bool get isGetter => propertyKeyword != null &&
8257 propertyKeyword != null && 8019 (propertyKeyword as KeywordToken).keyword == Keyword.GET;
8258 (propertyKeyword as KeywordToken).keyword == Keyword.GET;
8259 8020
8260 /** 8021 /**
8261 * Return `true` if this function declares a setter. 8022 * Return `true` if this function declares a setter.
8262 */ 8023 */
8263 bool get isSetter => 8024 bool get isSetter => propertyKeyword != null &&
8264 propertyKeyword != null && 8025 (propertyKeyword as KeywordToken).keyword == Keyword.SET;
8265 (propertyKeyword as KeywordToken).keyword == Keyword.SET;
8266 8026
8267 /** 8027 /**
8268 * Return the name of the function, or `null` if the function is not named. 8028 * Return the name of the function, or `null` if the function is not named.
8269 */ 8029 */
8270 SimpleIdentifier get name => _name; 8030 SimpleIdentifier get name => _name;
8271 8031
8272 /** 8032 /**
8273 * Set the name of the function to the given [identifier]. 8033 * Set the name of the function to the given [identifier].
8274 */ 8034 */
8275 void set name(SimpleIdentifier identifier) { 8035 void set name(SimpleIdentifier identifier) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
8398 8158
8399 /** 8159 /**
8400 * Set the body of the function to the given [functionBody]. 8160 * Set the body of the function to the given [functionBody].
8401 */ 8161 */
8402 void set body(FunctionBody functionBody) { 8162 void set body(FunctionBody functionBody) {
8403 _body = _becomeParentOf(functionBody); 8163 _body = _becomeParentOf(functionBody);
8404 } 8164 }
8405 8165
8406 @override 8166 @override
8407 Iterable get childEntities => new ChildEntities() 8167 Iterable get childEntities => new ChildEntities()
8408 ..add(_parameters) 8168 ..add(_parameters)
8409 ..add(_body); 8169 ..add(_body);
8410 8170
8411 @override 8171 @override
8412 Token get endToken { 8172 Token get endToken {
8413 if (_body != null) { 8173 if (_body != null) {
8414 return _body.endToken; 8174 return _body.endToken;
8415 } else if (_parameters != null) { 8175 } else if (_parameters != null) {
8416 return _parameters.endToken; 8176 return _parameters.endToken;
8417 } 8177 }
8418 // This should never be reached because external functions must be named, 8178 // This should never be reached because external functions must be named,
8419 // hence either the body or the name should be non-null. 8179 // hence either the body or the name should be non-null.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
8513 ExecutableElement get bestElement { 8273 ExecutableElement get bestElement {
8514 ExecutableElement element = propagatedElement; 8274 ExecutableElement element = propagatedElement;
8515 if (element == null) { 8275 if (element == null) {
8516 element = staticElement; 8276 element = staticElement;
8517 } 8277 }
8518 return element; 8278 return element;
8519 } 8279 }
8520 8280
8521 @override 8281 @override
8522 Iterable get childEntities => new ChildEntities() 8282 Iterable get childEntities => new ChildEntities()
8523 ..add(_function) 8283 ..add(_function)
8524 ..add(_argumentList); 8284 ..add(_argumentList);
8525 8285
8526 @override 8286 @override
8527 Token get endToken => _argumentList.endToken; 8287 Token get endToken => _argumentList.endToken;
8528 8288
8529 /** 8289 /**
8530 * Return the expression producing the function being invoked. 8290 * Return the expression producing the function being invoked.
8531 */ 8291 */
8532 Expression get function => _function; 8292 Expression get function => _function;
8533 8293
8534 /** 8294 /**
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
8585 FormalParameterList _parameters; 8345 FormalParameterList _parameters;
8586 8346
8587 /** 8347 /**
8588 * Initialize a newly created function type alias. Either or both of the 8348 * Initialize a newly created function type alias. Either or both of the
8589 * [comment] and [metadata] can be `null` if the function does not have the 8349 * [comment] and [metadata] can be `null` if the function does not have the
8590 * corresponding attribute. The [returnType] can be `null` if no return type 8350 * corresponding attribute. The [returnType] can be `null` if no return type
8591 * was specified. The [typeParameters] can be `null` if the function has no 8351 * was specified. The [typeParameters] can be `null` if the function has no
8592 * type parameters. 8352 * type parameters.
8593 */ 8353 */
8594 FunctionTypeAlias(Comment comment, List<Annotation> metadata, Token keyword, 8354 FunctionTypeAlias(Comment comment, List<Annotation> metadata, Token keyword,
8595 TypeName returnType, SimpleIdentifier name, TypeParameterList typeParamete rs, 8355 TypeName returnType, SimpleIdentifier name,
8596 FormalParameterList parameters, Token semicolon) 8356 TypeParameterList typeParameters, FormalParameterList parameters,
8357 Token semicolon)
8597 : super(comment, metadata, keyword, semicolon) { 8358 : super(comment, metadata, keyword, semicolon) {
8598 _returnType = _becomeParentOf(returnType); 8359 _returnType = _becomeParentOf(returnType);
8599 _name = _becomeParentOf(name); 8360 _name = _becomeParentOf(name);
8600 _typeParameters = _becomeParentOf(typeParameters); 8361 _typeParameters = _becomeParentOf(typeParameters);
8601 _parameters = _becomeParentOf(parameters); 8362 _parameters = _becomeParentOf(parameters);
8602 } 8363 }
8603 8364
8604 @override 8365 @override
8605 Iterable get childEntities => super._childEntities 8366 Iterable get childEntities => super._childEntities
8606 ..add(typedefKeyword) 8367 ..add(typedefKeyword)
8607 ..add(_returnType) 8368 ..add(_returnType)
8608 ..add(_name) 8369 ..add(_name)
8609 ..add(_typeParameters) 8370 ..add(_typeParameters)
8610 ..add(_parameters) 8371 ..add(_parameters)
8611 ..add(semicolon); 8372 ..add(semicolon);
8612 8373
8613 @override 8374 @override
8614 FunctionTypeAliasElement get element => 8375 FunctionTypeAliasElement get element =>
8615 _name != null ? (_name.staticElement as FunctionTypeAliasElement) : null; 8376 _name != null ? (_name.staticElement as FunctionTypeAliasElement) : null;
8616 8377
8617 /** 8378 /**
8618 * Return the name of the function type being declared. 8379 * Return the name of the function type being declared.
8619 */ 8380 */
8620 SimpleIdentifier get name => _name; 8381 SimpleIdentifier get name => _name;
8621 8382
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
8715 @override 8476 @override
8716 Token get beginToken { 8477 Token get beginToken {
8717 if (_returnType != null) { 8478 if (_returnType != null) {
8718 return _returnType.beginToken; 8479 return _returnType.beginToken;
8719 } 8480 }
8720 return identifier.beginToken; 8481 return identifier.beginToken;
8721 } 8482 }
8722 8483
8723 @override 8484 @override
8724 Iterable get childEntities => super._childEntities 8485 Iterable get childEntities => super._childEntities
8725 ..add(_returnType) 8486 ..add(_returnType)
8726 ..add(identifier) 8487 ..add(identifier)
8727 ..add(parameters); 8488 ..add(parameters);
8728 8489
8729 @override 8490 @override
8730 Token get endToken => _parameters.endToken; 8491 Token get endToken => _parameters.endToken;
8731 8492
8732 @override 8493 @override
8733 bool get isConst => false; 8494 bool get isConst => false;
8734 8495
8735 @override 8496 @override
8736 bool get isFinal => false; 8497 bool get isFinal => false;
8737 8498
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
9072 @override 8833 @override
9073 R visitPrefixedIdentifier(PrefixedIdentifier node) => visitIdentifier(node); 8834 R visitPrefixedIdentifier(PrefixedIdentifier node) => visitIdentifier(node);
9074 8835
9075 @override 8836 @override
9076 R visitPrefixExpression(PrefixExpression node) => visitExpression(node); 8837 R visitPrefixExpression(PrefixExpression node) => visitExpression(node);
9077 8838
9078 @override 8839 @override
9079 R visitPropertyAccess(PropertyAccess node) => visitExpression(node); 8840 R visitPropertyAccess(PropertyAccess node) => visitExpression(node);
9080 8841
9081 @override 8842 @override
9082 R 8843 R visitRedirectingConstructorInvocation(
9083 visitRedirectingConstructorInvocation(RedirectingConstructorInvocation nod e) => 8844 RedirectingConstructorInvocation node) =>
9084 visitConstructorInitializer(node); 8845 visitConstructorInitializer(node);
9085 8846
9086 @override 8847 @override
9087 R visitRethrowExpression(RethrowExpression node) => visitExpression(node); 8848 R visitRethrowExpression(RethrowExpression node) => visitExpression(node);
9088 8849
9089 @override 8850 @override
9090 R visitReturnStatement(ReturnStatement node) => visitStatement(node); 8851 R visitReturnStatement(ReturnStatement node) => visitStatement(node);
9091 8852
9092 @override 8853 @override
9093 R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag); 8854 R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
9184 @override 8945 @override
9185 R visitWhileStatement(WhileStatement node) => visitStatement(node); 8946 R visitWhileStatement(WhileStatement node) => visitStatement(node);
9186 8947
9187 @override 8948 @override
9188 R visitWithClause(WithClause node) => visitNode(node); 8949 R visitWithClause(WithClause node) => visitNode(node);
9189 8950
9190 @override 8951 @override
9191 R visitYieldStatement(YieldStatement node) => visitStatement(node); 8952 R visitYieldStatement(YieldStatement node) => visitStatement(node);
9192 } 8953 }
9193 8954
9194 class GeneralizingAstVisitor_BreadthFirstVisitor extends 8955 class GeneralizingAstVisitor_BreadthFirstVisitor
9195 GeneralizingAstVisitor<Object> { 8956 extends GeneralizingAstVisitor<Object> {
9196 final BreadthFirstVisitor BreadthFirstVisitor_this; 8957 final BreadthFirstVisitor BreadthFirstVisitor_this;
9197 8958
9198 GeneralizingAstVisitor_BreadthFirstVisitor(this.BreadthFirstVisitor_this) 8959 GeneralizingAstVisitor_BreadthFirstVisitor(this.BreadthFirstVisitor_this)
9199 : super(); 8960 : super();
9200 8961
9201 @override 8962 @override
9202 Object visitNode(AstNode node) { 8963 Object visitNode(AstNode node) {
9203 BreadthFirstVisitor_this._queue.add(node); 8964 BreadthFirstVisitor_this._queue.add(node);
9204 return null; 8965 return null;
9205 } 8966 }
(...skipping 15 matching lines...) Expand all
9221 /** 8982 /**
9222 * Initialize a newly created import show combinator. 8983 * Initialize a newly created import show combinator.
9223 */ 8984 */
9224 HideCombinator(Token keyword, List<SimpleIdentifier> hiddenNames) 8985 HideCombinator(Token keyword, List<SimpleIdentifier> hiddenNames)
9225 : super(keyword) { 8986 : super(keyword) {
9226 _hiddenNames = new NodeList<SimpleIdentifier>(this, hiddenNames); 8987 _hiddenNames = new NodeList<SimpleIdentifier>(this, hiddenNames);
9227 } 8988 }
9228 8989
9229 @override 8990 @override
9230 Iterable get childEntities => new ChildEntities() 8991 Iterable get childEntities => new ChildEntities()
9231 ..add(keyword) 8992 ..add(keyword)
9232 ..addAll(_hiddenNames); 8993 ..addAll(_hiddenNames);
9233 8994
9234 @override 8995 @override
9235 Token get endToken => _hiddenNames.endToken; 8996 Token get endToken => _hiddenNames.endToken;
9236 8997
9237 /** 8998 /**
9238 * Return the list of names from the library that are hidden by this 8999 * Return the list of names from the library that are hidden by this
9239 * combinator. 9000 * combinator.
9240 */ 9001 */
9241 NodeList<SimpleIdentifier> get hiddenNames => _hiddenNames; 9002 NodeList<SimpleIdentifier> get hiddenNames => _hiddenNames;
9242 9003
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
9352 _condition = _becomeParentOf(condition); 9113 _condition = _becomeParentOf(condition);
9353 _thenStatement = _becomeParentOf(thenStatement); 9114 _thenStatement = _becomeParentOf(thenStatement);
9354 _elseStatement = _becomeParentOf(elseStatement); 9115 _elseStatement = _becomeParentOf(elseStatement);
9355 } 9116 }
9356 9117
9357 @override 9118 @override
9358 Token get beginToken => ifKeyword; 9119 Token get beginToken => ifKeyword;
9359 9120
9360 @override 9121 @override
9361 Iterable get childEntities => new ChildEntities() 9122 Iterable get childEntities => new ChildEntities()
9362 ..add(ifKeyword) 9123 ..add(ifKeyword)
9363 ..add(leftParenthesis) 9124 ..add(leftParenthesis)
9364 ..add(_condition) 9125 ..add(_condition)
9365 ..add(rightParenthesis) 9126 ..add(rightParenthesis)
9366 ..add(_thenStatement) 9127 ..add(_thenStatement)
9367 ..add(elseKeyword) 9128 ..add(elseKeyword)
9368 ..add(_elseStatement); 9129 ..add(_elseStatement);
9369 9130
9370 /** 9131 /**
9371 * Return the condition used to determine which of the statements is executed 9132 * Return the condition used to determine which of the statements is executed
9372 * next. 9133 * next.
9373 */ 9134 */
9374 Expression get condition => _condition; 9135 Expression get condition => _condition;
9375 9136
9376 /** 9137 /**
9377 * Set the condition used to determine which of the statements is executed 9138 * Set the condition used to determine which of the statements is executed
9378 * next to the given [expression]. 9139 * next to the given [expression].
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
9452 } 9213 }
9453 9214
9454 @override 9215 @override
9455 Token get beginToken => implementsKeyword; 9216 Token get beginToken => implementsKeyword;
9456 9217
9457 /** 9218 /**
9458 * TODO(paulberry): add commas. 9219 * TODO(paulberry): add commas.
9459 */ 9220 */
9460 @override 9221 @override
9461 Iterable get childEntities => new ChildEntities() 9222 Iterable get childEntities => new ChildEntities()
9462 ..add(implementsKeyword) 9223 ..add(implementsKeyword)
9463 ..addAll(interfaces); 9224 ..addAll(interfaces);
9464 9225
9465 @override 9226 @override
9466 Token get endToken => _interfaces.endToken; 9227 Token get endToken => _interfaces.endToken;
9467 9228
9468 /** 9229 /**
9469 * Return the list of the interfaces that are being implemented. 9230 * Return the list of the interfaces that are being implemented.
9470 */ 9231 */
9471 NodeList<TypeName> get interfaces => _interfaces; 9232 NodeList<TypeName> get interfaces => _interfaces;
9472 9233
9473 /** 9234 /**
(...skipping 20 matching lines...) Expand all
9494 } 9255 }
9495 9256
9496 /** 9257 /**
9497 * An import directive. 9258 * An import directive.
9498 * 9259 *
9499 * > importDirective ::= 9260 * > importDirective ::=
9500 * > [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* ';' 9261 * > [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* ';'
9501 * > | [Annotation] 'import' [StringLiteral] 'deferred' 'as' identifier [Combi nator]* ';' 9262 * > | [Annotation] 'import' [StringLiteral] 'deferred' 'as' identifier [Combi nator]* ';'
9502 */ 9263 */
9503 class ImportDirective extends NamespaceDirective { 9264 class ImportDirective extends NamespaceDirective {
9504 static Comparator<ImportDirective> COMPARATOR = 9265 static Comparator<ImportDirective> COMPARATOR = (ImportDirective import1,
9505 (ImportDirective import1, ImportDirective import2) { 9266 ImportDirective import2) {
9506 // 9267 //
9507 // uri 9268 // uri
9508 // 9269 //
9509 StringLiteral uri1 = import1.uri; 9270 StringLiteral uri1 = import1.uri;
9510 StringLiteral uri2 = import2.uri; 9271 StringLiteral uri2 = import2.uri;
9511 String uriStr1 = uri1.stringValue; 9272 String uriStr1 = uri1.stringValue;
9512 String uriStr2 = uri2.stringValue; 9273 String uriStr2 = uri2.stringValue;
9513 if (uriStr1 != null || uriStr2 != null) { 9274 if (uriStr1 != null || uriStr2 != null) {
9514 if (uriStr1 == null) { 9275 if (uriStr1 == null) {
9515 return -1; 9276 return -1;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
9632 * The token representing the 'as' token, or `null` if the imported names are 9393 * The token representing the 'as' token, or `null` if the imported names are
9633 * not prefixed. 9394 * not prefixed.
9634 */ 9395 */
9635 @deprecated // Use "this.asKeyword" 9396 @deprecated // Use "this.asKeyword"
9636 Token get asToken => asKeyword; 9397 Token get asToken => asKeyword;
9637 9398
9638 /** 9399 /**
9639 * The token representing the 'as' token to the given token. 9400 * The token representing the 'as' token to the given token.
9640 */ 9401 */
9641 @deprecated // Use "this.asKeyword" 9402 @deprecated // Use "this.asKeyword"
9642 set asToken (Token token) { 9403 set asToken(Token token) {
9643 asKeyword = token; 9404 asKeyword = token;
9644 } 9405 }
9645 9406
9646 @override 9407 @override
9647 Iterable get childEntities => super._childEntities 9408 Iterable get childEntities => super._childEntities
9648 ..add(_uri) 9409 ..add(_uri)
9649 ..add(deferredKeyword) 9410 ..add(deferredKeyword)
9650 ..add(asKeyword) 9411 ..add(asKeyword)
9651 ..add(_prefix) 9412 ..add(_prefix)
9652 ..addAll(combinators) 9413 ..addAll(combinators)
9653 ..add(semicolon); 9414 ..add(semicolon);
9654 9415
9655 /** 9416 /**
9656 * Return the token representing the 'deferred' token, or `null` if the 9417 * Return the token representing the 'deferred' token, or `null` if the
9657 * imported is not deferred. 9418 * imported is not deferred.
9658 */ 9419 */
9659 @deprecated // Use "this.deferredKeyword" 9420 @deprecated // Use "this.deferredKeyword"
9660 Token get deferredToken => deferredKeyword; 9421 Token get deferredToken => deferredKeyword;
9661 9422
9662 /** 9423 /**
9663 * Set the token representing the 'deferred' token to the given token. 9424 * Set the token representing the 'deferred' token to the given token.
9664 */ 9425 */
9665 @deprecated // Use "this.deferredKeyword" 9426 @deprecated // Use "this.deferredKeyword"
9666 set deferredToken (Token token) { 9427 set deferredToken(Token token) {
9667 deferredKeyword = token; 9428 deferredKeyword = token;
9668 } 9429 }
9669 9430
9670 @override 9431 @override
9671 ImportElement get element => super.element as ImportElement; 9432 ImportElement get element => super.element as ImportElement;
9672 9433
9673 /** 9434 /**
9674 * Return the prefix to be used with the imported names, or `null` if the 9435 * Return the prefix to be used with the imported names, or `null` if the
9675 * imported names are not prefixed. 9436 * imported names are not prefixed.
9676 */ 9437 */
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
9731 * mapping of old tokens to new tokens. 9492 * mapping of old tokens to new tokens.
9732 */ 9493 */
9733 IncrementalAstCloner(this._oldNode, this._newNode, this._tokenMap); 9494 IncrementalAstCloner(this._oldNode, this._newNode, this._tokenMap);
9734 9495
9735 @override 9496 @override
9736 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => 9497 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) =>
9737 new AdjacentStrings(_cloneNodeList(node.strings)); 9498 new AdjacentStrings(_cloneNodeList(node.strings));
9738 9499
9739 @override 9500 @override
9740 Annotation visitAnnotation(Annotation node) { 9501 Annotation visitAnnotation(Annotation node) {
9741 Annotation copy = new Annotation( 9502 Annotation copy = new Annotation(_mapToken(node.atSign),
9742 _mapToken(node.atSign), 9503 _cloneNode(node.name), _mapToken(node.period),
9743 _cloneNode(node.name), 9504 _cloneNode(node.constructorName), _cloneNode(node.arguments));
9744 _mapToken(node.period),
9745 _cloneNode(node.constructorName),
9746 _cloneNode(node.arguments));
9747 copy.element = node.element; 9505 copy.element = node.element;
9748 return copy; 9506 return copy;
9749 } 9507 }
9750 9508
9751 @override 9509 @override
9752 ArgumentList visitArgumentList(ArgumentList node) => 9510 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(
9753 new ArgumentList( 9511 _mapToken(node.leftParenthesis), _cloneNodeList(node.arguments),
9754 _mapToken(node.leftParenthesis), 9512 _mapToken(node.rightParenthesis));
9755 _cloneNodeList(node.arguments),
9756 _mapToken(node.rightParenthesis));
9757 9513
9758 @override 9514 @override
9759 AsExpression visitAsExpression(AsExpression node) { 9515 AsExpression visitAsExpression(AsExpression node) {
9760 AsExpression copy = new AsExpression( 9516 AsExpression copy = new AsExpression(_cloneNode(node.expression),
9761 _cloneNode(node.expression), 9517 _mapToken(node.asOperator), _cloneNode(node.type));
9762 _mapToken(node.asOperator),
9763 _cloneNode(node.type));
9764 copy.propagatedType = node.propagatedType; 9518 copy.propagatedType = node.propagatedType;
9765 copy.staticType = node.staticType; 9519 copy.staticType = node.staticType;
9766 return copy; 9520 return copy;
9767 } 9521 }
9768 9522
9769 @override 9523 @override
9770 AstNode visitAssertStatement(AssertStatement node) => 9524 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(
9771 new AssertStatement( 9525 _mapToken(node.assertKeyword), _mapToken(node.leftParenthesis),
9772 _mapToken(node.assertKeyword), 9526 _cloneNode(node.condition), _mapToken(node.rightParenthesis),
9773 _mapToken(node.leftParenthesis), 9527 _mapToken(node.semicolon));
9774 _cloneNode(node.condition),
9775 _mapToken(node.rightParenthesis),
9776 _mapToken(node.semicolon));
9777 9528
9778 @override 9529 @override
9779 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) { 9530 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) {
9780 AssignmentExpression copy = new AssignmentExpression( 9531 AssignmentExpression copy = new AssignmentExpression(
9781 _cloneNode(node.leftHandSide), 9532 _cloneNode(node.leftHandSide), _mapToken(node.operator),
9782 _mapToken(node.operator),
9783 _cloneNode(node.rightHandSide)); 9533 _cloneNode(node.rightHandSide));
9784 copy.propagatedElement = node.propagatedElement; 9534 copy.propagatedElement = node.propagatedElement;
9785 copy.propagatedType = node.propagatedType; 9535 copy.propagatedType = node.propagatedType;
9786 copy.staticElement = node.staticElement; 9536 copy.staticElement = node.staticElement;
9787 copy.staticType = node.staticType; 9537 copy.staticType = node.staticType;
9788 return copy; 9538 return copy;
9789 } 9539 }
9790 9540
9791 @override 9541 @override
9792 AwaitExpression visitAwaitExpression(AwaitExpression node) => 9542 AwaitExpression visitAwaitExpression(AwaitExpression node) =>
9793 new AwaitExpression(_mapToken(node.awaitKeyword), _cloneNode(node.expressi on)); 9543 new AwaitExpression(
9544 _mapToken(node.awaitKeyword), _cloneNode(node.expression));
9794 9545
9795 @override 9546 @override
9796 BinaryExpression visitBinaryExpression(BinaryExpression node) { 9547 BinaryExpression visitBinaryExpression(BinaryExpression node) {
9797 BinaryExpression copy = new BinaryExpression( 9548 BinaryExpression copy = new BinaryExpression(_cloneNode(node.leftOperand),
9798 _cloneNode(node.leftOperand), 9549 _mapToken(node.operator), _cloneNode(node.rightOperand));
9799 _mapToken(node.operator),
9800 _cloneNode(node.rightOperand));
9801 copy.propagatedElement = node.propagatedElement; 9550 copy.propagatedElement = node.propagatedElement;
9802 copy.propagatedType = node.propagatedType; 9551 copy.propagatedType = node.propagatedType;
9803 copy.staticElement = node.staticElement; 9552 copy.staticElement = node.staticElement;
9804 copy.staticType = node.staticType; 9553 copy.staticType = node.staticType;
9805 return copy; 9554 return copy;
9806 } 9555 }
9807 9556
9808 @override 9557 @override
9809 Block visitBlock(Block node) => 9558 Block visitBlock(Block node) => new Block(_mapToken(node.leftBracket),
9810 new Block( 9559 _cloneNodeList(node.statements), _mapToken(node.rightBracket));
9811 _mapToken(node.leftBracket),
9812 _cloneNodeList(node.statements),
9813 _mapToken(node.rightBracket));
9814 9560
9815 @override 9561 @override
9816 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => 9562 BlockFunctionBody visitBlockFunctionBody(
9817 new BlockFunctionBody( 9563 BlockFunctionBody node) => new BlockFunctionBody(
9818 _mapToken(node.keyword), 9564 _mapToken(node.keyword), _mapToken(node.star), _cloneNode(node.block));
9819 _mapToken(node.star),
9820 _cloneNode(node.block));
9821 9565
9822 @override 9566 @override
9823 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) { 9567 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) {
9824 BooleanLiteral copy = 9568 BooleanLiteral copy =
9825 new BooleanLiteral(_mapToken(node.literal), node.value); 9569 new BooleanLiteral(_mapToken(node.literal), node.value);
9826 copy.propagatedType = node.propagatedType; 9570 copy.propagatedType = node.propagatedType;
9827 copy.staticType = node.staticType; 9571 copy.staticType = node.staticType;
9828 return copy; 9572 return copy;
9829 } 9573 }
9830 9574
9831 @override 9575 @override
9832 BreakStatement visitBreakStatement(BreakStatement node) => 9576 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
9833 new BreakStatement( 9577 _mapToken(node.breakKeyword), _cloneNode(node.label),
9834 _mapToken(node.breakKeyword), 9578 _mapToken(node.semicolon));
9835 _cloneNode(node.label),
9836 _mapToken(node.semicolon));
9837 9579
9838 @override 9580 @override
9839 CascadeExpression visitCascadeExpression(CascadeExpression node) { 9581 CascadeExpression visitCascadeExpression(CascadeExpression node) {
9840 CascadeExpression copy = new CascadeExpression( 9582 CascadeExpression copy = new CascadeExpression(
9841 _cloneNode(node.target), 9583 _cloneNode(node.target), _cloneNodeList(node.cascadeSections));
9842 _cloneNodeList(node.cascadeSections));
9843 copy.propagatedType = node.propagatedType; 9584 copy.propagatedType = node.propagatedType;
9844 copy.staticType = node.staticType; 9585 copy.staticType = node.staticType;
9845 return copy; 9586 return copy;
9846 } 9587 }
9847 9588
9848 @override 9589 @override
9849 CatchClause visitCatchClause(CatchClause node) => 9590 CatchClause visitCatchClause(CatchClause node) => new CatchClause(
9850 new CatchClause( 9591 _mapToken(node.onKeyword), _cloneNode(node.exceptionType),
9851 _mapToken(node.onKeyword), 9592 _mapToken(node.catchKeyword), _mapToken(node.leftParenthesis),
9852 _cloneNode(node.exceptionType), 9593 _cloneNode(node.exceptionParameter), _mapToken(node.comma),
9853 _mapToken(node.catchKeyword), 9594 _cloneNode(node.stackTraceParameter), _mapToken(node.rightParenthesis),
9854 _mapToken(node.leftParenthesis), 9595 _cloneNode(node.body));
9855 _cloneNode(node.exceptionParameter),
9856 _mapToken(node.comma),
9857 _cloneNode(node.stackTraceParameter),
9858 _mapToken(node.rightParenthesis),
9859 _cloneNode(node.body));
9860 9596
9861 @override 9597 @override
9862 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { 9598 ClassDeclaration visitClassDeclaration(ClassDeclaration node) {
9863 ClassDeclaration copy = new ClassDeclaration( 9599 ClassDeclaration copy = new ClassDeclaration(
9864 _cloneNode(node.documentationComment), 9600 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata),
9865 _cloneNodeList(node.metadata), 9601 _mapToken(node.abstractKeyword), _mapToken(node.classKeyword),
9866 _mapToken(node.abstractKeyword), 9602 _cloneNode(node.name), _cloneNode(node.typeParameters),
9867 _mapToken(node.classKeyword), 9603 _cloneNode(node.extendsClause), _cloneNode(node.withClause),
9868 _cloneNode(node.name), 9604 _cloneNode(node.implementsClause), _mapToken(node.leftBracket),
9869 _cloneNode(node.typeParameters), 9605 _cloneNodeList(node.members), _mapToken(node.rightBracket));
9870 _cloneNode(node.extendsClause),
9871 _cloneNode(node.withClause),
9872 _cloneNode(node.implementsClause),
9873 _mapToken(node.leftBracket),
9874 _cloneNodeList(node.members),
9875 _mapToken(node.rightBracket));
9876 copy.nativeClause = _cloneNode(node.nativeClause); 9606 copy.nativeClause = _cloneNode(node.nativeClause);
9877 return copy; 9607 return copy;
9878 } 9608 }
9879 9609
9880 @override 9610 @override
9881 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => 9611 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
9882 new ClassTypeAlias( 9612 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata),
9883 _cloneNode(node.documentationComment), 9613 _mapToken(node.typedefKeyword), _cloneNode(node.name),
9884 _cloneNodeList(node.metadata), 9614 _cloneNode(node.typeParameters), _mapToken(node.equals),
9885 _mapToken(node.typedefKeyword), 9615 _mapToken(node.abstractKeyword), _cloneNode(node.superclass),
9886 _cloneNode(node.name), 9616 _cloneNode(node.withClause), _cloneNode(node.implementsClause),
9887 _cloneNode(node.typeParameters), 9617 _mapToken(node.semicolon));
9888 _mapToken(node.equals),
9889 _mapToken(node.abstractKeyword),
9890 _cloneNode(node.superclass),
9891 _cloneNode(node.withClause),
9892 _cloneNode(node.implementsClause),
9893 _mapToken(node.semicolon));
9894 9618
9895 @override 9619 @override
9896 Comment visitComment(Comment node) { 9620 Comment visitComment(Comment node) {
9897 if (node.isDocumentation) { 9621 if (node.isDocumentation) {
9898 return Comment.createDocumentationCommentWithReferences( 9622 return Comment.createDocumentationCommentWithReferences(
9899 _mapTokens(node.tokens), 9623 _mapTokens(node.tokens), _cloneNodeList(node.references));
9900 _cloneNodeList(node.references));
9901 } else if (node.isBlock) { 9624 } else if (node.isBlock) {
9902 return Comment.createBlockComment(_mapTokens(node.tokens)); 9625 return Comment.createBlockComment(_mapTokens(node.tokens));
9903 } 9626 }
9904 return Comment.createEndOfLineComment(_mapTokens(node.tokens)); 9627 return Comment.createEndOfLineComment(_mapTokens(node.tokens));
9905 } 9628 }
9906 9629
9907 @override 9630 @override
9908 CommentReference visitCommentReference(CommentReference node) => 9631 CommentReference visitCommentReference(CommentReference node) =>
9909 new CommentReference(_mapToken(node.newKeyword), _cloneNode(node.identifie r)); 9632 new CommentReference(
9633 _mapToken(node.newKeyword), _cloneNode(node.identifier));
9910 9634
9911 @override 9635 @override
9912 CompilationUnit visitCompilationUnit(CompilationUnit node) { 9636 CompilationUnit visitCompilationUnit(CompilationUnit node) {
9913 CompilationUnit copy = new CompilationUnit( 9637 CompilationUnit copy = new CompilationUnit(_mapToken(node.beginToken),
9914 _mapToken(node.beginToken), 9638 _cloneNode(node.scriptTag), _cloneNodeList(node.directives),
9915 _cloneNode(node.scriptTag), 9639 _cloneNodeList(node.declarations), _mapToken(node.endToken));
9916 _cloneNodeList(node.directives),
9917 _cloneNodeList(node.declarations),
9918 _mapToken(node.endToken));
9919 copy.lineInfo = node.lineInfo; 9640 copy.lineInfo = node.lineInfo;
9920 copy.element = node.element; 9641 copy.element = node.element;
9921 return copy; 9642 return copy;
9922 } 9643 }
9923 9644
9924 @override 9645 @override
9925 ConditionalExpression visitConditionalExpression(ConditionalExpression node) { 9646 ConditionalExpression visitConditionalExpression(ConditionalExpression node) {
9926 ConditionalExpression copy = new ConditionalExpression( 9647 ConditionalExpression copy = new ConditionalExpression(
9927 _cloneNode(node.condition), 9648 _cloneNode(node.condition), _mapToken(node.question),
9928 _mapToken(node.question), 9649 _cloneNode(node.thenExpression), _mapToken(node.colon),
9929 _cloneNode(node.thenExpression),
9930 _mapToken(node.colon),
9931 _cloneNode(node.elseExpression)); 9650 _cloneNode(node.elseExpression));
9932 copy.propagatedType = node.propagatedType; 9651 copy.propagatedType = node.propagatedType;
9933 copy.staticType = node.staticType; 9652 copy.staticType = node.staticType;
9934 return copy; 9653 return copy;
9935 } 9654 }
9936 9655
9937 @override 9656 @override
9938 ConstructorDeclaration 9657 ConstructorDeclaration visitConstructorDeclaration(
9939 visitConstructorDeclaration(ConstructorDeclaration node) { 9658 ConstructorDeclaration node) {
9940 ConstructorDeclaration copy = new ConstructorDeclaration( 9659 ConstructorDeclaration copy = new ConstructorDeclaration(
9941 _cloneNode(node.documentationComment), 9660 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata),
9942 _cloneNodeList(node.metadata), 9661 _mapToken(node.externalKeyword), _mapToken(node.constKeyword),
9943 _mapToken(node.externalKeyword), 9662 _mapToken(node.factoryKeyword), _cloneNode(node.returnType),
9944 _mapToken(node.constKeyword), 9663 _mapToken(node.period), _cloneNode(node.name),
9945 _mapToken(node.factoryKeyword), 9664 _cloneNode(node.parameters), _mapToken(node.separator),
9946 _cloneNode(node.returnType),
9947 _mapToken(node.period),
9948 _cloneNode(node.name),
9949 _cloneNode(node.parameters),
9950 _mapToken(node.separator),
9951 _cloneNodeList(node.initializers), 9665 _cloneNodeList(node.initializers),
9952 _cloneNode(node.redirectedConstructor), 9666 _cloneNode(node.redirectedConstructor), _cloneNode(node.body));
9953 _cloneNode(node.body));
9954 copy.element = node.element; 9667 copy.element = node.element;
9955 return copy; 9668 return copy;
9956 } 9669 }
9957 9670
9958 @override 9671 @override
9959 ConstructorFieldInitializer 9672 ConstructorFieldInitializer visitConstructorFieldInitializer(
9960 visitConstructorFieldInitializer(ConstructorFieldInitializer node) => 9673 ConstructorFieldInitializer node) => new ConstructorFieldInitializer(
9961 new ConstructorFieldInitializer( 9674 _mapToken(node.thisKeyword), _mapToken(node.period),
9962 _mapToken(node.thisKeyword), 9675 _cloneNode(node.fieldName), _mapToken(node.equals),
9963 _mapToken(node.period), 9676 _cloneNode(node.expression));
9964 _cloneNode(node.fieldName),
9965 _mapToken(node.equals),
9966 _cloneNode(node.expression));
9967 9677
9968 @override 9678 @override
9969 ConstructorName visitConstructorName(ConstructorName node) { 9679 ConstructorName visitConstructorName(ConstructorName node) {
9970 ConstructorName copy = new ConstructorName( 9680 ConstructorName copy = new ConstructorName(
9971 _cloneNode(node.type), 9681 _cloneNode(node.type), _mapToken(node.period), _cloneNode(node.name));
9972 _mapToken(node.period),
9973 _cloneNode(node.name));
9974 copy.staticElement = node.staticElement; 9682 copy.staticElement = node.staticElement;
9975 return copy; 9683 return copy;
9976 } 9684 }
9977 9685
9978 @override 9686 @override
9979 ContinueStatement visitContinueStatement(ContinueStatement node) => 9687 ContinueStatement visitContinueStatement(ContinueStatement node) =>
9980 new ContinueStatement( 9688 new ContinueStatement(_mapToken(node.continueKeyword),
9981 _mapToken(node.continueKeyword), 9689 _cloneNode(node.label), _mapToken(node.semicolon));
9982 _cloneNode(node.label),
9983 _mapToken(node.semicolon));
9984 9690
9985 @override 9691 @override
9986 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => 9692 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) =>
9987 new DeclaredIdentifier( 9693 new DeclaredIdentifier(_cloneNode(node.documentationComment),
9988 _cloneNode(node.documentationComment), 9694 _cloneNodeList(node.metadata), _mapToken(node.keyword),
9989 _cloneNodeList(node.metadata), 9695 _cloneNode(node.type), _cloneNode(node.identifier));
9990 _mapToken(node.keyword),
9991 _cloneNode(node.type),
9992 _cloneNode(node.identifier));
9993 9696
9994 @override 9697 @override
9995 DefaultFormalParameter 9698 DefaultFormalParameter visitDefaultFormalParameter(
9996 visitDefaultFormalParameter(DefaultFormalParameter node) => 9699 DefaultFormalParameter node) => new DefaultFormalParameter(
9997 new DefaultFormalParameter( 9700 _cloneNode(node.parameter), node.kind, _mapToken(node.separator),
9998 _cloneNode(node.parameter), 9701 _cloneNode(node.defaultValue));
9999 node.kind,
10000 _mapToken(node.separator),
10001 _cloneNode(node.defaultValue));
10002 9702
10003 @override 9703 @override
10004 DoStatement visitDoStatement(DoStatement node) => 9704 DoStatement visitDoStatement(DoStatement node) => new DoStatement(
10005 new DoStatement( 9705 _mapToken(node.doKeyword), _cloneNode(node.body),
10006 _mapToken(node.doKeyword), 9706 _mapToken(node.whileKeyword), _mapToken(node.leftParenthesis),
10007 _cloneNode(node.body), 9707 _cloneNode(node.condition), _mapToken(node.rightParenthesis),
10008 _mapToken(node.whileKeyword), 9708 _mapToken(node.semicolon));
10009 _mapToken(node.leftParenthesis),
10010 _cloneNode(node.condition),
10011 _mapToken(node.rightParenthesis),
10012 _mapToken(node.semicolon));
10013 9709
10014 @override 9710 @override
10015 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) { 9711 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) {
10016 DoubleLiteral copy = new DoubleLiteral(_mapToken(node.literal), node.value); 9712 DoubleLiteral copy = new DoubleLiteral(_mapToken(node.literal), node.value);
10017 copy.propagatedType = node.propagatedType; 9713 copy.propagatedType = node.propagatedType;
10018 copy.staticType = node.staticType; 9714 copy.staticType = node.staticType;
10019 return copy; 9715 return copy;
10020 } 9716 }
10021 9717
10022 @override 9718 @override
10023 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => 9719 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) =>
10024 new EmptyFunctionBody(_mapToken(node.semicolon)); 9720 new EmptyFunctionBody(_mapToken(node.semicolon));
10025 9721
10026 @override 9722 @override
10027 EmptyStatement visitEmptyStatement(EmptyStatement node) => 9723 EmptyStatement visitEmptyStatement(EmptyStatement node) =>
10028 new EmptyStatement(_mapToken(node.semicolon)); 9724 new EmptyStatement(_mapToken(node.semicolon));
10029 9725
10030 @override 9726 @override
10031 AstNode visitEnumConstantDeclaration(EnumConstantDeclaration node) => 9727 AstNode visitEnumConstantDeclaration(EnumConstantDeclaration node) =>
10032 new EnumConstantDeclaration( 9728 new EnumConstantDeclaration(_cloneNode(node.documentationComment),
10033 _cloneNode(node.documentationComment), 9729 _cloneNodeList(node.metadata), _cloneNode(node.name));
10034 _cloneNodeList(node.metadata),
10035 _cloneNode(node.name));
10036 9730
10037 @override 9731 @override
10038 AstNode visitEnumDeclaration(EnumDeclaration node) => 9732 AstNode visitEnumDeclaration(EnumDeclaration node) => new EnumDeclaration(
10039 new EnumDeclaration( 9733 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata),
10040 _cloneNode(node.documentationComment), 9734 _mapToken(node.enumKeyword), _cloneNode(node.name),
10041 _cloneNodeList(node.metadata), 9735 _mapToken(node.leftBracket), _cloneNodeList(node.constants),
10042 _mapToken(node.enumKeyword), 9736 _mapToken(node.rightBracket));
10043 _cloneNode(node.name),
10044 _mapToken(node.leftBracket),
10045 _cloneNodeList(node.constants),
10046 _mapToken(node.rightBracket));
10047 9737
10048 @override 9738 @override
10049 ExportDirective visitExportDirective(ExportDirective node) { 9739 ExportDirective visitExportDirective(ExportDirective node) {
10050 ExportDirective copy = new ExportDirective( 9740 ExportDirective copy = new ExportDirective(
10051 _cloneNode(node.documentationComment), 9741 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata),
10052 _cloneNodeList(node.metadata), 9742 _mapToken(node.keyword), _cloneNode(node.uri),
10053 _mapToken(node.keyword), 9743 _cloneNodeList(node.combinators), _mapToken(node.semicolon));
10054 _cloneNode(node.uri),
10055 _cloneNodeList(node.combinators),
10056 _mapToken(node.semicolon));
10057 copy.element = node.element; 9744 copy.element = node.element;
10058 return copy; 9745 return copy;
10059 } 9746 }
10060 9747
10061 @override 9748 @override
10062 ExpressionFunctionBody 9749 ExpressionFunctionBody visitExpressionFunctionBody(
10063 visitExpressionFunctionBody(ExpressionFunctionBody node) => 9750 ExpressionFunctionBody node) => new ExpressionFunctionBody(
10064 new ExpressionFunctionBody( 9751 _mapToken(node.keyword), _mapToken(node.functionDefinition),
10065 _mapToken(node.keyword), 9752 _cloneNode(node.expression), _mapToken(node.semicolon));
10066 _mapToken(node.functionDefinition),
10067 _cloneNode(node.expression),
10068 _mapToken(node.semicolon));
10069 9753
10070 @override 9754 @override
10071 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => 9755 ExpressionStatement visitExpressionStatement(ExpressionStatement node) =>
10072 new ExpressionStatement(_cloneNode(node.expression), _mapToken(node.semico lon)); 9756 new ExpressionStatement(
9757 _cloneNode(node.expression), _mapToken(node.semicolon));
10073 9758
10074 @override 9759 @override
10075 ExtendsClause visitExtendsClause(ExtendsClause node) => 9760 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(
10076 new ExtendsClause(_mapToken(node.extendsKeyword), _cloneNode(node.supercla ss)); 9761 _mapToken(node.extendsKeyword), _cloneNode(node.superclass));
10077 9762
10078 @override 9763 @override
10079 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => 9764 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) =>
10080 new FieldDeclaration( 9765 new FieldDeclaration(_cloneNode(node.documentationComment),
10081 _cloneNode(node.documentationComment), 9766 _cloneNodeList(node.metadata), _mapToken(node.staticKeyword),
10082 _cloneNodeList(node.metadata), 9767 _cloneNode(node.fields), _mapToken(node.semicolon));
10083 _mapToken(node.staticKeyword),
10084 _cloneNode(node.fields),
10085 _mapToken(node.semicolon));
10086 9768
10087 @override 9769 @override
10088 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => 9770 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) =>
10089 new FieldFormalParameter( 9771 new FieldFormalParameter(_cloneNode(node.documentationComment),
10090 _cloneNode(node.documentationComment), 9772 _cloneNodeList(node.metadata), _mapToken(node.keyword),
10091 _cloneNodeList(node.metadata), 9773 _cloneNode(node.type), _mapToken(node.thisKeyword),
10092 _mapToken(node.keyword), 9774 _mapToken(node.period), _cloneNode(node.identifier),
10093 _cloneNode(node.type),
10094 _mapToken(node.thisKeyword),
10095 _mapToken(node.period),
10096 _cloneNode(node.identifier),
10097 _cloneNode(node.parameters)); 9775 _cloneNode(node.parameters));
10098 9776
10099 @override 9777 @override
10100 ForEachStatement visitForEachStatement(ForEachStatement node) { 9778 ForEachStatement visitForEachStatement(ForEachStatement node) {
10101 DeclaredIdentifier loopVariable = node.loopVariable; 9779 DeclaredIdentifier loopVariable = node.loopVariable;
10102 if (loopVariable == null) { 9780 if (loopVariable == null) {
10103 return new ForEachStatement.con2( 9781 return new ForEachStatement.con2(_mapToken(node.awaitKeyword),
10104 _mapToken(node.awaitKeyword), 9782 _mapToken(node.forKeyword), _mapToken(node.leftParenthesis),
10105 _mapToken(node.forKeyword), 9783 _cloneNode(node.identifier), _mapToken(node.inKeyword),
10106 _mapToken(node.leftParenthesis), 9784 _cloneNode(node.iterable), _mapToken(node.rightParenthesis),
10107 _cloneNode(node.identifier),
10108 _mapToken(node.inKeyword),
10109 _cloneNode(node.iterable),
10110 _mapToken(node.rightParenthesis),
10111 _cloneNode(node.body)); 9785 _cloneNode(node.body));
10112 } 9786 }
10113 return new ForEachStatement.con1( 9787 return new ForEachStatement.con1(_mapToken(node.awaitKeyword),
10114 _mapToken(node.awaitKeyword), 9788 _mapToken(node.forKeyword), _mapToken(node.leftParenthesis),
10115 _mapToken(node.forKeyword), 9789 _cloneNode(loopVariable), _mapToken(node.inKeyword),
10116 _mapToken(node.leftParenthesis), 9790 _cloneNode(node.iterable), _mapToken(node.rightParenthesis),
10117 _cloneNode(loopVariable),
10118 _mapToken(node.inKeyword),
10119 _cloneNode(node.iterable),
10120 _mapToken(node.rightParenthesis),
10121 _cloneNode(node.body)); 9791 _cloneNode(node.body));
10122 } 9792 }
10123 9793
10124 @override 9794 @override
10125 FormalParameterList visitFormalParameterList(FormalParameterList node) => 9795 FormalParameterList visitFormalParameterList(FormalParameterList node) =>
10126 new FormalParameterList( 9796 new FormalParameterList(_mapToken(node.leftParenthesis),
10127 _mapToken(node.leftParenthesis), 9797 _cloneNodeList(node.parameters), _mapToken(node.leftDelimiter),
10128 _cloneNodeList(node.parameters), 9798 _mapToken(node.rightDelimiter), _mapToken(node.rightParenthesis));
10129 _mapToken(node.leftDelimiter),
10130 _mapToken(node.rightDelimiter),
10131 _mapToken(node.rightParenthesis));
10132 9799
10133 @override 9800 @override
10134 ForStatement visitForStatement(ForStatement node) => 9801 ForStatement visitForStatement(ForStatement node) => new ForStatement(
10135 new ForStatement( 9802 _mapToken(node.forKeyword), _mapToken(node.leftParenthesis),
10136 _mapToken(node.forKeyword), 9803 _cloneNode(node.variables), _cloneNode(node.initialization),
10137 _mapToken(node.leftParenthesis), 9804 _mapToken(node.leftSeparator), _cloneNode(node.condition),
10138 _cloneNode(node.variables), 9805 _mapToken(node.rightSeparator), _cloneNodeList(node.updaters),
10139 _cloneNode(node.initialization), 9806 _mapToken(node.rightParenthesis), _cloneNode(node.body));
10140 _mapToken(node.leftSeparator),
10141 _cloneNode(node.condition),
10142 _mapToken(node.rightSeparator),
10143 _cloneNodeList(node.updaters),
10144 _mapToken(node.rightParenthesis),
10145 _cloneNode(node.body));
10146 9807
10147 @override 9808 @override
10148 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => 9809 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) =>
10149 new FunctionDeclaration( 9810 new FunctionDeclaration(_cloneNode(node.documentationComment),
10150 _cloneNode(node.documentationComment), 9811 _cloneNodeList(node.metadata), _mapToken(node.externalKeyword),
10151 _cloneNodeList(node.metadata), 9812 _cloneNode(node.returnType), _mapToken(node.propertyKeyword),
10152 _mapToken(node.externalKeyword), 9813 _cloneNode(node.name), _cloneNode(node.functionExpression));
10153 _cloneNode(node.returnType),
10154 _mapToken(node.propertyKeyword),
10155 _cloneNode(node.name),
10156 _cloneNode(node.functionExpression));
10157 9814
10158 @override 9815 @override
10159 FunctionDeclarationStatement 9816 FunctionDeclarationStatement visitFunctionDeclarationStatement(
10160 visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => 9817 FunctionDeclarationStatement node) =>
10161 new FunctionDeclarationStatement(_cloneNode(node.functionDeclaration)); 9818 new FunctionDeclarationStatement(_cloneNode(node.functionDeclaration));
10162 9819
10163 @override 9820 @override
10164 FunctionExpression visitFunctionExpression(FunctionExpression node) { 9821 FunctionExpression visitFunctionExpression(FunctionExpression node) {
10165 FunctionExpression copy = 9822 FunctionExpression copy = new FunctionExpression(
10166 new FunctionExpression(_cloneNode(node.parameters), _cloneNode(node.body )); 9823 _cloneNode(node.parameters), _cloneNode(node.body));
10167 copy.element = node.element; 9824 copy.element = node.element;
10168 copy.propagatedType = node.propagatedType; 9825 copy.propagatedType = node.propagatedType;
10169 copy.staticType = node.staticType; 9826 copy.staticType = node.staticType;
10170 return copy; 9827 return copy;
10171 } 9828 }
10172 9829
10173 @override 9830 @override
10174 FunctionExpressionInvocation 9831 FunctionExpressionInvocation visitFunctionExpressionInvocation(
10175 visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { 9832 FunctionExpressionInvocation node) {
10176 FunctionExpressionInvocation copy = new FunctionExpressionInvocation( 9833 FunctionExpressionInvocation copy = new FunctionExpressionInvocation(
10177 _cloneNode(node.function), 9834 _cloneNode(node.function), _cloneNode(node.argumentList));
10178 _cloneNode(node.argumentList));
10179 copy.propagatedElement = node.propagatedElement; 9835 copy.propagatedElement = node.propagatedElement;
10180 copy.propagatedType = node.propagatedType; 9836 copy.propagatedType = node.propagatedType;
10181 copy.staticElement = node.staticElement; 9837 copy.staticElement = node.staticElement;
10182 copy.staticType = node.staticType; 9838 copy.staticType = node.staticType;
10183 return copy; 9839 return copy;
10184 } 9840 }
10185 9841
10186 @override 9842 @override
10187 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => 9843 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) =>
10188 new FunctionTypeAlias( 9844 new FunctionTypeAlias(_cloneNode(node.documentationComment),
10189 _cloneNode(node.documentationComment), 9845 _cloneNodeList(node.metadata), _mapToken(node.typedefKeyword),
10190 _cloneNodeList(node.metadata), 9846 _cloneNode(node.returnType), _cloneNode(node.name),
10191 _mapToken(node.typedefKeyword), 9847 _cloneNode(node.typeParameters), _cloneNode(node.parameters),
10192 _cloneNode(node.returnType),
10193 _cloneNode(node.name),
10194 _cloneNode(node.typeParameters),
10195 _cloneNode(node.parameters),
10196 _mapToken(node.semicolon)); 9848 _mapToken(node.semicolon));
10197 9849
10198 @override 9850 @override
10199 FunctionTypedFormalParameter 9851 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(
10200 visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => 9852 FunctionTypedFormalParameter node) => new FunctionTypedFormalParameter(
10201 new FunctionTypedFormalParameter( 9853 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata),
10202 _cloneNode(node.documentationComment), 9854 _cloneNode(node.returnType), _cloneNode(node.identifier),
10203 _cloneNodeList(node.metadata), 9855 _cloneNode(node.parameters));
10204 _cloneNode(node.returnType),
10205 _cloneNode(node.identifier),
10206 _cloneNode(node.parameters));
10207 9856
10208 @override 9857 @override
10209 HideCombinator visitHideCombinator(HideCombinator node) => 9858 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
10210 new HideCombinator(_mapToken(node.keyword), _cloneNodeList(node.hiddenName s)); 9859 _mapToken(node.keyword), _cloneNodeList(node.hiddenNames));
10211 9860
10212 @override 9861 @override
10213 IfStatement visitIfStatement(IfStatement node) => 9862 IfStatement visitIfStatement(IfStatement node) => new IfStatement(
10214 new IfStatement( 9863 _mapToken(node.ifKeyword), _mapToken(node.leftParenthesis),
10215 _mapToken(node.ifKeyword), 9864 _cloneNode(node.condition), _mapToken(node.rightParenthesis),
10216 _mapToken(node.leftParenthesis), 9865 _cloneNode(node.thenStatement), _mapToken(node.elseKeyword),
10217 _cloneNode(node.condition), 9866 _cloneNode(node.elseStatement));
10218 _mapToken(node.rightParenthesis),
10219 _cloneNode(node.thenStatement),
10220 _mapToken(node.elseKeyword),
10221 _cloneNode(node.elseStatement));
10222 9867
10223 @override 9868 @override
10224 ImplementsClause visitImplementsClause(ImplementsClause node) => 9869 ImplementsClause visitImplementsClause(ImplementsClause node) =>
10225 new ImplementsClause(_mapToken(node.implementsKeyword), _cloneNodeList(nod e.interfaces)); 9870 new ImplementsClause(
9871 _mapToken(node.implementsKeyword), _cloneNodeList(node.interfaces));
10226 9872
10227 @override 9873 @override
10228 ImportDirective visitImportDirective(ImportDirective node) => 9874 ImportDirective visitImportDirective(ImportDirective node) =>
10229 new ImportDirective( 9875 new ImportDirective(_cloneNode(node.documentationComment),
10230 _cloneNode(node.documentationComment), 9876 _cloneNodeList(node.metadata), _mapToken(node.keyword),
10231 _cloneNodeList(node.metadata), 9877 _cloneNode(node.uri), _mapToken(node.deferredKeyword),
10232 _mapToken(node.keyword), 9878 _mapToken(node.asKeyword), _cloneNode(node.prefix),
10233 _cloneNode(node.uri), 9879 _cloneNodeList(node.combinators), _mapToken(node.semicolon));
10234 _mapToken(node.deferredKeyword),
10235 _mapToken(node.asKeyword),
10236 _cloneNode(node.prefix),
10237 _cloneNodeList(node.combinators),
10238 _mapToken(node.semicolon));
10239 9880
10240 @override 9881 @override
10241 IndexExpression visitIndexExpression(IndexExpression node) { 9882 IndexExpression visitIndexExpression(IndexExpression node) {
10242 Token period = _mapToken(node.period); 9883 Token period = _mapToken(node.period);
10243 IndexExpression copy; 9884 IndexExpression copy;
10244 if (period == null) { 9885 if (period == null) {
10245 copy = new IndexExpression.forTarget( 9886 copy = new IndexExpression.forTarget(_cloneNode(node.target),
10246 _cloneNode(node.target), 9887 _mapToken(node.leftBracket), _cloneNode(node.index),
10247 _mapToken(node.leftBracket),
10248 _cloneNode(node.index),
10249 _mapToken(node.rightBracket)); 9888 _mapToken(node.rightBracket));
10250 } else { 9889 } else {
10251 copy = new IndexExpression.forCascade( 9890 copy = new IndexExpression.forCascade(period, _mapToken(node.leftBracket),
10252 period, 9891 _cloneNode(node.index), _mapToken(node.rightBracket));
10253 _mapToken(node.leftBracket),
10254 _cloneNode(node.index),
10255 _mapToken(node.rightBracket));
10256 } 9892 }
10257 copy.auxiliaryElements = node.auxiliaryElements; 9893 copy.auxiliaryElements = node.auxiliaryElements;
10258 copy.propagatedElement = node.propagatedElement; 9894 copy.propagatedElement = node.propagatedElement;
10259 copy.propagatedType = node.propagatedType; 9895 copy.propagatedType = node.propagatedType;
10260 copy.staticElement = node.staticElement; 9896 copy.staticElement = node.staticElement;
10261 copy.staticType = node.staticType; 9897 copy.staticType = node.staticType;
10262 return copy; 9898 return copy;
10263 } 9899 }
10264 9900
10265 @override 9901 @override
10266 InstanceCreationExpression 9902 InstanceCreationExpression visitInstanceCreationExpression(
10267 visitInstanceCreationExpression(InstanceCreationExpression node) { 9903 InstanceCreationExpression node) {
10268 InstanceCreationExpression copy = new InstanceCreationExpression( 9904 InstanceCreationExpression copy = new InstanceCreationExpression(
10269 _mapToken(node.keyword), 9905 _mapToken(node.keyword), _cloneNode(node.constructorName),
10270 _cloneNode(node.constructorName),
10271 _cloneNode(node.argumentList)); 9906 _cloneNode(node.argumentList));
10272 copy.propagatedType = node.propagatedType; 9907 copy.propagatedType = node.propagatedType;
10273 copy.staticElement = node.staticElement; 9908 copy.staticElement = node.staticElement;
10274 copy.staticType = node.staticType; 9909 copy.staticType = node.staticType;
10275 return copy; 9910 return copy;
10276 } 9911 }
10277 9912
10278 @override 9913 @override
10279 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) { 9914 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) {
10280 IntegerLiteral copy = 9915 IntegerLiteral copy =
10281 new IntegerLiteral(_mapToken(node.literal), node.value); 9916 new IntegerLiteral(_mapToken(node.literal), node.value);
10282 copy.propagatedType = node.propagatedType; 9917 copy.propagatedType = node.propagatedType;
10283 copy.staticType = node.staticType; 9918 copy.staticType = node.staticType;
10284 return copy; 9919 return copy;
10285 } 9920 }
10286 9921
10287 @override 9922 @override
10288 InterpolationExpression 9923 InterpolationExpression visitInterpolationExpression(
10289 visitInterpolationExpression(InterpolationExpression node) => 9924 InterpolationExpression node) => new InterpolationExpression(
10290 new InterpolationExpression( 9925 _mapToken(node.leftBracket), _cloneNode(node.expression),
10291 _mapToken(node.leftBracket), 9926 _mapToken(node.rightBracket));
10292 _cloneNode(node.expression),
10293 _mapToken(node.rightBracket));
10294 9927
10295 @override 9928 @override
10296 InterpolationString visitInterpolationString(InterpolationString node) => 9929 InterpolationString visitInterpolationString(InterpolationString node) =>
10297 new InterpolationString(_mapToken(node.contents), node.value); 9930 new InterpolationString(_mapToken(node.contents), node.value);
10298 9931
10299 @override 9932 @override
10300 IsExpression visitIsExpression(IsExpression node) { 9933 IsExpression visitIsExpression(IsExpression node) {
10301 IsExpression copy = new IsExpression( 9934 IsExpression copy = new IsExpression(_cloneNode(node.expression),
10302 _cloneNode(node.expression), 9935 _mapToken(node.isOperator), _mapToken(node.notOperator),
10303 _mapToken(node.isOperator),
10304 _mapToken(node.notOperator),
10305 _cloneNode(node.type)); 9936 _cloneNode(node.type));
10306 copy.propagatedType = node.propagatedType; 9937 copy.propagatedType = node.propagatedType;
10307 copy.staticType = node.staticType; 9938 copy.staticType = node.staticType;
10308 return copy; 9939 return copy;
10309 } 9940 }
10310 9941
10311 @override 9942 @override
10312 Label visitLabel(Label node) => 9943 Label visitLabel(Label node) =>
10313 new Label(_cloneNode(node.label), _mapToken(node.colon)); 9944 new Label(_cloneNode(node.label), _mapToken(node.colon));
10314 9945
10315 @override 9946 @override
10316 LabeledStatement visitLabeledStatement(LabeledStatement node) => 9947 LabeledStatement visitLabeledStatement(LabeledStatement node) =>
10317 new LabeledStatement(_cloneNodeList(node.labels), _cloneNode(node.statemen t)); 9948 new LabeledStatement(
9949 _cloneNodeList(node.labels), _cloneNode(node.statement));
10318 9950
10319 @override 9951 @override
10320 LibraryDirective visitLibraryDirective(LibraryDirective node) => 9952 LibraryDirective visitLibraryDirective(LibraryDirective node) =>
10321 new LibraryDirective( 9953 new LibraryDirective(_cloneNode(node.documentationComment),
10322 _cloneNode(node.documentationComment), 9954 _cloneNodeList(node.metadata), _mapToken(node.libraryKeyword),
10323 _cloneNodeList(node.metadata), 9955 _cloneNode(node.name), _mapToken(node.semicolon));
10324 _mapToken(node.libraryKeyword),
10325 _cloneNode(node.name),
10326 _mapToken(node.semicolon));
10327 9956
10328 @override 9957 @override
10329 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) { 9958 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) {
10330 LibraryIdentifier copy = 9959 LibraryIdentifier copy =
10331 new LibraryIdentifier(_cloneNodeList(node.components)); 9960 new LibraryIdentifier(_cloneNodeList(node.components));
10332 copy.propagatedType = node.propagatedType; 9961 copy.propagatedType = node.propagatedType;
10333 copy.staticType = node.staticType; 9962 copy.staticType = node.staticType;
10334 return copy; 9963 return copy;
10335 } 9964 }
10336 9965
10337 @override 9966 @override
10338 ListLiteral visitListLiteral(ListLiteral node) { 9967 ListLiteral visitListLiteral(ListLiteral node) {
10339 ListLiteral copy = new ListLiteral( 9968 ListLiteral copy = new ListLiteral(_mapToken(node.constKeyword),
10340 _mapToken(node.constKeyword), 9969 _cloneNode(node.typeArguments), _mapToken(node.leftBracket),
10341 _cloneNode(node.typeArguments), 9970 _cloneNodeList(node.elements), _mapToken(node.rightBracket));
10342 _mapToken(node.leftBracket),
10343 _cloneNodeList(node.elements),
10344 _mapToken(node.rightBracket));
10345 copy.propagatedType = node.propagatedType; 9971 copy.propagatedType = node.propagatedType;
10346 copy.staticType = node.staticType; 9972 copy.staticType = node.staticType;
10347 return copy; 9973 return copy;
10348 } 9974 }
10349 9975
10350 @override 9976 @override
10351 MapLiteral visitMapLiteral(MapLiteral node) { 9977 MapLiteral visitMapLiteral(MapLiteral node) {
10352 MapLiteral copy = new MapLiteral( 9978 MapLiteral copy = new MapLiteral(_mapToken(node.constKeyword),
10353 _mapToken(node.constKeyword), 9979 _cloneNode(node.typeArguments), _mapToken(node.leftBracket),
10354 _cloneNode(node.typeArguments), 9980 _cloneNodeList(node.entries), _mapToken(node.rightBracket));
10355 _mapToken(node.leftBracket),
10356 _cloneNodeList(node.entries),
10357 _mapToken(node.rightBracket));
10358 copy.propagatedType = node.propagatedType; 9981 copy.propagatedType = node.propagatedType;
10359 copy.staticType = node.staticType; 9982 copy.staticType = node.staticType;
10360 return copy; 9983 return copy;
10361 } 9984 }
10362 9985
10363 @override 9986 @override
10364 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => 9987 MapLiteralEntry visitMapLiteralEntry(
10365 new MapLiteralEntry( 9988 MapLiteralEntry node) => new MapLiteralEntry(
10366 _cloneNode(node.key), 9989 _cloneNode(node.key), _mapToken(node.separator), _cloneNode(node.value));
10367 _mapToken(node.separator),
10368 _cloneNode(node.value));
10369 9990
10370 @override 9991 @override
10371 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => 9992 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) =>
10372 new MethodDeclaration( 9993 new MethodDeclaration(_cloneNode(node.documentationComment),
10373 _cloneNode(node.documentationComment), 9994 _cloneNodeList(node.metadata), _mapToken(node.externalKeyword),
10374 _cloneNodeList(node.metadata), 9995 _mapToken(node.modifierKeyword), _cloneNode(node.returnType),
10375 _mapToken(node.externalKeyword), 9996 _mapToken(node.propertyKeyword), _mapToken(node.operatorKeyword),
10376 _mapToken(node.modifierKeyword), 9997 _cloneNode(node.name), _cloneNode(node.parameters),
10377 _cloneNode(node.returnType),
10378 _mapToken(node.propertyKeyword),
10379 _mapToken(node.operatorKeyword),
10380 _cloneNode(node.name),
10381 _cloneNode(node.parameters),
10382 _cloneNode(node.body)); 9998 _cloneNode(node.body));
10383 9999
10384 @override 10000 @override
10385 MethodInvocation visitMethodInvocation(MethodInvocation node) { 10001 MethodInvocation visitMethodInvocation(MethodInvocation node) {
10386 MethodInvocation copy = new MethodInvocation( 10002 MethodInvocation copy = new MethodInvocation(_cloneNode(node.target),
10387 _cloneNode(node.target), 10003 _mapToken(node.period), _cloneNode(node.methodName),
10388 _mapToken(node.period),
10389 _cloneNode(node.methodName),
10390 _cloneNode(node.argumentList)); 10004 _cloneNode(node.argumentList));
10391 copy.propagatedType = node.propagatedType; 10005 copy.propagatedType = node.propagatedType;
10392 copy.staticType = node.staticType; 10006 copy.staticType = node.staticType;
10393 return copy; 10007 return copy;
10394 } 10008 }
10395 10009
10396 @override 10010 @override
10397 NamedExpression visitNamedExpression(NamedExpression node) { 10011 NamedExpression visitNamedExpression(NamedExpression node) {
10398 NamedExpression copy = 10012 NamedExpression copy =
10399 new NamedExpression(_cloneNode(node.name), _cloneNode(node.expression)); 10013 new NamedExpression(_cloneNode(node.name), _cloneNode(node.expression));
10400 copy.propagatedType = node.propagatedType; 10014 copy.propagatedType = node.propagatedType;
10401 copy.staticType = node.staticType; 10015 copy.staticType = node.staticType;
10402 return copy; 10016 return copy;
10403 } 10017 }
10404 10018
10405 @override 10019 @override
10406 AstNode visitNativeClause(NativeClause node) => 10020 AstNode visitNativeClause(NativeClause node) =>
10407 new NativeClause(_mapToken(node.nativeKeyword), _cloneNode(node.name)); 10021 new NativeClause(_mapToken(node.nativeKeyword), _cloneNode(node.name));
10408 10022
10409 @override 10023 @override
10410 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => 10024 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) =>
10411 new NativeFunctionBody( 10025 new NativeFunctionBody(_mapToken(node.nativeKeyword),
10412 _mapToken(node.nativeKeyword), 10026 _cloneNode(node.stringLiteral), _mapToken(node.semicolon));
10413 _cloneNode(node.stringLiteral),
10414 _mapToken(node.semicolon));
10415 10027
10416 @override 10028 @override
10417 NullLiteral visitNullLiteral(NullLiteral node) { 10029 NullLiteral visitNullLiteral(NullLiteral node) {
10418 NullLiteral copy = new NullLiteral(_mapToken(node.literal)); 10030 NullLiteral copy = new NullLiteral(_mapToken(node.literal));
10419 copy.propagatedType = node.propagatedType; 10031 copy.propagatedType = node.propagatedType;
10420 copy.staticType = node.staticType; 10032 copy.staticType = node.staticType;
10421 return copy; 10033 return copy;
10422 } 10034 }
10423 10035
10424 @override 10036 @override
10425 ParenthesizedExpression 10037 ParenthesizedExpression visitParenthesizedExpression(
10426 visitParenthesizedExpression(ParenthesizedExpression node) { 10038 ParenthesizedExpression node) {
10427 ParenthesizedExpression copy = new ParenthesizedExpression( 10039 ParenthesizedExpression copy = new ParenthesizedExpression(
10428 _mapToken(node.leftParenthesis), 10040 _mapToken(node.leftParenthesis), _cloneNode(node.expression),
10429 _cloneNode(node.expression),
10430 _mapToken(node.rightParenthesis)); 10041 _mapToken(node.rightParenthesis));
10431 copy.propagatedType = node.propagatedType; 10042 copy.propagatedType = node.propagatedType;
10432 copy.staticType = node.staticType; 10043 copy.staticType = node.staticType;
10433 return copy; 10044 return copy;
10434 } 10045 }
10435 10046
10436 @override 10047 @override
10437 PartDirective visitPartDirective(PartDirective node) { 10048 PartDirective visitPartDirective(PartDirective node) {
10438 PartDirective copy = new PartDirective( 10049 PartDirective copy = new PartDirective(
10439 _cloneNode(node.documentationComment), 10050 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata),
10440 _cloneNodeList(node.metadata), 10051 _mapToken(node.partKeyword), _cloneNode(node.uri),
10441 _mapToken(node.partKeyword),
10442 _cloneNode(node.uri),
10443 _mapToken(node.semicolon)); 10052 _mapToken(node.semicolon));
10444 copy.element = node.element; 10053 copy.element = node.element;
10445 return copy; 10054 return copy;
10446 } 10055 }
10447 10056
10448 @override 10057 @override
10449 PartOfDirective visitPartOfDirective(PartOfDirective node) { 10058 PartOfDirective visitPartOfDirective(PartOfDirective node) {
10450 PartOfDirective copy = new PartOfDirective( 10059 PartOfDirective copy = new PartOfDirective(
10451 _cloneNode(node.documentationComment), 10060 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata),
10452 _cloneNodeList(node.metadata), 10061 _mapToken(node.partKeyword), _mapToken(node.ofKeyword),
10453 _mapToken(node.partKeyword), 10062 _cloneNode(node.libraryName), _mapToken(node.semicolon));
10454 _mapToken(node.ofKeyword),
10455 _cloneNode(node.libraryName),
10456 _mapToken(node.semicolon));
10457 copy.element = node.element; 10063 copy.element = node.element;
10458 return copy; 10064 return copy;
10459 } 10065 }
10460 10066
10461 @override 10067 @override
10462 PostfixExpression visitPostfixExpression(PostfixExpression node) { 10068 PostfixExpression visitPostfixExpression(PostfixExpression node) {
10463 PostfixExpression copy = 10069 PostfixExpression copy = new PostfixExpression(
10464 new PostfixExpression(_cloneNode(node.operand), _mapToken(node.operator) ); 10070 _cloneNode(node.operand), _mapToken(node.operator));
10465 copy.propagatedElement = node.propagatedElement; 10071 copy.propagatedElement = node.propagatedElement;
10466 copy.propagatedType = node.propagatedType; 10072 copy.propagatedType = node.propagatedType;
10467 copy.staticElement = node.staticElement; 10073 copy.staticElement = node.staticElement;
10468 copy.staticType = node.staticType; 10074 copy.staticType = node.staticType;
10469 return copy; 10075 return copy;
10470 } 10076 }
10471 10077
10472 @override 10078 @override
10473 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) { 10079 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) {
10474 PrefixedIdentifier copy = new PrefixedIdentifier( 10080 PrefixedIdentifier copy = new PrefixedIdentifier(_cloneNode(node.prefix),
10475 _cloneNode(node.prefix), 10081 _mapToken(node.period), _cloneNode(node.identifier));
10476 _mapToken(node.period),
10477 _cloneNode(node.identifier));
10478 copy.propagatedType = node.propagatedType; 10082 copy.propagatedType = node.propagatedType;
10479 copy.staticType = node.staticType; 10083 copy.staticType = node.staticType;
10480 return copy; 10084 return copy;
10481 } 10085 }
10482 10086
10483 @override 10087 @override
10484 PrefixExpression visitPrefixExpression(PrefixExpression node) { 10088 PrefixExpression visitPrefixExpression(PrefixExpression node) {
10485 PrefixExpression copy = 10089 PrefixExpression copy = new PrefixExpression(
10486 new PrefixExpression(_mapToken(node.operator), _cloneNode(node.operand)) ; 10090 _mapToken(node.operator), _cloneNode(node.operand));
10487 copy.propagatedElement = node.propagatedElement; 10091 copy.propagatedElement = node.propagatedElement;
10488 copy.propagatedType = node.propagatedType; 10092 copy.propagatedType = node.propagatedType;
10489 copy.staticElement = node.staticElement; 10093 copy.staticElement = node.staticElement;
10490 copy.staticType = node.staticType; 10094 copy.staticType = node.staticType;
10491 return copy; 10095 return copy;
10492 } 10096 }
10493 10097
10494 @override 10098 @override
10495 PropertyAccess visitPropertyAccess(PropertyAccess node) { 10099 PropertyAccess visitPropertyAccess(PropertyAccess node) {
10496 PropertyAccess copy = new PropertyAccess( 10100 PropertyAccess copy = new PropertyAccess(_cloneNode(node.target),
10497 _cloneNode(node.target), 10101 _mapToken(node.operator), _cloneNode(node.propertyName));
10498 _mapToken(node.operator),
10499 _cloneNode(node.propertyName));
10500 copy.propagatedType = node.propagatedType; 10102 copy.propagatedType = node.propagatedType;
10501 copy.staticType = node.staticType; 10103 copy.staticType = node.staticType;
10502 return copy; 10104 return copy;
10503 } 10105 }
10504 10106
10505 @override 10107 @override
10506 RedirectingConstructorInvocation 10108 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(
10507 visitRedirectingConstructorInvocation(RedirectingConstructorInvocation nod e) { 10109 RedirectingConstructorInvocation node) {
10508 RedirectingConstructorInvocation copy = 10110 RedirectingConstructorInvocation copy =
10509 new RedirectingConstructorInvocation( 10111 new RedirectingConstructorInvocation(_mapToken(node.thisKeyword),
10510 _mapToken(node.thisKeyword), 10112 _mapToken(node.period), _cloneNode(node.constructorName),
10511 _mapToken(node.period),
10512 _cloneNode(node.constructorName),
10513 _cloneNode(node.argumentList)); 10113 _cloneNode(node.argumentList));
10514 copy.staticElement = node.staticElement; 10114 copy.staticElement = node.staticElement;
10515 return copy; 10115 return copy;
10516 } 10116 }
10517 10117
10518 @override 10118 @override
10519 RethrowExpression visitRethrowExpression(RethrowExpression node) { 10119 RethrowExpression visitRethrowExpression(RethrowExpression node) {
10520 RethrowExpression copy = new RethrowExpression(_mapToken(node.rethrowKeyword )); 10120 RethrowExpression copy =
10121 new RethrowExpression(_mapToken(node.rethrowKeyword));
10521 copy.propagatedType = node.propagatedType; 10122 copy.propagatedType = node.propagatedType;
10522 copy.staticType = node.staticType; 10123 copy.staticType = node.staticType;
10523 return copy; 10124 return copy;
10524 } 10125 }
10525 10126
10526 @override 10127 @override
10527 ReturnStatement visitReturnStatement(ReturnStatement node) => 10128 ReturnStatement visitReturnStatement(ReturnStatement node) =>
10528 new ReturnStatement( 10129 new ReturnStatement(_mapToken(node.returnKeyword),
10529 _mapToken(node.returnKeyword), 10130 _cloneNode(node.expression), _mapToken(node.semicolon));
10530 _cloneNode(node.expression),
10531 _mapToken(node.semicolon));
10532 10131
10533 @override 10132 @override
10534 ScriptTag visitScriptTag(ScriptTag node) => 10133 ScriptTag visitScriptTag(ScriptTag node) =>
10535 new ScriptTag(_mapToken(node.scriptTag)); 10134 new ScriptTag(_mapToken(node.scriptTag));
10536 10135
10537 @override 10136 @override
10538 ShowCombinator visitShowCombinator(ShowCombinator node) => 10137 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
10539 new ShowCombinator(_mapToken(node.keyword), _cloneNodeList(node.shownNames )); 10138 _mapToken(node.keyword), _cloneNodeList(node.shownNames));
10540 10139
10541 @override 10140 @override
10542 SimpleFormalParameter 10141 SimpleFormalParameter visitSimpleFormalParameter(
10543 visitSimpleFormalParameter(SimpleFormalParameter node) => 10142 SimpleFormalParameter node) => new SimpleFormalParameter(
10544 new SimpleFormalParameter( 10143 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata),
10545 _cloneNode(node.documentationComment), 10144 _mapToken(node.keyword), _cloneNode(node.type),
10546 _cloneNodeList(node.metadata), 10145 _cloneNode(node.identifier));
10547 _mapToken(node.keyword),
10548 _cloneNode(node.type),
10549 _cloneNode(node.identifier));
10550 10146
10551 @override 10147 @override
10552 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) { 10148 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) {
10553 Token mappedToken = _mapToken(node.token); 10149 Token mappedToken = _mapToken(node.token);
10554 if (mappedToken == null) { 10150 if (mappedToken == null) {
10555 // This only happens for SimpleIdentifiers created by the parser as part 10151 // This only happens for SimpleIdentifiers created by the parser as part
10556 // of scanning documentation comments (the tokens for those identifiers 10152 // of scanning documentation comments (the tokens for those identifiers
10557 // are not in the original token stream and hence do not get copied). 10153 // are not in the original token stream and hence do not get copied).
10558 // This extra check can be removed if the scanner is changed to scan 10154 // This extra check can be removed if the scanner is changed to scan
10559 // documentation comments for the parser. 10155 // documentation comments for the parser.
(...skipping 20 matching lines...) Expand all
10580 @override 10176 @override
10581 StringInterpolation visitStringInterpolation(StringInterpolation node) { 10177 StringInterpolation visitStringInterpolation(StringInterpolation node) {
10582 StringInterpolation copy = 10178 StringInterpolation copy =
10583 new StringInterpolation(_cloneNodeList(node.elements)); 10179 new StringInterpolation(_cloneNodeList(node.elements));
10584 copy.propagatedType = node.propagatedType; 10180 copy.propagatedType = node.propagatedType;
10585 copy.staticType = node.staticType; 10181 copy.staticType = node.staticType;
10586 return copy; 10182 return copy;
10587 } 10183 }
10588 10184
10589 @override 10185 @override
10590 SuperConstructorInvocation 10186 SuperConstructorInvocation visitSuperConstructorInvocation(
10591 visitSuperConstructorInvocation(SuperConstructorInvocation node) { 10187 SuperConstructorInvocation node) {
10592 SuperConstructorInvocation copy = new SuperConstructorInvocation( 10188 SuperConstructorInvocation copy = new SuperConstructorInvocation(
10593 _mapToken(node.superKeyword), 10189 _mapToken(node.superKeyword), _mapToken(node.period),
10594 _mapToken(node.period), 10190 _cloneNode(node.constructorName), _cloneNode(node.argumentList));
10595 _cloneNode(node.constructorName),
10596 _cloneNode(node.argumentList));
10597 copy.staticElement = node.staticElement; 10191 copy.staticElement = node.staticElement;
10598 return copy; 10192 return copy;
10599 } 10193 }
10600 10194
10601 @override 10195 @override
10602 SuperExpression visitSuperExpression(SuperExpression node) { 10196 SuperExpression visitSuperExpression(SuperExpression node) {
10603 SuperExpression copy = new SuperExpression(_mapToken(node.superKeyword)); 10197 SuperExpression copy = new SuperExpression(_mapToken(node.superKeyword));
10604 copy.propagatedType = node.propagatedType; 10198 copy.propagatedType = node.propagatedType;
10605 copy.staticType = node.staticType; 10199 copy.staticType = node.staticType;
10606 return copy; 10200 return copy;
10607 } 10201 }
10608 10202
10609 @override 10203 @override
10610 SwitchCase visitSwitchCase(SwitchCase node) => 10204 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(
10611 new SwitchCase( 10205 _cloneNodeList(node.labels), _mapToken(node.keyword),
10612 _cloneNodeList(node.labels), 10206 _cloneNode(node.expression), _mapToken(node.colon),
10613 _mapToken(node.keyword), 10207 _cloneNodeList(node.statements));
10614 _cloneNode(node.expression),
10615 _mapToken(node.colon),
10616 _cloneNodeList(node.statements));
10617 10208
10618 @override 10209 @override
10619 SwitchDefault visitSwitchDefault(SwitchDefault node) => 10210 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(
10620 new SwitchDefault( 10211 _cloneNodeList(node.labels), _mapToken(node.keyword),
10621 _cloneNodeList(node.labels), 10212 _mapToken(node.colon), _cloneNodeList(node.statements));
10622 _mapToken(node.keyword),
10623 _mapToken(node.colon),
10624 _cloneNodeList(node.statements));
10625 10213
10626 @override 10214 @override
10627 SwitchStatement visitSwitchStatement(SwitchStatement node) => 10215 SwitchStatement visitSwitchStatement(SwitchStatement node) =>
10628 new SwitchStatement( 10216 new SwitchStatement(_mapToken(node.switchKeyword),
10629 _mapToken(node.switchKeyword), 10217 _mapToken(node.leftParenthesis), _cloneNode(node.expression),
10630 _mapToken(node.leftParenthesis), 10218 _mapToken(node.rightParenthesis), _mapToken(node.leftBracket),
10631 _cloneNode(node.expression), 10219 _cloneNodeList(node.members), _mapToken(node.rightBracket));
10632 _mapToken(node.rightParenthesis),
10633 _mapToken(node.leftBracket),
10634 _cloneNodeList(node.members),
10635 _mapToken(node.rightBracket));
10636 10220
10637 @override 10221 @override
10638 AstNode visitSymbolLiteral(SymbolLiteral node) { 10222 AstNode visitSymbolLiteral(SymbolLiteral node) {
10639 SymbolLiteral copy = 10223 SymbolLiteral copy = new SymbolLiteral(
10640 new SymbolLiteral(_mapToken(node.poundSign), _mapTokens(node.components) ); 10224 _mapToken(node.poundSign), _mapTokens(node.components));
10641 copy.propagatedType = node.propagatedType; 10225 copy.propagatedType = node.propagatedType;
10642 copy.staticType = node.staticType; 10226 copy.staticType = node.staticType;
10643 return copy; 10227 return copy;
10644 } 10228 }
10645 10229
10646 @override 10230 @override
10647 ThisExpression visitThisExpression(ThisExpression node) { 10231 ThisExpression visitThisExpression(ThisExpression node) {
10648 ThisExpression copy = new ThisExpression(_mapToken(node.thisKeyword)); 10232 ThisExpression copy = new ThisExpression(_mapToken(node.thisKeyword));
10649 copy.propagatedType = node.propagatedType; 10233 copy.propagatedType = node.propagatedType;
10650 copy.staticType = node.staticType; 10234 copy.staticType = node.staticType;
10651 return copy; 10235 return copy;
10652 } 10236 }
10653 10237
10654 @override 10238 @override
10655 ThrowExpression visitThrowExpression(ThrowExpression node) { 10239 ThrowExpression visitThrowExpression(ThrowExpression node) {
10656 ThrowExpression copy = 10240 ThrowExpression copy = new ThrowExpression(
10657 new ThrowExpression(_mapToken(node.throwKeyword), _cloneNode(node.expres sion)); 10241 _mapToken(node.throwKeyword), _cloneNode(node.expression));
10658 copy.propagatedType = node.propagatedType; 10242 copy.propagatedType = node.propagatedType;
10659 copy.staticType = node.staticType; 10243 copy.staticType = node.staticType;
10660 return copy; 10244 return copy;
10661 } 10245 }
10662 10246
10663 @override 10247 @override
10664 TopLevelVariableDeclaration 10248 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(
10665 visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => 10249 TopLevelVariableDeclaration node) => new TopLevelVariableDeclaration(
10666 new TopLevelVariableDeclaration( 10250 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata),
10667 _cloneNode(node.documentationComment), 10251 _cloneNode(node.variables), _mapToken(node.semicolon));
10668 _cloneNodeList(node.metadata),
10669 _cloneNode(node.variables),
10670 _mapToken(node.semicolon));
10671 10252
10672 @override 10253 @override
10673 TryStatement visitTryStatement(TryStatement node) => 10254 TryStatement visitTryStatement(TryStatement node) => new TryStatement(
10674 new TryStatement( 10255 _mapToken(node.tryKeyword), _cloneNode(node.body),
10675 _mapToken(node.tryKeyword), 10256 _cloneNodeList(node.catchClauses), _mapToken(node.finallyKeyword),
10676 _cloneNode(node.body), 10257 _cloneNode(node.finallyBlock));
10677 _cloneNodeList(node.catchClauses),
10678 _mapToken(node.finallyKeyword),
10679 _cloneNode(node.finallyBlock));
10680 10258
10681 @override 10259 @override
10682 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => 10260 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) =>
10683 new TypeArgumentList( 10261 new TypeArgumentList(_mapToken(node.leftBracket),
10684 _mapToken(node.leftBracket), 10262 _cloneNodeList(node.arguments), _mapToken(node.rightBracket));
10685 _cloneNodeList(node.arguments),
10686 _mapToken(node.rightBracket));
10687 10263
10688 @override 10264 @override
10689 TypeName visitTypeName(TypeName node) { 10265 TypeName visitTypeName(TypeName node) {
10690 TypeName copy = 10266 TypeName copy =
10691 new TypeName(_cloneNode(node.name), _cloneNode(node.typeArguments)); 10267 new TypeName(_cloneNode(node.name), _cloneNode(node.typeArguments));
10692 copy.type = node.type; 10268 copy.type = node.type;
10693 return copy; 10269 return copy;
10694 } 10270 }
10695 10271
10696 @override 10272 @override
10697 TypeParameter visitTypeParameter(TypeParameter node) => 10273 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(
10698 new TypeParameter( 10274 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata),
10699 _cloneNode(node.documentationComment), 10275 _cloneNode(node.name), _mapToken(node.extendsKeyword),
10700 _cloneNodeList(node.metadata), 10276 _cloneNode(node.bound));
10701 _cloneNode(node.name),
10702 _mapToken(node.extendsKeyword),
10703 _cloneNode(node.bound));
10704 10277
10705 @override 10278 @override
10706 TypeParameterList visitTypeParameterList(TypeParameterList node) => 10279 TypeParameterList visitTypeParameterList(TypeParameterList node) =>
10707 new TypeParameterList( 10280 new TypeParameterList(_mapToken(node.leftBracket),
10708 _mapToken(node.leftBracket), 10281 _cloneNodeList(node.typeParameters), _mapToken(node.rightBracket));
10709 _cloneNodeList(node.typeParameters),
10710 _mapToken(node.rightBracket));
10711 10282
10712 @override 10283 @override
10713 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => 10284 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) =>
10714 new VariableDeclaration( 10285 new VariableDeclaration(null, _cloneNodeList(node.metadata),
10715 null, 10286 _cloneNode(node.name), _mapToken(node.equals),
10716 _cloneNodeList(node.metadata),
10717 _cloneNode(node.name),
10718 _mapToken(node.equals),
10719 _cloneNode(node.initializer)); 10287 _cloneNode(node.initializer));
10720 10288
10721 @override 10289 @override
10722 VariableDeclarationList 10290 VariableDeclarationList visitVariableDeclarationList(
10723 visitVariableDeclarationList(VariableDeclarationList node) => 10291 VariableDeclarationList node) => new VariableDeclarationList(null,
10724 new VariableDeclarationList( 10292 _cloneNodeList(node.metadata), _mapToken(node.keyword),
10725 null, 10293 _cloneNode(node.type), _cloneNodeList(node.variables));
10726 _cloneNodeList(node.metadata),
10727 _mapToken(node.keyword),
10728 _cloneNode(node.type),
10729 _cloneNodeList(node.variables));
10730 10294
10731 @override 10295 @override
10732 VariableDeclarationStatement 10296 VariableDeclarationStatement visitVariableDeclarationStatement(
10733 visitVariableDeclarationStatement(VariableDeclarationStatement node) => 10297 VariableDeclarationStatement node) => new VariableDeclarationStatement(
10734 new VariableDeclarationStatement( 10298 _cloneNode(node.variables), _mapToken(node.semicolon));
10735 _cloneNode(node.variables),
10736 _mapToken(node.semicolon));
10737 10299
10738 @override 10300 @override
10739 WhileStatement visitWhileStatement(WhileStatement node) => 10301 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
10740 new WhileStatement( 10302 _mapToken(node.whileKeyword), _mapToken(node.leftParenthesis),
10741 _mapToken(node.whileKeyword), 10303 _cloneNode(node.condition), _mapToken(node.rightParenthesis),
10742 _mapToken(node.leftParenthesis), 10304 _cloneNode(node.body));
10743 _cloneNode(node.condition),
10744 _mapToken(node.rightParenthesis),
10745 _cloneNode(node.body));
10746 10305
10747 @override 10306 @override
10748 WithClause visitWithClause(WithClause node) => 10307 WithClause visitWithClause(WithClause node) => new WithClause(
10749 new WithClause(_mapToken(node.withKeyword), _cloneNodeList(node.mixinTypes )); 10308 _mapToken(node.withKeyword), _cloneNodeList(node.mixinTypes));
10750 10309
10751 @override 10310 @override
10752 YieldStatement visitYieldStatement(YieldStatement node) => 10311 YieldStatement visitYieldStatement(YieldStatement node) => new YieldStatement(
10753 new YieldStatement( 10312 _mapToken(node.yieldKeyword), _mapToken(node.star),
10754 _mapToken(node.yieldKeyword), 10313 _cloneNode(node.expression), _mapToken(node.semicolon));
10755 _mapToken(node.star),
10756 _cloneNode(node.expression),
10757 _mapToken(node.semicolon));
10758 10314
10759 AstNode _cloneNode(AstNode node) { 10315 AstNode _cloneNode(AstNode node) {
10760 if (node == null) { 10316 if (node == null) {
10761 return null; 10317 return null;
10762 } 10318 }
10763 if (identical(node, _oldNode)) { 10319 if (identical(node, _oldNode)) {
10764 return _newNode; 10320 return _newNode;
10765 } 10321 }
10766 return node.accept(this) as AstNode; 10322 return node.accept(this) as AstNode;
10767 } 10323 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
10842 * If this expression is both in a getter and setter context, the 10398 * If this expression is both in a getter and setter context, the
10843 * [AuxiliaryElements] will be set to hold onto the static and propagated 10399 * [AuxiliaryElements] will be set to hold onto the static and propagated
10844 * information. The auxiliary element will hold onto the elements from the 10400 * information. The auxiliary element will hold onto the elements from the
10845 * getter context. 10401 * getter context.
10846 */ 10402 */
10847 AuxiliaryElements auxiliaryElements = null; 10403 AuxiliaryElements auxiliaryElements = null;
10848 10404
10849 /** 10405 /**
10850 * Initialize a newly created index expression. 10406 * Initialize a newly created index expression.
10851 */ 10407 */
10852 IndexExpression.forCascade(this.period, this.leftBracket, Expression index, 10408 IndexExpression.forCascade(
10853 this.rightBracket) { 10409 this.period, this.leftBracket, Expression index, this.rightBracket) {
10854 _index = _becomeParentOf(index); 10410 _index = _becomeParentOf(index);
10855 } 10411 }
10856 10412
10857 /** 10413 /**
10858 * Initialize a newly created index expression. 10414 * Initialize a newly created index expression.
10859 */ 10415 */
10860 IndexExpression.forTarget(Expression target, this.leftBracket, 10416 IndexExpression.forTarget(Expression target, this.leftBracket,
10861 Expression index, this.rightBracket) { 10417 Expression index, this.rightBracket) {
10862 _target = _becomeParentOf(target); 10418 _target = _becomeParentOf(target);
10863 _index = _becomeParentOf(index); 10419 _index = _becomeParentOf(index);
(...skipping 17 matching lines...) Expand all
10881 MethodElement get bestElement { 10437 MethodElement get bestElement {
10882 MethodElement element = propagatedElement; 10438 MethodElement element = propagatedElement;
10883 if (element == null) { 10439 if (element == null) {
10884 element = staticElement; 10440 element = staticElement;
10885 } 10441 }
10886 return element; 10442 return element;
10887 } 10443 }
10888 10444
10889 @override 10445 @override
10890 Iterable get childEntities => new ChildEntities() 10446 Iterable get childEntities => new ChildEntities()
10891 ..add(_target) 10447 ..add(_target)
10892 ..add(period) 10448 ..add(period)
10893 ..add(leftBracket) 10449 ..add(leftBracket)
10894 ..add(_index) 10450 ..add(_index)
10895 ..add(rightBracket); 10451 ..add(rightBracket);
10896 10452
10897 @override 10453 @override
10898 Token get endToken => rightBracket; 10454 Token get endToken => rightBracket;
10899 10455
10900 /** 10456 /**
10901 * Return the expression used to compute the index. 10457 * Return the expression used to compute the index.
10902 */ 10458 */
10903 Expression get index => _index; 10459 Expression get index => _index;
10904 10460
10905 /** 10461 /**
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
11123 */ 10679 */
11124 void set argumentList(ArgumentList argumentList) { 10680 void set argumentList(ArgumentList argumentList) {
11125 _argumentList = _becomeParentOf(argumentList); 10681 _argumentList = _becomeParentOf(argumentList);
11126 } 10682 }
11127 10683
11128 @override 10684 @override
11129 Token get beginToken => keyword; 10685 Token get beginToken => keyword;
11130 10686
11131 @override 10687 @override
11132 Iterable get childEntities => new ChildEntities() 10688 Iterable get childEntities => new ChildEntities()
11133 ..add(keyword) 10689 ..add(keyword)
11134 ..add(_constructorName) 10690 ..add(_constructorName)
11135 ..add(_argumentList); 10691 ..add(_argumentList);
11136 10692
11137 /** 10693 /**
11138 * Return the name of the constructor to be invoked. 10694 * Return the name of the constructor to be invoked.
11139 */ 10695 */
11140 ConstructorName get constructorName => _constructorName; 10696 ConstructorName get constructorName => _constructorName;
11141 10697
11142 /** 10698 /**
11143 * Set the name of the constructor to be invoked to the given [name]. 10699 * Set the name of the constructor to be invoked to the given [name].
11144 */ 10700 */
11145 void set constructorName(ConstructorName name) { 10701 void set constructorName(ConstructorName name) {
11146 _constructorName = _becomeParentOf(name); 10702 _constructorName = _becomeParentOf(name);
11147 } 10703 }
11148 10704
11149 @override 10705 @override
11150 Token get endToken => _argumentList.endToken; 10706 Token get endToken => _argumentList.endToken;
11151 10707
11152 /** 10708 /**
11153 * Return `true` if this creation expression is used to invoke a constant 10709 * Return `true` if this creation expression is used to invoke a constant
11154 * constructor. 10710 * constructor.
11155 */ 10711 */
11156 bool get isConst => 10712 bool get isConst => keyword is KeywordToken &&
11157 keyword is KeywordToken && (keyword as KeywordToken).keyword == Keyword.CO NST; 10713 (keyword as KeywordToken).keyword == Keyword.CONST;
11158 10714
11159 @override 10715 @override
11160 int get precedence => 16; 10716 int get precedence => 16;
11161 10717
11162 @override 10718 @override
11163 accept(AstVisitor visitor) => visitor.visitInstanceCreationExpression(this); 10719 accept(AstVisitor visitor) => visitor.visitInstanceCreationExpression(this);
11164 10720
11165 @override 10721 @override
11166 void visitChildren(AstVisitor visitor) { 10722 void visitChildren(AstVisitor visitor) {
11167 _safelyVisitChild(_constructorName, visitor); 10723 _safelyVisitChild(_constructorName, visitor);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
11217 } 10773 }
11218 } 10774 }
11219 10775
11220 /** 10776 /**
11221 * A node within a [StringInterpolation]. 10777 * A node within a [StringInterpolation].
11222 * 10778 *
11223 * > interpolationElement ::= 10779 * > interpolationElement ::=
11224 * > [InterpolationExpression] 10780 * > [InterpolationExpression]
11225 * > | [InterpolationString] 10781 * > | [InterpolationString]
11226 */ 10782 */
11227 abstract class InterpolationElement extends AstNode { 10783 abstract class InterpolationElement extends AstNode {}
11228 }
11229 10784
11230 /** 10785 /**
11231 * An expression embedded in a string interpolation. 10786 * An expression embedded in a string interpolation.
11232 * 10787 *
11233 * > interpolationExpression ::= 10788 * > interpolationExpression ::=
11234 * > '$' [SimpleIdentifier] 10789 * > '$' [SimpleIdentifier]
11235 * > | '$' '{' [Expression] '}' 10790 * > | '$' '{' [Expression] '}'
11236 */ 10791 */
11237 class InterpolationExpression extends InterpolationElement { 10792 class InterpolationExpression extends InterpolationElement {
11238 /** 10793 /**
(...skipping 10 matching lines...) Expand all
11249 10804
11250 /** 10805 /**
11251 * The right curly bracket, or `null` if the expression is an identifier 10806 * The right curly bracket, or `null` if the expression is an identifier
11252 * without brackets. 10807 * without brackets.
11253 */ 10808 */
11254 Token rightBracket; 10809 Token rightBracket;
11255 10810
11256 /** 10811 /**
11257 * Initialize a newly created interpolation expression. 10812 * Initialize a newly created interpolation expression.
11258 */ 10813 */
11259 InterpolationExpression(this.leftBracket, Expression expression, 10814 InterpolationExpression(
11260 this.rightBracket) { 10815 this.leftBracket, Expression expression, this.rightBracket) {
11261 _expression = _becomeParentOf(expression); 10816 _expression = _becomeParentOf(expression);
11262 } 10817 }
11263 10818
11264 @override 10819 @override
11265 Token get beginToken => leftBracket; 10820 Token get beginToken => leftBracket;
11266 10821
11267 @override 10822 @override
11268 Iterable get childEntities => new ChildEntities() 10823 Iterable get childEntities => new ChildEntities()
11269 ..add(leftBracket) 10824 ..add(leftBracket)
11270 ..add(_expression) 10825 ..add(_expression)
11271 ..add(rightBracket); 10826 ..add(rightBracket);
11272 10827
11273 @override 10828 @override
11274 Token get endToken { 10829 Token get endToken {
11275 if (rightBracket != null) { 10830 if (rightBracket != null) {
11276 return rightBracket; 10831 return rightBracket;
11277 } 10832 }
11278 return _expression.endToken; 10833 return _expression.endToken;
11279 } 10834 }
11280 10835
11281 /** 10836 /**
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
11377 * Set the value of the literal to the given [string]. 10932 * Set the value of the literal to the given [string].
11378 */ 10933 */
11379 void set value(String string) { 10934 void set value(String string) {
11380 _value = string; 10935 _value = string;
11381 } 10936 }
11382 10937
11383 @override 10938 @override
11384 accept(AstVisitor visitor) => visitor.visitInterpolationString(this); 10939 accept(AstVisitor visitor) => visitor.visitInterpolationString(this);
11385 10940
11386 @override 10941 @override
11387 void visitChildren(AstVisitor visitor) { 10942 void visitChildren(AstVisitor visitor) {}
11388 }
11389 } 10943 }
11390 10944
11391 /** 10945 /**
11392 * An is expression. 10946 * An is expression.
11393 * 10947 *
11394 * > isExpression ::= 10948 * > isExpression ::=
11395 * > [Expression] 'is' '!'? [TypeName] 10949 * > [Expression] 'is' '!'? [TypeName]
11396 */ 10950 */
11397 class IsExpression extends Expression { 10951 class IsExpression extends Expression {
11398 /** 10952 /**
(...skipping 13 matching lines...) Expand all
11412 10966
11413 /** 10967 /**
11414 * The name of the type being tested for. 10968 * The name of the type being tested for.
11415 */ 10969 */
11416 TypeName _type; 10970 TypeName _type;
11417 10971
11418 /** 10972 /**
11419 * Initialize a newly created is expression. The [notOperator] can be `null` 10973 * Initialize a newly created is expression. The [notOperator] can be `null`
11420 * if the sense of the test is not negated. 10974 * if the sense of the test is not negated.
11421 */ 10975 */
11422 IsExpression(Expression expression, this.isOperator, this.notOperator, 10976 IsExpression(
11423 TypeName type) { 10977 Expression expression, this.isOperator, this.notOperator, TypeName type) {
11424 _expression = _becomeParentOf(expression); 10978 _expression = _becomeParentOf(expression);
11425 _type = _becomeParentOf(type); 10979 _type = _becomeParentOf(type);
11426 } 10980 }
11427 10981
11428 @override 10982 @override
11429 Token get beginToken => _expression.beginToken; 10983 Token get beginToken => _expression.beginToken;
11430 10984
11431 @override 10985 @override
11432 Iterable get childEntities => new ChildEntities() 10986 Iterable get childEntities => new ChildEntities()
11433 ..add(_expression) 10987 ..add(_expression)
11434 ..add(isOperator) 10988 ..add(isOperator)
11435 ..add(notOperator) 10989 ..add(notOperator)
11436 ..add(_type); 10990 ..add(_type);
11437 10991
11438 @override 10992 @override
11439 Token get endToken => _type.endToken; 10993 Token get endToken => _type.endToken;
11440 10994
11441 /** 10995 /**
11442 * Return the expression used to compute the value whose type is being tested. 10996 * Return the expression used to compute the value whose type is being tested.
11443 */ 10997 */
11444 Expression get expression => _expression; 10998 Expression get expression => _expression;
11445 10999
11446 /** 11000 /**
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
11498 */ 11052 */
11499 Label(SimpleIdentifier label, this.colon) { 11053 Label(SimpleIdentifier label, this.colon) {
11500 _label = _becomeParentOf(label); 11054 _label = _becomeParentOf(label);
11501 } 11055 }
11502 11056
11503 @override 11057 @override
11504 Token get beginToken => _label.beginToken; 11058 Token get beginToken => _label.beginToken;
11505 11059
11506 @override 11060 @override
11507 Iterable get childEntities => new ChildEntities() 11061 Iterable get childEntities => new ChildEntities()
11508 ..add(_label) 11062 ..add(_label)
11509 ..add(colon); 11063 ..add(colon);
11510 11064
11511 @override 11065 @override
11512 Token get endToken => colon; 11066 Token get endToken => colon;
11513 11067
11514 /** 11068 /**
11515 * Return the label being associated with the statement. 11069 * Return the label being associated with the statement.
11516 */ 11070 */
11517 SimpleIdentifier get label => _label; 11071 SimpleIdentifier get label => _label;
11518 11072
11519 /** 11073 /**
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
11560 @override 11114 @override
11561 Token get beginToken { 11115 Token get beginToken {
11562 if (!_labels.isEmpty) { 11116 if (!_labels.isEmpty) {
11563 return _labels.beginToken; 11117 return _labels.beginToken;
11564 } 11118 }
11565 return _statement.beginToken; 11119 return _statement.beginToken;
11566 } 11120 }
11567 11121
11568 @override 11122 @override
11569 Iterable get childEntities => new ChildEntities() 11123 Iterable get childEntities => new ChildEntities()
11570 ..addAll(_labels) 11124 ..addAll(_labels)
11571 ..add(_statement); 11125 ..add(_statement);
11572 11126
11573 @override 11127 @override
11574 Token get endToken => _statement.endToken; 11128 Token get endToken => _statement.endToken;
11575 11129
11576 /** 11130 /**
11577 * Return the labels being associated with the statement. 11131 * Return the labels being associated with the statement.
11578 */ 11132 */
11579 NodeList<Label> get labels => _labels; 11133 NodeList<Label> get labels => _labels;
11580 11134
11581 /** 11135 /**
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
11632 * corresponding attribute. 11186 * corresponding attribute.
11633 */ 11187 */
11634 LibraryDirective(Comment comment, List<Annotation> metadata, 11188 LibraryDirective(Comment comment, List<Annotation> metadata,
11635 this.libraryKeyword, LibraryIdentifier name, this.semicolon) 11189 this.libraryKeyword, LibraryIdentifier name, this.semicolon)
11636 : super(comment, metadata) { 11190 : super(comment, metadata) {
11637 _name = _becomeParentOf(name); 11191 _name = _becomeParentOf(name);
11638 } 11192 }
11639 11193
11640 @override 11194 @override
11641 Iterable get childEntities => super._childEntities 11195 Iterable get childEntities => super._childEntities
11642 ..add(libraryKeyword) 11196 ..add(libraryKeyword)
11643 ..add(_name) 11197 ..add(_name)
11644 ..add(semicolon); 11198 ..add(semicolon);
11645 11199
11646 @override 11200 @override
11647 Token get endToken => semicolon; 11201 Token get endToken => semicolon;
11648 11202
11649 @override 11203 @override
11650 Token get firstTokenAfterCommentAndMetadata => libraryKeyword; 11204 Token get firstTokenAfterCommentAndMetadata => libraryKeyword;
11651 11205
11652 @override 11206 @override
11653 Token get keyword => libraryKeyword; 11207 Token get keyword => libraryKeyword;
11654 11208
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
11804 return typeArguments.beginToken; 11358 return typeArguments.beginToken;
11805 } 11359 }
11806 return leftBracket; 11360 return leftBracket;
11807 } 11361 }
11808 11362
11809 /** 11363 /**
11810 * TODO(paulberry): add commas. 11364 * TODO(paulberry): add commas.
11811 */ 11365 */
11812 @override 11366 @override
11813 Iterable get childEntities => super._childEntities 11367 Iterable get childEntities => super._childEntities
11814 ..add(leftBracket) 11368 ..add(leftBracket)
11815 ..addAll(_elements) 11369 ..addAll(_elements)
11816 ..add(rightBracket); 11370 ..add(rightBracket);
11817 11371
11818 /** 11372 /**
11819 * Return the expressions used to compute the elements of the list. 11373 * Return the expressions used to compute the elements of the list.
11820 */ 11374 */
11821 NodeList<Expression> get elements => _elements; 11375 NodeList<Expression> get elements => _elements;
11822 11376
11823 @override 11377 @override
11824 Token get endToken => rightBracket; 11378 Token get endToken => rightBracket;
11825 11379
11826 @override 11380 @override
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
11894 return typeArguments.beginToken; 11448 return typeArguments.beginToken;
11895 } 11449 }
11896 return leftBracket; 11450 return leftBracket;
11897 } 11451 }
11898 11452
11899 /** 11453 /**
11900 * TODO(paulberry): add commas. 11454 * TODO(paulberry): add commas.
11901 */ 11455 */
11902 @override 11456 @override
11903 Iterable get childEntities => super._childEntities 11457 Iterable get childEntities => super._childEntities
11904 ..add(leftBracket) 11458 ..add(leftBracket)
11905 ..addAll(entries) 11459 ..addAll(entries)
11906 ..add(rightBracket); 11460 ..add(rightBracket);
11907 11461
11908 @override 11462 @override
11909 Token get endToken => rightBracket; 11463 Token get endToken => rightBracket;
11910 11464
11911 /** 11465 /**
11912 * Return the entries in the map. 11466 * Return the entries in the map.
11913 */ 11467 */
11914 NodeList<MapLiteralEntry> get entries => _entries; 11468 NodeList<MapLiteralEntry> get entries => _entries;
11915 11469
11916 @override 11470 @override
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
11951 MapLiteralEntry(Expression key, this.separator, Expression value) { 11505 MapLiteralEntry(Expression key, this.separator, Expression value) {
11952 _key = _becomeParentOf(key); 11506 _key = _becomeParentOf(key);
11953 _value = _becomeParentOf(value); 11507 _value = _becomeParentOf(value);
11954 } 11508 }
11955 11509
11956 @override 11510 @override
11957 Token get beginToken => _key.beginToken; 11511 Token get beginToken => _key.beginToken;
11958 11512
11959 @override 11513 @override
11960 Iterable get childEntities => new ChildEntities() 11514 Iterable get childEntities => new ChildEntities()
11961 ..add(_key) 11515 ..add(_key)
11962 ..add(separator) 11516 ..add(separator)
11963 ..add(_value); 11517 ..add(_value);
11964 11518
11965 @override 11519 @override
11966 Token get endToken => _value.endToken; 11520 Token get endToken => _value.endToken;
11967 11521
11968 /** 11522 /**
11969 * Return the expression computing the key with which the value will be 11523 * Return the expression computing the key with which the value will be
11970 * associated. 11524 * associated.
11971 */ 11525 */
11972 Expression get key => _key; 11526 Expression get key => _key;
11973 11527
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
12092 11646
12093 /** 11647 /**
12094 * Set the body of the method to the given [functionBody]. 11648 * Set the body of the method to the given [functionBody].
12095 */ 11649 */
12096 void set body(FunctionBody functionBody) { 11650 void set body(FunctionBody functionBody) {
12097 _body = _becomeParentOf(functionBody); 11651 _body = _becomeParentOf(functionBody);
12098 } 11652 }
12099 11653
12100 @override 11654 @override
12101 Iterable get childEntities => super._childEntities 11655 Iterable get childEntities => super._childEntities
12102 ..add(externalKeyword) 11656 ..add(externalKeyword)
12103 ..add(modifierKeyword) 11657 ..add(modifierKeyword)
12104 ..add(_returnType) 11658 ..add(_returnType)
12105 ..add(propertyKeyword) 11659 ..add(propertyKeyword)
12106 ..add(operatorKeyword) 11660 ..add(operatorKeyword)
12107 ..add(_name) 11661 ..add(_name)
12108 ..add(_parameters) 11662 ..add(_parameters)
12109 ..add(_body); 11663 ..add(_body);
12110 11664
12111 /** 11665 /**
12112 * Return the element associated with this method, or `null` if the AST 11666 * Return the element associated with this method, or `null` if the AST
12113 * structure has not been resolved. The element can either be a 11667 * structure has not been resolved. The element can either be a
12114 * [MethodElement], if this represents the declaration of a normal method, or 11668 * [MethodElement], if this represents the declaration of a normal method, or
12115 * a [PropertyAccessorElement] if this represents the declaration of either a 11669 * a [PropertyAccessorElement] if this represents the declaration of either a
12116 * getter or a setter. 11670 * getter or a setter.
12117 */ 11671 */
12118 @override 11672 @override
12119 ExecutableElement get element => 11673 ExecutableElement get element =>
(...skipping 21 matching lines...) Expand all
12141 */ 11695 */
12142 bool get isAbstract { 11696 bool get isAbstract {
12143 FunctionBody body = _body; 11697 FunctionBody body = _body;
12144 return externalKeyword == null && 11698 return externalKeyword == null &&
12145 (body is EmptyFunctionBody && !body.semicolon.isSynthetic); 11699 (body is EmptyFunctionBody && !body.semicolon.isSynthetic);
12146 } 11700 }
12147 11701
12148 /** 11702 /**
12149 * Return `true` if this method declares a getter. 11703 * Return `true` if this method declares a getter.
12150 */ 11704 */
12151 bool get isGetter => 11705 bool get isGetter => propertyKeyword != null &&
12152 propertyKeyword != null && 11706 (propertyKeyword as KeywordToken).keyword == Keyword.GET;
12153 (propertyKeyword as KeywordToken).keyword == Keyword.GET;
12154 11707
12155 /** 11708 /**
12156 * Return `true` if this method declares an operator. 11709 * Return `true` if this method declares an operator.
12157 */ 11710 */
12158 bool get isOperator => operatorKeyword != null; 11711 bool get isOperator => operatorKeyword != null;
12159 11712
12160 /** 11713 /**
12161 * Return `true` if this method declares a setter. 11714 * Return `true` if this method declares a setter.
12162 */ 11715 */
12163 bool get isSetter => 11716 bool get isSetter => propertyKeyword != null &&
12164 propertyKeyword != null && 11717 (propertyKeyword as KeywordToken).keyword == Keyword.SET;
12165 (propertyKeyword as KeywordToken).keyword == Keyword.SET;
12166 11718
12167 /** 11719 /**
12168 * Return `true` if this method is declared to be a static method. 11720 * Return `true` if this method is declared to be a static method.
12169 */ 11721 */
12170 bool get isStatic => 11722 bool get isStatic => modifierKeyword != null &&
12171 modifierKeyword != null && 11723 (modifierKeyword as KeywordToken).keyword == Keyword.STATIC;
12172 (modifierKeyword as KeywordToken).keyword == Keyword.STATIC;
12173 11724
12174 /** 11725 /**
12175 * Return the name of the method. 11726 * Return the name of the method.
12176 */ 11727 */
12177 SimpleIdentifier get name => _name; 11728 SimpleIdentifier get name => _name;
12178 11729
12179 /** 11730 /**
12180 * Set the name of the method to the given [identifier]. 11731 * Set the name of the method to the given [identifier].
12181 */ 11732 */
12182 void set name(SimpleIdentifier identifier) { 11733 void set name(SimpleIdentifier identifier) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
12283 if (_target != null) { 11834 if (_target != null) {
12284 return _target.beginToken; 11835 return _target.beginToken;
12285 } else if (period != null) { 11836 } else if (period != null) {
12286 return period; 11837 return period;
12287 } 11838 }
12288 return _methodName.beginToken; 11839 return _methodName.beginToken;
12289 } 11840 }
12290 11841
12291 @override 11842 @override
12292 Iterable get childEntities => new ChildEntities() 11843 Iterable get childEntities => new ChildEntities()
12293 ..add(_target) 11844 ..add(_target)
12294 ..add(period) 11845 ..add(period)
12295 ..add(_methodName) 11846 ..add(_methodName)
12296 ..add(_argumentList); 11847 ..add(_argumentList);
12297 11848
12298 @override 11849 @override
12299 Token get endToken => _argumentList.endToken; 11850 Token get endToken => _argumentList.endToken;
12300 11851
12301 /** 11852 /**
12302 * Return `true` if this expression is cascaded. If it is, then the target of 11853 * Return `true` if this expression is cascaded. If it is, then the target of
12303 * this expression is not stored locally but is stored in the nearest ancestor 11854 * this expression is not stored locally but is stored in the nearest ancestor
12304 * that is a [CascadeExpression]. 11855 * that is a [CascadeExpression].
12305 */ 11856 */
12306 bool get isCascaded => 11857 bool get isCascaded =>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
12394 NamedExpression(Label name, Expression expression) { 11945 NamedExpression(Label name, Expression expression) {
12395 _name = _becomeParentOf(name); 11946 _name = _becomeParentOf(name);
12396 _expression = _becomeParentOf(expression); 11947 _expression = _becomeParentOf(expression);
12397 } 11948 }
12398 11949
12399 @override 11950 @override
12400 Token get beginToken => _name.beginToken; 11951 Token get beginToken => _name.beginToken;
12401 11952
12402 @override 11953 @override
12403 Iterable get childEntities => new ChildEntities() 11954 Iterable get childEntities => new ChildEntities()
12404 ..add(_name) 11955 ..add(_name)
12405 ..add(_expression); 11956 ..add(_expression);
12406 11957
12407 /** 11958 /**
12408 * Return the element representing the parameter being named by this 11959 * Return the element representing the parameter being named by this
12409 * expression, or `null` if the AST structure has not been resolved or if 11960 * expression, or `null` if the AST structure has not been resolved or if
12410 * there is no parameter with the same name as this expression. 11961 * there is no parameter with the same name as this expression.
12411 */ 11962 */
12412 ParameterElement get element { 11963 ParameterElement get element {
12413 Element element = _name.label.staticElement; 11964 Element element = _name.label.staticElement;
12414 if (element is ParameterElement) { 11965 if (element is ParameterElement) {
12415 return element; 11966 return element;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
12530 */ 12081 */
12531 NativeClause(this.nativeKeyword, StringLiteral name) { 12082 NativeClause(this.nativeKeyword, StringLiteral name) {
12532 _name = _becomeParentOf(name); 12083 _name = _becomeParentOf(name);
12533 } 12084 }
12534 12085
12535 @override 12086 @override
12536 Token get beginToken => nativeKeyword; 12087 Token get beginToken => nativeKeyword;
12537 12088
12538 @override 12089 @override
12539 Iterable get childEntities => new ChildEntities() 12090 Iterable get childEntities => new ChildEntities()
12540 ..add(nativeKeyword) 12091 ..add(nativeKeyword)
12541 ..add(_name); 12092 ..add(_name);
12542 12093
12543 @override 12094 @override
12544 Token get endToken => _name.endToken; 12095 Token get endToken => _name.endToken;
12545 12096
12546 /** 12097 /**
12547 * Get the token representing the 'native' keyword. 12098 * Get the token representing the 'native' keyword.
12548 */ 12099 */
12549 @deprecated // Use "this.nativeKeyword" 12100 @deprecated // Use "this.nativeKeyword"
12550 Token get keyword => nativeKeyword; 12101 Token get keyword => nativeKeyword;
12551 12102
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
12600 /** 12151 /**
12601 * The token representing the semicolon that marks the end of the function 12152 * The token representing the semicolon that marks the end of the function
12602 * body. 12153 * body.
12603 */ 12154 */
12604 Token semicolon; 12155 Token semicolon;
12605 12156
12606 /** 12157 /**
12607 * Initialize a newly created function body consisting of the 'native' token, 12158 * Initialize a newly created function body consisting of the 'native' token,
12608 * a string literal, and a semicolon. 12159 * a string literal, and a semicolon.
12609 */ 12160 */
12610 NativeFunctionBody(this.nativeKeyword, StringLiteral stringLiteral, 12161 NativeFunctionBody(
12611 this.semicolon) { 12162 this.nativeKeyword, StringLiteral stringLiteral, this.semicolon) {
12612 _stringLiteral = _becomeParentOf(stringLiteral); 12163 _stringLiteral = _becomeParentOf(stringLiteral);
12613 } 12164 }
12614 12165
12615 @override 12166 @override
12616 Token get beginToken => nativeKeyword; 12167 Token get beginToken => nativeKeyword;
12617 12168
12618 @override 12169 @override
12619 Iterable get childEntities => new ChildEntities() 12170 Iterable get childEntities => new ChildEntities()
12620 ..add(nativeKeyword) 12171 ..add(nativeKeyword)
12621 ..add(_stringLiteral) 12172 ..add(_stringLiteral)
12622 ..add(semicolon); 12173 ..add(semicolon);
12623 12174
12624 @override 12175 @override
12625 Token get endToken => semicolon; 12176 Token get endToken => semicolon;
12626 12177
12627 /** 12178 /**
12628 * Return the token representing 'native' that marks the start of the function 12179 * Return the token representing 'native' that marks the start of the function
12629 * body. 12180 * body.
12630 */ 12181 */
12631 @deprecated // Use "this.nativeKeyword" 12182 @deprecated // Use "this.nativeKeyword"
12632 Token get nativeToken => nativeKeyword; 12183 Token get nativeToken => nativeKeyword;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
12884 throw new NodeLocator_NodeFoundException(); 12435 throw new NodeLocator_NodeFoundException();
12885 } 12436 }
12886 return null; 12437 return null;
12887 } 12438 }
12888 } 12439 }
12889 12440
12890 /** 12441 /**
12891 * An exception used by [NodeLocator] to cancel visiting after a node has been 12442 * An exception used by [NodeLocator] to cancel visiting after a node has been
12892 * found. 12443 * found.
12893 */ 12444 */
12894 class NodeLocator_NodeFoundException extends RuntimeException { 12445 class NodeLocator_NodeFoundException extends RuntimeException {}
12895 }
12896 12446
12897 /** 12447 /**
12898 * An object that will replace one child node in an AST node with another node. 12448 * An object that will replace one child node in an AST node with another node.
12899 */ 12449 */
12900 class NodeReplacer implements AstVisitor<bool> { 12450 class NodeReplacer implements AstVisitor<bool> {
12901 /** 12451 /**
12902 * The node being replaced. 12452 * The node being replaced.
12903 */ 12453 */
12904 final AstNode _oldNode; 12454 final AstNode _oldNode;
12905 12455
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
13756 node.target = _newNode as Expression; 13306 node.target = _newNode as Expression;
13757 return true; 13307 return true;
13758 } else if (identical(node.propertyName, _oldNode)) { 13308 } else if (identical(node.propertyName, _oldNode)) {
13759 node.propertyName = _newNode as SimpleIdentifier; 13309 node.propertyName = _newNode as SimpleIdentifier;
13760 return true; 13310 return true;
13761 } 13311 }
13762 return visitNode(node); 13312 return visitNode(node);
13763 } 13313 }
13764 13314
13765 @override 13315 @override
13766 bool 13316 bool visitRedirectingConstructorInvocation(
13767 visitRedirectingConstructorInvocation(RedirectingConstructorInvocation nod e) { 13317 RedirectingConstructorInvocation node) {
13768 if (identical(node.constructorName, _oldNode)) { 13318 if (identical(node.constructorName, _oldNode)) {
13769 node.constructorName = _newNode as SimpleIdentifier; 13319 node.constructorName = _newNode as SimpleIdentifier;
13770 return true; 13320 return true;
13771 } else if (identical(node.argumentList, _oldNode)) { 13321 } else if (identical(node.argumentList, _oldNode)) {
13772 node.argumentList = _newNode as ArgumentList; 13322 node.argumentList = _newNode as ArgumentList;
13773 return true; 13323 return true;
13774 } 13324 }
13775 return visitNode(node); 13325 return visitNode(node);
13776 } 13326 }
13777 13327
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
14081 /** 13631 /**
14082 * The name of the parameter being declared. 13632 * The name of the parameter being declared.
14083 */ 13633 */
14084 SimpleIdentifier _identifier; 13634 SimpleIdentifier _identifier;
14085 13635
14086 /** 13636 /**
14087 * Initialize a newly created formal parameter. Either or both of the 13637 * Initialize a newly created formal parameter. Either or both of the
14088 * [comment] and [metadata] can be `null` if the parameter does not have the 13638 * [comment] and [metadata] can be `null` if the parameter does not have the
14089 * corresponding attribute. 13639 * corresponding attribute.
14090 */ 13640 */
14091 NormalFormalParameter(Comment comment, List<Annotation> metadata, 13641 NormalFormalParameter(
14092 SimpleIdentifier identifier) { 13642 Comment comment, List<Annotation> metadata, SimpleIdentifier identifier) {
14093 _comment = _becomeParentOf(comment); 13643 _comment = _becomeParentOf(comment);
14094 _metadata = new NodeList<Annotation>(this, metadata); 13644 _metadata = new NodeList<Annotation>(this, metadata);
14095 _identifier = _becomeParentOf(identifier); 13645 _identifier = _becomeParentOf(identifier);
14096 } 13646 }
14097 13647
14098 /** 13648 /**
14099 * Return the documentation comment associated with this parameter, or `null` 13649 * Return the documentation comment associated with this parameter, or `null`
14100 * if this parameter does not have a documentation comment associated with it. 13650 * if this parameter does not have a documentation comment associated with it.
14101 */ 13651 */
14102 Comment get documentationComment => _comment; 13652 Comment get documentationComment => _comment;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
14140 _metadata.clear(); 13690 _metadata.clear();
14141 _metadata.addAll(metadata); 13691 _metadata.addAll(metadata);
14142 } 13692 }
14143 13693
14144 /** 13694 /**
14145 * Return a list containing the comment and annotations associated with this 13695 * Return a list containing the comment and annotations associated with this
14146 * parameter, sorted in lexical order. 13696 * parameter, sorted in lexical order.
14147 */ 13697 */
14148 List<AstNode> get sortedCommentAndAnnotations { 13698 List<AstNode> get sortedCommentAndAnnotations {
14149 return <AstNode>[] 13699 return <AstNode>[]
14150 ..add(_comment) 13700 ..add(_comment)
14151 ..addAll(_metadata) 13701 ..addAll(_metadata)
14152 ..sort(AstNode.LEXICAL_ORDER); 13702 ..sort(AstNode.LEXICAL_ORDER);
14153 } 13703 }
14154 13704
14155 ChildEntities get _childEntities { 13705 ChildEntities get _childEntities {
14156 ChildEntities result = new ChildEntities(); 13706 ChildEntities result = new ChildEntities();
14157 if (_commentIsBeforeAnnotations()) { 13707 if (_commentIsBeforeAnnotations()) {
14158 result 13708 result
14159 ..add(_comment) 13709 ..add(_comment)
14160 ..addAll(_metadata); 13710 ..addAll(_metadata);
14161 } else { 13711 } else {
14162 result.addAll(sortedCommentAndAnnotations); 13712 result.addAll(sortedCommentAndAnnotations);
14163 } 13713 }
14164 return result; 13714 return result;
14165 } 13715 }
14166 13716
14167 @override 13717 @override
14168 void visitChildren(AstVisitor visitor) { 13718 void visitChildren(AstVisitor visitor) {
14169 // 13719 //
14170 // Note that subclasses are responsible for visiting the identifier because 13720 // Note that subclasses are responsible for visiting the identifier because
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
14245 Expression _expression; 13795 Expression _expression;
14246 13796
14247 /** 13797 /**
14248 * The right parenthesis. 13798 * The right parenthesis.
14249 */ 13799 */
14250 Token rightParenthesis; 13800 Token rightParenthesis;
14251 13801
14252 /** 13802 /**
14253 * Initialize a newly created parenthesized expression. 13803 * Initialize a newly created parenthesized expression.
14254 */ 13804 */
14255 ParenthesizedExpression(this.leftParenthesis, Expression expression, 13805 ParenthesizedExpression(
14256 this.rightParenthesis) { 13806 this.leftParenthesis, Expression expression, this.rightParenthesis) {
14257 _expression = _becomeParentOf(expression); 13807 _expression = _becomeParentOf(expression);
14258 } 13808 }
14259 13809
14260 @override 13810 @override
14261 Token get beginToken => leftParenthesis; 13811 Token get beginToken => leftParenthesis;
14262 13812
14263 @override 13813 @override
14264 Iterable get childEntities => new ChildEntities() 13814 Iterable get childEntities => new ChildEntities()
14265 ..add(leftParenthesis) 13815 ..add(leftParenthesis)
14266 ..add(_expression) 13816 ..add(_expression)
14267 ..add(rightParenthesis); 13817 ..add(rightParenthesis);
14268 13818
14269 @override 13819 @override
14270 Token get endToken => rightParenthesis; 13820 Token get endToken => rightParenthesis;
14271 13821
14272 /** 13822 /**
14273 * Return the expression within the parentheses. 13823 * Return the expression within the parentheses.
14274 */ 13824 */
14275 Expression get expression => _expression; 13825 Expression get expression => _expression;
14276 13826
14277 /** 13827 /**
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
14314 * Initialize a newly created part directive. Either or both of the [comment] 13864 * Initialize a newly created part directive. Either or both of the [comment]
14315 * and [metadata] can be `null` if the directive does not have the 13865 * and [metadata] can be `null` if the directive does not have the
14316 * corresponding attribute. 13866 * corresponding attribute.
14317 */ 13867 */
14318 PartDirective(Comment comment, List<Annotation> metadata, this.partKeyword, 13868 PartDirective(Comment comment, List<Annotation> metadata, this.partKeyword,
14319 StringLiteral partUri, this.semicolon) 13869 StringLiteral partUri, this.semicolon)
14320 : super(comment, metadata, partUri); 13870 : super(comment, metadata, partUri);
14321 13871
14322 @override 13872 @override
14323 Iterable get childEntities => super._childEntities 13873 Iterable get childEntities => super._childEntities
14324 ..add(partKeyword) 13874 ..add(partKeyword)
14325 ..add(_uri) 13875 ..add(_uri)
14326 ..add(semicolon); 13876 ..add(semicolon);
14327 13877
14328 @override 13878 @override
14329 Token get endToken => semicolon; 13879 Token get endToken => semicolon;
14330 13880
14331 @override 13881 @override
14332 Token get firstTokenAfterCommentAndMetadata => partKeyword; 13882 Token get firstTokenAfterCommentAndMetadata => partKeyword;
14333 13883
14334 @override 13884 @override
14335 Token get keyword => partKeyword; 13885 Token get keyword => partKeyword;
14336 13886
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
14388 * corresponding attribute. 13938 * corresponding attribute.
14389 */ 13939 */
14390 PartOfDirective(Comment comment, List<Annotation> metadata, this.partKeyword, 13940 PartOfDirective(Comment comment, List<Annotation> metadata, this.partKeyword,
14391 this.ofKeyword, LibraryIdentifier libraryName, this.semicolon) 13941 this.ofKeyword, LibraryIdentifier libraryName, this.semicolon)
14392 : super(comment, metadata) { 13942 : super(comment, metadata) {
14393 _libraryName = _becomeParentOf(libraryName); 13943 _libraryName = _becomeParentOf(libraryName);
14394 } 13944 }
14395 13945
14396 @override 13946 @override
14397 Iterable get childEntities => super._childEntities 13947 Iterable get childEntities => super._childEntities
14398 ..add(partKeyword) 13948 ..add(partKeyword)
14399 ..add(ofKeyword) 13949 ..add(ofKeyword)
14400 ..add(_libraryName) 13950 ..add(_libraryName)
14401 ..add(semicolon); 13951 ..add(semicolon);
14402 13952
14403 @override 13953 @override
14404 Token get endToken => semicolon; 13954 Token get endToken => semicolon;
14405 13955
14406 @override 13956 @override
14407 Token get firstTokenAfterCommentAndMetadata => partKeyword; 13957 Token get firstTokenAfterCommentAndMetadata => partKeyword;
14408 13958
14409 @override 13959 @override
14410 Token get keyword => partKeyword; 13960 Token get keyword => partKeyword;
14411 13961
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
14513 MethodElement get bestElement { 14063 MethodElement get bestElement {
14514 MethodElement element = propagatedElement; 14064 MethodElement element = propagatedElement;
14515 if (element == null) { 14065 if (element == null) {
14516 element = staticElement; 14066 element = staticElement;
14517 } 14067 }
14518 return element; 14068 return element;
14519 } 14069 }
14520 14070
14521 @override 14071 @override
14522 Iterable get childEntities => new ChildEntities() 14072 Iterable get childEntities => new ChildEntities()
14523 ..add(_operand) 14073 ..add(_operand)
14524 ..add(operator); 14074 ..add(operator);
14525 14075
14526 @override 14076 @override
14527 Token get endToken => operator; 14077 Token get endToken => operator;
14528 14078
14529 /** 14079 /**
14530 * Return the expression computing the operand for the operator. 14080 * Return the expression computing the operand for the operator.
14531 */ 14081 */
14532 Expression get operand => _operand; 14082 Expression get operand => _operand;
14533 14083
14534 /** 14084 /**
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
14626 Token period; 14176 Token period;
14627 14177
14628 /** 14178 /**
14629 * The identifier being prefixed. 14179 * The identifier being prefixed.
14630 */ 14180 */
14631 SimpleIdentifier _identifier; 14181 SimpleIdentifier _identifier;
14632 14182
14633 /** 14183 /**
14634 * Initialize a newly created prefixed identifier. 14184 * Initialize a newly created prefixed identifier.
14635 */ 14185 */
14636 PrefixedIdentifier(SimpleIdentifier prefix, this.period, 14186 PrefixedIdentifier(
14637 SimpleIdentifier identifier) { 14187 SimpleIdentifier prefix, this.period, SimpleIdentifier identifier) {
14638 _prefix = _becomeParentOf(prefix); 14188 _prefix = _becomeParentOf(prefix);
14639 _identifier = _becomeParentOf(identifier); 14189 _identifier = _becomeParentOf(identifier);
14640 } 14190 }
14641 14191
14642 @override 14192 @override
14643 Token get beginToken => _prefix.beginToken; 14193 Token get beginToken => _prefix.beginToken;
14644 14194
14645 @override 14195 @override
14646 Element get bestElement { 14196 Element get bestElement {
14647 if (_identifier == null) { 14197 if (_identifier == null) {
14648 return null; 14198 return null;
14649 } 14199 }
14650 return _identifier.bestElement; 14200 return _identifier.bestElement;
14651 } 14201 }
14652 14202
14653 @override 14203 @override
14654 Iterable get childEntities => new ChildEntities() 14204 Iterable get childEntities => new ChildEntities()
14655 ..add(_prefix) 14205 ..add(_prefix)
14656 ..add(period) 14206 ..add(period)
14657 ..add(_identifier); 14207 ..add(_identifier);
14658 14208
14659 @override 14209 @override
14660 Token get endToken => _identifier.endToken; 14210 Token get endToken => _identifier.endToken;
14661 14211
14662 /** 14212 /**
14663 * Return the identifier being prefixed. 14213 * Return the identifier being prefixed.
14664 */ 14214 */
14665 SimpleIdentifier get identifier => _identifier; 14215 SimpleIdentifier get identifier => _identifier;
14666 14216
14667 /** 14217 /**
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
14789 MethodElement get bestElement { 14339 MethodElement get bestElement {
14790 MethodElement element = propagatedElement; 14340 MethodElement element = propagatedElement;
14791 if (element == null) { 14341 if (element == null) {
14792 element = staticElement; 14342 element = staticElement;
14793 } 14343 }
14794 return element; 14344 return element;
14795 } 14345 }
14796 14346
14797 @override 14347 @override
14798 Iterable get childEntities => new ChildEntities() 14348 Iterable get childEntities => new ChildEntities()
14799 ..add(operator) 14349 ..add(operator)
14800 ..add(_operand); 14350 ..add(_operand);
14801 14351
14802 @override 14352 @override
14803 Token get endToken => _operand.endToken; 14353 Token get endToken => _operand.endToken;
14804 14354
14805 /** 14355 /**
14806 * Return the expression computing the operand for the operator. 14356 * Return the expression computing the operand for the operator.
14807 */ 14357 */
14808 Expression get operand => _operand; 14358 Expression get operand => _operand;
14809 14359
14810 /** 14360 /**
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
14905 Token operator; 14455 Token operator;
14906 14456
14907 /** 14457 /**
14908 * The name of the property being accessed. 14458 * The name of the property being accessed.
14909 */ 14459 */
14910 SimpleIdentifier _propertyName; 14460 SimpleIdentifier _propertyName;
14911 14461
14912 /** 14462 /**
14913 * Initialize a newly created property access expression. 14463 * Initialize a newly created property access expression.
14914 */ 14464 */
14915 PropertyAccess(Expression target, this.operator, 14465 PropertyAccess(
14916 SimpleIdentifier propertyName) { 14466 Expression target, this.operator, SimpleIdentifier propertyName) {
14917 _target = _becomeParentOf(target); 14467 _target = _becomeParentOf(target);
14918 _propertyName = _becomeParentOf(propertyName); 14468 _propertyName = _becomeParentOf(propertyName);
14919 } 14469 }
14920 14470
14921 @override 14471 @override
14922 Token get beginToken { 14472 Token get beginToken {
14923 if (_target != null) { 14473 if (_target != null) {
14924 return _target.beginToken; 14474 return _target.beginToken;
14925 } 14475 }
14926 return operator; 14476 return operator;
14927 } 14477 }
14928 14478
14929 @override 14479 @override
14930 Iterable get childEntities => new ChildEntities() 14480 Iterable get childEntities => new ChildEntities()
14931 ..add(_target) 14481 ..add(_target)
14932 ..add(operator) 14482 ..add(operator)
14933 ..add(_propertyName); 14483 ..add(_propertyName);
14934 14484
14935 @override 14485 @override
14936 Token get endToken => _propertyName.endToken; 14486 Token get endToken => _propertyName.endToken;
14937 14487
14938 @override 14488 @override
14939 bool get isAssignable => true; 14489 bool get isAssignable => true;
14940 14490
14941 /** 14491 /**
14942 * Return `true` if this expression is cascaded. If it is, then the target of 14492 * Return `true` if this expression is cascaded. If it is, then the target of
14943 * this expression is not stored locally but is stored in the nearest ancestor 14493 * this expression is not stored locally but is stored in the nearest ancestor
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
15475 return null; 15025 return null;
15476 } 15026 }
15477 15027
15478 @override 15028 @override
15479 R visitPropertyAccess(PropertyAccess node) { 15029 R visitPropertyAccess(PropertyAccess node) {
15480 node.visitChildren(this); 15030 node.visitChildren(this);
15481 return null; 15031 return null;
15482 } 15032 }
15483 15033
15484 @override 15034 @override
15485 R 15035 R visitRedirectingConstructorInvocation(
15486 visitRedirectingConstructorInvocation(RedirectingConstructorInvocation nod e) { 15036 RedirectingConstructorInvocation node) {
15487 node.visitChildren(this); 15037 node.visitChildren(this);
15488 return null; 15038 return null;
15489 } 15039 }
15490 15040
15491 @override 15041 @override
15492 R visitRethrowExpression(RethrowExpression node) { 15042 R visitRethrowExpression(RethrowExpression node) {
15493 node.visitChildren(this); 15043 node.visitChildren(this);
15494 return null; 15044 return null;
15495 } 15045 }
15496 15046
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
15715 */ 15265 */
15716 void set argumentList(ArgumentList argumentList) { 15266 void set argumentList(ArgumentList argumentList) {
15717 _argumentList = _becomeParentOf(argumentList); 15267 _argumentList = _becomeParentOf(argumentList);
15718 } 15268 }
15719 15269
15720 @override 15270 @override
15721 Token get beginToken => thisKeyword; 15271 Token get beginToken => thisKeyword;
15722 15272
15723 @override 15273 @override
15724 Iterable get childEntities => new ChildEntities() 15274 Iterable get childEntities => new ChildEntities()
15725 ..add(thisKeyword) 15275 ..add(thisKeyword)
15726 ..add(period) 15276 ..add(period)
15727 ..add(_constructorName) 15277 ..add(_constructorName)
15728 ..add(_argumentList); 15278 ..add(_argumentList);
15729 15279
15730 /** 15280 /**
15731 * Return the name of the constructor that is being invoked, or `null` if the 15281 * Return the name of the constructor that is being invoked, or `null` if the
15732 * unnamed constructor is being invoked. 15282 * unnamed constructor is being invoked.
15733 */ 15283 */
15734 SimpleIdentifier get constructorName => _constructorName; 15284 SimpleIdentifier get constructorName => _constructorName;
15735 15285
15736 /** 15286 /**
15737 * Set the name of the constructor that is being invoked to the given 15287 * Set the name of the constructor that is being invoked to the given
15738 * [identifier]. 15288 * [identifier].
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
15850 */ 15400 */
15851 ReturnStatement(this.returnKeyword, Expression expression, this.semicolon) { 15401 ReturnStatement(this.returnKeyword, Expression expression, this.semicolon) {
15852 _expression = _becomeParentOf(expression); 15402 _expression = _becomeParentOf(expression);
15853 } 15403 }
15854 15404
15855 @override 15405 @override
15856 Token get beginToken => returnKeyword; 15406 Token get beginToken => returnKeyword;
15857 15407
15858 @override 15408 @override
15859 Iterable get childEntities => new ChildEntities() 15409 Iterable get childEntities => new ChildEntities()
15860 ..add(returnKeyword) 15410 ..add(returnKeyword)
15861 ..add(_expression) 15411 ..add(_expression)
15862 ..add(semicolon); 15412 ..add(semicolon);
15863 15413
15864 @override 15414 @override
15865 Token get endToken => semicolon; 15415 Token get endToken => semicolon;
15866 15416
15867 /** 15417 /**
15868 * Return the expression computing the value to be returned, or `null` if no 15418 * Return the expression computing the value to be returned, or `null` if no
15869 * explicit value was provided. 15419 * explicit value was provided.
15870 */ 15420 */
15871 Expression get expression => _expression; 15421 Expression get expression => _expression;
15872 15422
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
16139 ShowCombinator(Token keyword, List<SimpleIdentifier> shownNames) 15689 ShowCombinator(Token keyword, List<SimpleIdentifier> shownNames)
16140 : super(keyword) { 15690 : super(keyword) {
16141 _shownNames = new NodeList<SimpleIdentifier>(this, shownNames); 15691 _shownNames = new NodeList<SimpleIdentifier>(this, shownNames);
16142 } 15692 }
16143 15693
16144 /** 15694 /**
16145 * TODO(paulberry): add commas. 15695 * TODO(paulberry): add commas.
16146 */ 15696 */
16147 @override 15697 @override
16148 Iterable get childEntities => new ChildEntities() 15698 Iterable get childEntities => new ChildEntities()
16149 ..add(keyword) 15699 ..add(keyword)
16150 ..addAll(_shownNames); 15700 ..addAll(_shownNames);
16151 15701
16152 @override 15702 @override
16153 Token get endToken => _shownNames.endToken; 15703 Token get endToken => _shownNames.endToken;
16154 15704
16155 /** 15705 /**
16156 * Return the list of names from the library that are made visible by this 15706 * Return the list of names from the library that are made visible by this
16157 * combinator. 15707 * combinator.
16158 */ 15708 */
16159 NodeList<SimpleIdentifier> get shownNames => _shownNames; 15709 NodeList<SimpleIdentifier> get shownNames => _shownNames;
16160 15710
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
16402 @override 15952 @override
16403 R visitPrefixedIdentifier(PrefixedIdentifier node) => null; 15953 R visitPrefixedIdentifier(PrefixedIdentifier node) => null;
16404 15954
16405 @override 15955 @override
16406 R visitPrefixExpression(PrefixExpression node) => null; 15956 R visitPrefixExpression(PrefixExpression node) => null;
16407 15957
16408 @override 15958 @override
16409 R visitPropertyAccess(PropertyAccess node) => null; 15959 R visitPropertyAccess(PropertyAccess node) => null;
16410 15960
16411 @override 15961 @override
16412 R 15962 R visitRedirectingConstructorInvocation(
16413 visitRedirectingConstructorInvocation(RedirectingConstructorInvocation nod e) => 15963 RedirectingConstructorInvocation node) => null;
16414 null;
16415 15964
16416 @override 15965 @override
16417 R visitRethrowExpression(RethrowExpression node) => null; 15966 R visitRethrowExpression(RethrowExpression node) => null;
16418 15967
16419 @override 15968 @override
16420 R visitReturnStatement(ReturnStatement node) => null; 15969 R visitReturnStatement(ReturnStatement node) => null;
16421 15970
16422 @override 15971 @override
16423 R visitScriptTag(ScriptTag node) => null; 15972 R visitScriptTag(ScriptTag node) => null;
16424 15973
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
16538 } else if (keyword != null) { 16087 } else if (keyword != null) {
16539 return keyword; 16088 return keyword;
16540 } else if (_type != null) { 16089 } else if (_type != null) {
16541 return _type.beginToken; 16090 return _type.beginToken;
16542 } 16091 }
16543 return identifier.beginToken; 16092 return identifier.beginToken;
16544 } 16093 }
16545 16094
16546 @override 16095 @override
16547 Iterable get childEntities => super._childEntities 16096 Iterable get childEntities => super._childEntities
16548 ..add(keyword) 16097 ..add(keyword)
16549 ..add(_type) 16098 ..add(_type)
16550 ..add(identifier); 16099 ..add(identifier);
16551 16100
16552 @override 16101 @override
16553 Token get endToken => identifier.endToken; 16102 Token get endToken => identifier.endToken;
16554 16103
16555 @override 16104 @override
16556 bool get isConst => 16105 bool get isConst => (keyword is KeywordToken) &&
16557 (keyword is KeywordToken) && (keyword as KeywordToken).keyword == Keyword. CONST; 16106 (keyword as KeywordToken).keyword == Keyword.CONST;
16558 16107
16559 @override 16108 @override
16560 bool get isFinal => 16109 bool get isFinal => (keyword is KeywordToken) &&
16561 (keyword is KeywordToken) && (keyword as KeywordToken).keyword == Keyword. FINAL; 16110 (keyword as KeywordToken).keyword == Keyword.FINAL;
16562 16111
16563 /** 16112 /**
16564 * Return the name of the declared type of the parameter, or `null` if the 16113 * Return the name of the declared type of the parameter, or `null` if the
16565 * parameter does not have a declared type. 16114 * parameter does not have a declared type.
16566 */ 16115 */
16567 TypeName get type => _type; 16116 TypeName get type => _type;
16568 16117
16569 /** 16118 /**
16570 * Set the name of the declared type of the parameter to the given [typeName]. 16119 * Set the name of the declared type of the parameter to the given [typeName].
16571 */ 16120 */
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
16839 16388
16840 /** 16389 /**
16841 * Return the given element if it is valid, or report the problem and return 16390 * Return the given element if it is valid, or report the problem and return
16842 * `null` if it is not appropriate. 16391 * `null` if it is not appropriate.
16843 * 16392 *
16844 * The [parent] is the parent of the element, used for reporting when there is 16393 * The [parent] is the parent of the element, used for reporting when there is
16845 * a problem. 16394 * a problem.
16846 * The [isValid] is `true` if the element is appropriate. 16395 * The [isValid] is `true` if the element is appropriate.
16847 * The [element] is the element to be associated with this identifier. 16396 * The [element] is the element to be associated with this identifier.
16848 */ 16397 */
16849 Element _returnOrReportElement(AstNode parent, bool isValid, 16398 Element _returnOrReportElement(
16850 Element element) { 16399 AstNode parent, bool isValid, Element element) {
16851 if (!isValid) { 16400 if (!isValid) {
16852 AnalysisEngine.instance.logger.logInformation( 16401 AnalysisEngine.instance.logger.logInformation(
16853 "Internal error: attempting to set the name of a ${parent.runtimeType} to a ${element.runtimeType}", 16402 "Internal error: attempting to set the name of a ${parent.runtimeType} to a ${element.runtimeType}",
16854 new CaughtException(new AnalysisException(), null)); 16403 new CaughtException(new AnalysisException(), null));
16855 return null; 16404 return null;
16856 } 16405 }
16857 return element; 16406 return element;
16858 } 16407 }
16859 16408
16860 /** 16409 /**
16861 * Return the given [element] if it is an appropriate element based on the 16410 * Return the given [element] if it is an appropriate element based on the
16862 * parent of this identifier, or `null` if it is not appropriate. 16411 * parent of this identifier, or `null` if it is not appropriate.
16863 */ 16412 */
16864 Element _validateElement(Element element) { 16413 Element _validateElement(Element element) {
16865 if (element == null) { 16414 if (element == null) {
16866 return null; 16415 return null;
16867 } 16416 }
16868 AstNode parent = this.parent; 16417 AstNode parent = this.parent;
16869 if (parent is ClassDeclaration && identical(parent.name, this)) { 16418 if (parent is ClassDeclaration && identical(parent.name, this)) {
16870 return _returnOrReportElement(parent, element is ClassElement, element); 16419 return _returnOrReportElement(parent, element is ClassElement, element);
16871 } else if (parent is ClassTypeAlias && identical(parent.name, this)) { 16420 } else if (parent is ClassTypeAlias && identical(parent.name, this)) {
16872 return _returnOrReportElement(parent, element is ClassElement, element); 16421 return _returnOrReportElement(parent, element is ClassElement, element);
16873 } else if (parent is DeclaredIdentifier && 16422 } else if (parent is DeclaredIdentifier &&
16874 identical(parent.identifier, this)) { 16423 identical(parent.identifier, this)) {
16875 return _returnOrReportElement( 16424 return _returnOrReportElement(
16876 parent, 16425 parent, element is LocalVariableElement, element);
16877 element is LocalVariableElement,
16878 element);
16879 } else if (parent is FormalParameter && 16426 } else if (parent is FormalParameter &&
16880 identical(parent.identifier, this)) { 16427 identical(parent.identifier, this)) {
16881 return _returnOrReportElement( 16428 return _returnOrReportElement(
16882 parent, 16429 parent, element is ParameterElement, element);
16883 element is ParameterElement,
16884 element);
16885 } else if (parent is FunctionDeclaration && identical(parent.name, this)) { 16430 } else if (parent is FunctionDeclaration && identical(parent.name, this)) {
16886 return _returnOrReportElement( 16431 return _returnOrReportElement(
16887 parent, 16432 parent, element is ExecutableElement, element);
16888 element is ExecutableElement,
16889 element);
16890 } else if (parent is FunctionTypeAlias && identical(parent.name, this)) { 16433 } else if (parent is FunctionTypeAlias && identical(parent.name, this)) {
16891 return _returnOrReportElement( 16434 return _returnOrReportElement(
16892 parent, 16435 parent, element is FunctionTypeAliasElement, element);
16893 element is FunctionTypeAliasElement,
16894 element);
16895 } else if (parent is MethodDeclaration && identical(parent.name, this)) { 16436 } else if (parent is MethodDeclaration && identical(parent.name, this)) {
16896 return _returnOrReportElement( 16437 return _returnOrReportElement(
16897 parent, 16438 parent, element is ExecutableElement, element);
16898 element is ExecutableElement,
16899 element);
16900 } else if (parent is TypeParameter && identical(parent.name, this)) { 16439 } else if (parent is TypeParameter && identical(parent.name, this)) {
16901 return _returnOrReportElement( 16440 return _returnOrReportElement(
16902 parent, 16441 parent, element is TypeParameterElement, element);
16903 element is TypeParameterElement,
16904 element);
16905 } else if (parent is VariableDeclaration && identical(parent.name, this)) { 16442 } else if (parent is VariableDeclaration && identical(parent.name, this)) {
16906 return _returnOrReportElement( 16443 return _returnOrReportElement(
16907 parent, 16444 parent, element is VariableElement, element);
16908 element is VariableElement,
16909 element);
16910 } 16445 }
16911 return element; 16446 return element;
16912 } 16447 }
16913 } 16448 }
16914 16449
16915 /** 16450 /**
16916 * A string literal expression that does not contain any interpolations. 16451 * A string literal expression that does not contain any interpolations.
16917 * 16452 *
16918 * > simpleStringLiteral ::= 16453 * > simpleStringLiteral ::=
16919 * > rawStringLiteral 16454 * > rawStringLiteral
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
17288 */ 16823 */
17289 void set argumentList(ArgumentList argumentList) { 16824 void set argumentList(ArgumentList argumentList) {
17290 _argumentList = _becomeParentOf(argumentList); 16825 _argumentList = _becomeParentOf(argumentList);
17291 } 16826 }
17292 16827
17293 @override 16828 @override
17294 Token get beginToken => superKeyword; 16829 Token get beginToken => superKeyword;
17295 16830
17296 @override 16831 @override
17297 Iterable get childEntities => new ChildEntities() 16832 Iterable get childEntities => new ChildEntities()
17298 ..add(superKeyword) 16833 ..add(superKeyword)
17299 ..add(period) 16834 ..add(period)
17300 ..add(_constructorName) 16835 ..add(_constructorName)
17301 ..add(_argumentList); 16836 ..add(_argumentList);
17302 16837
17303 /** 16838 /**
17304 * Return the name of the constructor that is being invoked, or `null` if the 16839 * Return the name of the constructor that is being invoked, or `null` if the
17305 * unnamed constructor is being invoked. 16840 * unnamed constructor is being invoked.
17306 */ 16841 */
17307 SimpleIdentifier get constructorName => _constructorName; 16842 SimpleIdentifier get constructorName => _constructorName;
17308 16843
17309 /** 16844 /**
17310 * Set the name of the constructor that is being invoked to the given 16845 * Set the name of the constructor that is being invoked to the given
17311 * [identifier]. 16846 * [identifier].
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
17410 * if there are no labels. 16945 * if there are no labels.
17411 */ 16946 */
17412 SwitchCase(List<Label> labels, Token keyword, Expression expression, 16947 SwitchCase(List<Label> labels, Token keyword, Expression expression,
17413 Token colon, List<Statement> statements) 16948 Token colon, List<Statement> statements)
17414 : super(labels, keyword, colon, statements) { 16949 : super(labels, keyword, colon, statements) {
17415 _expression = _becomeParentOf(expression); 16950 _expression = _becomeParentOf(expression);
17416 } 16951 }
17417 16952
17418 @override 16953 @override
17419 Iterable get childEntities => new ChildEntities() 16954 Iterable get childEntities => new ChildEntities()
17420 ..addAll(labels) 16955 ..addAll(labels)
17421 ..add(keyword) 16956 ..add(keyword)
17422 ..add(_expression) 16957 ..add(_expression)
17423 ..add(colon) 16958 ..add(colon)
17424 ..addAll(statements); 16959 ..addAll(statements);
17425 16960
17426 /** 16961 /**
17427 * Return the expression controlling whether the statements will be executed. 16962 * Return the expression controlling whether the statements will be executed.
17428 */ 16963 */
17429 Expression get expression => _expression; 16964 Expression get expression => _expression;
17430 16965
17431 /** 16966 /**
17432 * Set the expression controlling whether the statements will be executed to 16967 * Set the expression controlling whether the statements will be executed to
17433 * the given [expression]. 16968 * the given [expression].
17434 */ 16969 */
(...skipping 22 matching lines...) Expand all
17457 /** 16992 /**
17458 * Initialize a newly created switch default. The list of [labels] can be 16993 * Initialize a newly created switch default. The list of [labels] can be
17459 * `null` if there are no labels. 16994 * `null` if there are no labels.
17460 */ 16995 */
17461 SwitchDefault(List<Label> labels, Token keyword, Token colon, 16996 SwitchDefault(List<Label> labels, Token keyword, Token colon,
17462 List<Statement> statements) 16997 List<Statement> statements)
17463 : super(labels, keyword, colon, statements); 16998 : super(labels, keyword, colon, statements);
17464 16999
17465 @override 17000 @override
17466 Iterable get childEntities => new ChildEntities() 17001 Iterable get childEntities => new ChildEntities()
17467 ..addAll(labels) 17002 ..addAll(labels)
17468 ..add(keyword) 17003 ..add(keyword)
17469 ..add(colon) 17004 ..add(colon)
17470 ..addAll(statements); 17005 ..addAll(statements);
17471 17006
17472 @override 17007 @override
17473 accept(AstVisitor visitor) => visitor.visitSwitchDefault(this); 17008 accept(AstVisitor visitor) => visitor.visitSwitchDefault(this);
17474 17009
17475 @override 17010 @override
17476 void visitChildren(AstVisitor visitor) { 17011 void visitChildren(AstVisitor visitor) {
17477 labels.accept(visitor); 17012 labels.accept(visitor);
17478 statements.accept(visitor); 17013 statements.accept(visitor);
17479 } 17014 }
17480 } 17015 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
17585 17120
17586 /** 17121 /**
17587 * The right curly bracket. 17122 * The right curly bracket.
17588 */ 17123 */
17589 Token rightBracket; 17124 Token rightBracket;
17590 17125
17591 /** 17126 /**
17592 * Initialize a newly created switch statement. The list of [members] can be 17127 * Initialize a newly created switch statement. The list of [members] can be
17593 * `null` if there are no switch members. 17128 * `null` if there are no switch members.
17594 */ 17129 */
17595 SwitchStatement(this.switchKeyword, this.leftParenthesis, Expression expressio n, 17130 SwitchStatement(this.switchKeyword, this.leftParenthesis,
17596 this.rightParenthesis, this.leftBracket, List<SwitchMember> members, 17131 Expression expression, this.rightParenthesis, this.leftBracket,
17597 this.rightBracket) { 17132 List<SwitchMember> members, this.rightBracket) {
17598 _expression = _becomeParentOf(expression); 17133 _expression = _becomeParentOf(expression);
17599 _members = new NodeList<SwitchMember>(this, members); 17134 _members = new NodeList<SwitchMember>(this, members);
17600 } 17135 }
17601 17136
17602 @override 17137 @override
17603 Token get beginToken => switchKeyword; 17138 Token get beginToken => switchKeyword;
17604 17139
17605 @override 17140 @override
17606 Iterable get childEntities => new ChildEntities() 17141 Iterable get childEntities => new ChildEntities()
17607 ..add(switchKeyword) 17142 ..add(switchKeyword)
17608 ..add(leftParenthesis) 17143 ..add(leftParenthesis)
17609 ..add(_expression) 17144 ..add(_expression)
17610 ..add(rightParenthesis) 17145 ..add(rightParenthesis)
17611 ..add(leftBracket) 17146 ..add(leftBracket)
17612 ..addAll(_members) 17147 ..addAll(_members)
17613 ..add(rightBracket); 17148 ..add(rightBracket);
17614 17149
17615 @override 17150 @override
17616 Token get endToken => rightBracket; 17151 Token get endToken => rightBracket;
17617 17152
17618 /** 17153 /**
17619 * Return the expression used to determine which of the switch members will be 17154 * Return the expression used to determine which of the switch members will be
17620 * selected. 17155 * selected.
17621 */ 17156 */
17622 Expression get expression => _expression; 17157 Expression get expression => _expression;
17623 17158
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
17681 SymbolLiteral(this.poundSign, this.components); 17216 SymbolLiteral(this.poundSign, this.components);
17682 17217
17683 @override 17218 @override
17684 Token get beginToken => poundSign; 17219 Token get beginToken => poundSign;
17685 17220
17686 /** 17221 /**
17687 * TODO(paulberry): add "." tokens. 17222 * TODO(paulberry): add "." tokens.
17688 */ 17223 */
17689 @override 17224 @override
17690 Iterable get childEntities => new ChildEntities() 17225 Iterable get childEntities => new ChildEntities()
17691 ..add(poundSign) 17226 ..add(poundSign)
17692 ..addAll(components); 17227 ..addAll(components);
17693 17228
17694 @override 17229 @override
17695 Token get endToken => components[components.length - 1]; 17230 Token get endToken => components[components.length - 1];
17696 17231
17697 @override 17232 @override
17698 accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this); 17233 accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this);
17699 17234
17700 @override 17235 @override
17701 void visitChildren(AstVisitor visitor) { 17236 void visitChildren(AstVisitor visitor) {
17702 // There are no children to visit. 17237 // There are no children to visit.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
17777 */ 17312 */
17778 ThrowExpression(this.throwKeyword, Expression expression) { 17313 ThrowExpression(this.throwKeyword, Expression expression) {
17779 _expression = _becomeParentOf(expression); 17314 _expression = _becomeParentOf(expression);
17780 } 17315 }
17781 17316
17782 @override 17317 @override
17783 Token get beginToken => throwKeyword; 17318 Token get beginToken => throwKeyword;
17784 17319
17785 @override 17320 @override
17786 Iterable get childEntities => new ChildEntities() 17321 Iterable get childEntities => new ChildEntities()
17787 ..add(throwKeyword) 17322 ..add(throwKeyword)
17788 ..add(_expression); 17323 ..add(_expression);
17789 17324
17790 @override 17325 @override
17791 Token get endToken { 17326 Token get endToken {
17792 if (_expression != null) { 17327 if (_expression != null) {
17793 return _expression.endToken; 17328 return _expression.endToken;
17794 } 17329 }
17795 return throwKeyword; 17330 return throwKeyword;
17796 } 17331 }
17797 17332
17798 /** 17333 /**
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
17858 * the corresponding attribute. 17393 * the corresponding attribute.
17859 */ 17394 */
17860 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata, 17395 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata,
17861 VariableDeclarationList variableList, this.semicolon) 17396 VariableDeclarationList variableList, this.semicolon)
17862 : super(comment, metadata) { 17397 : super(comment, metadata) {
17863 _variableList = _becomeParentOf(variableList); 17398 _variableList = _becomeParentOf(variableList);
17864 } 17399 }
17865 17400
17866 @override 17401 @override
17867 Iterable get childEntities => super._childEntities 17402 Iterable get childEntities => super._childEntities
17868 ..add(_variableList) 17403 ..add(_variableList)
17869 ..add(semicolon); 17404 ..add(semicolon);
17870 17405
17871 @override 17406 @override
17872 Element get element => null; 17407 Element get element => null;
17873 17408
17874 @override 17409 @override
17875 Token get endToken => semicolon; 17410 Token get endToken => semicolon;
17876 17411
17877 @override 17412 @override
17878 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; 17413 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken;
17879 17414
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
18654 _writer.print(".."); 18189 _writer.print("..");
18655 } else { 18190 } else {
18656 _visitNode(node.target); 18191 _visitNode(node.target);
18657 _writer.print('.'); 18192 _writer.print('.');
18658 } 18193 }
18659 _visitNode(node.propertyName); 18194 _visitNode(node.propertyName);
18660 return null; 18195 return null;
18661 } 18196 }
18662 18197
18663 @override 18198 @override
18664 Object 18199 Object visitRedirectingConstructorInvocation(
18665 visitRedirectingConstructorInvocation(RedirectingConstructorInvocation nod e) { 18200 RedirectingConstructorInvocation node) {
18666 _writer.print("this"); 18201 _writer.print("this");
18667 _visitNodeWithPrefix(".", node.constructorName); 18202 _visitNodeWithPrefix(".", node.constructorName);
18668 _visitNode(node.argumentList); 18203 _visitNode(node.argumentList);
18669 return null; 18204 return null;
18670 } 18205 }
18671 18206
18672 @override 18207 @override
18673 Object visitRethrowExpression(RethrowExpression node) { 18208 Object visitRethrowExpression(RethrowExpression node) {
18674 _writer.print("rethrow"); 18209 _writer.print("rethrow");
18675 return null; 18210 return null;
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
18932 } 18467 }
18933 nodes[i].accept(this); 18468 nodes[i].accept(this);
18934 } 18469 }
18935 } 18470 }
18936 } 18471 }
18937 18472
18938 /** 18473 /**
18939 * Print a list of [nodes], prefixed by the given [prefix] if the list is not 18474 * Print a list of [nodes], prefixed by the given [prefix] if the list is not
18940 * empty, and separated by the given [separator]. 18475 * empty, and separated by the given [separator].
18941 */ 18476 */
18942 void _visitNodeListWithSeparatorAndPrefix(String prefix, 18477 void _visitNodeListWithSeparatorAndPrefix(
18943 NodeList<AstNode> nodes, String separator) { 18478 String prefix, NodeList<AstNode> nodes, String separator) {
18944 if (nodes != null) { 18479 if (nodes != null) {
18945 int size = nodes.length; 18480 int size = nodes.length;
18946 if (size > 0) { 18481 if (size > 0) {
18947 _writer.print(prefix); 18482 _writer.print(prefix);
18948 for (int i = 0; i < size; i++) { 18483 for (int i = 0; i < size; i++) {
18949 if (i > 0) { 18484 if (i > 0) {
18950 _writer.print(separator); 18485 _writer.print(separator);
18951 } 18486 }
18952 nodes[i].accept(this); 18487 nodes[i].accept(this);
18953 } 18488 }
18954 } 18489 }
18955 } 18490 }
18956 } 18491 }
18957 18492
18958 /** 18493 /**
18959 * Print a list of [nodes], separated by the given [separator], followed by 18494 * Print a list of [nodes], separated by the given [separator], followed by
18960 * the given [suffix] if the list is not empty. 18495 * the given [suffix] if the list is not empty.
18961 */ 18496 */
18962 void _visitNodeListWithSeparatorAndSuffix(NodeList<AstNode> nodes, 18497 void _visitNodeListWithSeparatorAndSuffix(
18963 String separator, String suffix) { 18498 NodeList<AstNode> nodes, String separator, String suffix) {
18964 if (nodes != null) { 18499 if (nodes != null) {
18965 int size = nodes.length; 18500 int size = nodes.length;
18966 if (size > 0) { 18501 if (size > 0) {
18967 for (int i = 0; i < size; i++) { 18502 for (int i = 0; i < size; i++) {
18968 if (i > 0) { 18503 if (i > 0) {
18969 _writer.print(separator); 18504 _writer.print(separator);
18970 } 18505 }
18971 nodes[i].accept(this); 18506 nodes[i].accept(this);
18972 } 18507 }
18973 _writer.print(suffix); 18508 _writer.print(suffix);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
19073 _body = _becomeParentOf(block); 18608 _body = _becomeParentOf(block);
19074 } 18609 }
19075 18610
19076 /** 18611 /**
19077 * Return the catch clauses contained in the try statement. 18612 * Return the catch clauses contained in the try statement.
19078 */ 18613 */
19079 NodeList<CatchClause> get catchClauses => _catchClauses; 18614 NodeList<CatchClause> get catchClauses => _catchClauses;
19080 18615
19081 @override 18616 @override
19082 Iterable get childEntities => new ChildEntities() 18617 Iterable get childEntities => new ChildEntities()
19083 ..add(tryKeyword) 18618 ..add(tryKeyword)
19084 ..add(_body) 18619 ..add(_body)
19085 ..addAll(_catchClauses) 18620 ..addAll(_catchClauses)
19086 ..add(finallyKeyword) 18621 ..add(finallyKeyword)
19087 ..add(_finallyBlock); 18622 ..add(_finallyBlock);
19088 18623
19089 @override 18624 @override
19090 Token get endToken { 18625 Token get endToken {
19091 if (_finallyBlock != null) { 18626 if (_finallyBlock != null) {
19092 return _finallyBlock.endToken; 18627 return _finallyBlock.endToken;
19093 } else if (finallyKeyword != null) { 18628 } else if (finallyKeyword != null) {
19094 return finallyKeyword; 18629 return finallyKeyword;
19095 } else if (!_catchClauses.isEmpty) { 18630 } else if (!_catchClauses.isEmpty) {
19096 return _catchClauses.endToken; 18631 return _catchClauses.endToken;
19097 } 18632 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
19191 NodeList<TypeName> _arguments; 18726 NodeList<TypeName> _arguments;
19192 18727
19193 /** 18728 /**
19194 * The right bracket. 18729 * The right bracket.
19195 */ 18730 */
19196 Token rightBracket; 18731 Token rightBracket;
19197 18732
19198 /** 18733 /**
19199 * Initialize a newly created list of type arguments. 18734 * Initialize a newly created list of type arguments.
19200 */ 18735 */
19201 TypeArgumentList(this.leftBracket, List<TypeName> arguments, 18736 TypeArgumentList(
19202 this.rightBracket) { 18737 this.leftBracket, List<TypeName> arguments, this.rightBracket) {
19203 _arguments = new NodeList<TypeName>(this, arguments); 18738 _arguments = new NodeList<TypeName>(this, arguments);
19204 } 18739 }
19205 18740
19206 /** 18741 /**
19207 * Return the type arguments associated with the type. 18742 * Return the type arguments associated with the type.
19208 */ 18743 */
19209 NodeList<TypeName> get arguments => _arguments; 18744 NodeList<TypeName> get arguments => _arguments;
19210 18745
19211 @override 18746 @override
19212 Token get beginToken => leftBracket; 18747 Token get beginToken => leftBracket;
19213 18748
19214 /** 18749 /**
19215 * TODO(paulberry): Add commas. 18750 * TODO(paulberry): Add commas.
19216 */ 18751 */
19217 @override 18752 @override
19218 Iterable get childEntities => new ChildEntities() 18753 Iterable get childEntities => new ChildEntities()
19219 ..add(leftBracket) 18754 ..add(leftBracket)
19220 ..addAll(_arguments) 18755 ..addAll(_arguments)
19221 ..add(rightBracket); 18756 ..add(rightBracket);
19222 18757
19223 @override 18758 @override
19224 Token get endToken => rightBracket; 18759 Token get endToken => rightBracket;
19225 18760
19226 @override 18761 @override
19227 accept(AstVisitor visitor) => visitor.visitTypeArgumentList(this); 18762 accept(AstVisitor visitor) => visitor.visitTypeArgumentList(this);
19228 18763
19229 @override 18764 @override
19230 void visitChildren(AstVisitor visitor) { 18765 void visitChildren(AstVisitor visitor) {
19231 _arguments.accept(visitor); 18766 _arguments.accept(visitor);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
19269 18804
19270 /** 18805 /**
19271 * Set the type argument associated with this literal to the given 18806 * Set the type argument associated with this literal to the given
19272 * [typeArguments]. 18807 * [typeArguments].
19273 */ 18808 */
19274 void set typeArguments(TypeArgumentList typeArguments) { 18809 void set typeArguments(TypeArgumentList typeArguments) {
19275 _typeArguments = _becomeParentOf(typeArguments); 18810 _typeArguments = _becomeParentOf(typeArguments);
19276 } 18811 }
19277 18812
19278 ChildEntities get _childEntities => new ChildEntities() 18813 ChildEntities get _childEntities => new ChildEntities()
19279 ..add(constKeyword) 18814 ..add(constKeyword)
19280 ..add(_typeArguments); 18815 ..add(_typeArguments);
19281 18816
19282 @override 18817 @override
19283 void visitChildren(AstVisitor visitor) { 18818 void visitChildren(AstVisitor visitor) {
19284 _safelyVisitChild(_typeArguments, visitor); 18819 _safelyVisitChild(_typeArguments, visitor);
19285 } 18820 }
19286 } 18821 }
19287 18822
19288 /** 18823 /**
19289 * The name of a type, which can optionally include type arguments. 18824 * The name of a type, which can optionally include type arguments.
19290 * 18825 *
(...skipping 24 matching lines...) Expand all
19315 TypeName(Identifier name, TypeArgumentList typeArguments) { 18850 TypeName(Identifier name, TypeArgumentList typeArguments) {
19316 _name = _becomeParentOf(name); 18851 _name = _becomeParentOf(name);
19317 _typeArguments = _becomeParentOf(typeArguments); 18852 _typeArguments = _becomeParentOf(typeArguments);
19318 } 18853 }
19319 18854
19320 @override 18855 @override
19321 Token get beginToken => _name.beginToken; 18856 Token get beginToken => _name.beginToken;
19322 18857
19323 @override 18858 @override
19324 Iterable get childEntities => new ChildEntities() 18859 Iterable get childEntities => new ChildEntities()
19325 ..add(_name) 18860 ..add(_name)
19326 ..add(_typeArguments); 18861 ..add(_typeArguments);
19327 18862
19328 @override 18863 @override
19329 Token get endToken { 18864 Token get endToken {
19330 if (_typeArguments != null) { 18865 if (_typeArguments != null) {
19331 return _typeArguments.endToken; 18866 return _typeArguments.endToken;
19332 } 18867 }
19333 return _name.endToken; 18868 return _name.endToken;
19334 } 18869 }
19335 18870
19336 /** 18871 /**
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
19432 /** 18967 /**
19433 * Set the name of the upper bound for legal arguments to the given 18968 * Set the name of the upper bound for legal arguments to the given
19434 * [typeName]. 18969 * [typeName].
19435 */ 18970 */
19436 void set bound(TypeName typeName) { 18971 void set bound(TypeName typeName) {
19437 _bound = _becomeParentOf(typeName); 18972 _bound = _becomeParentOf(typeName);
19438 } 18973 }
19439 18974
19440 @override 18975 @override
19441 Iterable get childEntities => super._childEntities 18976 Iterable get childEntities => super._childEntities
19442 ..add(_name) 18977 ..add(_name)
19443 ..add(extendsKeyword) 18978 ..add(extendsKeyword)
19444 ..add(_bound); 18979 ..add(_bound);
19445 18980
19446 @override 18981 @override
19447 TypeParameterElement get element => 18982 TypeParameterElement get element =>
19448 _name != null ? (_name.staticElement as TypeParameterElement) : null; 18983 _name != null ? (_name.staticElement as TypeParameterElement) : null;
19449 18984
19450 @override 18985 @override
19451 Token get endToken { 18986 Token get endToken {
19452 if (_bound == null) { 18987 if (_bound == null) {
19453 return _name.endToken; 18988 return _name.endToken;
19454 } 18989 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
19514 NodeList<TypeParameter> _typeParameters; 19049 NodeList<TypeParameter> _typeParameters;
19515 19050
19516 /** 19051 /**
19517 * The right angle bracket. 19052 * The right angle bracket.
19518 */ 19053 */
19519 final Token rightBracket; 19054 final Token rightBracket;
19520 19055
19521 /** 19056 /**
19522 * Initialize a newly created list of type parameters. 19057 * Initialize a newly created list of type parameters.
19523 */ 19058 */
19524 TypeParameterList(this.leftBracket, List<TypeParameter> typeParameters, 19059 TypeParameterList(
19525 this.rightBracket) { 19060 this.leftBracket, List<TypeParameter> typeParameters, this.rightBracket) {
19526 _typeParameters = new NodeList<TypeParameter>(this, typeParameters); 19061 _typeParameters = new NodeList<TypeParameter>(this, typeParameters);
19527 } 19062 }
19528 19063
19529 @override 19064 @override
19530 Token get beginToken => leftBracket; 19065 Token get beginToken => leftBracket;
19531 19066
19532 @override 19067 @override
19533 Iterable get childEntities => new ChildEntities() 19068 Iterable get childEntities => new ChildEntities()
19534 ..add(leftBracket) 19069 ..add(leftBracket)
19535 ..addAll(_typeParameters) 19070 ..addAll(_typeParameters)
19536 ..add(rightBracket); 19071 ..add(rightBracket);
19537 19072
19538 @override 19073 @override
19539 Token get endToken => rightBracket; 19074 Token get endToken => rightBracket;
19540 19075
19541 /** 19076 /**
19542 * Return the type parameters for the type. 19077 * Return the type parameters for the type.
19543 */ 19078 */
19544 NodeList<TypeParameter> get typeParameters => _typeParameters; 19079 NodeList<TypeParameter> get typeParameters => _typeParameters;
19545 19080
19546 @override 19081 @override
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
19801 @override 19336 @override
19802 R visitPrefixedIdentifier(PrefixedIdentifier node) => visitNode(node); 19337 R visitPrefixedIdentifier(PrefixedIdentifier node) => visitNode(node);
19803 19338
19804 @override 19339 @override
19805 R visitPrefixExpression(PrefixExpression node) => visitNode(node); 19340 R visitPrefixExpression(PrefixExpression node) => visitNode(node);
19806 19341
19807 @override 19342 @override
19808 R visitPropertyAccess(PropertyAccess node) => visitNode(node); 19343 R visitPropertyAccess(PropertyAccess node) => visitNode(node);
19809 19344
19810 @override 19345 @override
19811 R 19346 R visitRedirectingConstructorInvocation(
19812 visitRedirectingConstructorInvocation(RedirectingConstructorInvocation nod e) => 19347 RedirectingConstructorInvocation node) => visitNode(node);
19813 visitNode(node);
19814 19348
19815 @override 19349 @override
19816 R visitRethrowExpression(RethrowExpression node) => visitNode(node); 19350 R visitRethrowExpression(RethrowExpression node) => visitNode(node);
19817 19351
19818 @override 19352 @override
19819 R visitReturnStatement(ReturnStatement node) => visitNode(node); 19353 R visitReturnStatement(ReturnStatement node) => visitNode(node);
19820 19354
19821 @override 19355 @override
19822 R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag); 19356 R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
19823 19357
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
19929 /** 19463 /**
19930 * The source to which the URI was resolved. 19464 * The source to which the URI was resolved.
19931 */ 19465 */
19932 Source source; 19466 Source source;
19933 19467
19934 /** 19468 /**
19935 * Initialize a newly create URI-based directive. Either or both of the 19469 * Initialize a newly create URI-based directive. Either or both of the
19936 * [comment] and [metadata] can be `null` if the directive does not have the 19470 * [comment] and [metadata] can be `null` if the directive does not have the
19937 * corresponding attribute. 19471 * corresponding attribute.
19938 */ 19472 */
19939 UriBasedDirective(Comment comment, List<Annotation> metadata, 19473 UriBasedDirective(
19940 StringLiteral uri) 19474 Comment comment, List<Annotation> metadata, StringLiteral uri)
19941 : super(comment, metadata) { 19475 : super(comment, metadata) {
19942 _uri = _becomeParentOf(uri); 19476 _uri = _becomeParentOf(uri);
19943 } 19477 }
19944 19478
19945 /** 19479 /**
19946 * Return the URI referenced by this directive. 19480 * Return the URI referenced by this directive.
19947 */ 19481 */
19948 StringLiteral get uri => _uri; 19482 StringLiteral get uri => _uri;
19949 19483
19950 /** 19484 /**
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
20053 */ 19587 */
20054 VariableDeclaration(Comment comment, List<Annotation> metadata, 19588 VariableDeclaration(Comment comment, List<Annotation> metadata,
20055 SimpleIdentifier name, this.equals, Expression initializer) 19589 SimpleIdentifier name, this.equals, Expression initializer)
20056 : super(comment, metadata) { 19590 : super(comment, metadata) {
20057 _name = _becomeParentOf(name); 19591 _name = _becomeParentOf(name);
20058 _initializer = _becomeParentOf(initializer); 19592 _initializer = _becomeParentOf(initializer);
20059 } 19593 }
20060 19594
20061 @override 19595 @override
20062 Iterable get childEntities => super._childEntities 19596 Iterable get childEntities => super._childEntities
20063 ..add(_name) 19597 ..add(_name)
20064 ..add(equals) 19598 ..add(equals)
20065 ..add(_initializer); 19599 ..add(_initializer);
20066 19600
20067 /** 19601 /**
20068 * This overridden implementation of getDocumentationComment() looks in the 19602 * This overridden implementation of getDocumentationComment() looks in the
20069 * grandparent node for dartdoc comments if no documentation is specifically 19603 * grandparent node for dartdoc comments if no documentation is specifically
20070 * available on the node. 19604 * available on the node.
20071 */ 19605 */
20072 @override 19606 @override
20073 Comment get documentationComment { 19607 Comment get documentationComment {
20074 Comment comment = super.documentationComment; 19608 Comment comment = super.documentationComment;
20075 if (comment == null) { 19609 if (comment == null) {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
20193 : super(comment, metadata) { 19727 : super(comment, metadata) {
20194 _type = _becomeParentOf(type); 19728 _type = _becomeParentOf(type);
20195 _variables = new NodeList<VariableDeclaration>(this, variables); 19729 _variables = new NodeList<VariableDeclaration>(this, variables);
20196 } 19730 }
20197 19731
20198 /** 19732 /**
20199 * TODO(paulberry): include commas. 19733 * TODO(paulberry): include commas.
20200 */ 19734 */
20201 @override 19735 @override
20202 Iterable get childEntities => super._childEntities 19736 Iterable get childEntities => super._childEntities
20203 ..add(keyword) 19737 ..add(keyword)
20204 ..add(_type) 19738 ..add(_type)
20205 ..addAll(_variables); 19739 ..addAll(_variables);
20206 19740
20207 @override 19741 @override
20208 Token get endToken => _variables.endToken; 19742 Token get endToken => _variables.endToken;
20209 19743
20210 @override 19744 @override
20211 Token get firstTokenAfterCommentAndMetadata { 19745 Token get firstTokenAfterCommentAndMetadata {
20212 if (keyword != null) { 19746 if (keyword != null) {
20213 return keyword; 19747 return keyword;
20214 } else if (_type != null) { 19748 } else if (_type != null) {
20215 return _type.beginToken; 19749 return _type.beginToken;
20216 } 19750 }
20217 return _variables.beginToken; 19751 return _variables.beginToken;
20218 } 19752 }
20219 19753
20220 /** 19754 /**
20221 * Return `true` if the variables in this list were declared with the 'const' 19755 * Return `true` if the variables in this list were declared with the 'const'
20222 * modifier. 19756 * modifier.
20223 */ 19757 */
20224 bool get isConst => 19758 bool get isConst => keyword is KeywordToken &&
20225 keyword is KeywordToken && (keyword as KeywordToken).keyword == Keyword.CO NST; 19759 (keyword as KeywordToken).keyword == Keyword.CONST;
20226 19760
20227 /** 19761 /**
20228 * Return `true` if the variables in this list were declared with the 'final' 19762 * Return `true` if the variables in this list were declared with the 'final'
20229 * modifier. Variables that are declared with the 'const' modifier will return 19763 * modifier. Variables that are declared with the 'const' modifier will return
20230 * `false` even though they are implicitly final. (In other words, this is a 19764 * `false` even though they are implicitly final. (In other words, this is a
20231 * syntactic check rather than a semantic check.) 19765 * syntactic check rather than a semantic check.)
20232 */ 19766 */
20233 bool get isFinal => 19767 bool get isFinal => keyword is KeywordToken &&
20234 keyword is KeywordToken && (keyword as KeywordToken).keyword == Keyword.FI NAL; 19768 (keyword as KeywordToken).keyword == Keyword.FINAL;
20235 19769
20236 /** 19770 /**
20237 * Return the type of the variables being declared, or `null` if no type was 19771 * Return the type of the variables being declared, or `null` if no type was
20238 * provided. 19772 * provided.
20239 */ 19773 */
20240 TypeName get type => _type; 19774 TypeName get type => _type;
20241 19775
20242 /** 19776 /**
20243 * Set the type of the variables being declared to the given [typeName]. 19777 * Set the type of the variables being declared to the given [typeName].
20244 */ 19778 */
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
20276 VariableDeclarationList _variableList; 19810 VariableDeclarationList _variableList;
20277 19811
20278 /** 19812 /**
20279 * The semicolon terminating the statement. 19813 * The semicolon terminating the statement.
20280 */ 19814 */
20281 Token semicolon; 19815 Token semicolon;
20282 19816
20283 /** 19817 /**
20284 * Initialize a newly created variable declaration statement. 19818 * Initialize a newly created variable declaration statement.
20285 */ 19819 */
20286 VariableDeclarationStatement(VariableDeclarationList variableList, 19820 VariableDeclarationStatement(
20287 this.semicolon) { 19821 VariableDeclarationList variableList, this.semicolon) {
20288 _variableList = _becomeParentOf(variableList); 19822 _variableList = _becomeParentOf(variableList);
20289 } 19823 }
20290 19824
20291 @override 19825 @override
20292 Token get beginToken => _variableList.beginToken; 19826 Token get beginToken => _variableList.beginToken;
20293 19827
20294 @override 19828 @override
20295 Iterable get childEntities => new ChildEntities() 19829 Iterable get childEntities => new ChildEntities()
20296 ..add(_variableList) 19830 ..add(_variableList)
20297 ..add(semicolon); 19831 ..add(semicolon);
20298 19832
20299 @override 19833 @override
20300 Token get endToken => semicolon; 19834 Token get endToken => semicolon;
20301 19835
20302 /** 19836 /**
20303 * Return the variables being declared. 19837 * Return the variables being declared.
20304 */ 19838 */
20305 VariableDeclarationList get variables => _variableList; 19839 VariableDeclarationList get variables => _variableList;
20306 19840
20307 /** 19841 /**
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
20371 19905
20372 /** 19906 /**
20373 * Set the body of the loop to the given [statement]. 19907 * Set the body of the loop to the given [statement].
20374 */ 19908 */
20375 void set body(Statement statement) { 19909 void set body(Statement statement) {
20376 _body = _becomeParentOf(statement); 19910 _body = _becomeParentOf(statement);
20377 } 19911 }
20378 19912
20379 @override 19913 @override
20380 Iterable get childEntities => new ChildEntities() 19914 Iterable get childEntities => new ChildEntities()
20381 ..add(whileKeyword) 19915 ..add(whileKeyword)
20382 ..add(leftParenthesis) 19916 ..add(leftParenthesis)
20383 ..add(_condition) 19917 ..add(_condition)
20384 ..add(rightParenthesis) 19918 ..add(rightParenthesis)
20385 ..add(_body); 19919 ..add(_body);
20386 19920
20387 /** 19921 /**
20388 * Return the expression used to determine whether to execute the body of the 19922 * Return the expression used to determine whether to execute the body of the
20389 * loop. 19923 * loop.
20390 */ 19924 */
20391 Expression get condition => _condition; 19925 Expression get condition => _condition;
20392 19926
20393 /** 19927 /**
20394 * Set the expression used to determine whether to execute the body of the 19928 * Set the expression used to determine whether to execute the body of the
20395 * loop to the given [expression]. 19929 * loop to the given [expression].
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
20450 } 19984 }
20451 19985
20452 @override 19986 @override
20453 Token get beginToken => withKeyword; 19987 Token get beginToken => withKeyword;
20454 19988
20455 /** 19989 /**
20456 * TODO(paulberry): add commas. 19990 * TODO(paulberry): add commas.
20457 */ 19991 */
20458 @override 19992 @override
20459 Iterable get childEntities => new ChildEntities() 19993 Iterable get childEntities => new ChildEntities()
20460 ..add(withKeyword) 19994 ..add(withKeyword)
20461 ..addAll(_mixinTypes); 19995 ..addAll(_mixinTypes);
20462 19996
20463 @override 19997 @override
20464 Token get endToken => _mixinTypes.endToken; 19998 Token get endToken => _mixinTypes.endToken;
20465 19999
20466 /** 20000 /**
20467 * Set the token representing the 'with' keyword to the given [token]. 20001 * Set the token representing the 'with' keyword to the given [token].
20468 */ 20002 */
20469 @deprecated // Use "this.withKeyword" 20003 @deprecated // Use "this.withKeyword"
20470 void set mixinKeyword(Token token) { 20004 void set mixinKeyword(Token token) {
20471 this.withKeyword = token; 20005 this.withKeyword = token;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
20509 20043
20510 /** 20044 /**
20511 * The semicolon following the expression. 20045 * The semicolon following the expression.
20512 */ 20046 */
20513 Token semicolon; 20047 Token semicolon;
20514 20048
20515 /** 20049 /**
20516 * Initialize a newly created yield expression. The [star] can be `null` if no 20050 * Initialize a newly created yield expression. The [star] can be `null` if no
20517 * star was provided. 20051 * star was provided.
20518 */ 20052 */
20519 YieldStatement(this.yieldKeyword, this.star, Expression expression, 20053 YieldStatement(
20520 this.semicolon) { 20054 this.yieldKeyword, this.star, Expression expression, this.semicolon) {
20521 _expression = _becomeParentOf(expression); 20055 _expression = _becomeParentOf(expression);
20522 } 20056 }
20523 20057
20524 @override 20058 @override
20525 Token get beginToken { 20059 Token get beginToken {
20526 if (yieldKeyword != null) { 20060 if (yieldKeyword != null) {
20527 return yieldKeyword; 20061 return yieldKeyword;
20528 } 20062 }
20529 return _expression.beginToken; 20063 return _expression.beginToken;
20530 } 20064 }
20531 20065
20532 @override 20066 @override
20533 Iterable get childEntities => new ChildEntities() 20067 Iterable get childEntities => new ChildEntities()
20534 ..add(yieldKeyword) 20068 ..add(yieldKeyword)
20535 ..add(star) 20069 ..add(star)
20536 ..add(_expression) 20070 ..add(_expression)
20537 ..add(semicolon); 20071 ..add(semicolon);
20538 20072
20539 @override 20073 @override
20540 Token get endToken { 20074 Token get endToken {
20541 if (semicolon != null) { 20075 if (semicolon != null) {
20542 return semicolon; 20076 return semicolon;
20543 } 20077 }
20544 return _expression.endToken; 20078 return _expression.endToken;
20545 } 20079 }
20546 20080
20547 /** 20081 /**
20548 * Return the expression whose value will be yielded. 20082 * Return the expression whose value will be yielded.
20549 */ 20083 */
20550 Expression get expression => _expression; 20084 Expression get expression => _expression;
20551 20085
20552 /** 20086 /**
20553 * Set the expression whose value will be yielded to the given [expression]. 20087 * Set the expression whose value will be yielded to the given [expression].
20554 */ 20088 */
20555 void set expression(Expression expression) { 20089 void set expression(Expression expression) {
20556 _expression = _becomeParentOf(expression); 20090 _expression = _becomeParentOf(expression);
20557 } 20091 }
20558 20092
20559 @override 20093 @override
20560 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); 20094 accept(AstVisitor visitor) => visitor.visitYieldStatement(this);
20561 20095
20562 @override 20096 @override
20563 void visitChildren(AstVisitor visitor) { 20097 void visitChildren(AstVisitor visitor) {
20564 _safelyVisitChild(_expression, visitor); 20098 _safelyVisitChild(_expression, visitor);
20565 } 20099 }
20566 } 20100 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/error_formatter.dart ('k') | pkg/analyzer/lib/src/generated/constant.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698