| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 import 'package:analyzer/dart/ast/ast.dart'; |
| 6 import 'package:analyzer/dart/ast/ast_factory.dart'; |
| 7 import 'package:analyzer/dart/ast/token.dart'; |
| 8 import 'package:analyzer/src/dart/ast/ast.dart'; |
| 9 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 10 |
| 11 /** |
| 12 * Concrete implementation of [AstFactory] based on the standard AST |
| 13 * implementation. |
| 14 */ |
| 15 class AstFactoryImpl extends AstFactory { |
| 16 @override |
| 17 AdjacentStrings adjacentStrings(List<StringLiteral> strings) => |
| 18 new AdjacentStringsImpl(strings); |
| 19 |
| 20 @override |
| 21 Annotation annotation(Token atSign, Identifier name, Token period, |
| 22 SimpleIdentifier constructorName, ArgumentList arguments) => |
| 23 new AnnotationImpl(atSign, name, period, constructorName, arguments); |
| 24 |
| 25 @override |
| 26 ArgumentList argumentList(Token leftParenthesis, List<Expression> arguments, |
| 27 Token rightParenthesis) => |
| 28 new ArgumentListImpl(leftParenthesis, arguments, rightParenthesis); |
| 29 |
| 30 @override |
| 31 AsExpression asExpression( |
| 32 Expression expression, Token asOperator, TypeName type) => |
| 33 new AsExpressionImpl(expression, asOperator, type); |
| 34 |
| 35 @override |
| 36 AssertStatement assertStatement( |
| 37 Token assertKeyword, |
| 38 Token leftParenthesis, |
| 39 Expression condition, |
| 40 Token comma, |
| 41 Expression message, |
| 42 Token rightParenthesis, |
| 43 Token semicolon) => |
| 44 new AssertStatementImpl(assertKeyword, leftParenthesis, condition, comma, |
| 45 message, rightParenthesis, semicolon); |
| 46 |
| 47 @override |
| 48 AssignmentExpression assignmentExpression( |
| 49 Expression leftHandSide, Token operator, Expression rightHandSide) => |
| 50 new AssignmentExpressionImpl(leftHandSide, operator, rightHandSide); |
| 51 |
| 52 @override |
| 53 AwaitExpression awaitExpression(Token awaitKeyword, Expression expression) => |
| 54 new AwaitExpressionImpl(awaitKeyword, expression); |
| 55 |
| 56 @override |
| 57 BinaryExpression binaryExpression( |
| 58 Expression leftOperand, Token operator, Expression rightOperand) => |
| 59 new BinaryExpressionImpl(leftOperand, operator, rightOperand); |
| 60 @override |
| 61 Block block( |
| 62 Token leftBracket, List<Statement> statements, Token rightBracket) => |
| 63 new BlockImpl(leftBracket, statements, rightBracket); |
| 64 |
| 65 @override |
| 66 Comment blockComment(List<Token> tokens) => |
| 67 CommentImpl.createBlockComment(tokens); |
| 68 |
| 69 @override |
| 70 BlockFunctionBody blockFunctionBody(Token keyword, Token star, Block block) => |
| 71 new BlockFunctionBodyImpl(keyword, star, block); |
| 72 |
| 73 @override |
| 74 BooleanLiteral booleanLiteral(Token literal, bool value) => |
| 75 new BooleanLiteralImpl(literal, value); |
| 76 |
| 77 @override |
| 78 BreakStatement breakStatement( |
| 79 Token breakKeyword, SimpleIdentifier label, Token semicolon) => |
| 80 new BreakStatementImpl(breakKeyword, label, semicolon); |
| 81 |
| 82 @override |
| 83 CascadeExpression cascadeExpression( |
| 84 Expression target, List<Expression> cascadeSections) => |
| 85 new CascadeExpressionImpl(target, cascadeSections); |
| 86 |
| 87 @override |
| 88 CatchClause catchClause( |
| 89 Token onKeyword, |
| 90 TypeName exceptionType, |
| 91 Token catchKeyword, |
| 92 Token leftParenthesis, |
| 93 SimpleIdentifier exceptionParameter, |
| 94 Token comma, |
| 95 SimpleIdentifier stackTraceParameter, |
| 96 Token rightParenthesis, |
| 97 Block body) => |
| 98 new CatchClauseImpl( |
| 99 onKeyword, |
| 100 exceptionType, |
| 101 catchKeyword, |
| 102 leftParenthesis, |
| 103 exceptionParameter, |
| 104 comma, |
| 105 stackTraceParameter, |
| 106 rightParenthesis, |
| 107 body); |
| 108 |
| 109 @override |
| 110 ClassDeclaration classDeclaration( |
| 111 Comment comment, |
| 112 List<Annotation> metadata, |
| 113 Token abstractKeyword, |
| 114 Token classKeyword, |
| 115 SimpleIdentifier name, |
| 116 TypeParameterList typeParameters, |
| 117 ExtendsClause extendsClause, |
| 118 WithClause withClause, |
| 119 ImplementsClause implementsClause, |
| 120 Token leftBracket, |
| 121 List<ClassMember> members, |
| 122 Token rightBracket) => |
| 123 new ClassDeclarationImpl( |
| 124 comment, |
| 125 metadata, |
| 126 abstractKeyword, |
| 127 classKeyword, |
| 128 name, |
| 129 typeParameters, |
| 130 extendsClause, |
| 131 withClause, |
| 132 implementsClause, |
| 133 leftBracket, |
| 134 members, |
| 135 rightBracket); |
| 136 |
| 137 @override |
| 138 ClassTypeAlias classTypeAlias( |
| 139 Comment comment, |
| 140 List<Annotation> metadata, |
| 141 Token keyword, |
| 142 SimpleIdentifier name, |
| 143 TypeParameterList typeParameters, |
| 144 Token equals, |
| 145 Token abstractKeyword, |
| 146 TypeName superclass, |
| 147 WithClause withClause, |
| 148 ImplementsClause implementsClause, |
| 149 Token semicolon) => |
| 150 new ClassTypeAliasImpl( |
| 151 comment, |
| 152 metadata, |
| 153 keyword, |
| 154 name, |
| 155 typeParameters, |
| 156 equals, |
| 157 abstractKeyword, |
| 158 superclass, |
| 159 withClause, |
| 160 implementsClause, |
| 161 semicolon); |
| 162 |
| 163 @override |
| 164 CommentReference commentReference(Token newKeyword, Identifier identifier) => |
| 165 new CommentReferenceImpl(newKeyword, identifier); |
| 166 |
| 167 @override |
| 168 CompilationUnit compilationUnit( |
| 169 Token beginToken, |
| 170 ScriptTag scriptTag, |
| 171 List<Directive> directives, |
| 172 List<CompilationUnitMember> declarations, |
| 173 Token endToken) => |
| 174 new CompilationUnitImpl( |
| 175 beginToken, scriptTag, directives, declarations, endToken); |
| 176 |
| 177 @override |
| 178 ConditionalExpression conditionalExpression( |
| 179 Expression condition, |
| 180 Token question, |
| 181 Expression thenExpression, |
| 182 Token colon, |
| 183 Expression elseExpression) => |
| 184 new ConditionalExpressionImpl( |
| 185 condition, question, thenExpression, colon, elseExpression); |
| 186 |
| 187 @override |
| 188 Configuration configuration( |
| 189 Token ifKeyword, |
| 190 Token leftParenthesis, |
| 191 DottedName name, |
| 192 Token equalToken, |
| 193 StringLiteral value, |
| 194 Token rightParenthesis, |
| 195 StringLiteral libraryUri) => |
| 196 new ConfigurationImpl(ifKeyword, leftParenthesis, name, equalToken, value, |
| 197 rightParenthesis, libraryUri); |
| 198 |
| 199 @override |
| 200 ConstructorDeclaration constructorDeclaration( |
| 201 Comment comment, |
| 202 List<Annotation> metadata, |
| 203 Token externalKeyword, |
| 204 Token constKeyword, |
| 205 Token factoryKeyword, |
| 206 Identifier returnType, |
| 207 Token period, |
| 208 SimpleIdentifier name, |
| 209 FormalParameterList parameters, |
| 210 Token separator, |
| 211 List<ConstructorInitializer> initializers, |
| 212 ConstructorName redirectedConstructor, |
| 213 FunctionBody body) => |
| 214 new ConstructorDeclarationImpl( |
| 215 comment, |
| 216 metadata, |
| 217 externalKeyword, |
| 218 constKeyword, |
| 219 factoryKeyword, |
| 220 returnType, |
| 221 period, |
| 222 name, |
| 223 parameters, |
| 224 separator, |
| 225 initializers, |
| 226 redirectedConstructor, |
| 227 body); |
| 228 |
| 229 @override |
| 230 ConstructorFieldInitializer constructorFieldInitializer( |
| 231 Token thisKeyword, |
| 232 Token period, |
| 233 SimpleIdentifier fieldName, |
| 234 Token equals, |
| 235 Expression expression) => |
| 236 new ConstructorFieldInitializerImpl( |
| 237 thisKeyword, period, fieldName, equals, expression); |
| 238 |
| 239 @override |
| 240 ConstructorName constructorName( |
| 241 TypeName type, Token period, SimpleIdentifier name) => |
| 242 new ConstructorNameImpl(type, period, name); |
| 243 |
| 244 @override |
| 245 ContinueStatement continueStatement( |
| 246 Token continueKeyword, SimpleIdentifier label, Token semicolon) => |
| 247 new ContinueStatementImpl(continueKeyword, label, semicolon); |
| 248 |
| 249 @override |
| 250 DeclaredIdentifier declaredIdentifier( |
| 251 Comment comment, |
| 252 List<Annotation> metadata, |
| 253 Token keyword, |
| 254 TypeName type, |
| 255 SimpleIdentifier identifier) => |
| 256 new DeclaredIdentifierImpl(comment, metadata, keyword, type, identifier); |
| 257 |
| 258 @override |
| 259 DefaultFormalParameter defaultFormalParameter(NormalFormalParameter parameter, |
| 260 ParameterKind kind, Token separator, Expression defaultValue) => |
| 261 new DefaultFormalParameterImpl(parameter, kind, separator, defaultValue); |
| 262 |
| 263 @override |
| 264 Comment documentationComment(List<Token> tokens, |
| 265 [List<CommentReference> references]) => |
| 266 CommentImpl.createDocumentationCommentWithReferences( |
| 267 tokens, references ?? <CommentReference>[]); |
| 268 |
| 269 @override |
| 270 DoStatement doStatement( |
| 271 Token doKeyword, |
| 272 Statement body, |
| 273 Token whileKeyword, |
| 274 Token leftParenthesis, |
| 275 Expression condition, |
| 276 Token rightParenthesis, |
| 277 Token semicolon) => |
| 278 new DoStatementImpl(doKeyword, body, whileKeyword, leftParenthesis, |
| 279 condition, rightParenthesis, semicolon); |
| 280 |
| 281 @override |
| 282 DottedName dottedName(List<SimpleIdentifier> components) => |
| 283 new DottedNameImpl(components); |
| 284 |
| 285 @override |
| 286 DoubleLiteral doubleLiteral(Token literal, double value) => |
| 287 new DoubleLiteralImpl(literal, value); |
| 288 |
| 289 @override |
| 290 EmptyFunctionBody emptyFunctionBody(Token semicolon) => |
| 291 new EmptyFunctionBodyImpl(semicolon); |
| 292 |
| 293 @override |
| 294 EmptyStatement emptyStatement(Token semicolon) => |
| 295 new EmptyStatementImpl(semicolon); |
| 296 |
| 297 @override |
| 298 Comment endOfLineComment(List<Token> tokens) => |
| 299 CommentImpl.createEndOfLineComment(tokens); |
| 300 |
| 301 @override |
| 302 EnumConstantDeclaration enumConstantDeclaration( |
| 303 Comment comment, List<Annotation> metadata, SimpleIdentifier name) => |
| 304 new EnumConstantDeclarationImpl(comment, metadata, name); |
| 305 |
| 306 @override |
| 307 EnumDeclaration enumDeclaration( |
| 308 Comment comment, |
| 309 List<Annotation> metadata, |
| 310 Token enumKeyword, |
| 311 SimpleIdentifier name, |
| 312 Token leftBracket, |
| 313 List<EnumConstantDeclaration> constants, |
| 314 Token rightBracket) => |
| 315 new EnumDeclarationImpl(comment, metadata, enumKeyword, name, leftBracket, |
| 316 constants, rightBracket); |
| 317 |
| 318 @override |
| 319 ExportDirective exportDirective( |
| 320 Comment comment, |
| 321 List<Annotation> metadata, |
| 322 Token keyword, |
| 323 StringLiteral libraryUri, |
| 324 List<Configuration> configurations, |
| 325 List<Combinator> combinators, |
| 326 Token semicolon) => |
| 327 new ExportDirectiveImpl(comment, metadata, keyword, libraryUri, |
| 328 configurations, combinators, semicolon); |
| 329 @override |
| 330 ExpressionFunctionBody expressionFunctionBody(Token keyword, |
| 331 Token functionDefinition, Expression expression, Token semicolon) => |
| 332 new ExpressionFunctionBodyImpl( |
| 333 keyword, functionDefinition, expression, semicolon); |
| 334 |
| 335 @override |
| 336 ExpressionStatement expressionStatement( |
| 337 Expression expression, Token semicolon) => |
| 338 new ExpressionStatementImpl(expression, semicolon); |
| 339 |
| 340 @override |
| 341 ExtendsClause extendsClause(Token extendsKeyword, TypeName superclass) => |
| 342 new ExtendsClauseImpl(extendsKeyword, superclass); |
| 343 |
| 344 @override |
| 345 FieldDeclaration fieldDeclaration( |
| 346 Comment comment, |
| 347 List<Annotation> metadata, |
| 348 Token staticKeyword, |
| 349 VariableDeclarationList fieldList, |
| 350 Token semicolon) => |
| 351 new FieldDeclarationImpl( |
| 352 comment, metadata, staticKeyword, fieldList, semicolon); |
| 353 |
| 354 @override |
| 355 FieldFormalParameter fieldFormalParameter( |
| 356 Comment comment, |
| 357 List<Annotation> metadata, |
| 358 Token keyword, |
| 359 TypeName type, |
| 360 Token thisKeyword, |
| 361 Token period, |
| 362 SimpleIdentifier identifier, |
| 363 TypeParameterList typeParameters, |
| 364 FormalParameterList parameters) => |
| 365 new FieldFormalParameterImpl(comment, metadata, keyword, type, |
| 366 thisKeyword, period, identifier, typeParameters, parameters); |
| 367 |
| 368 @override |
| 369 ForEachStatement forEachStatementWithDeclaration( |
| 370 Token awaitKeyword, |
| 371 Token forKeyword, |
| 372 Token leftParenthesis, |
| 373 DeclaredIdentifier loopVariable, |
| 374 Token inKeyword, |
| 375 Expression iterator, |
| 376 Token rightParenthesis, |
| 377 Statement body) => |
| 378 new ForEachStatementImpl.withDeclaration( |
| 379 awaitKeyword, |
| 380 forKeyword, |
| 381 leftParenthesis, |
| 382 loopVariable, |
| 383 inKeyword, |
| 384 iterator, |
| 385 rightParenthesis, |
| 386 body); |
| 387 |
| 388 @override |
| 389 ForEachStatement forEachStatementWithReference( |
| 390 Token awaitKeyword, |
| 391 Token forKeyword, |
| 392 Token leftParenthesis, |
| 393 SimpleIdentifier identifier, |
| 394 Token inKeyword, |
| 395 Expression iterator, |
| 396 Token rightParenthesis, |
| 397 Statement body) => |
| 398 new ForEachStatementImpl.withReference( |
| 399 awaitKeyword, |
| 400 forKeyword, |
| 401 leftParenthesis, |
| 402 identifier, |
| 403 inKeyword, |
| 404 iterator, |
| 405 rightParenthesis, |
| 406 body); |
| 407 |
| 408 @override |
| 409 FormalParameterList formalParameterList( |
| 410 Token leftParenthesis, |
| 411 List<FormalParameter> parameters, |
| 412 Token leftDelimiter, |
| 413 Token rightDelimiter, |
| 414 Token rightParenthesis) => |
| 415 new FormalParameterListImpl(leftParenthesis, parameters, leftDelimiter, |
| 416 rightDelimiter, rightParenthesis); |
| 417 |
| 418 @override |
| 419 ForStatement forStatement( |
| 420 Token forKeyword, |
| 421 Token leftParenthesis, |
| 422 VariableDeclarationList variableList, |
| 423 Expression initialization, |
| 424 Token leftSeparator, |
| 425 Expression condition, |
| 426 Token rightSeparator, |
| 427 List<Expression> updaters, |
| 428 Token rightParenthesis, |
| 429 Statement body) => |
| 430 new ForStatementImpl( |
| 431 forKeyword, |
| 432 leftParenthesis, |
| 433 variableList, |
| 434 initialization, |
| 435 leftSeparator, |
| 436 condition, |
| 437 rightSeparator, |
| 438 updaters, |
| 439 rightParenthesis, |
| 440 body); |
| 441 |
| 442 @override |
| 443 FunctionDeclaration functionDeclaration( |
| 444 Comment comment, |
| 445 List<Annotation> metadata, |
| 446 Token externalKeyword, |
| 447 TypeName returnType, |
| 448 Token propertyKeyword, |
| 449 SimpleIdentifier name, |
| 450 FunctionExpression functionExpression) => |
| 451 new FunctionDeclarationImpl(comment, metadata, externalKeyword, |
| 452 returnType, propertyKeyword, name, functionExpression); |
| 453 |
| 454 @override |
| 455 FunctionDeclarationStatement functionDeclarationStatement( |
| 456 FunctionDeclaration functionDeclaration) => |
| 457 new FunctionDeclarationStatementImpl(functionDeclaration); |
| 458 |
| 459 @override |
| 460 FunctionExpression functionExpression(TypeParameterList typeParameters, |
| 461 FormalParameterList parameters, FunctionBody body) => |
| 462 new FunctionExpressionImpl(typeParameters, parameters, body); |
| 463 |
| 464 @override |
| 465 FunctionExpressionInvocation functionExpressionInvocation(Expression function, |
| 466 TypeArgumentList typeArguments, ArgumentList argumentList) => |
| 467 new FunctionExpressionInvocationImpl( |
| 468 function, typeArguments, argumentList); |
| 469 |
| 470 @override |
| 471 FunctionTypeAlias functionTypeAlias( |
| 472 Comment comment, |
| 473 List<Annotation> metadata, |
| 474 Token keyword, |
| 475 TypeName returnType, |
| 476 SimpleIdentifier name, |
| 477 TypeParameterList typeParameters, |
| 478 FormalParameterList parameters, |
| 479 Token semicolon) => |
| 480 new FunctionTypeAliasImpl(comment, metadata, keyword, returnType, name, |
| 481 typeParameters, parameters, semicolon); |
| 482 |
| 483 @override |
| 484 FunctionTypedFormalParameter functionTypedFormalParameter( |
| 485 Comment comment, |
| 486 List<Annotation> metadata, |
| 487 TypeName returnType, |
| 488 SimpleIdentifier identifier, |
| 489 TypeParameterList typeParameters, |
| 490 FormalParameterList parameters, |
| 491 {Token question: null}) => |
| 492 new FunctionTypedFormalParameterImpl(comment, metadata, returnType, |
| 493 identifier, typeParameters, parameters, question); |
| 494 |
| 495 @override |
| 496 HideCombinator hideCombinator( |
| 497 Token keyword, List<SimpleIdentifier> hiddenNames) => |
| 498 new HideCombinatorImpl(keyword, hiddenNames); |
| 499 |
| 500 @override |
| 501 IfStatement ifStatement( |
| 502 Token ifKeyword, |
| 503 Token leftParenthesis, |
| 504 Expression condition, |
| 505 Token rightParenthesis, |
| 506 Statement thenStatement, |
| 507 Token elseKeyword, |
| 508 Statement elseStatement) => |
| 509 new IfStatementImpl(ifKeyword, leftParenthesis, condition, |
| 510 rightParenthesis, thenStatement, elseKeyword, elseStatement); |
| 511 |
| 512 @override |
| 513 ImplementsClause implementsClause( |
| 514 Token implementsKeyword, List<TypeName> interfaces) => |
| 515 new ImplementsClauseImpl(implementsKeyword, interfaces); |
| 516 |
| 517 @override |
| 518 ImportDirective importDirective( |
| 519 Comment comment, |
| 520 List<Annotation> metadata, |
| 521 Token keyword, |
| 522 StringLiteral libraryUri, |
| 523 List<Configuration> configurations, |
| 524 Token deferredKeyword, |
| 525 Token asKeyword, |
| 526 SimpleIdentifier prefix, |
| 527 List<Combinator> combinators, |
| 528 Token semicolon) => |
| 529 new ImportDirectiveImpl( |
| 530 comment, |
| 531 metadata, |
| 532 keyword, |
| 533 libraryUri, |
| 534 configurations, |
| 535 deferredKeyword, |
| 536 asKeyword, |
| 537 prefix, |
| 538 combinators, |
| 539 semicolon); |
| 540 |
| 541 @override |
| 542 IndexExpression indexExpressionForCascade(Token period, Token leftBracket, |
| 543 Expression index, Token rightBracket) => |
| 544 new IndexExpressionImpl.forCascade( |
| 545 period, leftBracket, index, rightBracket); |
| 546 |
| 547 @override |
| 548 IndexExpression indexExpressionForTarget(Expression target, Token leftBracket, |
| 549 Expression index, Token rightBracket) => |
| 550 new IndexExpressionImpl.forTarget( |
| 551 target, leftBracket, index, rightBracket); |
| 552 |
| 553 @override |
| 554 InstanceCreationExpression instanceCreationExpression(Token keyword, |
| 555 ConstructorName constructorName, ArgumentList argumentList) => |
| 556 new InstanceCreationExpressionImpl( |
| 557 keyword, constructorName, argumentList); |
| 558 |
| 559 @override |
| 560 IntegerLiteral integerLiteral(Token literal, int value) => |
| 561 new IntegerLiteralImpl(literal, value); |
| 562 |
| 563 @override |
| 564 InterpolationExpression interpolationExpression( |
| 565 Token leftBracket, Expression expression, Token rightBracket) => |
| 566 new InterpolationExpressionImpl(leftBracket, expression, rightBracket); |
| 567 |
| 568 @override |
| 569 InterpolationString interpolationString(Token contents, String value) => |
| 570 new InterpolationStringImpl(contents, value); |
| 571 |
| 572 @override |
| 573 IsExpression isExpression(Expression expression, Token isOperator, |
| 574 Token notOperator, TypeName type) => |
| 575 new IsExpressionImpl(expression, isOperator, notOperator, type); |
| 576 |
| 577 @override |
| 578 Label label(SimpleIdentifier label, Token colon) => |
| 579 new LabelImpl(label, colon); |
| 580 |
| 581 @override |
| 582 LabeledStatement labeledStatement(List<Label> labels, Statement statement) => |
| 583 new LabeledStatementImpl(labels, statement); |
| 584 |
| 585 @override |
| 586 LibraryDirective libraryDirective(Comment comment, List<Annotation> metadata, |
| 587 Token libraryKeyword, LibraryIdentifier name, Token semicolon) => |
| 588 new LibraryDirectiveImpl( |
| 589 comment, metadata, libraryKeyword, name, semicolon); |
| 590 |
| 591 @override |
| 592 LibraryIdentifier libraryIdentifier(List<SimpleIdentifier> components) => |
| 593 new LibraryIdentifierImpl(components); |
| 594 |
| 595 @override |
| 596 ListLiteral listLiteral(Token constKeyword, TypeArgumentList typeArguments, |
| 597 Token leftBracket, List<Expression> elements, Token rightBracket) => |
| 598 new ListLiteralImpl( |
| 599 constKeyword, typeArguments, leftBracket, elements, rightBracket); |
| 600 |
| 601 @override |
| 602 MapLiteral mapLiteral( |
| 603 Token constKeyword, |
| 604 TypeArgumentList typeArguments, |
| 605 Token leftBracket, |
| 606 List<MapLiteralEntry> entries, |
| 607 Token rightBracket) => |
| 608 new MapLiteralImpl( |
| 609 constKeyword, typeArguments, leftBracket, entries, rightBracket); |
| 610 |
| 611 @override |
| 612 MapLiteralEntry mapLiteralEntry( |
| 613 Expression key, Token separator, Expression value) => |
| 614 new MapLiteralEntryImpl(key, separator, value); |
| 615 |
| 616 @override |
| 617 MethodDeclaration methodDeclaration( |
| 618 Comment comment, |
| 619 List<Annotation> metadata, |
| 620 Token externalKeyword, |
| 621 Token modifierKeyword, |
| 622 TypeName returnType, |
| 623 Token propertyKeyword, |
| 624 Token operatorKeyword, |
| 625 SimpleIdentifier name, |
| 626 TypeParameterList typeParameters, |
| 627 FormalParameterList parameters, |
| 628 FunctionBody body) => |
| 629 new MethodDeclarationImpl( |
| 630 comment, |
| 631 metadata, |
| 632 externalKeyword, |
| 633 modifierKeyword, |
| 634 returnType, |
| 635 propertyKeyword, |
| 636 operatorKeyword, |
| 637 name, |
| 638 typeParameters, |
| 639 parameters, |
| 640 body); |
| 641 |
| 642 @override |
| 643 MethodInvocation methodInvocation( |
| 644 Expression target, |
| 645 Token operator, |
| 646 SimpleIdentifier methodName, |
| 647 TypeArgumentList typeArguments, |
| 648 ArgumentList argumentList) => |
| 649 new MethodInvocationImpl( |
| 650 target, operator, methodName, typeArguments, argumentList); |
| 651 |
| 652 @override |
| 653 NamedExpression namedExpression(Label name, Expression expression) => |
| 654 new NamedExpressionImpl(name, expression); |
| 655 |
| 656 @override |
| 657 NativeClause nativeClause(Token nativeKeyword, StringLiteral name) => |
| 658 new NativeClauseImpl(nativeKeyword, name); |
| 659 |
| 660 @override |
| 661 NativeFunctionBody nativeFunctionBody( |
| 662 Token nativeKeyword, StringLiteral stringLiteral, Token semicolon) => |
| 663 new NativeFunctionBodyImpl(nativeKeyword, stringLiteral, semicolon); |
| 664 |
| 665 @override |
| 666 NodeList/*<E>*/ nodeList/*<E extends AstNode>*/(AstNode owner, |
| 667 [List/*<E>*/ elements]) => |
| 668 new NodeListImpl/*<E>*/(owner as AstNodeImpl, elements); |
| 669 |
| 670 @override |
| 671 NullLiteral nullLiteral(Token literal) => new NullLiteralImpl(literal); |
| 672 |
| 673 @override |
| 674 ParenthesizedExpression parenthesizedExpression(Token leftParenthesis, |
| 675 Expression expression, Token rightParenthesis) => |
| 676 new ParenthesizedExpressionImpl( |
| 677 leftParenthesis, expression, rightParenthesis); |
| 678 |
| 679 @override |
| 680 PartDirective partDirective(Comment comment, List<Annotation> metadata, |
| 681 Token partKeyword, StringLiteral partUri, Token semicolon) => |
| 682 new PartDirectiveImpl(comment, metadata, partKeyword, partUri, semicolon); |
| 683 |
| 684 @override |
| 685 PartOfDirective partOfDirective( |
| 686 Comment comment, |
| 687 List<Annotation> metadata, |
| 688 Token partKeyword, |
| 689 Token ofKeyword, |
| 690 StringLiteral uri, |
| 691 LibraryIdentifier libraryName, |
| 692 Token semicolon) => |
| 693 new PartOfDirectiveImpl( |
| 694 comment, metadata, partKeyword, ofKeyword, libraryName, semicolon); |
| 695 |
| 696 @override |
| 697 PostfixExpression postfixExpression(Expression operand, Token operator) => |
| 698 new PostfixExpressionImpl(operand, operator); |
| 699 |
| 700 @override |
| 701 PrefixedIdentifier prefixedIdentifier( |
| 702 SimpleIdentifier prefix, Token period, SimpleIdentifier identifier) => |
| 703 new PrefixedIdentifierImpl(prefix, period, identifier); |
| 704 |
| 705 @override |
| 706 PrefixExpression prefixExpression(Token operator, Expression operand) => |
| 707 new PrefixExpressionImpl(operator, operand); |
| 708 |
| 709 @override |
| 710 PropertyAccess propertyAccess( |
| 711 Expression target, Token operator, SimpleIdentifier propertyName) => |
| 712 new PropertyAccessImpl(target, operator, propertyName); |
| 713 |
| 714 @override |
| 715 RedirectingConstructorInvocation redirectingConstructorInvocation( |
| 716 Token thisKeyword, |
| 717 Token period, |
| 718 SimpleIdentifier constructorName, |
| 719 ArgumentList argumentList) => |
| 720 new RedirectingConstructorInvocationImpl( |
| 721 thisKeyword, period, constructorName, argumentList); |
| 722 |
| 723 @override |
| 724 RethrowExpression rethrowExpression(Token rethrowKeyword) => |
| 725 new RethrowExpressionImpl(rethrowKeyword); |
| 726 |
| 727 @override |
| 728 ReturnStatement returnStatement( |
| 729 Token returnKeyword, Expression expression, Token semicolon) => |
| 730 new ReturnStatementImpl(returnKeyword, expression, semicolon); |
| 731 |
| 732 @override |
| 733 ScriptTag scriptTag(Token scriptTag) => new ScriptTagImpl(scriptTag); |
| 734 |
| 735 @override |
| 736 ShowCombinator showCombinator( |
| 737 Token keyword, List<SimpleIdentifier> shownNames) => |
| 738 new ShowCombinatorImpl(keyword, shownNames); |
| 739 |
| 740 @override |
| 741 SimpleFormalParameter simpleFormalParameter( |
| 742 Comment comment, |
| 743 List<Annotation> metadata, |
| 744 Token keyword, |
| 745 TypeName type, |
| 746 SimpleIdentifier identifier) => |
| 747 new SimpleFormalParameterImpl( |
| 748 comment, metadata, keyword, type, identifier); |
| 749 |
| 750 @override |
| 751 SimpleIdentifier simpleIdentifier(Token token, {bool isDeclaration: false}) { |
| 752 if (isDeclaration) { |
| 753 return new DeclaredSimpleIdentifier(token); |
| 754 } |
| 755 return new SimpleIdentifierImpl(token); |
| 756 } |
| 757 |
| 758 @override |
| 759 SimpleStringLiteral simpleStringLiteral(Token literal, String value) => |
| 760 new SimpleStringLiteralImpl(literal, value); |
| 761 |
| 762 @override |
| 763 StringInterpolation stringInterpolation( |
| 764 List<InterpolationElement> elements) => |
| 765 new StringInterpolationImpl(elements); |
| 766 |
| 767 @override |
| 768 SuperConstructorInvocation superConstructorInvocation( |
| 769 Token superKeyword, |
| 770 Token period, |
| 771 SimpleIdentifier constructorName, |
| 772 ArgumentList argumentList) => |
| 773 new SuperConstructorInvocationImpl( |
| 774 superKeyword, period, constructorName, argumentList); |
| 775 |
| 776 @override |
| 777 SuperExpression superExpression(Token superKeyword) => |
| 778 new SuperExpressionImpl(superKeyword); |
| 779 |
| 780 @override |
| 781 SwitchCase switchCase(List<Label> labels, Token keyword, |
| 782 Expression expression, Token colon, List<Statement> statements) => |
| 783 new SwitchCaseImpl(labels, keyword, expression, colon, statements); |
| 784 |
| 785 @override |
| 786 SwitchDefault switchDefault(List<Label> labels, Token keyword, Token colon, |
| 787 List<Statement> statements) => |
| 788 new SwitchDefaultImpl(labels, keyword, colon, statements); |
| 789 @override |
| 790 SwitchStatement switchStatement( |
| 791 Token switchKeyword, |
| 792 Token leftParenthesis, |
| 793 Expression expression, |
| 794 Token rightParenthesis, |
| 795 Token leftBracket, |
| 796 List<SwitchMember> members, |
| 797 Token rightBracket) => |
| 798 new SwitchStatementImpl(switchKeyword, leftParenthesis, expression, |
| 799 rightParenthesis, leftBracket, members, rightBracket); |
| 800 |
| 801 @override |
| 802 SymbolLiteral symbolLiteral(Token poundSign, List<Token> components) => |
| 803 new SymbolLiteralImpl(poundSign, components); |
| 804 |
| 805 @override |
| 806 ThisExpression thisExpression(Token thisKeyword) => |
| 807 new ThisExpressionImpl(thisKeyword); |
| 808 |
| 809 @override |
| 810 ThrowExpression throwExpression(Token throwKeyword, Expression expression) => |
| 811 new ThrowExpressionImpl(throwKeyword, expression); |
| 812 |
| 813 @override |
| 814 TopLevelVariableDeclaration topLevelVariableDeclaration( |
| 815 Comment comment, |
| 816 List<Annotation> metadata, |
| 817 VariableDeclarationList variableList, |
| 818 Token semicolon) => |
| 819 new TopLevelVariableDeclarationImpl( |
| 820 comment, metadata, variableList, semicolon); |
| 821 |
| 822 @override |
| 823 TryStatement tryStatement( |
| 824 Token tryKeyword, |
| 825 Block body, |
| 826 List<CatchClause> catchClauses, |
| 827 Token finallyKeyword, |
| 828 Block finallyBlock) => |
| 829 new TryStatementImpl( |
| 830 tryKeyword, body, catchClauses, finallyKeyword, finallyBlock); |
| 831 |
| 832 @override |
| 833 TypeArgumentList typeArgumentList( |
| 834 Token leftBracket, List<TypeName> arguments, Token rightBracket) => |
| 835 new TypeArgumentListImpl(leftBracket, arguments, rightBracket); |
| 836 |
| 837 @override |
| 838 TypeName typeName(Identifier name, TypeArgumentList typeArguments, |
| 839 {Token question: null}) => |
| 840 new TypeNameImpl(name, typeArguments, question); |
| 841 |
| 842 @override |
| 843 TypeParameter typeParameter(Comment comment, List<Annotation> metadata, |
| 844 SimpleIdentifier name, Token extendsKeyword, TypeName bound) => |
| 845 new TypeParameterImpl(comment, metadata, name, extendsKeyword, bound); |
| 846 |
| 847 @override |
| 848 TypeParameterList typeParameterList(Token leftBracket, |
| 849 List<TypeParameter> typeParameters, Token rightBracket) => |
| 850 new TypeParameterListImpl(leftBracket, typeParameters, rightBracket); |
| 851 |
| 852 @override |
| 853 VariableDeclaration variableDeclaration( |
| 854 SimpleIdentifier name, Token equals, Expression initializer) => |
| 855 new VariableDeclarationImpl(name, equals, initializer); |
| 856 |
| 857 @override |
| 858 VariableDeclarationList variableDeclarationList( |
| 859 Comment comment, |
| 860 List<Annotation> metadata, |
| 861 Token keyword, |
| 862 TypeName type, |
| 863 List<VariableDeclaration> variables) => |
| 864 new VariableDeclarationListImpl( |
| 865 comment, metadata, keyword, type, variables); |
| 866 |
| 867 @override |
| 868 VariableDeclarationStatement variableDeclarationStatement( |
| 869 VariableDeclarationList variableList, Token semicolon) => |
| 870 new VariableDeclarationStatementImpl(variableList, semicolon); |
| 871 |
| 872 @override |
| 873 WhileStatement whileStatement(Token whileKeyword, Token leftParenthesis, |
| 874 Expression condition, Token rightParenthesis, Statement body) => |
| 875 new WhileStatementImpl( |
| 876 whileKeyword, leftParenthesis, condition, rightParenthesis, body); |
| 877 |
| 878 @override |
| 879 WithClause withClause(Token withKeyword, List<TypeName> mixinTypes) => |
| 880 new WithClauseImpl(withKeyword, mixinTypes); |
| 881 |
| 882 @override |
| 883 YieldStatement yieldStatement(Token yieldKeyword, Token star, |
| 884 Expression expression, Token semicolon) => |
| 885 new YieldStatementImpl(yieldKeyword, star, expression, semicolon); |
| 886 } |
| OLD | NEW |