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