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

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

Issue 1322513004: Reformat code to reduce churn (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.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 library engine.ast; 5 library engine.ast;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'element.dart'; 9 import 'element.dart';
10 import 'engine.dart' show AnalysisEngine; 10 import 'engine.dart' show AnalysisEngine;
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 * A flag indicating whether tokens should be cloned while cloning an AST 956 * A flag indicating whether tokens should be cloned while cloning an AST
957 * structure. 957 * structure.
958 */ 958 */
959 final bool cloneTokens; 959 final bool cloneTokens;
960 960
961 /** 961 /**
962 * Initialize a newly created AST cloner to optionally clone tokens while 962 * Initialize a newly created AST cloner to optionally clone tokens while
963 * cloning AST nodes if [cloneTokens] is `true`. 963 * cloning AST nodes if [cloneTokens] is `true`.
964 */ 964 */
965 AstCloner( 965 AstCloner(
966 [this.cloneTokens = false]); // TODO(brianwilkerson) Change this to be a n amed parameter. 966 [this.cloneTokens =
967 false]); // TODO(brianwilkerson) Change this to be a named parameter.
967 968
968 /** 969 /**
969 * Return a clone of the given [node]. 970 * Return a clone of the given [node].
970 */ 971 */
971 AstNode cloneNode(AstNode node) { 972 AstNode cloneNode(AstNode node) {
972 if (node == null) { 973 if (node == null) {
973 return null; 974 return null;
974 } 975 }
975 return node.accept(this) as AstNode; 976 return node.accept(this) as AstNode;
976 } 977 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 } 1009 }
1009 return tokens; 1010 return tokens;
1010 } 1011 }
1011 1012
1012 @override 1013 @override
1013 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => 1014 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) =>
1014 new AdjacentStrings(cloneNodeList(node.strings)); 1015 new AdjacentStrings(cloneNodeList(node.strings));
1015 1016
1016 @override 1017 @override
1017 Annotation visitAnnotation(Annotation node) => new Annotation( 1018 Annotation visitAnnotation(Annotation node) => new Annotation(
1018 cloneToken(node.atSign), cloneNode(node.name), cloneToken(node.period), 1019 cloneToken(node.atSign),
1019 cloneNode(node.constructorName), cloneNode(node.arguments)); 1020 cloneNode(node.name),
1021 cloneToken(node.period),
1022 cloneNode(node.constructorName),
1023 cloneNode(node.arguments));
1020 1024
1021 @override 1025 @override
1022 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList( 1026 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(
1023 cloneToken(node.leftParenthesis), cloneNodeList(node.arguments), 1027 cloneToken(node.leftParenthesis),
1028 cloneNodeList(node.arguments),
1024 cloneToken(node.rightParenthesis)); 1029 cloneToken(node.rightParenthesis));
1025 1030
1026 @override 1031 @override
1027 AsExpression visitAsExpression(AsExpression node) => new AsExpression( 1032 AsExpression visitAsExpression(AsExpression node) => new AsExpression(
1028 cloneNode(node.expression), cloneToken(node.asOperator), 1033 cloneNode(node.expression),
1034 cloneToken(node.asOperator),
1029 cloneNode(node.type)); 1035 cloneNode(node.type));
1030 1036
1031 @override 1037 @override
1032 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement( 1038 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(
1033 cloneToken(node.assertKeyword), cloneToken(node.leftParenthesis), 1039 cloneToken(node.assertKeyword),
1034 cloneNode(node.condition), cloneToken(node.rightParenthesis), 1040 cloneToken(node.leftParenthesis),
1041 cloneNode(node.condition),
1042 cloneToken(node.rightParenthesis),
1035 cloneToken(node.semicolon)); 1043 cloneToken(node.semicolon));
1036 1044
1037 @override 1045 @override
1038 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => 1046 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) =>
1039 new AssignmentExpression(cloneNode(node.leftHandSide), 1047 new AssignmentExpression(cloneNode(node.leftHandSide),
1040 cloneToken(node.operator), cloneNode(node.rightHandSide)); 1048 cloneToken(node.operator), cloneNode(node.rightHandSide));
1041 1049
1042 @override 1050 @override
1043 AwaitExpression visitAwaitExpression(AwaitExpression node) => 1051 AwaitExpression visitAwaitExpression(AwaitExpression node) =>
1044 new AwaitExpression( 1052 new AwaitExpression(
1045 cloneToken(node.awaitKeyword), cloneNode(node.expression)); 1053 cloneToken(node.awaitKeyword), cloneNode(node.expression));
1046 1054
1047 @override 1055 @override
1048 BinaryExpression visitBinaryExpression(BinaryExpression node) => 1056 BinaryExpression visitBinaryExpression(BinaryExpression node) =>
1049 new BinaryExpression(cloneNode(node.leftOperand), 1057 new BinaryExpression(cloneNode(node.leftOperand),
1050 cloneToken(node.operator), cloneNode(node.rightOperand)); 1058 cloneToken(node.operator), cloneNode(node.rightOperand));
1051 1059
1052 @override 1060 @override
1053 Block visitBlock(Block node) => new Block(cloneToken(node.leftBracket), 1061 Block visitBlock(Block node) => new Block(cloneToken(node.leftBracket),
1054 cloneNodeList(node.statements), cloneToken(node.rightBracket)); 1062 cloneNodeList(node.statements), cloneToken(node.rightBracket));
1055 1063
1056 @override 1064 @override
1057 BlockFunctionBody visitBlockFunctionBody( 1065 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) =>
1058 BlockFunctionBody node) => new BlockFunctionBody( 1066 new BlockFunctionBody(cloneToken(node.keyword), cloneToken(node.star),
1059 cloneToken(node.keyword), cloneToken(node.star), cloneNode(node.block)); 1067 cloneNode(node.block));
1060 1068
1061 @override 1069 @override
1062 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) => 1070 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) =>
1063 new BooleanLiteral(cloneToken(node.literal), node.value); 1071 new BooleanLiteral(cloneToken(node.literal), node.value);
1064 1072
1065 @override 1073 @override
1066 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement( 1074 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
1067 cloneToken(node.breakKeyword), cloneNode(node.label), 1075 cloneToken(node.breakKeyword),
1076 cloneNode(node.label),
1068 cloneToken(node.semicolon)); 1077 cloneToken(node.semicolon));
1069 1078
1070 @override 1079 @override
1071 CascadeExpression visitCascadeExpression(CascadeExpression node) => 1080 CascadeExpression visitCascadeExpression(CascadeExpression node) =>
1072 new CascadeExpression( 1081 new CascadeExpression(
1073 cloneNode(node.target), cloneNodeList(node.cascadeSections)); 1082 cloneNode(node.target), cloneNodeList(node.cascadeSections));
1074 1083
1075 @override 1084 @override
1076 CatchClause visitCatchClause(CatchClause node) => new CatchClause( 1085 CatchClause visitCatchClause(CatchClause node) => new CatchClause(
1077 cloneToken(node.onKeyword), cloneNode(node.exceptionType), 1086 cloneToken(node.onKeyword),
1078 cloneToken(node.catchKeyword), cloneToken(node.leftParenthesis), 1087 cloneNode(node.exceptionType),
1079 cloneNode(node.exceptionParameter), cloneToken(node.comma), 1088 cloneToken(node.catchKeyword),
1080 cloneNode(node.stackTraceParameter), cloneToken(node.rightParenthesis), 1089 cloneToken(node.leftParenthesis),
1090 cloneNode(node.exceptionParameter),
1091 cloneToken(node.comma),
1092 cloneNode(node.stackTraceParameter),
1093 cloneToken(node.rightParenthesis),
1081 cloneNode(node.body)); 1094 cloneNode(node.body));
1082 1095
1083 @override 1096 @override
1084 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { 1097 ClassDeclaration visitClassDeclaration(ClassDeclaration node) {
1085 ClassDeclaration copy = new ClassDeclaration( 1098 ClassDeclaration copy = new ClassDeclaration(
1086 cloneNode(node.documentationComment), cloneNodeList(node.metadata), 1099 cloneNode(node.documentationComment),
1087 cloneToken(node.abstractKeyword), cloneToken(node.classKeyword), 1100 cloneNodeList(node.metadata),
1088 cloneNode(node.name), cloneNode(node.typeParameters), 1101 cloneToken(node.abstractKeyword),
1089 cloneNode(node.extendsClause), cloneNode(node.withClause), 1102 cloneToken(node.classKeyword),
1090 cloneNode(node.implementsClause), cloneToken(node.leftBracket), 1103 cloneNode(node.name),
1091 cloneNodeList(node.members), cloneToken(node.rightBracket)); 1104 cloneNode(node.typeParameters),
1105 cloneNode(node.extendsClause),
1106 cloneNode(node.withClause),
1107 cloneNode(node.implementsClause),
1108 cloneToken(node.leftBracket),
1109 cloneNodeList(node.members),
1110 cloneToken(node.rightBracket));
1092 copy.nativeClause = cloneNode(node.nativeClause); 1111 copy.nativeClause = cloneNode(node.nativeClause);
1093 return copy; 1112 return copy;
1094 } 1113 }
1095 1114
1096 @override 1115 @override
1097 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias( 1116 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
1098 cloneNode(node.documentationComment), cloneNodeList(node.metadata), 1117 cloneNode(node.documentationComment),
1099 cloneToken(node.typedefKeyword), cloneNode(node.name), 1118 cloneNodeList(node.metadata),
1100 cloneNode(node.typeParameters), cloneToken(node.equals), 1119 cloneToken(node.typedefKeyword),
1101 cloneToken(node.abstractKeyword), cloneNode(node.superclass), 1120 cloneNode(node.name),
1102 cloneNode(node.withClause), cloneNode(node.implementsClause), 1121 cloneNode(node.typeParameters),
1122 cloneToken(node.equals),
1123 cloneToken(node.abstractKeyword),
1124 cloneNode(node.superclass),
1125 cloneNode(node.withClause),
1126 cloneNode(node.implementsClause),
1103 cloneToken(node.semicolon)); 1127 cloneToken(node.semicolon));
1104 1128
1105 @override 1129 @override
1106 Comment visitComment(Comment node) { 1130 Comment visitComment(Comment node) {
1107 if (node.isDocumentation) { 1131 if (node.isDocumentation) {
1108 return Comment.createDocumentationCommentWithReferences( 1132 return Comment.createDocumentationCommentWithReferences(
1109 cloneTokenList(node.tokens), cloneNodeList(node.references)); 1133 cloneTokenList(node.tokens), cloneNodeList(node.references));
1110 } else if (node.isBlock) { 1134 } else if (node.isBlock) {
1111 return Comment.createBlockComment(cloneTokenList(node.tokens)); 1135 return Comment.createBlockComment(cloneTokenList(node.tokens));
1112 } 1136 }
1113 return Comment.createEndOfLineComment(cloneTokenList(node.tokens)); 1137 return Comment.createEndOfLineComment(cloneTokenList(node.tokens));
1114 } 1138 }
1115 1139
1116 @override 1140 @override
1117 CommentReference visitCommentReference(CommentReference node) => 1141 CommentReference visitCommentReference(CommentReference node) =>
1118 new CommentReference( 1142 new CommentReference(
1119 cloneToken(node.newKeyword), cloneNode(node.identifier)); 1143 cloneToken(node.newKeyword), cloneNode(node.identifier));
1120 1144
1121 @override 1145 @override
1122 CompilationUnit visitCompilationUnit(CompilationUnit node) { 1146 CompilationUnit visitCompilationUnit(CompilationUnit node) {
1123 CompilationUnit clone = new CompilationUnit(cloneToken(node.beginToken), 1147 CompilationUnit clone = new CompilationUnit(
1124 cloneNode(node.scriptTag), cloneNodeList(node.directives), 1148 cloneToken(node.beginToken),
1125 cloneNodeList(node.declarations), cloneToken(node.endToken)); 1149 cloneNode(node.scriptTag),
1150 cloneNodeList(node.directives),
1151 cloneNodeList(node.declarations),
1152 cloneToken(node.endToken));
1126 clone.lineInfo = node.lineInfo; 1153 clone.lineInfo = node.lineInfo;
1127 return clone; 1154 return clone;
1128 } 1155 }
1129 1156
1130 @override 1157 @override
1131 ConditionalExpression visitConditionalExpression( 1158 ConditionalExpression visitConditionalExpression(
1132 ConditionalExpression node) => new ConditionalExpression( 1159 ConditionalExpression node) =>
1133 cloneNode(node.condition), cloneToken(node.question), 1160 new ConditionalExpression(
1134 cloneNode(node.thenExpression), cloneToken(node.colon), 1161 cloneNode(node.condition),
1135 cloneNode(node.elseExpression)); 1162 cloneToken(node.question),
1163 cloneNode(node.thenExpression),
1164 cloneToken(node.colon),
1165 cloneNode(node.elseExpression));
1136 1166
1137 @override 1167 @override
1138 ConstructorDeclaration visitConstructorDeclaration( 1168 ConstructorDeclaration visitConstructorDeclaration(
1139 ConstructorDeclaration node) => new ConstructorDeclaration( 1169 ConstructorDeclaration node) =>
1140 cloneNode(node.documentationComment), cloneNodeList(node.metadata), 1170 new ConstructorDeclaration(
1141 cloneToken(node.externalKeyword), cloneToken(node.constKeyword), 1171 cloneNode(node.documentationComment),
1142 cloneToken(node.factoryKeyword), cloneNode(node.returnType), 1172 cloneNodeList(node.metadata),
1143 cloneToken(node.period), cloneNode(node.name), cloneNode(node.parameters), 1173 cloneToken(node.externalKeyword),
1144 cloneToken(node.separator), cloneNodeList(node.initializers), 1174 cloneToken(node.constKeyword),
1145 cloneNode(node.redirectedConstructor), cloneNode(node.body)); 1175 cloneToken(node.factoryKeyword),
1176 cloneNode(node.returnType),
1177 cloneToken(node.period),
1178 cloneNode(node.name),
1179 cloneNode(node.parameters),
1180 cloneToken(node.separator),
1181 cloneNodeList(node.initializers),
1182 cloneNode(node.redirectedConstructor),
1183 cloneNode(node.body));
1146 1184
1147 @override 1185 @override
1148 ConstructorFieldInitializer visitConstructorFieldInitializer( 1186 ConstructorFieldInitializer visitConstructorFieldInitializer(
1149 ConstructorFieldInitializer node) => new ConstructorFieldInitializer( 1187 ConstructorFieldInitializer node) =>
1150 cloneToken(node.thisKeyword), cloneToken(node.period), 1188 new ConstructorFieldInitializer(
1151 cloneNode(node.fieldName), cloneToken(node.equals), 1189 cloneToken(node.thisKeyword),
1152 cloneNode(node.expression)); 1190 cloneToken(node.period),
1191 cloneNode(node.fieldName),
1192 cloneToken(node.equals),
1193 cloneNode(node.expression));
1153 1194
1154 @override 1195 @override
1155 ConstructorName visitConstructorName(ConstructorName node) => 1196 ConstructorName visitConstructorName(ConstructorName node) =>
1156 new ConstructorName( 1197 new ConstructorName(
1157 cloneNode(node.type), cloneToken(node.period), cloneNode(node.name)); 1198 cloneNode(node.type), cloneToken(node.period), cloneNode(node.name));
1158 1199
1159 @override 1200 @override
1160 ContinueStatement visitContinueStatement(ContinueStatement node) => 1201 ContinueStatement visitContinueStatement(ContinueStatement node) =>
1161 new ContinueStatement(cloneToken(node.continueKeyword), 1202 new ContinueStatement(cloneToken(node.continueKeyword),
1162 cloneNode(node.label), cloneToken(node.semicolon)); 1203 cloneNode(node.label), cloneToken(node.semicolon));
1163 1204
1164 @override 1205 @override
1165 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => 1206 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) =>
1166 new DeclaredIdentifier(cloneNode(node.documentationComment), 1207 new DeclaredIdentifier(
1167 cloneNodeList(node.metadata), cloneToken(node.keyword), 1208 cloneNode(node.documentationComment),
1168 cloneNode(node.type), cloneNode(node.identifier)); 1209 cloneNodeList(node.metadata),
1210 cloneToken(node.keyword),
1211 cloneNode(node.type),
1212 cloneNode(node.identifier));
1169 1213
1170 @override 1214 @override
1171 DefaultFormalParameter visitDefaultFormalParameter( 1215 DefaultFormalParameter visitDefaultFormalParameter(
1172 DefaultFormalParameter node) => new DefaultFormalParameter( 1216 DefaultFormalParameter node) =>
1173 cloneNode(node.parameter), node.kind, cloneToken(node.separator), 1217 new DefaultFormalParameter(cloneNode(node.parameter), node.kind,
1174 cloneNode(node.defaultValue)); 1218 cloneToken(node.separator), cloneNode(node.defaultValue));
1175 1219
1176 @override 1220 @override
1177 DoStatement visitDoStatement(DoStatement node) => new DoStatement( 1221 DoStatement visitDoStatement(DoStatement node) => new DoStatement(
1178 cloneToken(node.doKeyword), cloneNode(node.body), 1222 cloneToken(node.doKeyword),
1179 cloneToken(node.whileKeyword), cloneToken(node.leftParenthesis), 1223 cloneNode(node.body),
1180 cloneNode(node.condition), cloneToken(node.rightParenthesis), 1224 cloneToken(node.whileKeyword),
1225 cloneToken(node.leftParenthesis),
1226 cloneNode(node.condition),
1227 cloneToken(node.rightParenthesis),
1181 cloneToken(node.semicolon)); 1228 cloneToken(node.semicolon));
1182 1229
1183 @override 1230 @override
1184 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) => 1231 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) =>
1185 new DoubleLiteral(cloneToken(node.literal), node.value); 1232 new DoubleLiteral(cloneToken(node.literal), node.value);
1186 1233
1187 @override 1234 @override
1188 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => 1235 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) =>
1189 new EmptyFunctionBody(cloneToken(node.semicolon)); 1236 new EmptyFunctionBody(cloneToken(node.semicolon));
1190 1237
1191 @override 1238 @override
1192 EmptyStatement visitEmptyStatement(EmptyStatement node) => 1239 EmptyStatement visitEmptyStatement(EmptyStatement node) =>
1193 new EmptyStatement(cloneToken(node.semicolon)); 1240 new EmptyStatement(cloneToken(node.semicolon));
1194 1241
1195 @override 1242 @override
1196 AstNode visitEnumConstantDeclaration(EnumConstantDeclaration node) => 1243 AstNode visitEnumConstantDeclaration(EnumConstantDeclaration node) =>
1197 new EnumConstantDeclaration(cloneNode(node.documentationComment), 1244 new EnumConstantDeclaration(cloneNode(node.documentationComment),
1198 cloneNodeList(node.metadata), cloneNode(node.name)); 1245 cloneNodeList(node.metadata), cloneNode(node.name));
1199 1246
1200 @override 1247 @override
1201 EnumDeclaration visitEnumDeclaration(EnumDeclaration node) => 1248 EnumDeclaration visitEnumDeclaration(EnumDeclaration node) =>
1202 new EnumDeclaration(cloneNode(node.documentationComment), 1249 new EnumDeclaration(
1203 cloneNodeList(node.metadata), cloneToken(node.enumKeyword), 1250 cloneNode(node.documentationComment),
1204 cloneNode(node.name), cloneToken(node.leftBracket), 1251 cloneNodeList(node.metadata),
1205 cloneNodeList(node.constants), cloneToken(node.rightBracket)); 1252 cloneToken(node.enumKeyword),
1253 cloneNode(node.name),
1254 cloneToken(node.leftBracket),
1255 cloneNodeList(node.constants),
1256 cloneToken(node.rightBracket));
1206 1257
1207 @override 1258 @override
1208 ExportDirective visitExportDirective(ExportDirective node) { 1259 ExportDirective visitExportDirective(ExportDirective node) {
1209 ExportDirective directive = new ExportDirective( 1260 ExportDirective directive = new ExportDirective(
1210 cloneNode(node.documentationComment), cloneNodeList(node.metadata), 1261 cloneNode(node.documentationComment),
1211 cloneToken(node.keyword), cloneNode(node.uri), 1262 cloneNodeList(node.metadata),
1212 cloneNodeList(node.combinators), cloneToken(node.semicolon)); 1263 cloneToken(node.keyword),
1264 cloneNode(node.uri),
1265 cloneNodeList(node.combinators),
1266 cloneToken(node.semicolon));
1213 directive.source = node.source; 1267 directive.source = node.source;
1214 directive.uriContent = node.uriContent; 1268 directive.uriContent = node.uriContent;
1215 return directive; 1269 return directive;
1216 } 1270 }
1217 1271
1218 @override 1272 @override
1219 ExpressionFunctionBody visitExpressionFunctionBody( 1273 ExpressionFunctionBody visitExpressionFunctionBody(
1220 ExpressionFunctionBody node) => new ExpressionFunctionBody( 1274 ExpressionFunctionBody node) =>
1221 cloneToken(node.keyword), cloneToken(node.functionDefinition), 1275 new ExpressionFunctionBody(
1222 cloneNode(node.expression), cloneToken(node.semicolon)); 1276 cloneToken(node.keyword),
1277 cloneToken(node.functionDefinition),
1278 cloneNode(node.expression),
1279 cloneToken(node.semicolon));
1223 1280
1224 @override 1281 @override
1225 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => 1282 ExpressionStatement visitExpressionStatement(ExpressionStatement node) =>
1226 new ExpressionStatement( 1283 new ExpressionStatement(
1227 cloneNode(node.expression), cloneToken(node.semicolon)); 1284 cloneNode(node.expression), cloneToken(node.semicolon));
1228 1285
1229 @override 1286 @override
1230 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause( 1287 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(
1231 cloneToken(node.extendsKeyword), cloneNode(node.superclass)); 1288 cloneToken(node.extendsKeyword), cloneNode(node.superclass));
1232 1289
1233 @override 1290 @override
1234 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => 1291 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) =>
1235 new FieldDeclaration(cloneNode(node.documentationComment), 1292 new FieldDeclaration(
1236 cloneNodeList(node.metadata), cloneToken(node.staticKeyword), 1293 cloneNode(node.documentationComment),
1237 cloneNode(node.fields), cloneToken(node.semicolon)); 1294 cloneNodeList(node.metadata),
1295 cloneToken(node.staticKeyword),
1296 cloneNode(node.fields),
1297 cloneToken(node.semicolon));
1238 1298
1239 @override 1299 @override
1240 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => 1300 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) =>
1241 new FieldFormalParameter(cloneNode(node.documentationComment), 1301 new FieldFormalParameter(
1242 cloneNodeList(node.metadata), cloneToken(node.keyword), 1302 cloneNode(node.documentationComment),
1243 cloneNode(node.type), cloneToken(node.thisKeyword), 1303 cloneNodeList(node.metadata),
1244 cloneToken(node.period), cloneNode(node.identifier), 1304 cloneToken(node.keyword),
1245 cloneNode(node.typeParameters), cloneNode(node.parameters)); 1305 cloneNode(node.type),
1306 cloneToken(node.thisKeyword),
1307 cloneToken(node.period),
1308 cloneNode(node.identifier),
1309 cloneNode(node.typeParameters),
1310 cloneNode(node.parameters));
1246 1311
1247 @override 1312 @override
1248 ForEachStatement visitForEachStatement(ForEachStatement node) { 1313 ForEachStatement visitForEachStatement(ForEachStatement node) {
1249 DeclaredIdentifier loopVariable = node.loopVariable; 1314 DeclaredIdentifier loopVariable = node.loopVariable;
1250 if (loopVariable == null) { 1315 if (loopVariable == null) {
1251 return new ForEachStatement.withReference(cloneToken(node.awaitKeyword), 1316 return new ForEachStatement.withReference(
1252 cloneToken(node.forKeyword), cloneToken(node.leftParenthesis), 1317 cloneToken(node.awaitKeyword),
1253 cloneNode(node.identifier), cloneToken(node.inKeyword), 1318 cloneToken(node.forKeyword),
1254 cloneNode(node.iterable), cloneToken(node.rightParenthesis), 1319 cloneToken(node.leftParenthesis),
1320 cloneNode(node.identifier),
1321 cloneToken(node.inKeyword),
1322 cloneNode(node.iterable),
1323 cloneToken(node.rightParenthesis),
1255 cloneNode(node.body)); 1324 cloneNode(node.body));
1256 } 1325 }
1257 return new ForEachStatement.withDeclaration(cloneToken(node.awaitKeyword), 1326 return new ForEachStatement.withDeclaration(
1258 cloneToken(node.forKeyword), cloneToken(node.leftParenthesis), 1327 cloneToken(node.awaitKeyword),
1259 cloneNode(loopVariable), cloneToken(node.inKeyword), 1328 cloneToken(node.forKeyword),
1260 cloneNode(node.iterable), cloneToken(node.rightParenthesis), 1329 cloneToken(node.leftParenthesis),
1330 cloneNode(loopVariable),
1331 cloneToken(node.inKeyword),
1332 cloneNode(node.iterable),
1333 cloneToken(node.rightParenthesis),
1261 cloneNode(node.body)); 1334 cloneNode(node.body));
1262 } 1335 }
1263 1336
1264 @override 1337 @override
1265 FormalParameterList visitFormalParameterList(FormalParameterList node) => 1338 FormalParameterList visitFormalParameterList(FormalParameterList node) =>
1266 new FormalParameterList(cloneToken(node.leftParenthesis), 1339 new FormalParameterList(
1267 cloneNodeList(node.parameters), cloneToken(node.leftDelimiter), 1340 cloneToken(node.leftParenthesis),
1268 cloneToken(node.rightDelimiter), cloneToken(node.rightParenthesis)); 1341 cloneNodeList(node.parameters),
1342 cloneToken(node.leftDelimiter),
1343 cloneToken(node.rightDelimiter),
1344 cloneToken(node.rightParenthesis));
1269 1345
1270 @override 1346 @override
1271 ForStatement visitForStatement(ForStatement node) => new ForStatement( 1347 ForStatement visitForStatement(ForStatement node) => new ForStatement(
1272 cloneToken(node.forKeyword), cloneToken(node.leftParenthesis), 1348 cloneToken(node.forKeyword),
1273 cloneNode(node.variables), cloneNode(node.initialization), 1349 cloneToken(node.leftParenthesis),
1274 cloneToken(node.leftSeparator), cloneNode(node.condition), 1350 cloneNode(node.variables),
1275 cloneToken(node.rightSeparator), cloneNodeList(node.updaters), 1351 cloneNode(node.initialization),
1276 cloneToken(node.rightParenthesis), cloneNode(node.body)); 1352 cloneToken(node.leftSeparator),
1353 cloneNode(node.condition),
1354 cloneToken(node.rightSeparator),
1355 cloneNodeList(node.updaters),
1356 cloneToken(node.rightParenthesis),
1357 cloneNode(node.body));
1277 1358
1278 @override 1359 @override
1279 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => 1360 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) =>
1280 new FunctionDeclaration(cloneNode(node.documentationComment), 1361 new FunctionDeclaration(
1281 cloneNodeList(node.metadata), cloneToken(node.externalKeyword), 1362 cloneNode(node.documentationComment),
1282 cloneNode(node.returnType), cloneToken(node.propertyKeyword), 1363 cloneNodeList(node.metadata),
1283 cloneNode(node.name), cloneNode(node.functionExpression)); 1364 cloneToken(node.externalKeyword),
1365 cloneNode(node.returnType),
1366 cloneToken(node.propertyKeyword),
1367 cloneNode(node.name),
1368 cloneNode(node.functionExpression));
1284 1369
1285 @override 1370 @override
1286 FunctionDeclarationStatement visitFunctionDeclarationStatement( 1371 FunctionDeclarationStatement visitFunctionDeclarationStatement(
1287 FunctionDeclarationStatement node) => 1372 FunctionDeclarationStatement node) =>
1288 new FunctionDeclarationStatement(cloneNode(node.functionDeclaration)); 1373 new FunctionDeclarationStatement(cloneNode(node.functionDeclaration));
1289 1374
1290 @override 1375 @override
1291 FunctionExpression visitFunctionExpression(FunctionExpression node) => 1376 FunctionExpression visitFunctionExpression(FunctionExpression node) =>
1292 new FunctionExpression(cloneNode(node.typeParameters), 1377 new FunctionExpression(cloneNode(node.typeParameters),
1293 cloneNode(node.parameters), cloneNode(node.body)); 1378 cloneNode(node.parameters), cloneNode(node.body));
1294 1379
1295 @override 1380 @override
1296 FunctionExpressionInvocation visitFunctionExpressionInvocation( 1381 FunctionExpressionInvocation visitFunctionExpressionInvocation(
1297 FunctionExpressionInvocation node) => new FunctionExpressionInvocation( 1382 FunctionExpressionInvocation node) =>
1298 cloneNode(node.function), cloneNode(node.typeArguments), 1383 new FunctionExpressionInvocation(cloneNode(node.function),
1299 cloneNode(node.argumentList)); 1384 cloneNode(node.typeArguments), cloneNode(node.argumentList));
1300 1385
1301 @override 1386 @override
1302 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => 1387 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) =>
1303 new FunctionTypeAlias(cloneNode(node.documentationComment), 1388 new FunctionTypeAlias(
1304 cloneNodeList(node.metadata), cloneToken(node.typedefKeyword), 1389 cloneNode(node.documentationComment),
1305 cloneNode(node.returnType), cloneNode(node.name), 1390 cloneNodeList(node.metadata),
1306 cloneNode(node.typeParameters), cloneNode(node.parameters), 1391 cloneToken(node.typedefKeyword),
1392 cloneNode(node.returnType),
1393 cloneNode(node.name),
1394 cloneNode(node.typeParameters),
1395 cloneNode(node.parameters),
1307 cloneToken(node.semicolon)); 1396 cloneToken(node.semicolon));
1308 1397
1309 @override 1398 @override
1310 FunctionTypedFormalParameter visitFunctionTypedFormalParameter( 1399 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(
1311 FunctionTypedFormalParameter node) => new FunctionTypedFormalParameter( 1400 FunctionTypedFormalParameter node) =>
1312 cloneNode(node.documentationComment), cloneNodeList(node.metadata), 1401 new FunctionTypedFormalParameter(
1313 cloneNode(node.returnType), cloneNode(node.identifier), 1402 cloneNode(node.documentationComment),
1314 cloneNode(node.typeParameters), cloneNode(node.parameters)); 1403 cloneNodeList(node.metadata),
1404 cloneNode(node.returnType),
1405 cloneNode(node.identifier),
1406 cloneNode(node.typeParameters),
1407 cloneNode(node.parameters));
1315 1408
1316 @override 1409 @override
1317 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator( 1410 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
1318 cloneToken(node.keyword), cloneNodeList(node.hiddenNames)); 1411 cloneToken(node.keyword), cloneNodeList(node.hiddenNames));
1319 1412
1320 @override 1413 @override
1321 IfStatement visitIfStatement(IfStatement node) => new IfStatement( 1414 IfStatement visitIfStatement(IfStatement node) => new IfStatement(
1322 cloneToken(node.ifKeyword), cloneToken(node.leftParenthesis), 1415 cloneToken(node.ifKeyword),
1323 cloneNode(node.condition), cloneToken(node.rightParenthesis), 1416 cloneToken(node.leftParenthesis),
1324 cloneNode(node.thenStatement), cloneToken(node.elseKeyword), 1417 cloneNode(node.condition),
1418 cloneToken(node.rightParenthesis),
1419 cloneNode(node.thenStatement),
1420 cloneToken(node.elseKeyword),
1325 cloneNode(node.elseStatement)); 1421 cloneNode(node.elseStatement));
1326 1422
1327 @override 1423 @override
1328 ImplementsClause visitImplementsClause(ImplementsClause node) => 1424 ImplementsClause visitImplementsClause(ImplementsClause node) =>
1329 new ImplementsClause( 1425 new ImplementsClause(
1330 cloneToken(node.implementsKeyword), cloneNodeList(node.interfaces)); 1426 cloneToken(node.implementsKeyword), cloneNodeList(node.interfaces));
1331 1427
1332 @override 1428 @override
1333 ImportDirective visitImportDirective(ImportDirective node) { 1429 ImportDirective visitImportDirective(ImportDirective node) {
1334 ImportDirective directive = new ImportDirective( 1430 ImportDirective directive = new ImportDirective(
1335 cloneNode(node.documentationComment), cloneNodeList(node.metadata), 1431 cloneNode(node.documentationComment),
1336 cloneToken(node.keyword), cloneNode(node.uri), 1432 cloneNodeList(node.metadata),
1337 cloneToken(node.deferredKeyword), cloneToken(node.asKeyword), 1433 cloneToken(node.keyword),
1338 cloneNode(node.prefix), cloneNodeList(node.combinators), 1434 cloneNode(node.uri),
1435 cloneToken(node.deferredKeyword),
1436 cloneToken(node.asKeyword),
1437 cloneNode(node.prefix),
1438 cloneNodeList(node.combinators),
1339 cloneToken(node.semicolon)); 1439 cloneToken(node.semicolon));
1340 directive.source = node.source; 1440 directive.source = node.source;
1341 directive.uriContent = node.uriContent; 1441 directive.uriContent = node.uriContent;
1342 return directive; 1442 return directive;
1343 } 1443 }
1344 1444
1345 @override 1445 @override
1346 IndexExpression visitIndexExpression(IndexExpression node) { 1446 IndexExpression visitIndexExpression(IndexExpression node) {
1347 Token period = node.period; 1447 Token period = node.period;
1348 if (period == null) { 1448 if (period == null) {
1349 return new IndexExpression.forTarget(cloneNode(node.target), 1449 return new IndexExpression.forTarget(
1350 cloneToken(node.leftBracket), cloneNode(node.index), 1450 cloneNode(node.target),
1451 cloneToken(node.leftBracket),
1452 cloneNode(node.index),
1351 cloneToken(node.rightBracket)); 1453 cloneToken(node.rightBracket));
1352 } else { 1454 } else {
1353 return new IndexExpression.forCascade(cloneToken(period), 1455 return new IndexExpression.forCascade(
1354 cloneToken(node.leftBracket), cloneNode(node.index), 1456 cloneToken(period),
1457 cloneToken(node.leftBracket),
1458 cloneNode(node.index),
1355 cloneToken(node.rightBracket)); 1459 cloneToken(node.rightBracket));
1356 } 1460 }
1357 } 1461 }
1358 1462
1359 @override 1463 @override
1360 InstanceCreationExpression visitInstanceCreationExpression( 1464 InstanceCreationExpression visitInstanceCreationExpression(
1361 InstanceCreationExpression node) => new InstanceCreationExpression( 1465 InstanceCreationExpression node) =>
1362 cloneToken(node.keyword), cloneNode(node.constructorName), 1466 new InstanceCreationExpression(cloneToken(node.keyword),
1363 cloneNode(node.argumentList)); 1467 cloneNode(node.constructorName), cloneNode(node.argumentList));
1364 1468
1365 @override 1469 @override
1366 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) => 1470 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) =>
1367 new IntegerLiteral(cloneToken(node.literal), node.value); 1471 new IntegerLiteral(cloneToken(node.literal), node.value);
1368 1472
1369 @override 1473 @override
1370 InterpolationExpression visitInterpolationExpression( 1474 InterpolationExpression visitInterpolationExpression(
1371 InterpolationExpression node) => new InterpolationExpression( 1475 InterpolationExpression node) =>
1372 cloneToken(node.leftBracket), cloneNode(node.expression), 1476 new InterpolationExpression(cloneToken(node.leftBracket),
1373 cloneToken(node.rightBracket)); 1477 cloneNode(node.expression), cloneToken(node.rightBracket));
1374 1478
1375 @override 1479 @override
1376 InterpolationString visitInterpolationString(InterpolationString node) => 1480 InterpolationString visitInterpolationString(InterpolationString node) =>
1377 new InterpolationString(cloneToken(node.contents), node.value); 1481 new InterpolationString(cloneToken(node.contents), node.value);
1378 1482
1379 @override 1483 @override
1380 IsExpression visitIsExpression(IsExpression node) => new IsExpression( 1484 IsExpression visitIsExpression(IsExpression node) => new IsExpression(
1381 cloneNode(node.expression), cloneToken(node.isOperator), 1485 cloneNode(node.expression),
1382 cloneToken(node.notOperator), cloneNode(node.type)); 1486 cloneToken(node.isOperator),
1487 cloneToken(node.notOperator),
1488 cloneNode(node.type));
1383 1489
1384 @override 1490 @override
1385 Label visitLabel(Label node) => 1491 Label visitLabel(Label node) =>
1386 new Label(cloneNode(node.label), cloneToken(node.colon)); 1492 new Label(cloneNode(node.label), cloneToken(node.colon));
1387 1493
1388 @override 1494 @override
1389 LabeledStatement visitLabeledStatement(LabeledStatement node) => 1495 LabeledStatement visitLabeledStatement(LabeledStatement node) =>
1390 new LabeledStatement( 1496 new LabeledStatement(
1391 cloneNodeList(node.labels), cloneNode(node.statement)); 1497 cloneNodeList(node.labels), cloneNode(node.statement));
1392 1498
1393 @override 1499 @override
1394 LibraryDirective visitLibraryDirective(LibraryDirective node) => 1500 LibraryDirective visitLibraryDirective(LibraryDirective node) =>
1395 new LibraryDirective(cloneNode(node.documentationComment), 1501 new LibraryDirective(
1396 cloneNodeList(node.metadata), cloneToken(node.libraryKeyword), 1502 cloneNode(node.documentationComment),
1397 cloneNode(node.name), cloneToken(node.semicolon)); 1503 cloneNodeList(node.metadata),
1504 cloneToken(node.libraryKeyword),
1505 cloneNode(node.name),
1506 cloneToken(node.semicolon));
1398 1507
1399 @override 1508 @override
1400 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) => 1509 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) =>
1401 new LibraryIdentifier(cloneNodeList(node.components)); 1510 new LibraryIdentifier(cloneNodeList(node.components));
1402 1511
1403 @override 1512 @override
1404 ListLiteral visitListLiteral(ListLiteral node) => new ListLiteral( 1513 ListLiteral visitListLiteral(ListLiteral node) => new ListLiteral(
1405 cloneToken(node.constKeyword), cloneNode(node.typeArguments), 1514 cloneToken(node.constKeyword),
1406 cloneToken(node.leftBracket), cloneNodeList(node.elements), 1515 cloneNode(node.typeArguments),
1516 cloneToken(node.leftBracket),
1517 cloneNodeList(node.elements),
1407 cloneToken(node.rightBracket)); 1518 cloneToken(node.rightBracket));
1408 1519
1409 @override 1520 @override
1410 MapLiteral visitMapLiteral(MapLiteral node) => new MapLiteral( 1521 MapLiteral visitMapLiteral(MapLiteral node) => new MapLiteral(
1411 cloneToken(node.constKeyword), cloneNode(node.typeArguments), 1522 cloneToken(node.constKeyword),
1412 cloneToken(node.leftBracket), cloneNodeList(node.entries), 1523 cloneNode(node.typeArguments),
1524 cloneToken(node.leftBracket),
1525 cloneNodeList(node.entries),
1413 cloneToken(node.rightBracket)); 1526 cloneToken(node.rightBracket));
1414 1527
1415 @override 1528 @override
1416 MapLiteralEntry visitMapLiteralEntry( 1529 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) =>
1417 MapLiteralEntry node) => new MapLiteralEntry( 1530 new MapLiteralEntry(cloneNode(node.key), cloneToken(node.separator),
1418 cloneNode(node.key), cloneToken(node.separator), cloneNode(node.value)); 1531 cloneNode(node.value));
1419 1532
1420 @override 1533 @override
1421 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => 1534 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) =>
1422 new MethodDeclaration(cloneNode(node.documentationComment), 1535 new MethodDeclaration(
1423 cloneNodeList(node.metadata), cloneToken(node.externalKeyword), 1536 cloneNode(node.documentationComment),
1424 cloneToken(node.modifierKeyword), cloneNode(node.returnType), 1537 cloneNodeList(node.metadata),
1425 cloneToken(node.propertyKeyword), cloneToken(node.operatorKeyword), 1538 cloneToken(node.externalKeyword),
1426 cloneNode(node.name), cloneNode(node.typeParameters), 1539 cloneToken(node.modifierKeyword),
1427 cloneNode(node.parameters), cloneNode(node.body)); 1540 cloneNode(node.returnType),
1541 cloneToken(node.propertyKeyword),
1542 cloneToken(node.operatorKeyword),
1543 cloneNode(node.name),
1544 cloneNode(node.typeParameters),
1545 cloneNode(node.parameters),
1546 cloneNode(node.body));
1428 1547
1429 @override 1548 @override
1430 MethodInvocation visitMethodInvocation(MethodInvocation node) => 1549 MethodInvocation visitMethodInvocation(MethodInvocation node) =>
1431 new MethodInvocation(cloneNode(node.target), cloneToken(node.operator), 1550 new MethodInvocation(
1432 cloneNode(node.methodName), cloneNode(node.typeArguments), 1551 cloneNode(node.target),
1552 cloneToken(node.operator),
1553 cloneNode(node.methodName),
1554 cloneNode(node.typeArguments),
1433 cloneNode(node.argumentList)); 1555 cloneNode(node.argumentList));
1434 1556
1435 @override 1557 @override
1436 NamedExpression visitNamedExpression(NamedExpression node) => 1558 NamedExpression visitNamedExpression(NamedExpression node) =>
1437 new NamedExpression(cloneNode(node.name), cloneNode(node.expression)); 1559 new NamedExpression(cloneNode(node.name), cloneNode(node.expression));
1438 1560
1439 @override 1561 @override
1440 AstNode visitNativeClause(NativeClause node) => 1562 AstNode visitNativeClause(NativeClause node) =>
1441 new NativeClause(cloneToken(node.nativeKeyword), cloneNode(node.name)); 1563 new NativeClause(cloneToken(node.nativeKeyword), cloneNode(node.name));
1442 1564
1443 @override 1565 @override
1444 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => 1566 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) =>
1445 new NativeFunctionBody(cloneToken(node.nativeKeyword), 1567 new NativeFunctionBody(cloneToken(node.nativeKeyword),
1446 cloneNode(node.stringLiteral), cloneToken(node.semicolon)); 1568 cloneNode(node.stringLiteral), cloneToken(node.semicolon));
1447 1569
1448 @override 1570 @override
1449 NullLiteral visitNullLiteral(NullLiteral node) => 1571 NullLiteral visitNullLiteral(NullLiteral node) =>
1450 new NullLiteral(cloneToken(node.literal)); 1572 new NullLiteral(cloneToken(node.literal));
1451 1573
1452 @override 1574 @override
1453 ParenthesizedExpression visitParenthesizedExpression( 1575 ParenthesizedExpression visitParenthesizedExpression(
1454 ParenthesizedExpression node) => new ParenthesizedExpression( 1576 ParenthesizedExpression node) =>
1455 cloneToken(node.leftParenthesis), cloneNode(node.expression), 1577 new ParenthesizedExpression(cloneToken(node.leftParenthesis),
1456 cloneToken(node.rightParenthesis)); 1578 cloneNode(node.expression), cloneToken(node.rightParenthesis));
1457 1579
1458 @override 1580 @override
1459 PartDirective visitPartDirective(PartDirective node) { 1581 PartDirective visitPartDirective(PartDirective node) {
1460 PartDirective directive = new PartDirective( 1582 PartDirective directive = new PartDirective(
1461 cloneNode(node.documentationComment), cloneNodeList(node.metadata), 1583 cloneNode(node.documentationComment),
1462 cloneToken(node.partKeyword), cloneNode(node.uri), 1584 cloneNodeList(node.metadata),
1585 cloneToken(node.partKeyword),
1586 cloneNode(node.uri),
1463 cloneToken(node.semicolon)); 1587 cloneToken(node.semicolon));
1464 directive.source = node.source; 1588 directive.source = node.source;
1465 directive.uriContent = node.uriContent; 1589 directive.uriContent = node.uriContent;
1466 return directive; 1590 return directive;
1467 } 1591 }
1468 1592
1469 @override 1593 @override
1470 PartOfDirective visitPartOfDirective(PartOfDirective node) => 1594 PartOfDirective visitPartOfDirective(PartOfDirective node) =>
1471 new PartOfDirective(cloneNode(node.documentationComment), 1595 new PartOfDirective(
1472 cloneNodeList(node.metadata), cloneToken(node.partKeyword), 1596 cloneNode(node.documentationComment),
1473 cloneToken(node.ofKeyword), cloneNode(node.libraryName), 1597 cloneNodeList(node.metadata),
1598 cloneToken(node.partKeyword),
1599 cloneToken(node.ofKeyword),
1600 cloneNode(node.libraryName),
1474 cloneToken(node.semicolon)); 1601 cloneToken(node.semicolon));
1475 1602
1476 @override 1603 @override
1477 PostfixExpression visitPostfixExpression(PostfixExpression node) => 1604 PostfixExpression visitPostfixExpression(PostfixExpression node) =>
1478 new PostfixExpression(cloneNode(node.operand), cloneToken(node.operator)); 1605 new PostfixExpression(cloneNode(node.operand), cloneToken(node.operator));
1479 1606
1480 @override 1607 @override
1481 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => 1608 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) =>
1482 new PrefixedIdentifier(cloneNode(node.prefix), cloneToken(node.period), 1609 new PrefixedIdentifier(cloneNode(node.prefix), cloneToken(node.period),
1483 cloneNode(node.identifier)); 1610 cloneNode(node.identifier));
1484 1611
1485 @override 1612 @override
1486 PrefixExpression visitPrefixExpression(PrefixExpression node) => 1613 PrefixExpression visitPrefixExpression(PrefixExpression node) =>
1487 new PrefixExpression(cloneToken(node.operator), cloneNode(node.operand)); 1614 new PrefixExpression(cloneToken(node.operator), cloneNode(node.operand));
1488 1615
1489 @override 1616 @override
1490 PropertyAccess visitPropertyAccess(PropertyAccess node) => new PropertyAccess( 1617 PropertyAccess visitPropertyAccess(PropertyAccess node) => new PropertyAccess(
1491 cloneNode(node.target), cloneToken(node.operator), 1618 cloneNode(node.target),
1619 cloneToken(node.operator),
1492 cloneNode(node.propertyName)); 1620 cloneNode(node.propertyName));
1493 1621
1494 @override 1622 @override
1495 RedirectingConstructorInvocation visitRedirectingConstructorInvocation( 1623 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(
1496 RedirectingConstructorInvocation node) => 1624 RedirectingConstructorInvocation node) =>
1497 new RedirectingConstructorInvocation(cloneToken(node.thisKeyword), 1625 new RedirectingConstructorInvocation(
1498 cloneToken(node.period), cloneNode(node.constructorName), 1626 cloneToken(node.thisKeyword),
1627 cloneToken(node.period),
1628 cloneNode(node.constructorName),
1499 cloneNode(node.argumentList)); 1629 cloneNode(node.argumentList));
1500 1630
1501 @override 1631 @override
1502 RethrowExpression visitRethrowExpression(RethrowExpression node) => 1632 RethrowExpression visitRethrowExpression(RethrowExpression node) =>
1503 new RethrowExpression(cloneToken(node.rethrowKeyword)); 1633 new RethrowExpression(cloneToken(node.rethrowKeyword));
1504 1634
1505 @override 1635 @override
1506 ReturnStatement visitReturnStatement(ReturnStatement node) => 1636 ReturnStatement visitReturnStatement(ReturnStatement node) =>
1507 new ReturnStatement(cloneToken(node.returnKeyword), 1637 new ReturnStatement(cloneToken(node.returnKeyword),
1508 cloneNode(node.expression), cloneToken(node.semicolon)); 1638 cloneNode(node.expression), cloneToken(node.semicolon));
1509 1639
1510 @override 1640 @override
1511 ScriptTag visitScriptTag(ScriptTag node) => 1641 ScriptTag visitScriptTag(ScriptTag node) =>
1512 new ScriptTag(cloneToken(node.scriptTag)); 1642 new ScriptTag(cloneToken(node.scriptTag));
1513 1643
1514 @override 1644 @override
1515 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator( 1645 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
1516 cloneToken(node.keyword), cloneNodeList(node.shownNames)); 1646 cloneToken(node.keyword), cloneNodeList(node.shownNames));
1517 1647
1518 @override 1648 @override
1519 SimpleFormalParameter visitSimpleFormalParameter( 1649 SimpleFormalParameter visitSimpleFormalParameter(
1520 SimpleFormalParameter node) => new SimpleFormalParameter( 1650 SimpleFormalParameter node) =>
1521 cloneNode(node.documentationComment), cloneNodeList(node.metadata), 1651 new SimpleFormalParameter(
1522 cloneToken(node.keyword), cloneNode(node.type), 1652 cloneNode(node.documentationComment),
1523 cloneNode(node.identifier)); 1653 cloneNodeList(node.metadata),
1654 cloneToken(node.keyword),
1655 cloneNode(node.type),
1656 cloneNode(node.identifier));
1524 1657
1525 @override 1658 @override
1526 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) => 1659 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) =>
1527 new SimpleIdentifier(cloneToken(node.token)); 1660 new SimpleIdentifier(cloneToken(node.token));
1528 1661
1529 @override 1662 @override
1530 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) => 1663 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) =>
1531 new SimpleStringLiteral(cloneToken(node.literal), node.value); 1664 new SimpleStringLiteral(cloneToken(node.literal), node.value);
1532 1665
1533 @override 1666 @override
1534 StringInterpolation visitStringInterpolation(StringInterpolation node) => 1667 StringInterpolation visitStringInterpolation(StringInterpolation node) =>
1535 new StringInterpolation(cloneNodeList(node.elements)); 1668 new StringInterpolation(cloneNodeList(node.elements));
1536 1669
1537 @override 1670 @override
1538 SuperConstructorInvocation visitSuperConstructorInvocation( 1671 SuperConstructorInvocation visitSuperConstructorInvocation(
1539 SuperConstructorInvocation node) => new SuperConstructorInvocation( 1672 SuperConstructorInvocation node) =>
1540 cloneToken(node.superKeyword), cloneToken(node.period), 1673 new SuperConstructorInvocation(
1541 cloneNode(node.constructorName), cloneNode(node.argumentList)); 1674 cloneToken(node.superKeyword),
1675 cloneToken(node.period),
1676 cloneNode(node.constructorName),
1677 cloneNode(node.argumentList));
1542 1678
1543 @override 1679 @override
1544 SuperExpression visitSuperExpression(SuperExpression node) => 1680 SuperExpression visitSuperExpression(SuperExpression node) =>
1545 new SuperExpression(cloneToken(node.superKeyword)); 1681 new SuperExpression(cloneToken(node.superKeyword));
1546 1682
1547 @override 1683 @override
1548 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase( 1684 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(
1549 cloneNodeList(node.labels), cloneToken(node.keyword), 1685 cloneNodeList(node.labels),
1550 cloneNode(node.expression), cloneToken(node.colon), 1686 cloneToken(node.keyword),
1687 cloneNode(node.expression),
1688 cloneToken(node.colon),
1551 cloneNodeList(node.statements)); 1689 cloneNodeList(node.statements));
1552 1690
1553 @override 1691 @override
1554 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault( 1692 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(
1555 cloneNodeList(node.labels), cloneToken(node.keyword), 1693 cloneNodeList(node.labels),
1556 cloneToken(node.colon), cloneNodeList(node.statements)); 1694 cloneToken(node.keyword),
1695 cloneToken(node.colon),
1696 cloneNodeList(node.statements));
1557 1697
1558 @override 1698 @override
1559 SwitchStatement visitSwitchStatement(SwitchStatement node) => 1699 SwitchStatement visitSwitchStatement(SwitchStatement node) =>
1560 new SwitchStatement(cloneToken(node.switchKeyword), 1700 new SwitchStatement(
1561 cloneToken(node.leftParenthesis), cloneNode(node.expression), 1701 cloneToken(node.switchKeyword),
1562 cloneToken(node.rightParenthesis), cloneToken(node.leftBracket), 1702 cloneToken(node.leftParenthesis),
1563 cloneNodeList(node.members), cloneToken(node.rightBracket)); 1703 cloneNode(node.expression),
1704 cloneToken(node.rightParenthesis),
1705 cloneToken(node.leftBracket),
1706 cloneNodeList(node.members),
1707 cloneToken(node.rightBracket));
1564 1708
1565 @override 1709 @override
1566 SymbolLiteral visitSymbolLiteral(SymbolLiteral node) => new SymbolLiteral( 1710 SymbolLiteral visitSymbolLiteral(SymbolLiteral node) => new SymbolLiteral(
1567 cloneToken(node.poundSign), cloneTokenList(node.components)); 1711 cloneToken(node.poundSign), cloneTokenList(node.components));
1568 1712
1569 @override 1713 @override
1570 ThisExpression visitThisExpression(ThisExpression node) => 1714 ThisExpression visitThisExpression(ThisExpression node) =>
1571 new ThisExpression(cloneToken(node.thisKeyword)); 1715 new ThisExpression(cloneToken(node.thisKeyword));
1572 1716
1573 @override 1717 @override
1574 ThrowExpression visitThrowExpression(ThrowExpression node) => 1718 ThrowExpression visitThrowExpression(ThrowExpression node) =>
1575 new ThrowExpression( 1719 new ThrowExpression(
1576 cloneToken(node.throwKeyword), cloneNode(node.expression)); 1720 cloneToken(node.throwKeyword), cloneNode(node.expression));
1577 1721
1578 @override 1722 @override
1579 TopLevelVariableDeclaration visitTopLevelVariableDeclaration( 1723 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(
1580 TopLevelVariableDeclaration node) => new TopLevelVariableDeclaration( 1724 TopLevelVariableDeclaration node) =>
1581 cloneNode(node.documentationComment), cloneNodeList(node.metadata), 1725 new TopLevelVariableDeclaration(
1582 cloneNode(node.variables), cloneToken(node.semicolon)); 1726 cloneNode(node.documentationComment),
1727 cloneNodeList(node.metadata),
1728 cloneNode(node.variables),
1729 cloneToken(node.semicolon));
1583 1730
1584 @override 1731 @override
1585 TryStatement visitTryStatement(TryStatement node) => new TryStatement( 1732 TryStatement visitTryStatement(TryStatement node) => new TryStatement(
1586 cloneToken(node.tryKeyword), cloneNode(node.body), 1733 cloneToken(node.tryKeyword),
1587 cloneNodeList(node.catchClauses), cloneToken(node.finallyKeyword), 1734 cloneNode(node.body),
1735 cloneNodeList(node.catchClauses),
1736 cloneToken(node.finallyKeyword),
1588 cloneNode(node.finallyBlock)); 1737 cloneNode(node.finallyBlock));
1589 1738
1590 @override 1739 @override
1591 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => 1740 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) =>
1592 new TypeArgumentList(cloneToken(node.leftBracket), 1741 new TypeArgumentList(cloneToken(node.leftBracket),
1593 cloneNodeList(node.arguments), cloneToken(node.rightBracket)); 1742 cloneNodeList(node.arguments), cloneToken(node.rightBracket));
1594 1743
1595 @override 1744 @override
1596 TypeName visitTypeName(TypeName node) => 1745 TypeName visitTypeName(TypeName node) =>
1597 new TypeName(cloneNode(node.name), cloneNode(node.typeArguments)); 1746 new TypeName(cloneNode(node.name), cloneNode(node.typeArguments));
1598 1747
1599 @override 1748 @override
1600 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter( 1749 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(
1601 cloneNode(node.documentationComment), cloneNodeList(node.metadata), 1750 cloneNode(node.documentationComment),
1602 cloneNode(node.name), cloneToken(node.extendsKeyword), 1751 cloneNodeList(node.metadata),
1752 cloneNode(node.name),
1753 cloneToken(node.extendsKeyword),
1603 cloneNode(node.bound)); 1754 cloneNode(node.bound));
1604 1755
1605 @override 1756 @override
1606 TypeParameterList visitTypeParameterList(TypeParameterList node) => 1757 TypeParameterList visitTypeParameterList(TypeParameterList node) =>
1607 new TypeParameterList(cloneToken(node.leftBracket), 1758 new TypeParameterList(cloneToken(node.leftBracket),
1608 cloneNodeList(node.typeParameters), cloneToken(node.rightBracket)); 1759 cloneNodeList(node.typeParameters), cloneToken(node.rightBracket));
1609 1760
1610 @override 1761 @override
1611 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => 1762 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) =>
1612 new VariableDeclaration(cloneNode(node.name), cloneToken(node.equals), 1763 new VariableDeclaration(cloneNode(node.name), cloneToken(node.equals),
1613 cloneNode(node.initializer)); 1764 cloneNode(node.initializer));
1614 1765
1615 @override 1766 @override
1616 VariableDeclarationList visitVariableDeclarationList( 1767 VariableDeclarationList visitVariableDeclarationList(
1617 VariableDeclarationList node) => new VariableDeclarationList( 1768 VariableDeclarationList node) =>
1618 cloneNode(node.documentationComment), cloneNodeList(node.metadata), 1769 new VariableDeclarationList(
1619 cloneToken(node.keyword), cloneNode(node.type), 1770 cloneNode(node.documentationComment),
1620 cloneNodeList(node.variables)); 1771 cloneNodeList(node.metadata),
1772 cloneToken(node.keyword),
1773 cloneNode(node.type),
1774 cloneNodeList(node.variables));
1621 1775
1622 @override 1776 @override
1623 VariableDeclarationStatement visitVariableDeclarationStatement( 1777 VariableDeclarationStatement visitVariableDeclarationStatement(
1624 VariableDeclarationStatement node) => new VariableDeclarationStatement( 1778 VariableDeclarationStatement node) =>
1625 cloneNode(node.variables), cloneToken(node.semicolon)); 1779 new VariableDeclarationStatement(
1780 cloneNode(node.variables), cloneToken(node.semicolon));
1626 1781
1627 @override 1782 @override
1628 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement( 1783 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
1629 cloneToken(node.whileKeyword), cloneToken(node.leftParenthesis), 1784 cloneToken(node.whileKeyword),
1630 cloneNode(node.condition), cloneToken(node.rightParenthesis), 1785 cloneToken(node.leftParenthesis),
1786 cloneNode(node.condition),
1787 cloneToken(node.rightParenthesis),
1631 cloneNode(node.body)); 1788 cloneNode(node.body));
1632 1789
1633 @override 1790 @override
1634 WithClause visitWithClause(WithClause node) => new WithClause( 1791 WithClause visitWithClause(WithClause node) => new WithClause(
1635 cloneToken(node.withKeyword), cloneNodeList(node.mixinTypes)); 1792 cloneToken(node.withKeyword), cloneNodeList(node.mixinTypes));
1636 1793
1637 @override 1794 @override
1638 YieldStatement visitYieldStatement(YieldStatement node) => new YieldStatement( 1795 YieldStatement visitYieldStatement(YieldStatement node) => new YieldStatement(
1639 cloneToken(node.yieldKeyword), cloneToken(node.star), 1796 cloneToken(node.yieldKeyword),
1640 cloneNode(node.expression), cloneToken(node.semicolon)); 1797 cloneToken(node.star),
1798 cloneNode(node.expression),
1799 cloneToken(node.semicolon));
1641 1800
1642 /** 1801 /**
1643 * Return a clone of the given [node]. 1802 * Return a clone of the given [node].
1644 */ 1803 */
1645 static AstNode clone(AstNode node) { 1804 static AstNode clone(AstNode node) {
1646 return node.accept(new AstCloner()); 1805 return node.accept(new AstCloner());
1647 } 1806 }
1648 } 1807 }
1649 1808
1650 /** 1809 /**
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
2719 */ 2878 */
2720 static const List<AstNode> EMPTY_LIST = const <AstNode>[]; 2879 static const List<AstNode> EMPTY_LIST = const <AstNode>[];
2721 2880
2722 /** 2881 /**
2723 * A comparator that can be used to sort AST nodes in lexical order. In other 2882 * A comparator that can be used to sort AST nodes in lexical order. In other
2724 * words, `compare` will return a negative value if the offset of the first 2883 * words, `compare` will return a negative value if the offset of the first
2725 * node is less than the offset of the second node, zero (0) if the nodes have 2884 * node is less than the offset of the second node, zero (0) if the nodes have
2726 * the same offset, and a positive value if the offset of the first node is 2885 * the same offset, and a positive value if the offset of the first node is
2727 * greater than the offset of the second node. 2886 * greater than the offset of the second node.
2728 */ 2887 */
2729 static Comparator<AstNode> LEXICAL_ORDER = 2888 static Comparator<AstNode> LEXICAL_ORDER = (AstNode first, AstNode second) =>
2730 (AstNode first, AstNode second) => first.offset - second.offset; 2889 first.offset - second.offset;
2731 2890
2732 /** 2891 /**
2733 * The parent of the node, or `null` if the node is the root of an AST 2892 * The parent of the node, or `null` if the node is the root of an AST
2734 * structure. 2893 * structure.
2735 */ 2894 */
2736 AstNode _parent; 2895 AstNode _parent;
2737 2896
2738 /** 2897 /**
2739 * A table mapping the names of properties to their values, or `null` if this 2898 * A table mapping the names of properties to their values, or `null` if this
2740 * node does not have any properties associated with it. 2899 * node does not have any properties associated with it.
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
3844 * The body of the catch block. 4003 * The body of the catch block.
3845 */ 4004 */
3846 Block _body; 4005 Block _body;
3847 4006
3848 /** 4007 /**
3849 * Initialize a newly created catch clause. The [onKeyword] and 4008 * Initialize a newly created catch clause. The [onKeyword] and
3850 * [exceptionType] can be `null` if the clause will catch all exceptions. The 4009 * [exceptionType] can be `null` if the clause will catch all exceptions. The
3851 * [comma] and [stackTraceParameter] can be `null` if the stack trace is not 4010 * [comma] and [stackTraceParameter] can be `null` if the stack trace is not
3852 * referencable within the body. 4011 * referencable within the body.
3853 */ 4012 */
3854 CatchClause(this.onKeyword, TypeName exceptionType, this.catchKeyword, 4013 CatchClause(
3855 this.leftParenthesis, SimpleIdentifier exceptionParameter, this.comma, 4014 this.onKeyword,
3856 SimpleIdentifier stackTraceParameter, this.rightParenthesis, Block body) { 4015 TypeName exceptionType,
4016 this.catchKeyword,
4017 this.leftParenthesis,
4018 SimpleIdentifier exceptionParameter,
4019 this.comma,
4020 SimpleIdentifier stackTraceParameter,
4021 this.rightParenthesis,
4022 Block body) {
3857 _exceptionType = _becomeParentOf(exceptionType); 4023 _exceptionType = _becomeParentOf(exceptionType);
3858 _exceptionParameter = _becomeParentOf(exceptionParameter); 4024 _exceptionParameter = _becomeParentOf(exceptionParameter);
3859 _stackTraceParameter = _becomeParentOf(stackTraceParameter); 4025 _stackTraceParameter = _becomeParentOf(stackTraceParameter);
3860 _body = _becomeParentOf(body); 4026 _body = _becomeParentOf(body);
3861 } 4027 }
3862 4028
3863 @override 4029 @override
3864 Token get beginToken { 4030 Token get beginToken {
3865 if (onKeyword != null) { 4031 if (onKeyword != null) {
3866 return onKeyword; 4032 return onKeyword;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
4049 /** 4215 /**
4050 * Initialize a newly created class declaration. Either or both of the 4216 * Initialize a newly created class declaration. Either or both of the
4051 * [comment] and [metadata] can be `null` if the class does not have the 4217 * [comment] and [metadata] can be `null` if the class does not have the
4052 * corresponding attribute. The [abstractKeyword] can be `null` if the class 4218 * corresponding attribute. The [abstractKeyword] can be `null` if the class
4053 * is not abstract. The [typeParameters] can be `null` if the class does not 4219 * is not abstract. The [typeParameters] can be `null` if the class does not
4054 * have any type parameters. Any or all of the [extendsClause], [withClause], 4220 * have any type parameters. Any or all of the [extendsClause], [withClause],
4055 * and [implementsClause] can be `null` if the class does not have the 4221 * and [implementsClause] can be `null` if the class does not have the
4056 * corresponding clause. The list of [members] can be `null` if the class does 4222 * corresponding clause. The list of [members] can be `null` if the class does
4057 * not have any members. 4223 * not have any members.
4058 */ 4224 */
4059 ClassDeclaration(Comment comment, List<Annotation> metadata, 4225 ClassDeclaration(
4060 this.abstractKeyword, this.classKeyword, SimpleIdentifier name, 4226 Comment comment,
4061 TypeParameterList typeParameters, ExtendsClause extendsClause, 4227 List<Annotation> metadata,
4062 WithClause withClause, ImplementsClause implementsClause, 4228 this.abstractKeyword,
4063 this.leftBracket, List<ClassMember> members, this.rightBracket) 4229 this.classKeyword,
4230 SimpleIdentifier name,
4231 TypeParameterList typeParameters,
4232 ExtendsClause extendsClause,
4233 WithClause withClause,
4234 ImplementsClause implementsClause,
4235 this.leftBracket,
4236 List<ClassMember> members,
4237 this.rightBracket)
4064 : super(comment, metadata, name) { 4238 : super(comment, metadata, name) {
4065 _typeParameters = _becomeParentOf(typeParameters); 4239 _typeParameters = _becomeParentOf(typeParameters);
4066 _extendsClause = _becomeParentOf(extendsClause); 4240 _extendsClause = _becomeParentOf(extendsClause);
4067 _withClause = _becomeParentOf(withClause); 4241 _withClause = _becomeParentOf(withClause);
4068 _implementsClause = _becomeParentOf(implementsClause); 4242 _implementsClause = _becomeParentOf(implementsClause);
4069 _members = new NodeList<ClassMember>(this, members); 4243 _members = new NodeList<ClassMember>(this, members);
4070 } 4244 }
4071 4245
4072 @override 4246 @override
4073 Iterable get childEntities => super._childEntities 4247 Iterable get childEntities => super._childEntities
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
4305 ImplementsClause _implementsClause; 4479 ImplementsClause _implementsClause;
4306 4480
4307 /** 4481 /**
4308 * Initialize a newly created class type alias. Either or both of the 4482 * Initialize a newly created class type alias. Either or both of the
4309 * [comment] and [metadata] can be `null` if the class type alias does not 4483 * [comment] and [metadata] can be `null` if the class type alias does not
4310 * have the corresponding attribute. The [typeParameters] can be `null` if the 4484 * have the corresponding attribute. The [typeParameters] can be `null` if the
4311 * class does not have any type parameters. The [abstractKeyword] can be 4485 * class does not have any type parameters. The [abstractKeyword] can be
4312 * `null` if the class is not abstract. The [implementsClause] can be `null` 4486 * `null` if the class is not abstract. The [implementsClause] can be `null`
4313 * if the class does not implement any interfaces. 4487 * if the class does not implement any interfaces.
4314 */ 4488 */
4315 ClassTypeAlias(Comment comment, List<Annotation> metadata, Token keyword, 4489 ClassTypeAlias(
4316 SimpleIdentifier name, TypeParameterList typeParameters, this.equals, 4490 Comment comment,
4317 this.abstractKeyword, TypeName superclass, WithClause withClause, 4491 List<Annotation> metadata,
4318 ImplementsClause implementsClause, Token semicolon) 4492 Token keyword,
4493 SimpleIdentifier name,
4494 TypeParameterList typeParameters,
4495 this.equals,
4496 this.abstractKeyword,
4497 TypeName superclass,
4498 WithClause withClause,
4499 ImplementsClause implementsClause,
4500 Token semicolon)
4319 : super(comment, metadata, keyword, name, semicolon) { 4501 : super(comment, metadata, keyword, name, semicolon) {
4320 _typeParameters = _becomeParentOf(typeParameters); 4502 _typeParameters = _becomeParentOf(typeParameters);
4321 _superclass = _becomeParentOf(superclass); 4503 _superclass = _becomeParentOf(superclass);
4322 _withClause = _becomeParentOf(withClause); 4504 _withClause = _becomeParentOf(withClause);
4323 _implementsClause = _becomeParentOf(implementsClause); 4505 _implementsClause = _becomeParentOf(implementsClause);
4324 } 4506 }
4325 4507
4326 @override 4508 @override
4327 Iterable get childEntities => super._childEntities 4509 Iterable get childEntities => super._childEntities
4328 ..add(typedefKeyword) 4510 ..add(typedefKeyword)
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
4695 */ 4877 */
4696 LineInfo lineInfo; 4878 LineInfo lineInfo;
4697 4879
4698 /** 4880 /**
4699 * Initialize a newly created compilation unit to have the given directives 4881 * Initialize a newly created compilation unit to have the given directives
4700 * and declarations. The [scriptTag] can be `null` if there is no script tag 4882 * and declarations. The [scriptTag] can be `null` if there is no script tag
4701 * in the compilation unit. The list of [directives] can be `null` if there 4883 * in the compilation unit. The list of [directives] can be `null` if there
4702 * are no directives in the compilation unit. The list of [declarations] can 4884 * are no directives in the compilation unit. The list of [declarations] can
4703 * be `null` if there are no declarations in the compilation unit. 4885 * be `null` if there are no declarations in the compilation unit.
4704 */ 4886 */
4705 CompilationUnit(this.beginToken, ScriptTag scriptTag, 4887 CompilationUnit(
4706 List<Directive> directives, List<CompilationUnitMember> declarations, 4888 this.beginToken,
4889 ScriptTag scriptTag,
4890 List<Directive> directives,
4891 List<CompilationUnitMember> declarations,
4707 this.endToken) { 4892 this.endToken) {
4708 _scriptTag = _becomeParentOf(scriptTag); 4893 _scriptTag = _becomeParentOf(scriptTag);
4709 _directives = new NodeList<Directive>(this, directives); 4894 _directives = new NodeList<Directive>(this, directives);
4710 _declarations = new NodeList<CompilationUnitMember>(this, declarations); 4895 _declarations = new NodeList<CompilationUnitMember>(this, declarations);
4711 } 4896 }
4712 4897
4713 @override 4898 @override
4714 Iterable get childEntities { 4899 Iterable get childEntities {
4715 ChildEntities result = new ChildEntities()..add(_scriptTag); 4900 ChildEntities result = new ChildEntities()..add(_scriptTag);
4716 if (_directivesAreBeforeDeclarations) { 4901 if (_directivesAreBeforeDeclarations) {
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
5367 * constructor cannot be used to create a constant. The [factoryKeyword] can 5552 * constructor cannot be used to create a constant. The [factoryKeyword] can
5368 * be `null` if the constructor is not a factory. The [period] and [name] can 5553 * be `null` if the constructor is not a factory. The [period] and [name] can
5369 * both be `null` if the constructor is not a named constructor. The 5554 * both be `null` if the constructor is not a named constructor. The
5370 * [separator] can be `null` if the constructor does not have any initializers 5555 * [separator] can be `null` if the constructor does not have any initializers
5371 * and does not redirect to a different constructor. The list of 5556 * and does not redirect to a different constructor. The list of
5372 * [initializers] can be `null` if the constructor does not have any 5557 * [initializers] can be `null` if the constructor does not have any
5373 * initializers. The [redirectedConstructor] can be `null` if the constructor 5558 * initializers. The [redirectedConstructor] can be `null` if the constructor
5374 * does not redirect to a different constructor. The [body] can be `null` if 5559 * does not redirect to a different constructor. The [body] can be `null` if
5375 * the constructor does not have a body. 5560 * the constructor does not have a body.
5376 */ 5561 */
5377 ConstructorDeclaration(Comment comment, List<Annotation> metadata, 5562 ConstructorDeclaration(
5378 this.externalKeyword, this.constKeyword, this.factoryKeyword, 5563 Comment comment,
5379 Identifier returnType, this.period, SimpleIdentifier name, 5564 List<Annotation> metadata,
5380 FormalParameterList parameters, this.separator, 5565 this.externalKeyword,
5566 this.constKeyword,
5567 this.factoryKeyword,
5568 Identifier returnType,
5569 this.period,
5570 SimpleIdentifier name,
5571 FormalParameterList parameters,
5572 this.separator,
5381 List<ConstructorInitializer> initializers, 5573 List<ConstructorInitializer> initializers,
5382 ConstructorName redirectedConstructor, FunctionBody body) 5574 ConstructorName redirectedConstructor,
5575 FunctionBody body)
5383 : super(comment, metadata) { 5576 : super(comment, metadata) {
5384 _returnType = _becomeParentOf(returnType); 5577 _returnType = _becomeParentOf(returnType);
5385 _name = _becomeParentOf(name); 5578 _name = _becomeParentOf(name);
5386 _parameters = _becomeParentOf(parameters); 5579 _parameters = _becomeParentOf(parameters);
5387 _initializers = new NodeList<ConstructorInitializer>(this, initializers); 5580 _initializers = new NodeList<ConstructorInitializer>(this, initializers);
5388 _redirectedConstructor = _becomeParentOf(redirectedConstructor); 5581 _redirectedConstructor = _becomeParentOf(redirectedConstructor);
5389 _body = _becomeParentOf(body); 5582 _body = _becomeParentOf(body);
5390 } 5583 }
5391 5584
5392 /** 5585 /**
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
6153 Token rightParenthesis; 6346 Token rightParenthesis;
6154 6347
6155 /** 6348 /**
6156 * The semicolon terminating the statement. 6349 * The semicolon terminating the statement.
6157 */ 6350 */
6158 Token semicolon; 6351 Token semicolon;
6159 6352
6160 /** 6353 /**
6161 * Initialize a newly created do loop. 6354 * Initialize a newly created do loop.
6162 */ 6355 */
6163 DoStatement(this.doKeyword, Statement body, this.whileKeyword, 6356 DoStatement(
6164 this.leftParenthesis, Expression condition, this.rightParenthesis, 6357 this.doKeyword,
6358 Statement body,
6359 this.whileKeyword,
6360 this.leftParenthesis,
6361 Expression condition,
6362 this.rightParenthesis,
6165 this.semicolon) { 6363 this.semicolon) {
6166 _body = _becomeParentOf(body); 6364 _body = _becomeParentOf(body);
6167 _condition = _becomeParentOf(condition); 6365 _condition = _becomeParentOf(condition);
6168 } 6366 }
6169 6367
6170 @override 6368 @override
6171 Token get beginToken => doKeyword; 6369 Token get beginToken => doKeyword;
6172 6370
6173 /** 6371 /**
6174 * Return the body of the loop. 6372 * Return the body of the loop.
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
6560 * The right curly bracket. 6758 * The right curly bracket.
6561 */ 6759 */
6562 Token rightBracket; 6760 Token rightBracket;
6563 6761
6564 /** 6762 /**
6565 * Initialize a newly created enumeration declaration. Either or both of the 6763 * Initialize a newly created enumeration declaration. Either or both of the
6566 * [comment] and [metadata] can be `null` if the declaration does not have the 6764 * [comment] and [metadata] can be `null` if the declaration does not have the
6567 * corresponding attribute. The list of [constants] must contain at least one 6765 * corresponding attribute. The list of [constants] must contain at least one
6568 * value. 6766 * value.
6569 */ 6767 */
6570 EnumDeclaration(Comment comment, List<Annotation> metadata, this.enumKeyword, 6768 EnumDeclaration(
6571 SimpleIdentifier name, this.leftBracket, 6769 Comment comment,
6572 List<EnumConstantDeclaration> constants, this.rightBracket) 6770 List<Annotation> metadata,
6771 this.enumKeyword,
6772 SimpleIdentifier name,
6773 this.leftBracket,
6774 List<EnumConstantDeclaration> constants,
6775 this.rightBracket)
6573 : super(comment, metadata, name) { 6776 : super(comment, metadata, name) {
6574 _constants = new NodeList<EnumConstantDeclaration>(this, constants); 6777 _constants = new NodeList<EnumConstantDeclaration>(this, constants);
6575 } 6778 }
6576 6779
6577 @override 6780 @override
6578 // TODO(brianwilkerson) Add commas? 6781 // TODO(brianwilkerson) Add commas?
6579 Iterable get childEntities => super._childEntities 6782 Iterable get childEntities => super._childEntities
6580 ..add(enumKeyword) 6783 ..add(enumKeyword)
6581 ..add(_name) 6784 ..add(_name)
6582 ..add(leftBracket) 6785 ..add(leftBracket)
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
7177 7380
7178 /** 7381 /**
7179 * Initialize a newly created formal parameter. Either or both of the 7382 * Initialize a newly created formal parameter. Either or both of the
7180 * [comment] and [metadata] can be `null` if the parameter does not have the 7383 * [comment] and [metadata] can be `null` if the parameter does not have the
7181 * corresponding attribute. The [keyword] can be `null` if there is a type. 7384 * corresponding attribute. The [keyword] can be `null` if there is a type.
7182 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and 7385 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
7183 * [period] can be `null` if the keyword 'this' was not provided. The 7386 * [period] can be `null` if the keyword 'this' was not provided. The
7184 * [parameters] can be `null` if this is not a function-typed field formal 7387 * [parameters] can be `null` if this is not a function-typed field formal
7185 * parameter. 7388 * parameter.
7186 */ 7389 */
7187 FieldFormalParameter(Comment comment, List<Annotation> metadata, this.keyword, 7390 FieldFormalParameter(
7188 TypeName type, this.thisKeyword, this.period, SimpleIdentifier identifier, 7391 Comment comment,
7189 TypeParameterList typeParameters, FormalParameterList parameters) 7392 List<Annotation> metadata,
7393 this.keyword,
7394 TypeName type,
7395 this.thisKeyword,
7396 this.period,
7397 SimpleIdentifier identifier,
7398 TypeParameterList typeParameters,
7399 FormalParameterList parameters)
7190 : super(comment, metadata, identifier) { 7400 : super(comment, metadata, identifier) {
7191 _type = _becomeParentOf(type); 7401 _type = _becomeParentOf(type);
7192 _typeParameters = _becomeParentOf(typeParameters); 7402 _typeParameters = _becomeParentOf(typeParameters);
7193 _parameters = _becomeParentOf(parameters); 7403 _parameters = _becomeParentOf(parameters);
7194 } 7404 }
7195 7405
7196 @override 7406 @override
7197 Token get beginToken { 7407 Token get beginToken {
7198 if (keyword != null) { 7408 if (keyword != null) {
7199 return keyword; 7409 return keyword;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
7351 /** 7561 /**
7352 * The body of the loop. 7562 * The body of the loop.
7353 */ 7563 */
7354 Statement _body; 7564 Statement _body;
7355 7565
7356 /** 7566 /**
7357 * Initialize a newly created for-each statement. The [awaitKeyword] can be 7567 * Initialize a newly created for-each statement. The [awaitKeyword] can be
7358 * `null` if this is not an asynchronous for loop. 7568 * `null` if this is not an asynchronous for loop.
7359 */ 7569 */
7360 @deprecated // Use new ForEachStatement.withDeclaration(...) 7570 @deprecated // Use new ForEachStatement.withDeclaration(...)
7361 ForEachStatement.con1(this.awaitKeyword, this.forKeyword, 7571 ForEachStatement.con1(
7362 this.leftParenthesis, DeclaredIdentifier loopVariable, this.inKeyword, 7572 this.awaitKeyword,
7363 Expression iterator, this.rightParenthesis, Statement body) { 7573 this.forKeyword,
7574 this.leftParenthesis,
7575 DeclaredIdentifier loopVariable,
7576 this.inKeyword,
7577 Expression iterator,
7578 this.rightParenthesis,
7579 Statement body) {
7364 _loopVariable = _becomeParentOf(loopVariable); 7580 _loopVariable = _becomeParentOf(loopVariable);
7365 _iterable = _becomeParentOf(iterator); 7581 _iterable = _becomeParentOf(iterator);
7366 _body = _becomeParentOf(body); 7582 _body = _becomeParentOf(body);
7367 } 7583 }
7368 7584
7369 /** 7585 /**
7370 * Initialize a newly created for-each statement. The [awaitKeyword] can be 7586 * Initialize a newly created for-each statement. The [awaitKeyword] can be
7371 * `null` if this is not an asynchronous for loop. 7587 * `null` if this is not an asynchronous for loop.
7372 */ 7588 */
7373 @deprecated // Use new ForEachStatement.withReference(...) 7589 @deprecated // Use new ForEachStatement.withReference(...)
7374 ForEachStatement.con2(this.awaitKeyword, this.forKeyword, 7590 ForEachStatement.con2(
7375 this.leftParenthesis, SimpleIdentifier identifier, this.inKeyword, 7591 this.awaitKeyword,
7376 Expression iterator, this.rightParenthesis, Statement body) { 7592 this.forKeyword,
7593 this.leftParenthesis,
7594 SimpleIdentifier identifier,
7595 this.inKeyword,
7596 Expression iterator,
7597 this.rightParenthesis,
7598 Statement body) {
7377 _identifier = _becomeParentOf(identifier); 7599 _identifier = _becomeParentOf(identifier);
7378 _iterable = _becomeParentOf(iterator); 7600 _iterable = _becomeParentOf(iterator);
7379 _body = _becomeParentOf(body); 7601 _body = _becomeParentOf(body);
7380 } 7602 }
7381 7603
7382 /** 7604 /**
7383 * Initialize a newly created for-each statement whose loop control variable 7605 * Initialize a newly created for-each statement whose loop control variable
7384 * is declared internally (in the for-loop part). The [awaitKeyword] can be 7606 * is declared internally (in the for-loop part). The [awaitKeyword] can be
7385 * `null` if this is not an asynchronous for loop. 7607 * `null` if this is not an asynchronous for loop.
7386 */ 7608 */
7387 ForEachStatement.withDeclaration(this.awaitKeyword, this.forKeyword, 7609 ForEachStatement.withDeclaration(
7388 this.leftParenthesis, DeclaredIdentifier loopVariable, this.inKeyword, 7610 this.awaitKeyword,
7389 Expression iterator, this.rightParenthesis, Statement body) { 7611 this.forKeyword,
7612 this.leftParenthesis,
7613 DeclaredIdentifier loopVariable,
7614 this.inKeyword,
7615 Expression iterator,
7616 this.rightParenthesis,
7617 Statement body) {
7390 _loopVariable = _becomeParentOf(loopVariable); 7618 _loopVariable = _becomeParentOf(loopVariable);
7391 _iterable = _becomeParentOf(iterator); 7619 _iterable = _becomeParentOf(iterator);
7392 _body = _becomeParentOf(body); 7620 _body = _becomeParentOf(body);
7393 } 7621 }
7394 7622
7395 /** 7623 /**
7396 * Initialize a newly created for-each statement whose loop control variable 7624 * Initialize a newly created for-each statement whose loop control variable
7397 * is declared outside the for loop. The [awaitKeyword] can be `null` if this 7625 * is declared outside the for loop. The [awaitKeyword] can be `null` if this
7398 * is not an asynchronous for loop. 7626 * is not an asynchronous for loop.
7399 */ 7627 */
7400 ForEachStatement.withReference(this.awaitKeyword, this.forKeyword, 7628 ForEachStatement.withReference(
7401 this.leftParenthesis, SimpleIdentifier identifier, this.inKeyword, 7629 this.awaitKeyword,
7402 Expression iterator, this.rightParenthesis, Statement body) { 7630 this.forKeyword,
7631 this.leftParenthesis,
7632 SimpleIdentifier identifier,
7633 this.inKeyword,
7634 Expression iterator,
7635 this.rightParenthesis,
7636 Statement body) {
7403 _identifier = _becomeParentOf(identifier); 7637 _identifier = _becomeParentOf(identifier);
7404 _iterable = _becomeParentOf(iterator); 7638 _iterable = _becomeParentOf(iterator);
7405 _body = _becomeParentOf(body); 7639 _body = _becomeParentOf(body);
7406 } 7640 }
7407 7641
7408 @override 7642 @override
7409 Token get beginToken => forKeyword; 7643 Token get beginToken => forKeyword;
7410 7644
7411 /** 7645 /**
7412 * Return the body of the loop. 7646 * Return the body of the loop.
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
7723 * The body of the loop. 7957 * The body of the loop.
7724 */ 7958 */
7725 Statement _body; 7959 Statement _body;
7726 7960
7727 /** 7961 /**
7728 * Initialize a newly created for statement. Either the [variableList] or the 7962 * Initialize a newly created for statement. Either the [variableList] or the
7729 * [initialization] must be `null`. Either the [condition] and the list of 7963 * [initialization] must be `null`. Either the [condition] and the list of
7730 * [updaters] can be `null` if the loop does not have the corresponding 7964 * [updaters] can be `null` if the loop does not have the corresponding
7731 * attribute. 7965 * attribute.
7732 */ 7966 */
7733 ForStatement(this.forKeyword, this.leftParenthesis, 7967 ForStatement(
7734 VariableDeclarationList variableList, Expression initialization, 7968 this.forKeyword,
7735 this.leftSeparator, Expression condition, this.rightSeparator, 7969 this.leftParenthesis,
7736 List<Expression> updaters, this.rightParenthesis, Statement body) { 7970 VariableDeclarationList variableList,
7971 Expression initialization,
7972 this.leftSeparator,
7973 Expression condition,
7974 this.rightSeparator,
7975 List<Expression> updaters,
7976 this.rightParenthesis,
7977 Statement body) {
7737 _variableList = _becomeParentOf(variableList); 7978 _variableList = _becomeParentOf(variableList);
7738 _initialization = _becomeParentOf(initialization); 7979 _initialization = _becomeParentOf(initialization);
7739 _condition = _becomeParentOf(condition); 7980 _condition = _becomeParentOf(condition);
7740 _updaters = new NodeList<Expression>(this, updaters); 7981 _updaters = new NodeList<Expression>(this, updaters);
7741 _body = _becomeParentOf(body); 7982 _body = _becomeParentOf(body);
7742 } 7983 }
7743 7984
7744 @override 7985 @override
7745 Token get beginToken => forKeyword; 7986 Token get beginToken => forKeyword;
7746 7987
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
7901 FunctionExpression _functionExpression; 8142 FunctionExpression _functionExpression;
7902 8143
7903 /** 8144 /**
7904 * Initialize a newly created function declaration. Either or both of the 8145 * Initialize a newly created function declaration. Either or both of the
7905 * [comment] and [metadata] can be `null` if the function does not have the 8146 * [comment] and [metadata] can be `null` if the function does not have the
7906 * corresponding attribute. The [externalKeyword] can be `null` if the 8147 * corresponding attribute. The [externalKeyword] can be `null` if the
7907 * function is not an external function. The [returnType] can be `null` if no 8148 * function is not an external function. The [returnType] can be `null` if no
7908 * return type was specified. The [propertyKeyword] can be `null` if the 8149 * return type was specified. The [propertyKeyword] can be `null` if the
7909 * function is neither a getter or a setter. 8150 * function is neither a getter or a setter.
7910 */ 8151 */
7911 FunctionDeclaration(Comment comment, List<Annotation> metadata, 8152 FunctionDeclaration(
7912 this.externalKeyword, TypeName returnType, this.propertyKeyword, 8153 Comment comment,
7913 SimpleIdentifier name, FunctionExpression functionExpression) 8154 List<Annotation> metadata,
8155 this.externalKeyword,
8156 TypeName returnType,
8157 this.propertyKeyword,
8158 SimpleIdentifier name,
8159 FunctionExpression functionExpression)
7914 : super(comment, metadata, name) { 8160 : super(comment, metadata, name) {
7915 _returnType = _becomeParentOf(returnType); 8161 _returnType = _becomeParentOf(returnType);
7916 _functionExpression = _becomeParentOf(functionExpression); 8162 _functionExpression = _becomeParentOf(functionExpression);
7917 } 8163 }
7918 8164
7919 @override 8165 @override
7920 Iterable get childEntities => super._childEntities 8166 Iterable get childEntities => super._childEntities
7921 ..add(externalKeyword) 8167 ..add(externalKeyword)
7922 ..add(_returnType) 8168 ..add(_returnType)
7923 ..add(propertyKeyword) 8169 ..add(propertyKeyword)
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
8319 */ 8565 */
8320 FormalParameterList _parameters; 8566 FormalParameterList _parameters;
8321 8567
8322 /** 8568 /**
8323 * Initialize a newly created function type alias. Either or both of the 8569 * Initialize a newly created function type alias. Either or both of the
8324 * [comment] and [metadata] can be `null` if the function does not have the 8570 * [comment] and [metadata] can be `null` if the function does not have the
8325 * corresponding attribute. The [returnType] can be `null` if no return type 8571 * corresponding attribute. The [returnType] can be `null` if no return type
8326 * was specified. The [typeParameters] can be `null` if the function has no 8572 * was specified. The [typeParameters] can be `null` if the function has no
8327 * type parameters. 8573 * type parameters.
8328 */ 8574 */
8329 FunctionTypeAlias(Comment comment, List<Annotation> metadata, Token keyword, 8575 FunctionTypeAlias(
8330 TypeName returnType, SimpleIdentifier name, 8576 Comment comment,
8331 TypeParameterList typeParameters, FormalParameterList parameters, 8577 List<Annotation> metadata,
8578 Token keyword,
8579 TypeName returnType,
8580 SimpleIdentifier name,
8581 TypeParameterList typeParameters,
8582 FormalParameterList parameters,
8332 Token semicolon) 8583 Token semicolon)
8333 : super(comment, metadata, keyword, name, semicolon) { 8584 : super(comment, metadata, keyword, name, semicolon) {
8334 _returnType = _becomeParentOf(returnType); 8585 _returnType = _becomeParentOf(returnType);
8335 _typeParameters = _becomeParentOf(typeParameters); 8586 _typeParameters = _becomeParentOf(typeParameters);
8336 _parameters = _becomeParentOf(parameters); 8587 _parameters = _becomeParentOf(parameters);
8337 } 8588 }
8338 8589
8339 @override 8590 @override
8340 Iterable get childEntities => super._childEntities 8591 Iterable get childEntities => super._childEntities
8341 ..add(typedefKeyword) 8592 ..add(typedefKeyword)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
8426 * The parameters of the function-typed parameter. 8677 * The parameters of the function-typed parameter.
8427 */ 8678 */
8428 FormalParameterList _parameters; 8679 FormalParameterList _parameters;
8429 8680
8430 /** 8681 /**
8431 * Initialize a newly created formal parameter. Either or both of the 8682 * Initialize a newly created formal parameter. Either or both of the
8432 * [comment] and [metadata] can be `null` if the parameter does not have the 8683 * [comment] and [metadata] can be `null` if the parameter does not have the
8433 * corresponding attribute. The [returnType] can be `null` if no return type 8684 * corresponding attribute. The [returnType] can be `null` if no return type
8434 * was specified. 8685 * was specified.
8435 */ 8686 */
8436 FunctionTypedFormalParameter(Comment comment, List<Annotation> metadata, 8687 FunctionTypedFormalParameter(
8437 TypeName returnType, SimpleIdentifier identifier, 8688 Comment comment,
8438 TypeParameterList typeParameters, FormalParameterList parameters) 8689 List<Annotation> metadata,
8690 TypeName returnType,
8691 SimpleIdentifier identifier,
8692 TypeParameterList typeParameters,
8693 FormalParameterList parameters)
8439 : super(comment, metadata, identifier) { 8694 : super(comment, metadata, identifier) {
8440 _returnType = _becomeParentOf(returnType); 8695 _returnType = _becomeParentOf(returnType);
8441 _typeParameters = _becomeParentOf(typeParameters); 8696 _typeParameters = _becomeParentOf(typeParameters);
8442 _parameters = _becomeParentOf(parameters); 8697 _parameters = _becomeParentOf(parameters);
8443 } 8698 }
8444 8699
8445 @override 8700 @override
8446 Token get beginToken { 8701 Token get beginToken {
8447 if (_returnType != null) { 8702 if (_returnType != null) {
8448 return _returnType.beginToken; 8703 return _returnType.beginToken;
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
9085 /** 9340 /**
9086 * The statement that is executed if the condition evaluates to `false`, or 9341 * The statement that is executed if the condition evaluates to `false`, or
9087 * `null` if there is no else statement. 9342 * `null` if there is no else statement.
9088 */ 9343 */
9089 Statement _elseStatement; 9344 Statement _elseStatement;
9090 9345
9091 /** 9346 /**
9092 * Initialize a newly created if statement. The [elseKeyword] and 9347 * Initialize a newly created if statement. The [elseKeyword] and
9093 * [elseStatement] can be `null` if there is no else clause. 9348 * [elseStatement] can be `null` if there is no else clause.
9094 */ 9349 */
9095 IfStatement(this.ifKeyword, this.leftParenthesis, Expression condition, 9350 IfStatement(
9096 this.rightParenthesis, Statement thenStatement, this.elseKeyword, 9351 this.ifKeyword,
9352 this.leftParenthesis,
9353 Expression condition,
9354 this.rightParenthesis,
9355 Statement thenStatement,
9356 this.elseKeyword,
9097 Statement elseStatement) { 9357 Statement elseStatement) {
9098 _condition = _becomeParentOf(condition); 9358 _condition = _becomeParentOf(condition);
9099 _thenStatement = _becomeParentOf(thenStatement); 9359 _thenStatement = _becomeParentOf(thenStatement);
9100 _elseStatement = _becomeParentOf(elseStatement); 9360 _elseStatement = _becomeParentOf(elseStatement);
9101 } 9361 }
9102 9362
9103 @override 9363 @override
9104 Token get beginToken => ifKeyword; 9364 Token get beginToken => ifKeyword;
9105 9365
9106 @override 9366 @override
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
9240 } 9500 }
9241 9501
9242 /** 9502 /**
9243 * An import directive. 9503 * An import directive.
9244 * 9504 *
9245 * > importDirective ::= 9505 * > importDirective ::=
9246 * > [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* ';' 9506 * > [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* ';'
9247 * > | [Annotation] 'import' [StringLiteral] 'deferred' 'as' identifier [Combi nator]* ';' 9507 * > | [Annotation] 'import' [StringLiteral] 'deferred' 'as' identifier [Combi nator]* ';'
9248 */ 9508 */
9249 class ImportDirective extends NamespaceDirective { 9509 class ImportDirective extends NamespaceDirective {
9250 static Comparator<ImportDirective> COMPARATOR = (ImportDirective import1, 9510 static Comparator<ImportDirective> COMPARATOR =
9251 ImportDirective import2) { 9511 (ImportDirective import1, ImportDirective import2) {
9252 // 9512 //
9253 // uri 9513 // uri
9254 // 9514 //
9255 StringLiteral uri1 = import1.uri; 9515 StringLiteral uri1 = import1.uri;
9256 StringLiteral uri2 = import2.uri; 9516 StringLiteral uri2 = import2.uri;
9257 String uriStr1 = uri1.stringValue; 9517 String uriStr1 = uri1.stringValue;
9258 String uriStr2 = uri2.stringValue; 9518 String uriStr2 = uri2.stringValue;
9259 if (uriStr1 != null || uriStr2 != null) { 9519 if (uriStr1 != null || uriStr2 != null) {
9260 if (uriStr1 == null) { 9520 if (uriStr1 == null) {
9261 return -1; 9521 return -1;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
9360 SimpleIdentifier _prefix; 9620 SimpleIdentifier _prefix;
9361 9621
9362 /** 9622 /**
9363 * Initialize a newly created import directive. Either or both of the 9623 * Initialize a newly created import directive. Either or both of the
9364 * [comment] and [metadata] can be `null` if the function does not have the 9624 * [comment] and [metadata] can be `null` if the function does not have the
9365 * corresponding attribute. The [deferredKeyword] can be `null` if the import 9625 * corresponding attribute. The [deferredKeyword] can be `null` if the import
9366 * is not deferred. The [asKeyword] and [prefix] can be `null` if the import 9626 * is not deferred. The [asKeyword] and [prefix] can be `null` if the import
9367 * does not specify a prefix. The list of [combinators] can be `null` if there 9627 * does not specify a prefix. The list of [combinators] can be `null` if there
9368 * are no combinators. 9628 * are no combinators.
9369 */ 9629 */
9370 ImportDirective(Comment comment, List<Annotation> metadata, Token keyword, 9630 ImportDirective(
9371 StringLiteral libraryUri, this.deferredKeyword, this.asKeyword, 9631 Comment comment,
9372 SimpleIdentifier prefix, List<Combinator> combinators, Token semicolon) 9632 List<Annotation> metadata,
9633 Token keyword,
9634 StringLiteral libraryUri,
9635 this.deferredKeyword,
9636 this.asKeyword,
9637 SimpleIdentifier prefix,
9638 List<Combinator> combinators,
9639 Token semicolon)
9373 : super(comment, metadata, keyword, libraryUri, combinators, semicolon) { 9640 : super(comment, metadata, keyword, libraryUri, combinators, semicolon) {
9374 _prefix = _becomeParentOf(prefix); 9641 _prefix = _becomeParentOf(prefix);
9375 } 9642 }
9376 9643
9377 /** 9644 /**
9378 * The token representing the 'as' token, or `null` if the imported names are 9645 * The token representing the 'as' token, or `null` if the imported names are
9379 * not prefixed. 9646 * not prefixed.
9380 */ 9647 */
9381 @deprecated // Use "this.asKeyword" 9648 @deprecated // Use "this.asKeyword"
9382 Token get asToken => asKeyword; 9649 Token get asToken => asKeyword;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
9477 * mapping of old tokens to new tokens. 9744 * mapping of old tokens to new tokens.
9478 */ 9745 */
9479 IncrementalAstCloner(this._oldNode, this._newNode, this._tokenMap); 9746 IncrementalAstCloner(this._oldNode, this._newNode, this._tokenMap);
9480 9747
9481 @override 9748 @override
9482 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => 9749 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) =>
9483 new AdjacentStrings(_cloneNodeList(node.strings)); 9750 new AdjacentStrings(_cloneNodeList(node.strings));
9484 9751
9485 @override 9752 @override
9486 Annotation visitAnnotation(Annotation node) { 9753 Annotation visitAnnotation(Annotation node) {
9487 Annotation copy = new Annotation(_mapToken(node.atSign), 9754 Annotation copy = new Annotation(
9488 _cloneNode(node.name), _mapToken(node.period), 9755 _mapToken(node.atSign),
9489 _cloneNode(node.constructorName), _cloneNode(node.arguments)); 9756 _cloneNode(node.name),
9757 _mapToken(node.period),
9758 _cloneNode(node.constructorName),
9759 _cloneNode(node.arguments));
9490 copy.element = node.element; 9760 copy.element = node.element;
9491 return copy; 9761 return copy;
9492 } 9762 }
9493 9763
9494 @override 9764 @override
9495 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList( 9765 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(
9496 _mapToken(node.leftParenthesis), _cloneNodeList(node.arguments), 9766 _mapToken(node.leftParenthesis),
9767 _cloneNodeList(node.arguments),
9497 _mapToken(node.rightParenthesis)); 9768 _mapToken(node.rightParenthesis));
9498 9769
9499 @override 9770 @override
9500 AsExpression visitAsExpression(AsExpression node) { 9771 AsExpression visitAsExpression(AsExpression node) {
9501 AsExpression copy = new AsExpression(_cloneNode(node.expression), 9772 AsExpression copy = new AsExpression(_cloneNode(node.expression),
9502 _mapToken(node.asOperator), _cloneNode(node.type)); 9773 _mapToken(node.asOperator), _cloneNode(node.type));
9503 copy.propagatedType = node.propagatedType; 9774 copy.propagatedType = node.propagatedType;
9504 copy.staticType = node.staticType; 9775 copy.staticType = node.staticType;
9505 return copy; 9776 return copy;
9506 } 9777 }
9507 9778
9508 @override 9779 @override
9509 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement( 9780 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(
9510 _mapToken(node.assertKeyword), _mapToken(node.leftParenthesis), 9781 _mapToken(node.assertKeyword),
9511 _cloneNode(node.condition), _mapToken(node.rightParenthesis), 9782 _mapToken(node.leftParenthesis),
9783 _cloneNode(node.condition),
9784 _mapToken(node.rightParenthesis),
9512 _mapToken(node.semicolon)); 9785 _mapToken(node.semicolon));
9513 9786
9514 @override 9787 @override
9515 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) { 9788 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) {
9516 AssignmentExpression copy = new AssignmentExpression( 9789 AssignmentExpression copy = new AssignmentExpression(
9517 _cloneNode(node.leftHandSide), _mapToken(node.operator), 9790 _cloneNode(node.leftHandSide),
9791 _mapToken(node.operator),
9518 _cloneNode(node.rightHandSide)); 9792 _cloneNode(node.rightHandSide));
9519 copy.propagatedElement = node.propagatedElement; 9793 copy.propagatedElement = node.propagatedElement;
9520 copy.propagatedType = node.propagatedType; 9794 copy.propagatedType = node.propagatedType;
9521 copy.staticElement = node.staticElement; 9795 copy.staticElement = node.staticElement;
9522 copy.staticType = node.staticType; 9796 copy.staticType = node.staticType;
9523 return copy; 9797 return copy;
9524 } 9798 }
9525 9799
9526 @override 9800 @override
9527 AwaitExpression visitAwaitExpression(AwaitExpression node) => 9801 AwaitExpression visitAwaitExpression(AwaitExpression node) =>
9528 new AwaitExpression( 9802 new AwaitExpression(
9529 _mapToken(node.awaitKeyword), _cloneNode(node.expression)); 9803 _mapToken(node.awaitKeyword), _cloneNode(node.expression));
9530 9804
9531 @override 9805 @override
9532 BinaryExpression visitBinaryExpression(BinaryExpression node) { 9806 BinaryExpression visitBinaryExpression(BinaryExpression node) {
9533 BinaryExpression copy = new BinaryExpression(_cloneNode(node.leftOperand), 9807 BinaryExpression copy = new BinaryExpression(_cloneNode(node.leftOperand),
9534 _mapToken(node.operator), _cloneNode(node.rightOperand)); 9808 _mapToken(node.operator), _cloneNode(node.rightOperand));
9535 copy.propagatedElement = node.propagatedElement; 9809 copy.propagatedElement = node.propagatedElement;
9536 copy.propagatedType = node.propagatedType; 9810 copy.propagatedType = node.propagatedType;
9537 copy.staticElement = node.staticElement; 9811 copy.staticElement = node.staticElement;
9538 copy.staticType = node.staticType; 9812 copy.staticType = node.staticType;
9539 return copy; 9813 return copy;
9540 } 9814 }
9541 9815
9542 @override 9816 @override
9543 Block visitBlock(Block node) => new Block(_mapToken(node.leftBracket), 9817 Block visitBlock(Block node) => new Block(_mapToken(node.leftBracket),
9544 _cloneNodeList(node.statements), _mapToken(node.rightBracket)); 9818 _cloneNodeList(node.statements), _mapToken(node.rightBracket));
9545 9819
9546 @override 9820 @override
9547 BlockFunctionBody visitBlockFunctionBody( 9821 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) =>
9548 BlockFunctionBody node) => new BlockFunctionBody( 9822 new BlockFunctionBody(_mapToken(node.keyword), _mapToken(node.star),
9549 _mapToken(node.keyword), _mapToken(node.star), _cloneNode(node.block)); 9823 _cloneNode(node.block));
9550 9824
9551 @override 9825 @override
9552 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) { 9826 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) {
9553 BooleanLiteral copy = 9827 BooleanLiteral copy =
9554 new BooleanLiteral(_mapToken(node.literal), node.value); 9828 new BooleanLiteral(_mapToken(node.literal), node.value);
9555 copy.propagatedType = node.propagatedType; 9829 copy.propagatedType = node.propagatedType;
9556 copy.staticType = node.staticType; 9830 copy.staticType = node.staticType;
9557 return copy; 9831 return copy;
9558 } 9832 }
9559 9833
9560 @override 9834 @override
9561 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement( 9835 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
9562 _mapToken(node.breakKeyword), _cloneNode(node.label), 9836 _mapToken(node.breakKeyword),
9837 _cloneNode(node.label),
9563 _mapToken(node.semicolon)); 9838 _mapToken(node.semicolon));
9564 9839
9565 @override 9840 @override
9566 CascadeExpression visitCascadeExpression(CascadeExpression node) { 9841 CascadeExpression visitCascadeExpression(CascadeExpression node) {
9567 CascadeExpression copy = new CascadeExpression( 9842 CascadeExpression copy = new CascadeExpression(
9568 _cloneNode(node.target), _cloneNodeList(node.cascadeSections)); 9843 _cloneNode(node.target), _cloneNodeList(node.cascadeSections));
9569 copy.propagatedType = node.propagatedType; 9844 copy.propagatedType = node.propagatedType;
9570 copy.staticType = node.staticType; 9845 copy.staticType = node.staticType;
9571 return copy; 9846 return copy;
9572 } 9847 }
9573 9848
9574 @override 9849 @override
9575 CatchClause visitCatchClause(CatchClause node) => new CatchClause( 9850 CatchClause visitCatchClause(CatchClause node) => new CatchClause(
9576 _mapToken(node.onKeyword), _cloneNode(node.exceptionType), 9851 _mapToken(node.onKeyword),
9577 _mapToken(node.catchKeyword), _mapToken(node.leftParenthesis), 9852 _cloneNode(node.exceptionType),
9578 _cloneNode(node.exceptionParameter), _mapToken(node.comma), 9853 _mapToken(node.catchKeyword),
9579 _cloneNode(node.stackTraceParameter), _mapToken(node.rightParenthesis), 9854 _mapToken(node.leftParenthesis),
9855 _cloneNode(node.exceptionParameter),
9856 _mapToken(node.comma),
9857 _cloneNode(node.stackTraceParameter),
9858 _mapToken(node.rightParenthesis),
9580 _cloneNode(node.body)); 9859 _cloneNode(node.body));
9581 9860
9582 @override 9861 @override
9583 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { 9862 ClassDeclaration visitClassDeclaration(ClassDeclaration node) {
9584 ClassDeclaration copy = new ClassDeclaration( 9863 ClassDeclaration copy = new ClassDeclaration(
9585 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata), 9864 _cloneNode(node.documentationComment),
9586 _mapToken(node.abstractKeyword), _mapToken(node.classKeyword), 9865 _cloneNodeList(node.metadata),
9587 _cloneNode(node.name), _cloneNode(node.typeParameters), 9866 _mapToken(node.abstractKeyword),
9588 _cloneNode(node.extendsClause), _cloneNode(node.withClause), 9867 _mapToken(node.classKeyword),
9589 _cloneNode(node.implementsClause), _mapToken(node.leftBracket), 9868 _cloneNode(node.name),
9590 _cloneNodeList(node.members), _mapToken(node.rightBracket)); 9869 _cloneNode(node.typeParameters),
9870 _cloneNode(node.extendsClause),
9871 _cloneNode(node.withClause),
9872 _cloneNode(node.implementsClause),
9873 _mapToken(node.leftBracket),
9874 _cloneNodeList(node.members),
9875 _mapToken(node.rightBracket));
9591 copy.nativeClause = _cloneNode(node.nativeClause); 9876 copy.nativeClause = _cloneNode(node.nativeClause);
9592 return copy; 9877 return copy;
9593 } 9878 }
9594 9879
9595 @override 9880 @override
9596 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias( 9881 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
9597 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata), 9882 _cloneNode(node.documentationComment),
9598 _mapToken(node.typedefKeyword), _cloneNode(node.name), 9883 _cloneNodeList(node.metadata),
9599 _cloneNode(node.typeParameters), _mapToken(node.equals), 9884 _mapToken(node.typedefKeyword),
9600 _mapToken(node.abstractKeyword), _cloneNode(node.superclass), 9885 _cloneNode(node.name),
9601 _cloneNode(node.withClause), _cloneNode(node.implementsClause), 9886 _cloneNode(node.typeParameters),
9887 _mapToken(node.equals),
9888 _mapToken(node.abstractKeyword),
9889 _cloneNode(node.superclass),
9890 _cloneNode(node.withClause),
9891 _cloneNode(node.implementsClause),
9602 _mapToken(node.semicolon)); 9892 _mapToken(node.semicolon));
9603 9893
9604 @override 9894 @override
9605 Comment visitComment(Comment node) { 9895 Comment visitComment(Comment node) {
9606 if (node.isDocumentation) { 9896 if (node.isDocumentation) {
9607 return Comment.createDocumentationCommentWithReferences( 9897 return Comment.createDocumentationCommentWithReferences(
9608 _mapTokens(node.tokens), _cloneNodeList(node.references)); 9898 _mapTokens(node.tokens), _cloneNodeList(node.references));
9609 } else if (node.isBlock) { 9899 } else if (node.isBlock) {
9610 return Comment.createBlockComment(_mapTokens(node.tokens)); 9900 return Comment.createBlockComment(_mapTokens(node.tokens));
9611 } 9901 }
9612 return Comment.createEndOfLineComment(_mapTokens(node.tokens)); 9902 return Comment.createEndOfLineComment(_mapTokens(node.tokens));
9613 } 9903 }
9614 9904
9615 @override 9905 @override
9616 CommentReference visitCommentReference(CommentReference node) => 9906 CommentReference visitCommentReference(CommentReference node) =>
9617 new CommentReference( 9907 new CommentReference(
9618 _mapToken(node.newKeyword), _cloneNode(node.identifier)); 9908 _mapToken(node.newKeyword), _cloneNode(node.identifier));
9619 9909
9620 @override 9910 @override
9621 CompilationUnit visitCompilationUnit(CompilationUnit node) { 9911 CompilationUnit visitCompilationUnit(CompilationUnit node) {
9622 CompilationUnit copy = new CompilationUnit(_mapToken(node.beginToken), 9912 CompilationUnit copy = new CompilationUnit(
9623 _cloneNode(node.scriptTag), _cloneNodeList(node.directives), 9913 _mapToken(node.beginToken),
9624 _cloneNodeList(node.declarations), _mapToken(node.endToken)); 9914 _cloneNode(node.scriptTag),
9915 _cloneNodeList(node.directives),
9916 _cloneNodeList(node.declarations),
9917 _mapToken(node.endToken));
9625 copy.lineInfo = node.lineInfo; 9918 copy.lineInfo = node.lineInfo;
9626 copy.element = node.element; 9919 copy.element = node.element;
9627 return copy; 9920 return copy;
9628 } 9921 }
9629 9922
9630 @override 9923 @override
9631 ConditionalExpression visitConditionalExpression(ConditionalExpression node) { 9924 ConditionalExpression visitConditionalExpression(ConditionalExpression node) {
9632 ConditionalExpression copy = new ConditionalExpression( 9925 ConditionalExpression copy = new ConditionalExpression(
9633 _cloneNode(node.condition), _mapToken(node.question), 9926 _cloneNode(node.condition),
9634 _cloneNode(node.thenExpression), _mapToken(node.colon), 9927 _mapToken(node.question),
9928 _cloneNode(node.thenExpression),
9929 _mapToken(node.colon),
9635 _cloneNode(node.elseExpression)); 9930 _cloneNode(node.elseExpression));
9636 copy.propagatedType = node.propagatedType; 9931 copy.propagatedType = node.propagatedType;
9637 copy.staticType = node.staticType; 9932 copy.staticType = node.staticType;
9638 return copy; 9933 return copy;
9639 } 9934 }
9640 9935
9641 @override 9936 @override
9642 ConstructorDeclaration visitConstructorDeclaration( 9937 ConstructorDeclaration visitConstructorDeclaration(
9643 ConstructorDeclaration node) { 9938 ConstructorDeclaration node) {
9644 ConstructorDeclaration copy = new ConstructorDeclaration( 9939 ConstructorDeclaration copy = new ConstructorDeclaration(
9645 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata), 9940 _cloneNode(node.documentationComment),
9646 _mapToken(node.externalKeyword), _mapToken(node.constKeyword), 9941 _cloneNodeList(node.metadata),
9647 _mapToken(node.factoryKeyword), _cloneNode(node.returnType), 9942 _mapToken(node.externalKeyword),
9648 _mapToken(node.period), _cloneNode(node.name), 9943 _mapToken(node.constKeyword),
9649 _cloneNode(node.parameters), _mapToken(node.separator), 9944 _mapToken(node.factoryKeyword),
9945 _cloneNode(node.returnType),
9946 _mapToken(node.period),
9947 _cloneNode(node.name),
9948 _cloneNode(node.parameters),
9949 _mapToken(node.separator),
9650 _cloneNodeList(node.initializers), 9950 _cloneNodeList(node.initializers),
9651 _cloneNode(node.redirectedConstructor), _cloneNode(node.body)); 9951 _cloneNode(node.redirectedConstructor),
9952 _cloneNode(node.body));
9652 copy.element = node.element; 9953 copy.element = node.element;
9653 return copy; 9954 return copy;
9654 } 9955 }
9655 9956
9656 @override 9957 @override
9657 ConstructorFieldInitializer visitConstructorFieldInitializer( 9958 ConstructorFieldInitializer visitConstructorFieldInitializer(
9658 ConstructorFieldInitializer node) => new ConstructorFieldInitializer( 9959 ConstructorFieldInitializer node) =>
9659 _mapToken(node.thisKeyword), _mapToken(node.period), 9960 new ConstructorFieldInitializer(
9660 _cloneNode(node.fieldName), _mapToken(node.equals), 9961 _mapToken(node.thisKeyword),
9661 _cloneNode(node.expression)); 9962 _mapToken(node.period),
9963 _cloneNode(node.fieldName),
9964 _mapToken(node.equals),
9965 _cloneNode(node.expression));
9662 9966
9663 @override 9967 @override
9664 ConstructorName visitConstructorName(ConstructorName node) { 9968 ConstructorName visitConstructorName(ConstructorName node) {
9665 ConstructorName copy = new ConstructorName( 9969 ConstructorName copy = new ConstructorName(
9666 _cloneNode(node.type), _mapToken(node.period), _cloneNode(node.name)); 9970 _cloneNode(node.type), _mapToken(node.period), _cloneNode(node.name));
9667 copy.staticElement = node.staticElement; 9971 copy.staticElement = node.staticElement;
9668 return copy; 9972 return copy;
9669 } 9973 }
9670 9974
9671 @override 9975 @override
9672 ContinueStatement visitContinueStatement(ContinueStatement node) => 9976 ContinueStatement visitContinueStatement(ContinueStatement node) =>
9673 new ContinueStatement(_mapToken(node.continueKeyword), 9977 new ContinueStatement(_mapToken(node.continueKeyword),
9674 _cloneNode(node.label), _mapToken(node.semicolon)); 9978 _cloneNode(node.label), _mapToken(node.semicolon));
9675 9979
9676 @override 9980 @override
9677 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => 9981 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) =>
9678 new DeclaredIdentifier(_cloneNode(node.documentationComment), 9982 new DeclaredIdentifier(
9679 _cloneNodeList(node.metadata), _mapToken(node.keyword), 9983 _cloneNode(node.documentationComment),
9680 _cloneNode(node.type), _cloneNode(node.identifier)); 9984 _cloneNodeList(node.metadata),
9985 _mapToken(node.keyword),
9986 _cloneNode(node.type),
9987 _cloneNode(node.identifier));
9681 9988
9682 @override 9989 @override
9683 DefaultFormalParameter visitDefaultFormalParameter( 9990 DefaultFormalParameter visitDefaultFormalParameter(
9684 DefaultFormalParameter node) => new DefaultFormalParameter( 9991 DefaultFormalParameter node) =>
9685 _cloneNode(node.parameter), node.kind, _mapToken(node.separator), 9992 new DefaultFormalParameter(_cloneNode(node.parameter), node.kind,
9686 _cloneNode(node.defaultValue)); 9993 _mapToken(node.separator), _cloneNode(node.defaultValue));
9687 9994
9688 @override 9995 @override
9689 DoStatement visitDoStatement(DoStatement node) => new DoStatement( 9996 DoStatement visitDoStatement(DoStatement node) => new DoStatement(
9690 _mapToken(node.doKeyword), _cloneNode(node.body), 9997 _mapToken(node.doKeyword),
9691 _mapToken(node.whileKeyword), _mapToken(node.leftParenthesis), 9998 _cloneNode(node.body),
9692 _cloneNode(node.condition), _mapToken(node.rightParenthesis), 9999 _mapToken(node.whileKeyword),
10000 _mapToken(node.leftParenthesis),
10001 _cloneNode(node.condition),
10002 _mapToken(node.rightParenthesis),
9693 _mapToken(node.semicolon)); 10003 _mapToken(node.semicolon));
9694 10004
9695 @override 10005 @override
9696 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) { 10006 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) {
9697 DoubleLiteral copy = new DoubleLiteral(_mapToken(node.literal), node.value); 10007 DoubleLiteral copy = new DoubleLiteral(_mapToken(node.literal), node.value);
9698 copy.propagatedType = node.propagatedType; 10008 copy.propagatedType = node.propagatedType;
9699 copy.staticType = node.staticType; 10009 copy.staticType = node.staticType;
9700 return copy; 10010 return copy;
9701 } 10011 }
9702 10012
9703 @override 10013 @override
9704 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => 10014 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) =>
9705 new EmptyFunctionBody(_mapToken(node.semicolon)); 10015 new EmptyFunctionBody(_mapToken(node.semicolon));
9706 10016
9707 @override 10017 @override
9708 EmptyStatement visitEmptyStatement(EmptyStatement node) => 10018 EmptyStatement visitEmptyStatement(EmptyStatement node) =>
9709 new EmptyStatement(_mapToken(node.semicolon)); 10019 new EmptyStatement(_mapToken(node.semicolon));
9710 10020
9711 @override 10021 @override
9712 AstNode visitEnumConstantDeclaration(EnumConstantDeclaration node) => 10022 AstNode visitEnumConstantDeclaration(EnumConstantDeclaration node) =>
9713 new EnumConstantDeclaration(_cloneNode(node.documentationComment), 10023 new EnumConstantDeclaration(_cloneNode(node.documentationComment),
9714 _cloneNodeList(node.metadata), _cloneNode(node.name)); 10024 _cloneNodeList(node.metadata), _cloneNode(node.name));
9715 10025
9716 @override 10026 @override
9717 AstNode visitEnumDeclaration(EnumDeclaration node) => new EnumDeclaration( 10027 AstNode visitEnumDeclaration(EnumDeclaration node) => new EnumDeclaration(
9718 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata), 10028 _cloneNode(node.documentationComment),
9719 _mapToken(node.enumKeyword), _cloneNode(node.name), 10029 _cloneNodeList(node.metadata),
9720 _mapToken(node.leftBracket), _cloneNodeList(node.constants), 10030 _mapToken(node.enumKeyword),
10031 _cloneNode(node.name),
10032 _mapToken(node.leftBracket),
10033 _cloneNodeList(node.constants),
9721 _mapToken(node.rightBracket)); 10034 _mapToken(node.rightBracket));
9722 10035
9723 @override 10036 @override
9724 ExportDirective visitExportDirective(ExportDirective node) { 10037 ExportDirective visitExportDirective(ExportDirective node) {
9725 ExportDirective copy = new ExportDirective( 10038 ExportDirective copy = new ExportDirective(
9726 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata), 10039 _cloneNode(node.documentationComment),
9727 _mapToken(node.keyword), _cloneNode(node.uri), 10040 _cloneNodeList(node.metadata),
9728 _cloneNodeList(node.combinators), _mapToken(node.semicolon)); 10041 _mapToken(node.keyword),
10042 _cloneNode(node.uri),
10043 _cloneNodeList(node.combinators),
10044 _mapToken(node.semicolon));
9729 copy.element = node.element; 10045 copy.element = node.element;
9730 return copy; 10046 return copy;
9731 } 10047 }
9732 10048
9733 @override 10049 @override
9734 ExpressionFunctionBody visitExpressionFunctionBody( 10050 ExpressionFunctionBody visitExpressionFunctionBody(
9735 ExpressionFunctionBody node) => new ExpressionFunctionBody( 10051 ExpressionFunctionBody node) =>
9736 _mapToken(node.keyword), _mapToken(node.functionDefinition), 10052 new ExpressionFunctionBody(
9737 _cloneNode(node.expression), _mapToken(node.semicolon)); 10053 _mapToken(node.keyword),
10054 _mapToken(node.functionDefinition),
10055 _cloneNode(node.expression),
10056 _mapToken(node.semicolon));
9738 10057
9739 @override 10058 @override
9740 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => 10059 ExpressionStatement visitExpressionStatement(ExpressionStatement node) =>
9741 new ExpressionStatement( 10060 new ExpressionStatement(
9742 _cloneNode(node.expression), _mapToken(node.semicolon)); 10061 _cloneNode(node.expression), _mapToken(node.semicolon));
9743 10062
9744 @override 10063 @override
9745 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause( 10064 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(
9746 _mapToken(node.extendsKeyword), _cloneNode(node.superclass)); 10065 _mapToken(node.extendsKeyword), _cloneNode(node.superclass));
9747 10066
9748 @override 10067 @override
9749 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => 10068 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) =>
9750 new FieldDeclaration(_cloneNode(node.documentationComment), 10069 new FieldDeclaration(
9751 _cloneNodeList(node.metadata), _mapToken(node.staticKeyword), 10070 _cloneNode(node.documentationComment),
9752 _cloneNode(node.fields), _mapToken(node.semicolon)); 10071 _cloneNodeList(node.metadata),
10072 _mapToken(node.staticKeyword),
10073 _cloneNode(node.fields),
10074 _mapToken(node.semicolon));
9753 10075
9754 @override 10076 @override
9755 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => 10077 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) =>
9756 new FieldFormalParameter(_cloneNode(node.documentationComment), 10078 new FieldFormalParameter(
9757 _cloneNodeList(node.metadata), _mapToken(node.keyword), 10079 _cloneNode(node.documentationComment),
9758 _cloneNode(node.type), _mapToken(node.thisKeyword), 10080 _cloneNodeList(node.metadata),
9759 _mapToken(node.period), _cloneNode(node.identifier), 10081 _mapToken(node.keyword),
9760 _cloneNode(node.typeParameters), _cloneNode(node.parameters)); 10082 _cloneNode(node.type),
10083 _mapToken(node.thisKeyword),
10084 _mapToken(node.period),
10085 _cloneNode(node.identifier),
10086 _cloneNode(node.typeParameters),
10087 _cloneNode(node.parameters));
9761 10088
9762 @override 10089 @override
9763 ForEachStatement visitForEachStatement(ForEachStatement node) { 10090 ForEachStatement visitForEachStatement(ForEachStatement node) {
9764 DeclaredIdentifier loopVariable = node.loopVariable; 10091 DeclaredIdentifier loopVariable = node.loopVariable;
9765 if (loopVariable == null) { 10092 if (loopVariable == null) {
9766 return new ForEachStatement.withReference(_mapToken(node.awaitKeyword), 10093 return new ForEachStatement.withReference(
9767 _mapToken(node.forKeyword), _mapToken(node.leftParenthesis), 10094 _mapToken(node.awaitKeyword),
9768 _cloneNode(node.identifier), _mapToken(node.inKeyword), 10095 _mapToken(node.forKeyword),
9769 _cloneNode(node.iterable), _mapToken(node.rightParenthesis), 10096 _mapToken(node.leftParenthesis),
10097 _cloneNode(node.identifier),
10098 _mapToken(node.inKeyword),
10099 _cloneNode(node.iterable),
10100 _mapToken(node.rightParenthesis),
9770 _cloneNode(node.body)); 10101 _cloneNode(node.body));
9771 } 10102 }
9772 return new ForEachStatement.withDeclaration(_mapToken(node.awaitKeyword), 10103 return new ForEachStatement.withDeclaration(
9773 _mapToken(node.forKeyword), _mapToken(node.leftParenthesis), 10104 _mapToken(node.awaitKeyword),
9774 _cloneNode(loopVariable), _mapToken(node.inKeyword), 10105 _mapToken(node.forKeyword),
9775 _cloneNode(node.iterable), _mapToken(node.rightParenthesis), 10106 _mapToken(node.leftParenthesis),
10107 _cloneNode(loopVariable),
10108 _mapToken(node.inKeyword),
10109 _cloneNode(node.iterable),
10110 _mapToken(node.rightParenthesis),
9776 _cloneNode(node.body)); 10111 _cloneNode(node.body));
9777 } 10112 }
9778 10113
9779 @override 10114 @override
9780 FormalParameterList visitFormalParameterList(FormalParameterList node) => 10115 FormalParameterList visitFormalParameterList(FormalParameterList node) =>
9781 new FormalParameterList(_mapToken(node.leftParenthesis), 10116 new FormalParameterList(
9782 _cloneNodeList(node.parameters), _mapToken(node.leftDelimiter), 10117 _mapToken(node.leftParenthesis),
9783 _mapToken(node.rightDelimiter), _mapToken(node.rightParenthesis)); 10118 _cloneNodeList(node.parameters),
10119 _mapToken(node.leftDelimiter),
10120 _mapToken(node.rightDelimiter),
10121 _mapToken(node.rightParenthesis));
9784 10122
9785 @override 10123 @override
9786 ForStatement visitForStatement(ForStatement node) => new ForStatement( 10124 ForStatement visitForStatement(ForStatement node) => new ForStatement(
9787 _mapToken(node.forKeyword), _mapToken(node.leftParenthesis), 10125 _mapToken(node.forKeyword),
9788 _cloneNode(node.variables), _cloneNode(node.initialization), 10126 _mapToken(node.leftParenthesis),
9789 _mapToken(node.leftSeparator), _cloneNode(node.condition), 10127 _cloneNode(node.variables),
9790 _mapToken(node.rightSeparator), _cloneNodeList(node.updaters), 10128 _cloneNode(node.initialization),
9791 _mapToken(node.rightParenthesis), _cloneNode(node.body)); 10129 _mapToken(node.leftSeparator),
10130 _cloneNode(node.condition),
10131 _mapToken(node.rightSeparator),
10132 _cloneNodeList(node.updaters),
10133 _mapToken(node.rightParenthesis),
10134 _cloneNode(node.body));
9792 10135
9793 @override 10136 @override
9794 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => 10137 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) =>
9795 new FunctionDeclaration(_cloneNode(node.documentationComment), 10138 new FunctionDeclaration(
9796 _cloneNodeList(node.metadata), _mapToken(node.externalKeyword), 10139 _cloneNode(node.documentationComment),
9797 _cloneNode(node.returnType), _mapToken(node.propertyKeyword), 10140 _cloneNodeList(node.metadata),
9798 _cloneNode(node.name), _cloneNode(node.functionExpression)); 10141 _mapToken(node.externalKeyword),
10142 _cloneNode(node.returnType),
10143 _mapToken(node.propertyKeyword),
10144 _cloneNode(node.name),
10145 _cloneNode(node.functionExpression));
9799 10146
9800 @override 10147 @override
9801 FunctionDeclarationStatement visitFunctionDeclarationStatement( 10148 FunctionDeclarationStatement visitFunctionDeclarationStatement(
9802 FunctionDeclarationStatement node) => 10149 FunctionDeclarationStatement node) =>
9803 new FunctionDeclarationStatement(_cloneNode(node.functionDeclaration)); 10150 new FunctionDeclarationStatement(_cloneNode(node.functionDeclaration));
9804 10151
9805 @override 10152 @override
9806 FunctionExpression visitFunctionExpression(FunctionExpression node) { 10153 FunctionExpression visitFunctionExpression(FunctionExpression node) {
9807 FunctionExpression copy = new FunctionExpression( 10154 FunctionExpression copy = new FunctionExpression(
9808 _cloneNode(node.typeParameters), _cloneNode(node.parameters), 10155 _cloneNode(node.typeParameters),
10156 _cloneNode(node.parameters),
9809 _cloneNode(node.body)); 10157 _cloneNode(node.body));
9810 copy.element = node.element; 10158 copy.element = node.element;
9811 copy.propagatedType = node.propagatedType; 10159 copy.propagatedType = node.propagatedType;
9812 copy.staticType = node.staticType; 10160 copy.staticType = node.staticType;
9813 return copy; 10161 return copy;
9814 } 10162 }
9815 10163
9816 @override 10164 @override
9817 FunctionExpressionInvocation visitFunctionExpressionInvocation( 10165 FunctionExpressionInvocation visitFunctionExpressionInvocation(
9818 FunctionExpressionInvocation node) { 10166 FunctionExpressionInvocation node) {
9819 FunctionExpressionInvocation copy = new FunctionExpressionInvocation( 10167 FunctionExpressionInvocation copy = new FunctionExpressionInvocation(
9820 _cloneNode(node.function), _cloneNode(node.typeArguments), 10168 _cloneNode(node.function),
10169 _cloneNode(node.typeArguments),
9821 _cloneNode(node.argumentList)); 10170 _cloneNode(node.argumentList));
9822 copy.propagatedElement = node.propagatedElement; 10171 copy.propagatedElement = node.propagatedElement;
9823 copy.propagatedType = node.propagatedType; 10172 copy.propagatedType = node.propagatedType;
9824 copy.staticElement = node.staticElement; 10173 copy.staticElement = node.staticElement;
9825 copy.staticType = node.staticType; 10174 copy.staticType = node.staticType;
9826 return copy; 10175 return copy;
9827 } 10176 }
9828 10177
9829 @override 10178 @override
9830 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => 10179 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) =>
9831 new FunctionTypeAlias(_cloneNode(node.documentationComment), 10180 new FunctionTypeAlias(
9832 _cloneNodeList(node.metadata), _mapToken(node.typedefKeyword), 10181 _cloneNode(node.documentationComment),
9833 _cloneNode(node.returnType), _cloneNode(node.name), 10182 _cloneNodeList(node.metadata),
9834 _cloneNode(node.typeParameters), _cloneNode(node.parameters), 10183 _mapToken(node.typedefKeyword),
10184 _cloneNode(node.returnType),
10185 _cloneNode(node.name),
10186 _cloneNode(node.typeParameters),
10187 _cloneNode(node.parameters),
9835 _mapToken(node.semicolon)); 10188 _mapToken(node.semicolon));
9836 10189
9837 @override 10190 @override
9838 FunctionTypedFormalParameter visitFunctionTypedFormalParameter( 10191 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(
9839 FunctionTypedFormalParameter node) => new FunctionTypedFormalParameter( 10192 FunctionTypedFormalParameter node) =>
9840 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata), 10193 new FunctionTypedFormalParameter(
9841 _cloneNode(node.returnType), _cloneNode(node.identifier), 10194 _cloneNode(node.documentationComment),
9842 _cloneNode(node.typeParameters), _cloneNode(node.parameters)); 10195 _cloneNodeList(node.metadata),
10196 _cloneNode(node.returnType),
10197 _cloneNode(node.identifier),
10198 _cloneNode(node.typeParameters),
10199 _cloneNode(node.parameters));
9843 10200
9844 @override 10201 @override
9845 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator( 10202 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
9846 _mapToken(node.keyword), _cloneNodeList(node.hiddenNames)); 10203 _mapToken(node.keyword), _cloneNodeList(node.hiddenNames));
9847 10204
9848 @override 10205 @override
9849 IfStatement visitIfStatement(IfStatement node) => new IfStatement( 10206 IfStatement visitIfStatement(IfStatement node) => new IfStatement(
9850 _mapToken(node.ifKeyword), _mapToken(node.leftParenthesis), 10207 _mapToken(node.ifKeyword),
9851 _cloneNode(node.condition), _mapToken(node.rightParenthesis), 10208 _mapToken(node.leftParenthesis),
9852 _cloneNode(node.thenStatement), _mapToken(node.elseKeyword), 10209 _cloneNode(node.condition),
10210 _mapToken(node.rightParenthesis),
10211 _cloneNode(node.thenStatement),
10212 _mapToken(node.elseKeyword),
9853 _cloneNode(node.elseStatement)); 10213 _cloneNode(node.elseStatement));
9854 10214
9855 @override 10215 @override
9856 ImplementsClause visitImplementsClause(ImplementsClause node) => 10216 ImplementsClause visitImplementsClause(ImplementsClause node) =>
9857 new ImplementsClause( 10217 new ImplementsClause(
9858 _mapToken(node.implementsKeyword), _cloneNodeList(node.interfaces)); 10218 _mapToken(node.implementsKeyword), _cloneNodeList(node.interfaces));
9859 10219
9860 @override 10220 @override
9861 ImportDirective visitImportDirective(ImportDirective node) => 10221 ImportDirective visitImportDirective(ImportDirective node) =>
9862 new ImportDirective(_cloneNode(node.documentationComment), 10222 new ImportDirective(
9863 _cloneNodeList(node.metadata), _mapToken(node.keyword), 10223 _cloneNode(node.documentationComment),
9864 _cloneNode(node.uri), _mapToken(node.deferredKeyword), 10224 _cloneNodeList(node.metadata),
9865 _mapToken(node.asKeyword), _cloneNode(node.prefix), 10225 _mapToken(node.keyword),
9866 _cloneNodeList(node.combinators), _mapToken(node.semicolon)); 10226 _cloneNode(node.uri),
10227 _mapToken(node.deferredKeyword),
10228 _mapToken(node.asKeyword),
10229 _cloneNode(node.prefix),
10230 _cloneNodeList(node.combinators),
10231 _mapToken(node.semicolon));
9867 10232
9868 @override 10233 @override
9869 IndexExpression visitIndexExpression(IndexExpression node) { 10234 IndexExpression visitIndexExpression(IndexExpression node) {
9870 Token period = _mapToken(node.period); 10235 Token period = _mapToken(node.period);
9871 IndexExpression copy; 10236 IndexExpression copy;
9872 if (period == null) { 10237 if (period == null) {
9873 copy = new IndexExpression.forTarget(_cloneNode(node.target), 10238 copy = new IndexExpression.forTarget(
9874 _mapToken(node.leftBracket), _cloneNode(node.index), 10239 _cloneNode(node.target),
10240 _mapToken(node.leftBracket),
10241 _cloneNode(node.index),
9875 _mapToken(node.rightBracket)); 10242 _mapToken(node.rightBracket));
9876 } else { 10243 } else {
9877 copy = new IndexExpression.forCascade(period, _mapToken(node.leftBracket), 10244 copy = new IndexExpression.forCascade(period, _mapToken(node.leftBracket),
9878 _cloneNode(node.index), _mapToken(node.rightBracket)); 10245 _cloneNode(node.index), _mapToken(node.rightBracket));
9879 } 10246 }
9880 copy.auxiliaryElements = node.auxiliaryElements; 10247 copy.auxiliaryElements = node.auxiliaryElements;
9881 copy.propagatedElement = node.propagatedElement; 10248 copy.propagatedElement = node.propagatedElement;
9882 copy.propagatedType = node.propagatedType; 10249 copy.propagatedType = node.propagatedType;
9883 copy.staticElement = node.staticElement; 10250 copy.staticElement = node.staticElement;
9884 copy.staticType = node.staticType; 10251 copy.staticType = node.staticType;
9885 return copy; 10252 return copy;
9886 } 10253 }
9887 10254
9888 @override 10255 @override
9889 InstanceCreationExpression visitInstanceCreationExpression( 10256 InstanceCreationExpression visitInstanceCreationExpression(
9890 InstanceCreationExpression node) { 10257 InstanceCreationExpression node) {
9891 InstanceCreationExpression copy = new InstanceCreationExpression( 10258 InstanceCreationExpression copy = new InstanceCreationExpression(
9892 _mapToken(node.keyword), _cloneNode(node.constructorName), 10259 _mapToken(node.keyword),
10260 _cloneNode(node.constructorName),
9893 _cloneNode(node.argumentList)); 10261 _cloneNode(node.argumentList));
9894 copy.propagatedType = node.propagatedType; 10262 copy.propagatedType = node.propagatedType;
9895 copy.staticElement = node.staticElement; 10263 copy.staticElement = node.staticElement;
9896 copy.staticType = node.staticType; 10264 copy.staticType = node.staticType;
9897 return copy; 10265 return copy;
9898 } 10266 }
9899 10267
9900 @override 10268 @override
9901 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) { 10269 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) {
9902 IntegerLiteral copy = 10270 IntegerLiteral copy =
9903 new IntegerLiteral(_mapToken(node.literal), node.value); 10271 new IntegerLiteral(_mapToken(node.literal), node.value);
9904 copy.propagatedType = node.propagatedType; 10272 copy.propagatedType = node.propagatedType;
9905 copy.staticType = node.staticType; 10273 copy.staticType = node.staticType;
9906 return copy; 10274 return copy;
9907 } 10275 }
9908 10276
9909 @override 10277 @override
9910 InterpolationExpression visitInterpolationExpression( 10278 InterpolationExpression visitInterpolationExpression(
9911 InterpolationExpression node) => new InterpolationExpression( 10279 InterpolationExpression node) =>
9912 _mapToken(node.leftBracket), _cloneNode(node.expression), 10280 new InterpolationExpression(_mapToken(node.leftBracket),
9913 _mapToken(node.rightBracket)); 10281 _cloneNode(node.expression), _mapToken(node.rightBracket));
9914 10282
9915 @override 10283 @override
9916 InterpolationString visitInterpolationString(InterpolationString node) => 10284 InterpolationString visitInterpolationString(InterpolationString node) =>
9917 new InterpolationString(_mapToken(node.contents), node.value); 10285 new InterpolationString(_mapToken(node.contents), node.value);
9918 10286
9919 @override 10287 @override
9920 IsExpression visitIsExpression(IsExpression node) { 10288 IsExpression visitIsExpression(IsExpression node) {
9921 IsExpression copy = new IsExpression(_cloneNode(node.expression), 10289 IsExpression copy = new IsExpression(
9922 _mapToken(node.isOperator), _mapToken(node.notOperator), 10290 _cloneNode(node.expression),
10291 _mapToken(node.isOperator),
10292 _mapToken(node.notOperator),
9923 _cloneNode(node.type)); 10293 _cloneNode(node.type));
9924 copy.propagatedType = node.propagatedType; 10294 copy.propagatedType = node.propagatedType;
9925 copy.staticType = node.staticType; 10295 copy.staticType = node.staticType;
9926 return copy; 10296 return copy;
9927 } 10297 }
9928 10298
9929 @override 10299 @override
9930 Label visitLabel(Label node) => 10300 Label visitLabel(Label node) =>
9931 new Label(_cloneNode(node.label), _mapToken(node.colon)); 10301 new Label(_cloneNode(node.label), _mapToken(node.colon));
9932 10302
9933 @override 10303 @override
9934 LabeledStatement visitLabeledStatement(LabeledStatement node) => 10304 LabeledStatement visitLabeledStatement(LabeledStatement node) =>
9935 new LabeledStatement( 10305 new LabeledStatement(
9936 _cloneNodeList(node.labels), _cloneNode(node.statement)); 10306 _cloneNodeList(node.labels), _cloneNode(node.statement));
9937 10307
9938 @override 10308 @override
9939 LibraryDirective visitLibraryDirective(LibraryDirective node) => 10309 LibraryDirective visitLibraryDirective(LibraryDirective node) =>
9940 new LibraryDirective(_cloneNode(node.documentationComment), 10310 new LibraryDirective(
9941 _cloneNodeList(node.metadata), _mapToken(node.libraryKeyword), 10311 _cloneNode(node.documentationComment),
9942 _cloneNode(node.name), _mapToken(node.semicolon)); 10312 _cloneNodeList(node.metadata),
10313 _mapToken(node.libraryKeyword),
10314 _cloneNode(node.name),
10315 _mapToken(node.semicolon));
9943 10316
9944 @override 10317 @override
9945 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) { 10318 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) {
9946 LibraryIdentifier copy = 10319 LibraryIdentifier copy =
9947 new LibraryIdentifier(_cloneNodeList(node.components)); 10320 new LibraryIdentifier(_cloneNodeList(node.components));
9948 copy.propagatedType = node.propagatedType; 10321 copy.propagatedType = node.propagatedType;
9949 copy.staticType = node.staticType; 10322 copy.staticType = node.staticType;
9950 return copy; 10323 return copy;
9951 } 10324 }
9952 10325
9953 @override 10326 @override
9954 ListLiteral visitListLiteral(ListLiteral node) { 10327 ListLiteral visitListLiteral(ListLiteral node) {
9955 ListLiteral copy = new ListLiteral(_mapToken(node.constKeyword), 10328 ListLiteral copy = new ListLiteral(
9956 _cloneNode(node.typeArguments), _mapToken(node.leftBracket), 10329 _mapToken(node.constKeyword),
9957 _cloneNodeList(node.elements), _mapToken(node.rightBracket)); 10330 _cloneNode(node.typeArguments),
10331 _mapToken(node.leftBracket),
10332 _cloneNodeList(node.elements),
10333 _mapToken(node.rightBracket));
9958 copy.propagatedType = node.propagatedType; 10334 copy.propagatedType = node.propagatedType;
9959 copy.staticType = node.staticType; 10335 copy.staticType = node.staticType;
9960 return copy; 10336 return copy;
9961 } 10337 }
9962 10338
9963 @override 10339 @override
9964 MapLiteral visitMapLiteral(MapLiteral node) { 10340 MapLiteral visitMapLiteral(MapLiteral node) {
9965 MapLiteral copy = new MapLiteral(_mapToken(node.constKeyword), 10341 MapLiteral copy = new MapLiteral(
9966 _cloneNode(node.typeArguments), _mapToken(node.leftBracket), 10342 _mapToken(node.constKeyword),
9967 _cloneNodeList(node.entries), _mapToken(node.rightBracket)); 10343 _cloneNode(node.typeArguments),
10344 _mapToken(node.leftBracket),
10345 _cloneNodeList(node.entries),
10346 _mapToken(node.rightBracket));
9968 copy.propagatedType = node.propagatedType; 10347 copy.propagatedType = node.propagatedType;
9969 copy.staticType = node.staticType; 10348 copy.staticType = node.staticType;
9970 return copy; 10349 return copy;
9971 } 10350 }
9972 10351
9973 @override 10352 @override
9974 MapLiteralEntry visitMapLiteralEntry( 10353 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) =>
9975 MapLiteralEntry node) => new MapLiteralEntry( 10354 new MapLiteralEntry(_cloneNode(node.key), _mapToken(node.separator),
9976 _cloneNode(node.key), _mapToken(node.separator), _cloneNode(node.value)); 10355 _cloneNode(node.value));
9977 10356
9978 @override 10357 @override
9979 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => 10358 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) =>
9980 new MethodDeclaration(_cloneNode(node.documentationComment), 10359 new MethodDeclaration(
9981 _cloneNodeList(node.metadata), _mapToken(node.externalKeyword), 10360 _cloneNode(node.documentationComment),
9982 _mapToken(node.modifierKeyword), _cloneNode(node.returnType), 10361 _cloneNodeList(node.metadata),
9983 _mapToken(node.propertyKeyword), _mapToken(node.operatorKeyword), 10362 _mapToken(node.externalKeyword),
9984 _cloneNode(node.name), _cloneNode(node._typeParameters), 10363 _mapToken(node.modifierKeyword),
9985 _cloneNode(node.parameters), _cloneNode(node.body)); 10364 _cloneNode(node.returnType),
10365 _mapToken(node.propertyKeyword),
10366 _mapToken(node.operatorKeyword),
10367 _cloneNode(node.name),
10368 _cloneNode(node._typeParameters),
10369 _cloneNode(node.parameters),
10370 _cloneNode(node.body));
9986 10371
9987 @override 10372 @override
9988 MethodInvocation visitMethodInvocation(MethodInvocation node) { 10373 MethodInvocation visitMethodInvocation(MethodInvocation node) {
9989 MethodInvocation copy = new MethodInvocation(_cloneNode(node.target), 10374 MethodInvocation copy = new MethodInvocation(
9990 _mapToken(node.operator), _cloneNode(node.methodName), 10375 _cloneNode(node.target),
9991 _cloneNode(node.typeArguments), _cloneNode(node.argumentList)); 10376 _mapToken(node.operator),
10377 _cloneNode(node.methodName),
10378 _cloneNode(node.typeArguments),
10379 _cloneNode(node.argumentList));
9992 copy.propagatedType = node.propagatedType; 10380 copy.propagatedType = node.propagatedType;
9993 copy.staticType = node.staticType; 10381 copy.staticType = node.staticType;
9994 return copy; 10382 return copy;
9995 } 10383 }
9996 10384
9997 @override 10385 @override
9998 NamedExpression visitNamedExpression(NamedExpression node) { 10386 NamedExpression visitNamedExpression(NamedExpression node) {
9999 NamedExpression copy = 10387 NamedExpression copy =
10000 new NamedExpression(_cloneNode(node.name), _cloneNode(node.expression)); 10388 new NamedExpression(_cloneNode(node.name), _cloneNode(node.expression));
10001 copy.propagatedType = node.propagatedType; 10389 copy.propagatedType = node.propagatedType;
(...skipping 15 matching lines...) Expand all
10017 NullLiteral copy = new NullLiteral(_mapToken(node.literal)); 10405 NullLiteral copy = new NullLiteral(_mapToken(node.literal));
10018 copy.propagatedType = node.propagatedType; 10406 copy.propagatedType = node.propagatedType;
10019 copy.staticType = node.staticType; 10407 copy.staticType = node.staticType;
10020 return copy; 10408 return copy;
10021 } 10409 }
10022 10410
10023 @override 10411 @override
10024 ParenthesizedExpression visitParenthesizedExpression( 10412 ParenthesizedExpression visitParenthesizedExpression(
10025 ParenthesizedExpression node) { 10413 ParenthesizedExpression node) {
10026 ParenthesizedExpression copy = new ParenthesizedExpression( 10414 ParenthesizedExpression copy = new ParenthesizedExpression(
10027 _mapToken(node.leftParenthesis), _cloneNode(node.expression), 10415 _mapToken(node.leftParenthesis),
10416 _cloneNode(node.expression),
10028 _mapToken(node.rightParenthesis)); 10417 _mapToken(node.rightParenthesis));
10029 copy.propagatedType = node.propagatedType; 10418 copy.propagatedType = node.propagatedType;
10030 copy.staticType = node.staticType; 10419 copy.staticType = node.staticType;
10031 return copy; 10420 return copy;
10032 } 10421 }
10033 10422
10034 @override 10423 @override
10035 PartDirective visitPartDirective(PartDirective node) { 10424 PartDirective visitPartDirective(PartDirective node) {
10036 PartDirective copy = new PartDirective( 10425 PartDirective copy = new PartDirective(
10037 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata), 10426 _cloneNode(node.documentationComment),
10038 _mapToken(node.partKeyword), _cloneNode(node.uri), 10427 _cloneNodeList(node.metadata),
10428 _mapToken(node.partKeyword),
10429 _cloneNode(node.uri),
10039 _mapToken(node.semicolon)); 10430 _mapToken(node.semicolon));
10040 copy.element = node.element; 10431 copy.element = node.element;
10041 return copy; 10432 return copy;
10042 } 10433 }
10043 10434
10044 @override 10435 @override
10045 PartOfDirective visitPartOfDirective(PartOfDirective node) { 10436 PartOfDirective visitPartOfDirective(PartOfDirective node) {
10046 PartOfDirective copy = new PartOfDirective( 10437 PartOfDirective copy = new PartOfDirective(
10047 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata), 10438 _cloneNode(node.documentationComment),
10048 _mapToken(node.partKeyword), _mapToken(node.ofKeyword), 10439 _cloneNodeList(node.metadata),
10049 _cloneNode(node.libraryName), _mapToken(node.semicolon)); 10440 _mapToken(node.partKeyword),
10441 _mapToken(node.ofKeyword),
10442 _cloneNode(node.libraryName),
10443 _mapToken(node.semicolon));
10050 copy.element = node.element; 10444 copy.element = node.element;
10051 return copy; 10445 return copy;
10052 } 10446 }
10053 10447
10054 @override 10448 @override
10055 PostfixExpression visitPostfixExpression(PostfixExpression node) { 10449 PostfixExpression visitPostfixExpression(PostfixExpression node) {
10056 PostfixExpression copy = new PostfixExpression( 10450 PostfixExpression copy = new PostfixExpression(
10057 _cloneNode(node.operand), _mapToken(node.operator)); 10451 _cloneNode(node.operand), _mapToken(node.operator));
10058 copy.propagatedElement = node.propagatedElement; 10452 copy.propagatedElement = node.propagatedElement;
10059 copy.propagatedType = node.propagatedType; 10453 copy.propagatedType = node.propagatedType;
(...skipping 28 matching lines...) Expand all
10088 _mapToken(node.operator), _cloneNode(node.propertyName)); 10482 _mapToken(node.operator), _cloneNode(node.propertyName));
10089 copy.propagatedType = node.propagatedType; 10483 copy.propagatedType = node.propagatedType;
10090 copy.staticType = node.staticType; 10484 copy.staticType = node.staticType;
10091 return copy; 10485 return copy;
10092 } 10486 }
10093 10487
10094 @override 10488 @override
10095 RedirectingConstructorInvocation visitRedirectingConstructorInvocation( 10489 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(
10096 RedirectingConstructorInvocation node) { 10490 RedirectingConstructorInvocation node) {
10097 RedirectingConstructorInvocation copy = 10491 RedirectingConstructorInvocation copy =
10098 new RedirectingConstructorInvocation(_mapToken(node.thisKeyword), 10492 new RedirectingConstructorInvocation(
10099 _mapToken(node.period), _cloneNode(node.constructorName), 10493 _mapToken(node.thisKeyword),
10494 _mapToken(node.period),
10495 _cloneNode(node.constructorName),
10100 _cloneNode(node.argumentList)); 10496 _cloneNode(node.argumentList));
10101 copy.staticElement = node.staticElement; 10497 copy.staticElement = node.staticElement;
10102 return copy; 10498 return copy;
10103 } 10499 }
10104 10500
10105 @override 10501 @override
10106 RethrowExpression visitRethrowExpression(RethrowExpression node) { 10502 RethrowExpression visitRethrowExpression(RethrowExpression node) {
10107 RethrowExpression copy = 10503 RethrowExpression copy =
10108 new RethrowExpression(_mapToken(node.rethrowKeyword)); 10504 new RethrowExpression(_mapToken(node.rethrowKeyword));
10109 copy.propagatedType = node.propagatedType; 10505 copy.propagatedType = node.propagatedType;
10110 copy.staticType = node.staticType; 10506 copy.staticType = node.staticType;
10111 return copy; 10507 return copy;
10112 } 10508 }
10113 10509
10114 @override 10510 @override
10115 ReturnStatement visitReturnStatement(ReturnStatement node) => 10511 ReturnStatement visitReturnStatement(ReturnStatement node) =>
10116 new ReturnStatement(_mapToken(node.returnKeyword), 10512 new ReturnStatement(_mapToken(node.returnKeyword),
10117 _cloneNode(node.expression), _mapToken(node.semicolon)); 10513 _cloneNode(node.expression), _mapToken(node.semicolon));
10118 10514
10119 @override 10515 @override
10120 ScriptTag visitScriptTag(ScriptTag node) => 10516 ScriptTag visitScriptTag(ScriptTag node) =>
10121 new ScriptTag(_mapToken(node.scriptTag)); 10517 new ScriptTag(_mapToken(node.scriptTag));
10122 10518
10123 @override 10519 @override
10124 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator( 10520 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
10125 _mapToken(node.keyword), _cloneNodeList(node.shownNames)); 10521 _mapToken(node.keyword), _cloneNodeList(node.shownNames));
10126 10522
10127 @override 10523 @override
10128 SimpleFormalParameter visitSimpleFormalParameter( 10524 SimpleFormalParameter visitSimpleFormalParameter(
10129 SimpleFormalParameter node) => new SimpleFormalParameter( 10525 SimpleFormalParameter node) =>
10130 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata), 10526 new SimpleFormalParameter(
10131 _mapToken(node.keyword), _cloneNode(node.type), 10527 _cloneNode(node.documentationComment),
10132 _cloneNode(node.identifier)); 10528 _cloneNodeList(node.metadata),
10529 _mapToken(node.keyword),
10530 _cloneNode(node.type),
10531 _cloneNode(node.identifier));
10133 10532
10134 @override 10533 @override
10135 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) { 10534 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) {
10136 Token mappedToken = _mapToken(node.token); 10535 Token mappedToken = _mapToken(node.token);
10137 if (mappedToken == null) { 10536 if (mappedToken == null) {
10138 // This only happens for SimpleIdentifiers created by the parser as part 10537 // This only happens for SimpleIdentifiers created by the parser as part
10139 // of scanning documentation comments (the tokens for those identifiers 10538 // of scanning documentation comments (the tokens for those identifiers
10140 // are not in the original token stream and hence do not get copied). 10539 // are not in the original token stream and hence do not get copied).
10141 // This extra check can be removed if the scanner is changed to scan 10540 // This extra check can be removed if the scanner is changed to scan
10142 // documentation comments for the parser. 10541 // documentation comments for the parser.
(...skipping 23 matching lines...) Expand all
10166 new StringInterpolation(_cloneNodeList(node.elements)); 10565 new StringInterpolation(_cloneNodeList(node.elements));
10167 copy.propagatedType = node.propagatedType; 10566 copy.propagatedType = node.propagatedType;
10168 copy.staticType = node.staticType; 10567 copy.staticType = node.staticType;
10169 return copy; 10568 return copy;
10170 } 10569 }
10171 10570
10172 @override 10571 @override
10173 SuperConstructorInvocation visitSuperConstructorInvocation( 10572 SuperConstructorInvocation visitSuperConstructorInvocation(
10174 SuperConstructorInvocation node) { 10573 SuperConstructorInvocation node) {
10175 SuperConstructorInvocation copy = new SuperConstructorInvocation( 10574 SuperConstructorInvocation copy = new SuperConstructorInvocation(
10176 _mapToken(node.superKeyword), _mapToken(node.period), 10575 _mapToken(node.superKeyword),
10177 _cloneNode(node.constructorName), _cloneNode(node.argumentList)); 10576 _mapToken(node.period),
10577 _cloneNode(node.constructorName),
10578 _cloneNode(node.argumentList));
10178 copy.staticElement = node.staticElement; 10579 copy.staticElement = node.staticElement;
10179 return copy; 10580 return copy;
10180 } 10581 }
10181 10582
10182 @override 10583 @override
10183 SuperExpression visitSuperExpression(SuperExpression node) { 10584 SuperExpression visitSuperExpression(SuperExpression node) {
10184 SuperExpression copy = new SuperExpression(_mapToken(node.superKeyword)); 10585 SuperExpression copy = new SuperExpression(_mapToken(node.superKeyword));
10185 copy.propagatedType = node.propagatedType; 10586 copy.propagatedType = node.propagatedType;
10186 copy.staticType = node.staticType; 10587 copy.staticType = node.staticType;
10187 return copy; 10588 return copy;
10188 } 10589 }
10189 10590
10190 @override 10591 @override
10191 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase( 10592 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(
10192 _cloneNodeList(node.labels), _mapToken(node.keyword), 10593 _cloneNodeList(node.labels),
10193 _cloneNode(node.expression), _mapToken(node.colon), 10594 _mapToken(node.keyword),
10595 _cloneNode(node.expression),
10596 _mapToken(node.colon),
10194 _cloneNodeList(node.statements)); 10597 _cloneNodeList(node.statements));
10195 10598
10196 @override 10599 @override
10197 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault( 10600 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(
10198 _cloneNodeList(node.labels), _mapToken(node.keyword), 10601 _cloneNodeList(node.labels),
10199 _mapToken(node.colon), _cloneNodeList(node.statements)); 10602 _mapToken(node.keyword),
10603 _mapToken(node.colon),
10604 _cloneNodeList(node.statements));
10200 10605
10201 @override 10606 @override
10202 SwitchStatement visitSwitchStatement(SwitchStatement node) => 10607 SwitchStatement visitSwitchStatement(SwitchStatement node) =>
10203 new SwitchStatement(_mapToken(node.switchKeyword), 10608 new SwitchStatement(
10204 _mapToken(node.leftParenthesis), _cloneNode(node.expression), 10609 _mapToken(node.switchKeyword),
10205 _mapToken(node.rightParenthesis), _mapToken(node.leftBracket), 10610 _mapToken(node.leftParenthesis),
10206 _cloneNodeList(node.members), _mapToken(node.rightBracket)); 10611 _cloneNode(node.expression),
10612 _mapToken(node.rightParenthesis),
10613 _mapToken(node.leftBracket),
10614 _cloneNodeList(node.members),
10615 _mapToken(node.rightBracket));
10207 10616
10208 @override 10617 @override
10209 AstNode visitSymbolLiteral(SymbolLiteral node) { 10618 AstNode visitSymbolLiteral(SymbolLiteral node) {
10210 SymbolLiteral copy = new SymbolLiteral( 10619 SymbolLiteral copy = new SymbolLiteral(
10211 _mapToken(node.poundSign), _mapTokens(node.components)); 10620 _mapToken(node.poundSign), _mapTokens(node.components));
10212 copy.propagatedType = node.propagatedType; 10621 copy.propagatedType = node.propagatedType;
10213 copy.staticType = node.staticType; 10622 copy.staticType = node.staticType;
10214 return copy; 10623 return copy;
10215 } 10624 }
10216 10625
10217 @override 10626 @override
10218 ThisExpression visitThisExpression(ThisExpression node) { 10627 ThisExpression visitThisExpression(ThisExpression node) {
10219 ThisExpression copy = new ThisExpression(_mapToken(node.thisKeyword)); 10628 ThisExpression copy = new ThisExpression(_mapToken(node.thisKeyword));
10220 copy.propagatedType = node.propagatedType; 10629 copy.propagatedType = node.propagatedType;
10221 copy.staticType = node.staticType; 10630 copy.staticType = node.staticType;
10222 return copy; 10631 return copy;
10223 } 10632 }
10224 10633
10225 @override 10634 @override
10226 ThrowExpression visitThrowExpression(ThrowExpression node) { 10635 ThrowExpression visitThrowExpression(ThrowExpression node) {
10227 ThrowExpression copy = new ThrowExpression( 10636 ThrowExpression copy = new ThrowExpression(
10228 _mapToken(node.throwKeyword), _cloneNode(node.expression)); 10637 _mapToken(node.throwKeyword), _cloneNode(node.expression));
10229 copy.propagatedType = node.propagatedType; 10638 copy.propagatedType = node.propagatedType;
10230 copy.staticType = node.staticType; 10639 copy.staticType = node.staticType;
10231 return copy; 10640 return copy;
10232 } 10641 }
10233 10642
10234 @override 10643 @override
10235 TopLevelVariableDeclaration visitTopLevelVariableDeclaration( 10644 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(
10236 TopLevelVariableDeclaration node) => new TopLevelVariableDeclaration( 10645 TopLevelVariableDeclaration node) =>
10237 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata), 10646 new TopLevelVariableDeclaration(
10238 _cloneNode(node.variables), _mapToken(node.semicolon)); 10647 _cloneNode(node.documentationComment),
10648 _cloneNodeList(node.metadata),
10649 _cloneNode(node.variables),
10650 _mapToken(node.semicolon));
10239 10651
10240 @override 10652 @override
10241 TryStatement visitTryStatement(TryStatement node) => new TryStatement( 10653 TryStatement visitTryStatement(TryStatement node) => new TryStatement(
10242 _mapToken(node.tryKeyword), _cloneNode(node.body), 10654 _mapToken(node.tryKeyword),
10243 _cloneNodeList(node.catchClauses), _mapToken(node.finallyKeyword), 10655 _cloneNode(node.body),
10656 _cloneNodeList(node.catchClauses),
10657 _mapToken(node.finallyKeyword),
10244 _cloneNode(node.finallyBlock)); 10658 _cloneNode(node.finallyBlock));
10245 10659
10246 @override 10660 @override
10247 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => 10661 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) =>
10248 new TypeArgumentList(_mapToken(node.leftBracket), 10662 new TypeArgumentList(_mapToken(node.leftBracket),
10249 _cloneNodeList(node.arguments), _mapToken(node.rightBracket)); 10663 _cloneNodeList(node.arguments), _mapToken(node.rightBracket));
10250 10664
10251 @override 10665 @override
10252 TypeName visitTypeName(TypeName node) { 10666 TypeName visitTypeName(TypeName node) {
10253 TypeName copy = 10667 TypeName copy =
10254 new TypeName(_cloneNode(node.name), _cloneNode(node.typeArguments)); 10668 new TypeName(_cloneNode(node.name), _cloneNode(node.typeArguments));
10255 copy.type = node.type; 10669 copy.type = node.type;
10256 return copy; 10670 return copy;
10257 } 10671 }
10258 10672
10259 @override 10673 @override
10260 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter( 10674 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(
10261 _cloneNode(node.documentationComment), _cloneNodeList(node.metadata), 10675 _cloneNode(node.documentationComment),
10262 _cloneNode(node.name), _mapToken(node.extendsKeyword), 10676 _cloneNodeList(node.metadata),
10677 _cloneNode(node.name),
10678 _mapToken(node.extendsKeyword),
10263 _cloneNode(node.bound)); 10679 _cloneNode(node.bound));
10264 10680
10265 @override 10681 @override
10266 TypeParameterList visitTypeParameterList(TypeParameterList node) => 10682 TypeParameterList visitTypeParameterList(TypeParameterList node) =>
10267 new TypeParameterList(_mapToken(node.leftBracket), 10683 new TypeParameterList(_mapToken(node.leftBracket),
10268 _cloneNodeList(node.typeParameters), _mapToken(node.rightBracket)); 10684 _cloneNodeList(node.typeParameters), _mapToken(node.rightBracket));
10269 10685
10270 @override 10686 @override
10271 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => 10687 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) =>
10272 new VariableDeclaration(_cloneNode(node.name), _mapToken(node.equals), 10688 new VariableDeclaration(_cloneNode(node.name), _mapToken(node.equals),
10273 _cloneNode(node.initializer)); 10689 _cloneNode(node.initializer));
10274 10690
10275 @override 10691 @override
10276 VariableDeclarationList visitVariableDeclarationList( 10692 VariableDeclarationList visitVariableDeclarationList(
10277 VariableDeclarationList node) => new VariableDeclarationList(null, 10693 VariableDeclarationList node) =>
10278 _cloneNodeList(node.metadata), _mapToken(node.keyword), 10694 new VariableDeclarationList(
10279 _cloneNode(node.type), _cloneNodeList(node.variables)); 10695 null,
10696 _cloneNodeList(node.metadata),
10697 _mapToken(node.keyword),
10698 _cloneNode(node.type),
10699 _cloneNodeList(node.variables));
10280 10700
10281 @override 10701 @override
10282 VariableDeclarationStatement visitVariableDeclarationStatement( 10702 VariableDeclarationStatement visitVariableDeclarationStatement(
10283 VariableDeclarationStatement node) => new VariableDeclarationStatement( 10703 VariableDeclarationStatement node) =>
10284 _cloneNode(node.variables), _mapToken(node.semicolon)); 10704 new VariableDeclarationStatement(
10705 _cloneNode(node.variables), _mapToken(node.semicolon));
10285 10706
10286 @override 10707 @override
10287 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement( 10708 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
10288 _mapToken(node.whileKeyword), _mapToken(node.leftParenthesis), 10709 _mapToken(node.whileKeyword),
10289 _cloneNode(node.condition), _mapToken(node.rightParenthesis), 10710 _mapToken(node.leftParenthesis),
10711 _cloneNode(node.condition),
10712 _mapToken(node.rightParenthesis),
10290 _cloneNode(node.body)); 10713 _cloneNode(node.body));
10291 10714
10292 @override 10715 @override
10293 WithClause visitWithClause(WithClause node) => new WithClause( 10716 WithClause visitWithClause(WithClause node) => new WithClause(
10294 _mapToken(node.withKeyword), _cloneNodeList(node.mixinTypes)); 10717 _mapToken(node.withKeyword), _cloneNodeList(node.mixinTypes));
10295 10718
10296 @override 10719 @override
10297 YieldStatement visitYieldStatement(YieldStatement node) => new YieldStatement( 10720 YieldStatement visitYieldStatement(YieldStatement node) => new YieldStatement(
10298 _mapToken(node.yieldKeyword), _mapToken(node.star), 10721 _mapToken(node.yieldKeyword),
10299 _cloneNode(node.expression), _mapToken(node.semicolon)); 10722 _mapToken(node.star),
10723 _cloneNode(node.expression),
10724 _mapToken(node.semicolon));
10300 10725
10301 AstNode _cloneNode(AstNode node) { 10726 AstNode _cloneNode(AstNode node) {
10302 if (node == null) { 10727 if (node == null) {
10303 return null; 10728 return null;
10304 } 10729 }
10305 if (identical(node, _oldNode)) { 10730 if (identical(node, _oldNode)) {
10306 return _newNode; 10731 return _newNode;
10307 } 10732 }
10308 return node.accept(this) as AstNode; 10733 return node.accept(this) as AstNode;
10309 } 10734 }
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
11572 * Initialize a newly created method declaration. Either or both of the 11997 * Initialize a newly created method declaration. Either or both of the
11573 * [comment] and [metadata] can be `null` if the declaration does not have the 11998 * [comment] and [metadata] can be `null` if the declaration does not have the
11574 * corresponding attribute. The [externalKeyword] can be `null` if the method 11999 * corresponding attribute. The [externalKeyword] can be `null` if the method
11575 * is not external. The [modifierKeyword] can be `null` if the method is 12000 * is not external. The [modifierKeyword] can be `null` if the method is
11576 * neither abstract nor static. The [returnType] can be `null` if no return 12001 * neither abstract nor static. The [returnType] can be `null` if no return
11577 * type was specified. The [propertyKeyword] can be `null` if the method is 12002 * type was specified. The [propertyKeyword] can be `null` if the method is
11578 * neither a getter or a setter. The [operatorKeyword] can be `null` if the 12003 * neither a getter or a setter. The [operatorKeyword] can be `null` if the
11579 * method does not implement an operator. The [parameters] must be `null` if 12004 * method does not implement an operator. The [parameters] must be `null` if
11580 * this method declares a getter. 12005 * this method declares a getter.
11581 */ 12006 */
11582 MethodDeclaration(Comment comment, List<Annotation> metadata, 12007 MethodDeclaration(
11583 this.externalKeyword, this.modifierKeyword, TypeName returnType, 12008 Comment comment,
11584 this.propertyKeyword, this.operatorKeyword, SimpleIdentifier name, 12009 List<Annotation> metadata,
11585 TypeParameterList typeParameters, FormalParameterList parameters, 12010 this.externalKeyword,
12011 this.modifierKeyword,
12012 TypeName returnType,
12013 this.propertyKeyword,
12014 this.operatorKeyword,
12015 SimpleIdentifier name,
12016 TypeParameterList typeParameters,
12017 FormalParameterList parameters,
11586 FunctionBody body) 12018 FunctionBody body)
11587 : super(comment, metadata) { 12019 : super(comment, metadata) {
11588 _returnType = _becomeParentOf(returnType); 12020 _returnType = _becomeParentOf(returnType);
11589 _name = _becomeParentOf(name); 12021 _name = _becomeParentOf(name);
11590 _typeParameters = _becomeParentOf(typeParameters); 12022 _typeParameters = _becomeParentOf(typeParameters);
11591 _parameters = _becomeParentOf(parameters); 12023 _parameters = _becomeParentOf(parameters);
11592 _body = _becomeParentOf(body); 12024 _body = _becomeParentOf(body);
11593 } 12025 }
11594 12026
11595 /** 12027 /**
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
11779 12211
11780 /** 12212 /**
11781 * The list of arguments to the method. 12213 * The list of arguments to the method.
11782 */ 12214 */
11783 ArgumentList _argumentList; 12215 ArgumentList _argumentList;
11784 12216
11785 /** 12217 /**
11786 * Initialize a newly created method invocation. The [target] and [operator] 12218 * Initialize a newly created method invocation. The [target] and [operator]
11787 * can be `null` if there is no target. 12219 * can be `null` if there is no target.
11788 */ 12220 */
11789 MethodInvocation(Expression target, this.operator, 12221 MethodInvocation(
11790 SimpleIdentifier methodName, TypeArgumentList typeArguments, 12222 Expression target,
12223 this.operator,
12224 SimpleIdentifier methodName,
12225 TypeArgumentList typeArguments,
11791 ArgumentList argumentList) { 12226 ArgumentList argumentList) {
11792 _target = _becomeParentOf(target); 12227 _target = _becomeParentOf(target);
11793 _methodName = _becomeParentOf(methodName); 12228 _methodName = _becomeParentOf(methodName);
11794 _typeArguments = _becomeParentOf(typeArguments); 12229 _typeArguments = _becomeParentOf(typeArguments);
11795 _argumentList = _becomeParentOf(argumentList); 12230 _argumentList = _becomeParentOf(argumentList);
11796 } 12231 }
11797 12232
11798 /** 12233 /**
11799 * Return the list of arguments to the method. 12234 * Return the list of arguments to the method.
11800 */ 12235 */
(...skipping 4206 matching lines...) Expand 10 before | Expand all | Expand 10 after
16007 R visitPrefixedIdentifier(PrefixedIdentifier node) => null; 16442 R visitPrefixedIdentifier(PrefixedIdentifier node) => null;
16008 16443
16009 @override 16444 @override
16010 R visitPrefixExpression(PrefixExpression node) => null; 16445 R visitPrefixExpression(PrefixExpression node) => null;
16011 16446
16012 @override 16447 @override
16013 R visitPropertyAccess(PropertyAccess node) => null; 16448 R visitPropertyAccess(PropertyAccess node) => null;
16014 16449
16015 @override 16450 @override
16016 R visitRedirectingConstructorInvocation( 16451 R visitRedirectingConstructorInvocation(
16017 RedirectingConstructorInvocation node) => null; 16452 RedirectingConstructorInvocation node) =>
16453 null;
16018 16454
16019 @override 16455 @override
16020 R visitRethrowExpression(RethrowExpression node) => null; 16456 R visitRethrowExpression(RethrowExpression node) => null;
16021 16457
16022 @override 16458 @override
16023 R visitReturnStatement(ReturnStatement node) => null; 16459 R visitReturnStatement(ReturnStatement node) => null;
16024 16460
16025 @override 16461 @override
16026 R visitScriptTag(ScriptTag node) => null; 16462 R visitScriptTag(ScriptTag node) => null;
16027 16463
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
17228 17664
17229 /** 17665 /**
17230 * The right curly bracket. 17666 * The right curly bracket.
17231 */ 17667 */
17232 Token rightBracket; 17668 Token rightBracket;
17233 17669
17234 /** 17670 /**
17235 * Initialize a newly created switch statement. The list of [members] can be 17671 * Initialize a newly created switch statement. The list of [members] can be
17236 * `null` if there are no switch members. 17672 * `null` if there are no switch members.
17237 */ 17673 */
17238 SwitchStatement(this.switchKeyword, this.leftParenthesis, 17674 SwitchStatement(
17239 Expression expression, this.rightParenthesis, this.leftBracket, 17675 this.switchKeyword,
17240 List<SwitchMember> members, this.rightBracket) { 17676 this.leftParenthesis,
17677 Expression expression,
17678 this.rightParenthesis,
17679 this.leftBracket,
17680 List<SwitchMember> members,
17681 this.rightBracket) {
17241 _expression = _becomeParentOf(expression); 17682 _expression = _becomeParentOf(expression);
17242 _members = new NodeList<SwitchMember>(this, members); 17683 _members = new NodeList<SwitchMember>(this, members);
17243 } 17684 }
17244 17685
17245 @override 17686 @override
17246 Token get beginToken => switchKeyword; 17687 Token get beginToken => switchKeyword;
17247 17688
17248 @override 17689 @override
17249 Iterable get childEntities => new ChildEntities() 17690 Iterable get childEntities => new ChildEntities()
17250 ..add(switchKeyword) 17691 ..add(switchKeyword)
(...skipping 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after
19451 R visitPrefixedIdentifier(PrefixedIdentifier node) => visitNode(node); 19892 R visitPrefixedIdentifier(PrefixedIdentifier node) => visitNode(node);
19452 19893
19453 @override 19894 @override
19454 R visitPrefixExpression(PrefixExpression node) => visitNode(node); 19895 R visitPrefixExpression(PrefixExpression node) => visitNode(node);
19455 19896
19456 @override 19897 @override
19457 R visitPropertyAccess(PropertyAccess node) => visitNode(node); 19898 R visitPropertyAccess(PropertyAccess node) => visitNode(node);
19458 19899
19459 @override 19900 @override
19460 R visitRedirectingConstructorInvocation( 19901 R visitRedirectingConstructorInvocation(
19461 RedirectingConstructorInvocation node) => visitNode(node); 19902 RedirectingConstructorInvocation node) =>
19903 visitNode(node);
19462 19904
19463 @override 19905 @override
19464 R visitRethrowExpression(RethrowExpression node) => visitNode(node); 19906 R visitRethrowExpression(RethrowExpression node) => visitNode(node);
19465 19907
19466 @override 19908 @override
19467 R visitReturnStatement(ReturnStatement node) => visitNode(node); 19909 R visitReturnStatement(ReturnStatement node) => visitNode(node);
19468 19910
19469 @override 19911 @override
19470 R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag); 19912 R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
19471 19913
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
20205 } 20647 }
20206 20648
20207 @override 20649 @override
20208 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); 20650 accept(AstVisitor visitor) => visitor.visitYieldStatement(this);
20209 20651
20210 @override 20652 @override
20211 void visitChildren(AstVisitor visitor) { 20653 void visitChildren(AstVisitor visitor) {
20212 _safelyVisitChild(_expression, visitor); 20654 _safelyVisitChild(_expression, visitor);
20213 } 20655 }
20214 } 20656 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/lib/src/generated/constant.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698