| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.ast; | 8 library engine.ast; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 /** | 38 /** |
| 39 * Initialize a newly created list of adjacent strings. | 39 * Initialize a newly created list of adjacent strings. |
| 40 * | 40 * |
| 41 * @param strings the strings that are implicitly concatenated | 41 * @param strings the strings that are implicitly concatenated |
| 42 */ | 42 */ |
| 43 AdjacentStrings(List<StringLiteral> strings) { | 43 AdjacentStrings(List<StringLiteral> strings) { |
| 44 this._strings = new NodeList<StringLiteral>(this); | 44 this._strings = new NodeList<StringLiteral>(this); |
| 45 this._strings.addAll(strings); | 45 this._strings.addAll(strings); |
| 46 } | 46 } |
| 47 | 47 |
| 48 @override |
| 48 accept(AstVisitor visitor) => visitor.visitAdjacentStrings(this); | 49 accept(AstVisitor visitor) => visitor.visitAdjacentStrings(this); |
| 49 | 50 |
| 51 @override |
| 50 Token get beginToken => _strings.beginToken; | 52 Token get beginToken => _strings.beginToken; |
| 51 | 53 |
| 54 @override |
| 52 Token get endToken => _strings.endToken; | 55 Token get endToken => _strings.endToken; |
| 53 | 56 |
| 54 /** | 57 /** |
| 55 * Return the strings that are implicitly concatenated. | 58 * Return the strings that are implicitly concatenated. |
| 56 * | 59 * |
| 57 * @return the strings that are implicitly concatenated | 60 * @return the strings that are implicitly concatenated |
| 58 */ | 61 */ |
| 59 NodeList<StringLiteral> get strings => _strings; | 62 NodeList<StringLiteral> get strings => _strings; |
| 60 | 63 |
| 64 @override |
| 61 void visitChildren(AstVisitor visitor) { | 65 void visitChildren(AstVisitor visitor) { |
| 62 _strings.accept(visitor); | 66 _strings.accept(visitor); |
| 63 } | 67 } |
| 64 | 68 |
| 69 @override |
| 65 void appendStringValue(JavaStringBuilder builder) { | 70 void appendStringValue(JavaStringBuilder builder) { |
| 66 for (StringLiteral stringLiteral in strings) { | 71 for (StringLiteral stringLiteral in strings) { |
| 67 stringLiteral.appendStringValue(builder); | 72 stringLiteral.appendStringValue(builder); |
| 68 } | 73 } |
| 69 } | 74 } |
| 70 } | 75 } |
| 71 | 76 |
| 72 /** | 77 /** |
| 73 * The abstract class `AnnotatedNode` defines the behavior of nodes that can be
annotated with | 78 * The abstract class `AnnotatedNode` defines the behavior of nodes that can be
annotated with |
| 74 * both a comment and metadata. | 79 * both a comment and metadata. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 90 * | 95 * |
| 91 * @param comment the documentation comment associated with this node | 96 * @param comment the documentation comment associated with this node |
| 92 * @param metadata the annotations associated with this node | 97 * @param metadata the annotations associated with this node |
| 93 */ | 98 */ |
| 94 AnnotatedNode(Comment comment, List<Annotation> metadata) { | 99 AnnotatedNode(Comment comment, List<Annotation> metadata) { |
| 95 this._metadata = new NodeList<Annotation>(this); | 100 this._metadata = new NodeList<Annotation>(this); |
| 96 this._comment = becomeParentOf(comment); | 101 this._comment = becomeParentOf(comment); |
| 97 this._metadata.addAll(metadata); | 102 this._metadata.addAll(metadata); |
| 98 } | 103 } |
| 99 | 104 |
| 105 @override |
| 100 Token get beginToken { | 106 Token get beginToken { |
| 101 if (_comment == null) { | 107 if (_comment == null) { |
| 102 if (_metadata.isEmpty) { | 108 if (_metadata.isEmpty) { |
| 103 return firstTokenAfterCommentAndMetadata; | 109 return firstTokenAfterCommentAndMetadata; |
| 104 } else { | 110 } else { |
| 105 return _metadata.beginToken; | 111 return _metadata.beginToken; |
| 106 } | 112 } |
| 107 } else if (_metadata.isEmpty) { | 113 } else if (_metadata.isEmpty) { |
| 108 return _comment.beginToken; | 114 return _comment.beginToken; |
| 109 } | 115 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 /** | 148 /** |
| 143 * Set the metadata associated with this node to the given metadata. | 149 * Set the metadata associated with this node to the given metadata. |
| 144 * | 150 * |
| 145 * @param metadata the metadata to be associated with this node | 151 * @param metadata the metadata to be associated with this node |
| 146 */ | 152 */ |
| 147 void set metadata(List<Annotation> metadata) { | 153 void set metadata(List<Annotation> metadata) { |
| 148 this._metadata.clear(); | 154 this._metadata.clear(); |
| 149 this._metadata.addAll(metadata); | 155 this._metadata.addAll(metadata); |
| 150 } | 156 } |
| 151 | 157 |
| 158 @override |
| 152 void visitChildren(AstVisitor visitor) { | 159 void visitChildren(AstVisitor visitor) { |
| 153 if (_commentIsBeforeAnnotations()) { | 160 if (_commentIsBeforeAnnotations()) { |
| 154 safelyVisitChild(_comment, visitor); | 161 safelyVisitChild(_comment, visitor); |
| 155 _metadata.accept(visitor); | 162 _metadata.accept(visitor); |
| 156 } else { | 163 } else { |
| 157 for (AstNode child in sortedCommentAndAnnotations) { | 164 for (AstNode child in sortedCommentAndAnnotations) { |
| 158 child.accept(visitor); | 165 child.accept(visitor); |
| 159 } | 166 } |
| 160 } | 167 } |
| 161 } | 168 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 * annotation is not the invocation of a named constructor | 264 * annotation is not the invocation of a named constructor |
| 258 * @param arguments the arguments to the constructor being invoked, or `null`
if this | 265 * @param arguments the arguments to the constructor being invoked, or `null`
if this |
| 259 * annotation is not the invocation of a constructor | 266 * annotation is not the invocation of a constructor |
| 260 */ | 267 */ |
| 261 Annotation(this.atSign, Identifier name, this.period, SimpleIdentifier constru
ctorName, ArgumentList arguments) { | 268 Annotation(this.atSign, Identifier name, this.period, SimpleIdentifier constru
ctorName, ArgumentList arguments) { |
| 262 this._name = becomeParentOf(name); | 269 this._name = becomeParentOf(name); |
| 263 this._constructorName = becomeParentOf(constructorName); | 270 this._constructorName = becomeParentOf(constructorName); |
| 264 this._arguments = becomeParentOf(arguments); | 271 this._arguments = becomeParentOf(arguments); |
| 265 } | 272 } |
| 266 | 273 |
| 274 @override |
| 267 accept(AstVisitor visitor) => visitor.visitAnnotation(this); | 275 accept(AstVisitor visitor) => visitor.visitAnnotation(this); |
| 268 | 276 |
| 269 /** | 277 /** |
| 270 * Return the arguments to the constructor being invoked, or `null` if this an
notation is | 278 * Return the arguments to the constructor being invoked, or `null` if this an
notation is |
| 271 * not the invocation of a constructor. | 279 * not the invocation of a constructor. |
| 272 * | 280 * |
| 273 * @return the arguments to the constructor being invoked | 281 * @return the arguments to the constructor being invoked |
| 274 */ | 282 */ |
| 275 ArgumentList get arguments => _arguments; | 283 ArgumentList get arguments => _arguments; |
| 276 | 284 |
| 285 @override |
| 277 Token get beginToken => atSign; | 286 Token get beginToken => atSign; |
| 278 | 287 |
| 279 /** | 288 /** |
| 280 * Return the name of the constructor being invoked, or `null` if this annotat
ion is not the | 289 * Return the name of the constructor being invoked, or `null` if this annotat
ion is not the |
| 281 * invocation of a named constructor. | 290 * invocation of a named constructor. |
| 282 * | 291 * |
| 283 * @return the name of the constructor being invoked | 292 * @return the name of the constructor being invoked |
| 284 */ | 293 */ |
| 285 SimpleIdentifier get constructorName => _constructorName; | 294 SimpleIdentifier get constructorName => _constructorName; |
| 286 | 295 |
| 287 /** | 296 /** |
| 288 * Return the element associated with this annotation, or `null` if the AST st
ructure has | 297 * Return the element associated with this annotation, or `null` if the AST st
ructure has |
| 289 * not been resolved or if this annotation could not be resolved. | 298 * not been resolved or if this annotation could not be resolved. |
| 290 * | 299 * |
| 291 * @return the element associated with this annotation | 300 * @return the element associated with this annotation |
| 292 */ | 301 */ |
| 293 Element get element { | 302 Element get element { |
| 294 if (_element != null) { | 303 if (_element != null) { |
| 295 return _element; | 304 return _element; |
| 296 } | 305 } |
| 297 if (_name != null) { | 306 if (_name != null) { |
| 298 return _name.staticElement; | 307 return _name.staticElement; |
| 299 } | 308 } |
| 300 return null; | 309 return null; |
| 301 } | 310 } |
| 302 | 311 |
| 312 @override |
| 303 Token get endToken { | 313 Token get endToken { |
| 304 if (_arguments != null) { | 314 if (_arguments != null) { |
| 305 return _arguments.endToken; | 315 return _arguments.endToken; |
| 306 } else if (_constructorName != null) { | 316 } else if (_constructorName != null) { |
| 307 return _constructorName.endToken; | 317 return _constructorName.endToken; |
| 308 } | 318 } |
| 309 return _name.endToken; | 319 return _name.endToken; |
| 310 } | 320 } |
| 311 | 321 |
| 312 /** | 322 /** |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 /** | 357 /** |
| 348 * Set the name of the class defining the constructor that is being invoked or
the name of the | 358 * Set the name of the class defining the constructor that is being invoked or
the name of the |
| 349 * field that is being referenced to the given name. | 359 * field that is being referenced to the given name. |
| 350 * | 360 * |
| 351 * @param name the name of the constructor being invoked or the name of the fi
eld being referenced | 361 * @param name the name of the constructor being invoked or the name of the fi
eld being referenced |
| 352 */ | 362 */ |
| 353 void set name(Identifier name) { | 363 void set name(Identifier name) { |
| 354 this._name = becomeParentOf(name); | 364 this._name = becomeParentOf(name); |
| 355 } | 365 } |
| 356 | 366 |
| 367 @override |
| 357 void visitChildren(AstVisitor visitor) { | 368 void visitChildren(AstVisitor visitor) { |
| 358 safelyVisitChild(_name, visitor); | 369 safelyVisitChild(_name, visitor); |
| 359 safelyVisitChild(_constructorName, visitor); | 370 safelyVisitChild(_constructorName, visitor); |
| 360 safelyVisitChild(_arguments, visitor); | 371 safelyVisitChild(_arguments, visitor); |
| 361 } | 372 } |
| 362 } | 373 } |
| 363 | 374 |
| 364 /** | 375 /** |
| 365 * Instances of the class `ArgumentDefinitionTest` represent an argument definit
ion test. | 376 * Instances of the class `ArgumentDefinitionTest` represent an argument definit
ion test. |
| 366 * | 377 * |
| (...skipping 16 matching lines...) Expand all Loading... |
| 383 /** | 394 /** |
| 384 * Initialize a newly created argument definition test. | 395 * Initialize a newly created argument definition test. |
| 385 * | 396 * |
| 386 * @param question the token representing the question mark | 397 * @param question the token representing the question mark |
| 387 * @param identifier the identifier representing the argument being tested | 398 * @param identifier the identifier representing the argument being tested |
| 388 */ | 399 */ |
| 389 ArgumentDefinitionTest(this.question, SimpleIdentifier identifier) { | 400 ArgumentDefinitionTest(this.question, SimpleIdentifier identifier) { |
| 390 this._identifier = becomeParentOf(identifier); | 401 this._identifier = becomeParentOf(identifier); |
| 391 } | 402 } |
| 392 | 403 |
| 404 @override |
| 393 accept(AstVisitor visitor) => visitor.visitArgumentDefinitionTest(this); | 405 accept(AstVisitor visitor) => visitor.visitArgumentDefinitionTest(this); |
| 394 | 406 |
| 407 @override |
| 395 Token get beginToken => question; | 408 Token get beginToken => question; |
| 396 | 409 |
| 410 @override |
| 397 Token get endToken => _identifier.endToken; | 411 Token get endToken => _identifier.endToken; |
| 398 | 412 |
| 399 /** | 413 /** |
| 400 * Return the identifier representing the argument being tested. | 414 * Return the identifier representing the argument being tested. |
| 401 * | 415 * |
| 402 * @return the identifier representing the argument being tested | 416 * @return the identifier representing the argument being tested |
| 403 */ | 417 */ |
| 404 SimpleIdentifier get identifier => _identifier; | 418 SimpleIdentifier get identifier => _identifier; |
| 405 | 419 |
| 420 @override |
| 406 int get precedence => 15; | 421 int get precedence => 15; |
| 407 | 422 |
| 408 /** | 423 /** |
| 409 * Set the identifier representing the argument being tested to the given iden
tifier. | 424 * Set the identifier representing the argument being tested to the given iden
tifier. |
| 410 * | 425 * |
| 411 * @param identifier the identifier representing the argument being tested | 426 * @param identifier the identifier representing the argument being tested |
| 412 */ | 427 */ |
| 413 void set identifier(SimpleIdentifier identifier) { | 428 void set identifier(SimpleIdentifier identifier) { |
| 414 this._identifier = becomeParentOf(identifier); | 429 this._identifier = becomeParentOf(identifier); |
| 415 } | 430 } |
| 416 | 431 |
| 432 @override |
| 417 void visitChildren(AstVisitor visitor) { | 433 void visitChildren(AstVisitor visitor) { |
| 418 safelyVisitChild(_identifier, visitor); | 434 safelyVisitChild(_identifier, visitor); |
| 419 } | 435 } |
| 420 } | 436 } |
| 421 | 437 |
| 422 /** | 438 /** |
| 423 * Instances of the class `ArgumentList` represent a list of arguments in the in
vocation of a | 439 * Instances of the class `ArgumentList` represent a list of arguments in the in
vocation of a |
| 424 * executable element: a function, method, or constructor. | 440 * executable element: a function, method, or constructor. |
| 425 * | 441 * |
| 426 * <pre> | 442 * <pre> |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 * @param arguments the expressions producing the values of the arguments | 489 * @param arguments the expressions producing the values of the arguments |
| 474 * @param rightParenthesis the right parenthesis | 490 * @param rightParenthesis the right parenthesis |
| 475 */ | 491 */ |
| 476 ArgumentList(Token leftParenthesis, List<Expression> arguments, Token rightPar
enthesis) { | 492 ArgumentList(Token leftParenthesis, List<Expression> arguments, Token rightPar
enthesis) { |
| 477 this._arguments = new NodeList<Expression>(this); | 493 this._arguments = new NodeList<Expression>(this); |
| 478 this._leftParenthesis = leftParenthesis; | 494 this._leftParenthesis = leftParenthesis; |
| 479 this._arguments.addAll(arguments); | 495 this._arguments.addAll(arguments); |
| 480 this._rightParenthesis = rightParenthesis; | 496 this._rightParenthesis = rightParenthesis; |
| 481 } | 497 } |
| 482 | 498 |
| 499 @override |
| 483 accept(AstVisitor visitor) => visitor.visitArgumentList(this); | 500 accept(AstVisitor visitor) => visitor.visitArgumentList(this); |
| 484 | 501 |
| 485 /** | 502 /** |
| 486 * Return the expressions producing the values of the arguments. Although the
language requires | 503 * Return the expressions producing the values of the arguments. Although the
language requires |
| 487 * that positional arguments appear before named arguments, this class allows
them to be | 504 * that positional arguments appear before named arguments, this class allows
them to be |
| 488 * intermixed. | 505 * intermixed. |
| 489 * | 506 * |
| 490 * @return the expressions producing the values of the arguments | 507 * @return the expressions producing the values of the arguments |
| 491 */ | 508 */ |
| 492 NodeList<Expression> get arguments => _arguments; | 509 NodeList<Expression> get arguments => _arguments; |
| 493 | 510 |
| 511 @override |
| 494 Token get beginToken => _leftParenthesis; | 512 Token get beginToken => _leftParenthesis; |
| 495 | 513 |
| 514 @override |
| 496 Token get endToken => _rightParenthesis; | 515 Token get endToken => _rightParenthesis; |
| 497 | 516 |
| 498 /** | 517 /** |
| 499 * Return the left parenthesis. | 518 * Return the left parenthesis. |
| 500 * | 519 * |
| 501 * @return the left parenthesis | 520 * @return the left parenthesis |
| 502 */ | 521 */ |
| 503 Token get leftParenthesis => _leftParenthesis; | 522 Token get leftParenthesis => _leftParenthesis; |
| 504 | 523 |
| 505 /** | 524 /** |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 | 569 |
| 551 /** | 570 /** |
| 552 * Set the right parenthesis to the given token. | 571 * Set the right parenthesis to the given token. |
| 553 * | 572 * |
| 554 * @param parenthesis the right parenthesis | 573 * @param parenthesis the right parenthesis |
| 555 */ | 574 */ |
| 556 void set rightParenthesis(Token parenthesis) { | 575 void set rightParenthesis(Token parenthesis) { |
| 557 _rightParenthesis = parenthesis; | 576 _rightParenthesis = parenthesis; |
| 558 } | 577 } |
| 559 | 578 |
| 579 @override |
| 560 void visitChildren(AstVisitor visitor) { | 580 void visitChildren(AstVisitor visitor) { |
| 561 _arguments.accept(visitor); | 581 _arguments.accept(visitor); |
| 562 } | 582 } |
| 563 | 583 |
| 564 /** | 584 /** |
| 565 * If the given expression is a child of this list, and the AST structure has
been resolved, and | 585 * If the given expression is a child of this list, and the AST structure has
been resolved, and |
| 566 * the function being invoked is known based on propagated type information, a
nd the expression | 586 * the function being invoked is known based on propagated type information, a
nd the expression |
| 567 * corresponds to one of the parameters of the function being invoked, then re
turn the parameter | 587 * corresponds to one of the parameters of the function being invoked, then re
turn the parameter |
| 568 * element representing the parameter to which the value of the given expressi
on will be bound. | 588 * element representing the parameter to which the value of the given expressi
on will be bound. |
| 569 * Otherwise, return `null`. | 589 * Otherwise, return `null`. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 * @param expression the expression used to compute the value being cast | 666 * @param expression the expression used to compute the value being cast |
| 647 * @param isOperator the is operator | 667 * @param isOperator the is operator |
| 648 * @param type the name of the type being cast to | 668 * @param type the name of the type being cast to |
| 649 */ | 669 */ |
| 650 AsExpression(Expression expression, Token isOperator, TypeName type) { | 670 AsExpression(Expression expression, Token isOperator, TypeName type) { |
| 651 this._expression = becomeParentOf(expression); | 671 this._expression = becomeParentOf(expression); |
| 652 this.asOperator = isOperator; | 672 this.asOperator = isOperator; |
| 653 this._type = becomeParentOf(type); | 673 this._type = becomeParentOf(type); |
| 654 } | 674 } |
| 655 | 675 |
| 676 @override |
| 656 accept(AstVisitor visitor) => visitor.visitAsExpression(this); | 677 accept(AstVisitor visitor) => visitor.visitAsExpression(this); |
| 657 | 678 |
| 679 @override |
| 658 Token get beginToken => _expression.beginToken; | 680 Token get beginToken => _expression.beginToken; |
| 659 | 681 |
| 682 @override |
| 660 Token get endToken => _type.endToken; | 683 Token get endToken => _type.endToken; |
| 661 | 684 |
| 662 /** | 685 /** |
| 663 * Return the expression used to compute the value being cast. | 686 * Return the expression used to compute the value being cast. |
| 664 * | 687 * |
| 665 * @return the expression used to compute the value being cast | 688 * @return the expression used to compute the value being cast |
| 666 */ | 689 */ |
| 667 Expression get expression => _expression; | 690 Expression get expression => _expression; |
| 668 | 691 |
| 692 @override |
| 669 int get precedence => 7; | 693 int get precedence => 7; |
| 670 | 694 |
| 671 /** | 695 /** |
| 672 * Return the name of the type being cast to. | 696 * Return the name of the type being cast to. |
| 673 * | 697 * |
| 674 * @return the name of the type being cast to | 698 * @return the name of the type being cast to |
| 675 */ | 699 */ |
| 676 TypeName get type => _type; | 700 TypeName get type => _type; |
| 677 | 701 |
| 678 /** | 702 /** |
| 679 * Set the expression used to compute the value being cast to the given expres
sion. | 703 * Set the expression used to compute the value being cast to the given expres
sion. |
| 680 * | 704 * |
| 681 * @param expression the expression used to compute the value being cast | 705 * @param expression the expression used to compute the value being cast |
| 682 */ | 706 */ |
| 683 void set expression(Expression expression) { | 707 void set expression(Expression expression) { |
| 684 this._expression = becomeParentOf(expression); | 708 this._expression = becomeParentOf(expression); |
| 685 } | 709 } |
| 686 | 710 |
| 687 /** | 711 /** |
| 688 * Set the name of the type being cast to to the given name. | 712 * Set the name of the type being cast to to the given name. |
| 689 * | 713 * |
| 690 * @param name the name of the type being cast to | 714 * @param name the name of the type being cast to |
| 691 */ | 715 */ |
| 692 void set type(TypeName name) { | 716 void set type(TypeName name) { |
| 693 this._type = becomeParentOf(name); | 717 this._type = becomeParentOf(name); |
| 694 } | 718 } |
| 695 | 719 |
| 720 @override |
| 696 void visitChildren(AstVisitor visitor) { | 721 void visitChildren(AstVisitor visitor) { |
| 697 safelyVisitChild(_expression, visitor); | 722 safelyVisitChild(_expression, visitor); |
| 698 safelyVisitChild(_type, visitor); | 723 safelyVisitChild(_type, visitor); |
| 699 } | 724 } |
| 700 } | 725 } |
| 701 | 726 |
| 702 /** | 727 /** |
| 703 * Instances of the class `AssertStatement` represent an assert statement. | 728 * Instances of the class `AssertStatement` represent an assert statement. |
| 704 * | 729 * |
| 705 * <pre> | 730 * <pre> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 * @param keyword the token representing the 'assert' keyword | 764 * @param keyword the token representing the 'assert' keyword |
| 740 * @param leftParenthesis the left parenthesis | 765 * @param leftParenthesis the left parenthesis |
| 741 * @param condition the condition that is being asserted to be `true` | 766 * @param condition the condition that is being asserted to be `true` |
| 742 * @param rightParenthesis the right parenthesis | 767 * @param rightParenthesis the right parenthesis |
| 743 * @param semicolon the semicolon terminating the statement | 768 * @param semicolon the semicolon terminating the statement |
| 744 */ | 769 */ |
| 745 AssertStatement(this.keyword, this.leftParenthesis, Expression condition, this
.rightParenthesis, this.semicolon) { | 770 AssertStatement(this.keyword, this.leftParenthesis, Expression condition, this
.rightParenthesis, this.semicolon) { |
| 746 this._condition = becomeParentOf(condition); | 771 this._condition = becomeParentOf(condition); |
| 747 } | 772 } |
| 748 | 773 |
| 774 @override |
| 749 accept(AstVisitor visitor) => visitor.visitAssertStatement(this); | 775 accept(AstVisitor visitor) => visitor.visitAssertStatement(this); |
| 750 | 776 |
| 777 @override |
| 751 Token get beginToken => keyword; | 778 Token get beginToken => keyword; |
| 752 | 779 |
| 753 /** | 780 /** |
| 754 * Return the condition that is being asserted to be `true`. | 781 * Return the condition that is being asserted to be `true`. |
| 755 * | 782 * |
| 756 * @return the condition that is being asserted to be `true` | 783 * @return the condition that is being asserted to be `true` |
| 757 */ | 784 */ |
| 758 Expression get condition => _condition; | 785 Expression get condition => _condition; |
| 759 | 786 |
| 787 @override |
| 760 Token get endToken => semicolon; | 788 Token get endToken => semicolon; |
| 761 | 789 |
| 762 /** | 790 /** |
| 763 * Set the condition that is being asserted to be `true` to the given expressi
on. | 791 * Set the condition that is being asserted to be `true` to the given expressi
on. |
| 764 * | 792 * |
| 765 * @param the condition that is being asserted to be `true` | 793 * @param the condition that is being asserted to be `true` |
| 766 */ | 794 */ |
| 767 void set condition(Expression condition) { | 795 void set condition(Expression condition) { |
| 768 this._condition = becomeParentOf(condition); | 796 this._condition = becomeParentOf(condition); |
| 769 } | 797 } |
| 770 | 798 |
| 799 @override |
| 771 void visitChildren(AstVisitor visitor) { | 800 void visitChildren(AstVisitor visitor) { |
| 772 safelyVisitChild(_condition, visitor); | 801 safelyVisitChild(_condition, visitor); |
| 773 } | 802 } |
| 774 } | 803 } |
| 775 | 804 |
| 776 /** | 805 /** |
| 777 * Instances of the class `AssignmentExpression` represent an assignment express
ion. | 806 * Instances of the class `AssignmentExpression` represent an assignment express
ion. |
| 778 * | 807 * |
| 779 * <pre> | 808 * <pre> |
| 780 * assignmentExpression ::= | 809 * assignmentExpression ::= |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 * | 845 * |
| 817 * @param leftHandSide the expression used to compute the left hand side | 846 * @param leftHandSide the expression used to compute the left hand side |
| 818 * @param operator the assignment operator being applied | 847 * @param operator the assignment operator being applied |
| 819 * @param rightHandSide the expression used to compute the right hand side | 848 * @param rightHandSide the expression used to compute the right hand side |
| 820 */ | 849 */ |
| 821 AssignmentExpression(Expression leftHandSide, this.operator, Expression rightH
andSide) { | 850 AssignmentExpression(Expression leftHandSide, this.operator, Expression rightH
andSide) { |
| 822 this._leftHandSide = becomeParentOf(leftHandSide); | 851 this._leftHandSide = becomeParentOf(leftHandSide); |
| 823 this._rightHandSide = becomeParentOf(rightHandSide); | 852 this._rightHandSide = becomeParentOf(rightHandSide); |
| 824 } | 853 } |
| 825 | 854 |
| 855 @override |
| 826 accept(AstVisitor visitor) => visitor.visitAssignmentExpression(this); | 856 accept(AstVisitor visitor) => visitor.visitAssignmentExpression(this); |
| 827 | 857 |
| 858 @override |
| 828 Token get beginToken => _leftHandSide.beginToken; | 859 Token get beginToken => _leftHandSide.beginToken; |
| 829 | 860 |
| 830 /** | 861 /** |
| 831 * Return the best element available for this operator. If resolution was able
to find a better | 862 * Return the best element available for this operator. If resolution was able
to find a better |
| 832 * element based on type propagation, that element will be returned. Otherwise
, the element found | 863 * element based on type propagation, that element will be returned. Otherwise
, the element found |
| 833 * using the result of static analysis will be returned. If resolution has not
been performed, | 864 * using the result of static analysis will be returned. If resolution has not
been performed, |
| 834 * then `null` will be returned. | 865 * then `null` will be returned. |
| 835 * | 866 * |
| 836 * @return the best element available for this operator | 867 * @return the best element available for this operator |
| 837 */ | 868 */ |
| 838 MethodElement get bestElement { | 869 MethodElement get bestElement { |
| 839 MethodElement element = propagatedElement; | 870 MethodElement element = propagatedElement; |
| 840 if (element == null) { | 871 if (element == null) { |
| 841 element = staticElement; | 872 element = staticElement; |
| 842 } | 873 } |
| 843 return element; | 874 return element; |
| 844 } | 875 } |
| 845 | 876 |
| 877 @override |
| 846 Token get endToken => _rightHandSide.endToken; | 878 Token get endToken => _rightHandSide.endToken; |
| 847 | 879 |
| 848 /** | 880 /** |
| 849 * Set the expression used to compute the left hand side to the given expressi
on. | 881 * Set the expression used to compute the left hand side to the given expressi
on. |
| 850 * | 882 * |
| 851 * @return the expression used to compute the left hand side | 883 * @return the expression used to compute the left hand side |
| 852 */ | 884 */ |
| 853 Expression get leftHandSide => _leftHandSide; | 885 Expression get leftHandSide => _leftHandSide; |
| 854 | 886 |
| 887 @override |
| 855 int get precedence => 1; | 888 int get precedence => 1; |
| 856 | 889 |
| 857 /** | 890 /** |
| 858 * Return the element associated with the operator based on the propagated typ
e of the | 891 * Return the element associated with the operator based on the propagated typ
e of the |
| 859 * left-hand-side, or `null` if the AST structure has not been resolved, if th
e operator is | 892 * left-hand-side, or `null` if the AST structure has not been resolved, if th
e operator is |
| 860 * not a compound operator, or if the operator could not be resolved. One exam
ple of the latter | 893 * not a compound operator, or if the operator could not be resolved. One exam
ple of the latter |
| 861 * case is an operator that is not defined for the type of the left-hand opera
nd. | 894 * case is an operator that is not defined for the type of the left-hand opera
nd. |
| 862 * | 895 * |
| 863 * @return the element associated with the operator | 896 * @return the element associated with the operator |
| 864 */ | 897 */ |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 /** | 945 /** |
| 913 * Set the element associated with the operator based on the static type of th
e left-hand-side to | 946 * Set the element associated with the operator based on the static type of th
e left-hand-side to |
| 914 * the given element. | 947 * the given element. |
| 915 * | 948 * |
| 916 * @param element the static element to be associated with the operator | 949 * @param element the static element to be associated with the operator |
| 917 */ | 950 */ |
| 918 void set staticElement(MethodElement element) { | 951 void set staticElement(MethodElement element) { |
| 919 _staticElement = element; | 952 _staticElement = element; |
| 920 } | 953 } |
| 921 | 954 |
| 955 @override |
| 922 void visitChildren(AstVisitor visitor) { | 956 void visitChildren(AstVisitor visitor) { |
| 923 safelyVisitChild(_leftHandSide, visitor); | 957 safelyVisitChild(_leftHandSide, visitor); |
| 924 safelyVisitChild(_rightHandSide, visitor); | 958 safelyVisitChild(_rightHandSide, visitor); |
| 925 } | 959 } |
| 926 | 960 |
| 927 /** | 961 /** |
| 928 * If the AST structure has been resolved, and the function being invoked is k
nown based on | 962 * If the AST structure has been resolved, and the function being invoked is k
nown based on |
| 929 * propagated type information, then return the parameter element representing
the parameter to | 963 * propagated type information, then return the parameter element representing
the parameter to |
| 930 * which the value of the right operand will be bound. Otherwise, return `null
`. | 964 * which the value of the right operand will be bound. Otherwise, return `null
`. |
| 931 * | 965 * |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 * string will not be valid source primarily in the case where the node itself
is not well-formed. | 1182 * string will not be valid source primarily in the case where the node itself
is not well-formed. |
| 1149 * | 1183 * |
| 1150 * @return the source code equivalent of this node | 1184 * @return the source code equivalent of this node |
| 1151 */ | 1185 */ |
| 1152 String toSource() { | 1186 String toSource() { |
| 1153 PrintStringWriter writer = new PrintStringWriter(); | 1187 PrintStringWriter writer = new PrintStringWriter(); |
| 1154 accept(new ToSourceVisitor(writer)); | 1188 accept(new ToSourceVisitor(writer)); |
| 1155 return writer.toString(); | 1189 return writer.toString(); |
| 1156 } | 1190 } |
| 1157 | 1191 |
| 1192 @override |
| 1158 String toString() => toSource(); | 1193 String toString() => toSource(); |
| 1159 | 1194 |
| 1160 /** | 1195 /** |
| 1161 * Use the given visitor to visit all of the children of this node. The childr
en will be visited | 1196 * Use the given visitor to visit all of the children of this node. The childr
en will be visited |
| 1162 * in source order. | 1197 * in source order. |
| 1163 * | 1198 * |
| 1164 * @param visitor the visitor that will be used to visit the children of this
node | 1199 * @param visitor the visitor that will be used to visit the children of this
node |
| 1165 */ | 1200 */ |
| 1166 void visitChildren(AstVisitor visitor); | 1201 void visitChildren(AstVisitor visitor); |
| 1167 | 1202 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1456 * | 1491 * |
| 1457 * @param leftOperand the expression used to compute the left operand | 1492 * @param leftOperand the expression used to compute the left operand |
| 1458 * @param operator the binary operator being applied | 1493 * @param operator the binary operator being applied |
| 1459 * @param rightOperand the expression used to compute the right operand | 1494 * @param rightOperand the expression used to compute the right operand |
| 1460 */ | 1495 */ |
| 1461 BinaryExpression(Expression leftOperand, this.operator, Expression rightOperan
d) { | 1496 BinaryExpression(Expression leftOperand, this.operator, Expression rightOperan
d) { |
| 1462 this._leftOperand = becomeParentOf(leftOperand); | 1497 this._leftOperand = becomeParentOf(leftOperand); |
| 1463 this._rightOperand = becomeParentOf(rightOperand); | 1498 this._rightOperand = becomeParentOf(rightOperand); |
| 1464 } | 1499 } |
| 1465 | 1500 |
| 1501 @override |
| 1466 accept(AstVisitor visitor) => visitor.visitBinaryExpression(this); | 1502 accept(AstVisitor visitor) => visitor.visitBinaryExpression(this); |
| 1467 | 1503 |
| 1504 @override |
| 1468 Token get beginToken => _leftOperand.beginToken; | 1505 Token get beginToken => _leftOperand.beginToken; |
| 1469 | 1506 |
| 1470 /** | 1507 /** |
| 1471 * Return the best element available for this operator. If resolution was able
to find a better | 1508 * Return the best element available for this operator. If resolution was able
to find a better |
| 1472 * element based on type propagation, that element will be returned. Otherwise
, the element found | 1509 * element based on type propagation, that element will be returned. Otherwise
, the element found |
| 1473 * using the result of static analysis will be returned. If resolution has not
been performed, | 1510 * using the result of static analysis will be returned. If resolution has not
been performed, |
| 1474 * then `null` will be returned. | 1511 * then `null` will be returned. |
| 1475 * | 1512 * |
| 1476 * @return the best element available for this operator | 1513 * @return the best element available for this operator |
| 1477 */ | 1514 */ |
| 1478 MethodElement get bestElement { | 1515 MethodElement get bestElement { |
| 1479 MethodElement element = propagatedElement; | 1516 MethodElement element = propagatedElement; |
| 1480 if (element == null) { | 1517 if (element == null) { |
| 1481 element = staticElement; | 1518 element = staticElement; |
| 1482 } | 1519 } |
| 1483 return element; | 1520 return element; |
| 1484 } | 1521 } |
| 1485 | 1522 |
| 1523 @override |
| 1486 Token get endToken => _rightOperand.endToken; | 1524 Token get endToken => _rightOperand.endToken; |
| 1487 | 1525 |
| 1488 /** | 1526 /** |
| 1489 * Return the expression used to compute the left operand. | 1527 * Return the expression used to compute the left operand. |
| 1490 * | 1528 * |
| 1491 * @return the expression used to compute the left operand | 1529 * @return the expression used to compute the left operand |
| 1492 */ | 1530 */ |
| 1493 Expression get leftOperand => _leftOperand; | 1531 Expression get leftOperand => _leftOperand; |
| 1494 | 1532 |
| 1533 @override |
| 1495 int get precedence => operator.type.precedence; | 1534 int get precedence => operator.type.precedence; |
| 1496 | 1535 |
| 1497 /** | 1536 /** |
| 1498 * Return the element associated with the operator based on the propagated typ
e of the left | 1537 * Return the element associated with the operator based on the propagated typ
e of the left |
| 1499 * operand, or `null` if the AST structure has not been resolved, if the opera
tor is not | 1538 * operand, or `null` if the AST structure has not been resolved, if the opera
tor is not |
| 1500 * user definable, or if the operator could not be resolved. One example of th
e latter case is an | 1539 * user definable, or if the operator could not be resolved. One example of th
e latter case is an |
| 1501 * operator that is not defined for the type of the left-hand operand. | 1540 * operator that is not defined for the type of the left-hand operand. |
| 1502 * | 1541 * |
| 1503 * @return the element associated with the operator | 1542 * @return the element associated with the operator |
| 1504 */ | 1543 */ |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1552 /** | 1591 /** |
| 1553 * Set the element associated with the operator based on the static type of th
e left operand to | 1592 * Set the element associated with the operator based on the static type of th
e left operand to |
| 1554 * the given element. | 1593 * the given element. |
| 1555 * | 1594 * |
| 1556 * @param element the static element to be associated with the operator | 1595 * @param element the static element to be associated with the operator |
| 1557 */ | 1596 */ |
| 1558 void set staticElement(MethodElement element) { | 1597 void set staticElement(MethodElement element) { |
| 1559 _staticElement = element; | 1598 _staticElement = element; |
| 1560 } | 1599 } |
| 1561 | 1600 |
| 1601 @override |
| 1562 void visitChildren(AstVisitor visitor) { | 1602 void visitChildren(AstVisitor visitor) { |
| 1563 safelyVisitChild(_leftOperand, visitor); | 1603 safelyVisitChild(_leftOperand, visitor); |
| 1564 safelyVisitChild(_rightOperand, visitor); | 1604 safelyVisitChild(_rightOperand, visitor); |
| 1565 } | 1605 } |
| 1566 | 1606 |
| 1567 /** | 1607 /** |
| 1568 * If the AST structure has been resolved, and the function being invoked is k
nown based on | 1608 * If the AST structure has been resolved, and the function being invoked is k
nown based on |
| 1569 * propagated type information, then return the parameter element representing
the parameter to | 1609 * propagated type information, then return the parameter element representing
the parameter to |
| 1570 * which the value of the right operand will be bound. Otherwise, return `null
`. | 1610 * which the value of the right operand will be bound. Otherwise, return `null
`. |
| 1571 * | 1611 * |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 * | 1676 * |
| 1637 * @param leftBracket the left curly bracket | 1677 * @param leftBracket the left curly bracket |
| 1638 * @param statements the statements contained in the block | 1678 * @param statements the statements contained in the block |
| 1639 * @param rightBracket the right curly bracket | 1679 * @param rightBracket the right curly bracket |
| 1640 */ | 1680 */ |
| 1641 Block(this.leftBracket, List<Statement> statements, this.rightBracket) { | 1681 Block(this.leftBracket, List<Statement> statements, this.rightBracket) { |
| 1642 this._statements = new NodeList<Statement>(this); | 1682 this._statements = new NodeList<Statement>(this); |
| 1643 this._statements.addAll(statements); | 1683 this._statements.addAll(statements); |
| 1644 } | 1684 } |
| 1645 | 1685 |
| 1686 @override |
| 1646 accept(AstVisitor visitor) => visitor.visitBlock(this); | 1687 accept(AstVisitor visitor) => visitor.visitBlock(this); |
| 1647 | 1688 |
| 1689 @override |
| 1648 Token get beginToken => leftBracket; | 1690 Token get beginToken => leftBracket; |
| 1649 | 1691 |
| 1692 @override |
| 1650 Token get endToken => rightBracket; | 1693 Token get endToken => rightBracket; |
| 1651 | 1694 |
| 1652 /** | 1695 /** |
| 1653 * Return the statements contained in the block. | 1696 * Return the statements contained in the block. |
| 1654 * | 1697 * |
| 1655 * @return the statements contained in the block | 1698 * @return the statements contained in the block |
| 1656 */ | 1699 */ |
| 1657 NodeList<Statement> get statements => _statements; | 1700 NodeList<Statement> get statements => _statements; |
| 1658 | 1701 |
| 1702 @override |
| 1659 void visitChildren(AstVisitor visitor) { | 1703 void visitChildren(AstVisitor visitor) { |
| 1660 _statements.accept(visitor); | 1704 _statements.accept(visitor); |
| 1661 } | 1705 } |
| 1662 } | 1706 } |
| 1663 | 1707 |
| 1664 /** | 1708 /** |
| 1665 * Instances of the class `BlockFunctionBody` represent a function body that con
sists of a | 1709 * Instances of the class `BlockFunctionBody` represent a function body that con
sists of a |
| 1666 * block of statements. | 1710 * block of statements. |
| 1667 * | 1711 * |
| 1668 * <pre> | 1712 * <pre> |
| 1669 * blockFunctionBody ::= | 1713 * blockFunctionBody ::= |
| 1670 * [Block] | 1714 * [Block] |
| 1671 * </pre> | 1715 * </pre> |
| 1672 */ | 1716 */ |
| 1673 class BlockFunctionBody extends FunctionBody { | 1717 class BlockFunctionBody extends FunctionBody { |
| 1674 /** | 1718 /** |
| 1675 * The block representing the body of the function. | 1719 * The block representing the body of the function. |
| 1676 */ | 1720 */ |
| 1677 Block _block; | 1721 Block _block; |
| 1678 | 1722 |
| 1679 /** | 1723 /** |
| 1680 * Initialize a newly created function body consisting of a block of statement
s. | 1724 * Initialize a newly created function body consisting of a block of statement
s. |
| 1681 * | 1725 * |
| 1682 * @param block the block representing the body of the function | 1726 * @param block the block representing the body of the function |
| 1683 */ | 1727 */ |
| 1684 BlockFunctionBody(Block block) { | 1728 BlockFunctionBody(Block block) { |
| 1685 this._block = becomeParentOf(block); | 1729 this._block = becomeParentOf(block); |
| 1686 } | 1730 } |
| 1687 | 1731 |
| 1732 @override |
| 1688 accept(AstVisitor visitor) => visitor.visitBlockFunctionBody(this); | 1733 accept(AstVisitor visitor) => visitor.visitBlockFunctionBody(this); |
| 1689 | 1734 |
| 1735 @override |
| 1690 Token get beginToken => _block.beginToken; | 1736 Token get beginToken => _block.beginToken; |
| 1691 | 1737 |
| 1692 /** | 1738 /** |
| 1693 * Return the block representing the body of the function. | 1739 * Return the block representing the body of the function. |
| 1694 * | 1740 * |
| 1695 * @return the block representing the body of the function | 1741 * @return the block representing the body of the function |
| 1696 */ | 1742 */ |
| 1697 Block get block => _block; | 1743 Block get block => _block; |
| 1698 | 1744 |
| 1745 @override |
| 1699 Token get endToken => _block.endToken; | 1746 Token get endToken => _block.endToken; |
| 1700 | 1747 |
| 1701 /** | 1748 /** |
| 1702 * Set the block representing the body of the function to the given block. | 1749 * Set the block representing the body of the function to the given block. |
| 1703 * | 1750 * |
| 1704 * @param block the block representing the body of the function | 1751 * @param block the block representing the body of the function |
| 1705 */ | 1752 */ |
| 1706 void set block(Block block) { | 1753 void set block(Block block) { |
| 1707 this._block = becomeParentOf(block); | 1754 this._block = becomeParentOf(block); |
| 1708 } | 1755 } |
| 1709 | 1756 |
| 1757 @override |
| 1710 void visitChildren(AstVisitor visitor) { | 1758 void visitChildren(AstVisitor visitor) { |
| 1711 safelyVisitChild(_block, visitor); | 1759 safelyVisitChild(_block, visitor); |
| 1712 } | 1760 } |
| 1713 } | 1761 } |
| 1714 | 1762 |
| 1715 /** | 1763 /** |
| 1716 * Instances of the class `BooleanLiteral` represent a boolean literal expressio
n. | 1764 * Instances of the class `BooleanLiteral` represent a boolean literal expressio
n. |
| 1717 * | 1765 * |
| 1718 * <pre> | 1766 * <pre> |
| 1719 * booleanLiteral ::= | 1767 * booleanLiteral ::= |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1732 bool value = false; | 1780 bool value = false; |
| 1733 | 1781 |
| 1734 /** | 1782 /** |
| 1735 * Initialize a newly created boolean literal. | 1783 * Initialize a newly created boolean literal. |
| 1736 * | 1784 * |
| 1737 * @param literal the token representing the literal | 1785 * @param literal the token representing the literal |
| 1738 * @param value the value of the literal | 1786 * @param value the value of the literal |
| 1739 */ | 1787 */ |
| 1740 BooleanLiteral(this.literal, this.value); | 1788 BooleanLiteral(this.literal, this.value); |
| 1741 | 1789 |
| 1790 @override |
| 1742 accept(AstVisitor visitor) => visitor.visitBooleanLiteral(this); | 1791 accept(AstVisitor visitor) => visitor.visitBooleanLiteral(this); |
| 1743 | 1792 |
| 1793 @override |
| 1744 Token get beginToken => literal; | 1794 Token get beginToken => literal; |
| 1745 | 1795 |
| 1796 @override |
| 1746 Token get endToken => literal; | 1797 Token get endToken => literal; |
| 1747 | 1798 |
| 1799 @override |
| 1748 bool get isSynthetic => literal.isSynthetic; | 1800 bool get isSynthetic => literal.isSynthetic; |
| 1749 | 1801 |
| 1802 @override |
| 1750 void visitChildren(AstVisitor visitor) { | 1803 void visitChildren(AstVisitor visitor) { |
| 1751 } | 1804 } |
| 1752 } | 1805 } |
| 1753 | 1806 |
| 1754 /** | 1807 /** |
| 1755 * Instances of the class `BreakStatement` represent a break statement. | 1808 * Instances of the class `BreakStatement` represent a break statement. |
| 1756 * | 1809 * |
| 1757 * <pre> | 1810 * <pre> |
| 1758 * breakStatement ::= | 1811 * breakStatement ::= |
| 1759 * 'break' [SimpleIdentifier]? ';' | 1812 * 'break' [SimpleIdentifier]? ';' |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1779 * Initialize a newly created break statement. | 1832 * Initialize a newly created break statement. |
| 1780 * | 1833 * |
| 1781 * @param keyword the token representing the 'break' keyword | 1834 * @param keyword the token representing the 'break' keyword |
| 1782 * @param label the label associated with the statement | 1835 * @param label the label associated with the statement |
| 1783 * @param semicolon the semicolon terminating the statement | 1836 * @param semicolon the semicolon terminating the statement |
| 1784 */ | 1837 */ |
| 1785 BreakStatement(this.keyword, SimpleIdentifier label, this.semicolon) { | 1838 BreakStatement(this.keyword, SimpleIdentifier label, this.semicolon) { |
| 1786 this._label = becomeParentOf(label); | 1839 this._label = becomeParentOf(label); |
| 1787 } | 1840 } |
| 1788 | 1841 |
| 1842 @override |
| 1789 accept(AstVisitor visitor) => visitor.visitBreakStatement(this); | 1843 accept(AstVisitor visitor) => visitor.visitBreakStatement(this); |
| 1790 | 1844 |
| 1845 @override |
| 1791 Token get beginToken => keyword; | 1846 Token get beginToken => keyword; |
| 1792 | 1847 |
| 1848 @override |
| 1793 Token get endToken => semicolon; | 1849 Token get endToken => semicolon; |
| 1794 | 1850 |
| 1795 /** | 1851 /** |
| 1796 * Return the label associated with the statement, or `null` if there is no la
bel. | 1852 * Return the label associated with the statement, or `null` if there is no la
bel. |
| 1797 * | 1853 * |
| 1798 * @return the label associated with the statement | 1854 * @return the label associated with the statement |
| 1799 */ | 1855 */ |
| 1800 SimpleIdentifier get label => _label; | 1856 SimpleIdentifier get label => _label; |
| 1801 | 1857 |
| 1802 /** | 1858 /** |
| 1803 * Set the label associated with the statement to the given identifier. | 1859 * Set the label associated with the statement to the given identifier. |
| 1804 * | 1860 * |
| 1805 * @param identifier the label associated with the statement | 1861 * @param identifier the label associated with the statement |
| 1806 */ | 1862 */ |
| 1807 void set label(SimpleIdentifier identifier) { | 1863 void set label(SimpleIdentifier identifier) { |
| 1808 _label = becomeParentOf(identifier); | 1864 _label = becomeParentOf(identifier); |
| 1809 } | 1865 } |
| 1810 | 1866 |
| 1867 @override |
| 1811 void visitChildren(AstVisitor visitor) { | 1868 void visitChildren(AstVisitor visitor) { |
| 1812 safelyVisitChild(_label, visitor); | 1869 safelyVisitChild(_label, visitor); |
| 1813 } | 1870 } |
| 1814 } | 1871 } |
| 1815 | 1872 |
| 1816 /** | 1873 /** |
| 1817 * Instances of the class `CascadeExpression` represent a sequence of cascaded e
xpressions: | 1874 * Instances of the class `CascadeExpression` represent a sequence of cascaded e
xpressions: |
| 1818 * expressions that share a common target. There are three kinds of expressions
that can be used in | 1875 * expressions that share a common target. There are three kinds of expressions
that can be used in |
| 1819 * a cascade expression: [IndexExpression], [MethodInvocation] and | 1876 * a cascade expression: [IndexExpression], [MethodInvocation] and |
| 1820 * [PropertyAccess]. | 1877 * [PropertyAccess]. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1847 * | 1904 * |
| 1848 * @param target the target of the cascade sections | 1905 * @param target the target of the cascade sections |
| 1849 * @param cascadeSections the cascade sections sharing the common target | 1906 * @param cascadeSections the cascade sections sharing the common target |
| 1850 */ | 1907 */ |
| 1851 CascadeExpression(Expression target, List<Expression> cascadeSections) { | 1908 CascadeExpression(Expression target, List<Expression> cascadeSections) { |
| 1852 this._cascadeSections = new NodeList<Expression>(this); | 1909 this._cascadeSections = new NodeList<Expression>(this); |
| 1853 this._target = becomeParentOf(target); | 1910 this._target = becomeParentOf(target); |
| 1854 this._cascadeSections.addAll(cascadeSections); | 1911 this._cascadeSections.addAll(cascadeSections); |
| 1855 } | 1912 } |
| 1856 | 1913 |
| 1914 @override |
| 1857 accept(AstVisitor visitor) => visitor.visitCascadeExpression(this); | 1915 accept(AstVisitor visitor) => visitor.visitCascadeExpression(this); |
| 1858 | 1916 |
| 1917 @override |
| 1859 Token get beginToken => _target.beginToken; | 1918 Token get beginToken => _target.beginToken; |
| 1860 | 1919 |
| 1861 /** | 1920 /** |
| 1862 * Return the cascade sections sharing the common target. | 1921 * Return the cascade sections sharing the common target. |
| 1863 * | 1922 * |
| 1864 * @return the cascade sections sharing the common target | 1923 * @return the cascade sections sharing the common target |
| 1865 */ | 1924 */ |
| 1866 NodeList<Expression> get cascadeSections => _cascadeSections; | 1925 NodeList<Expression> get cascadeSections => _cascadeSections; |
| 1867 | 1926 |
| 1927 @override |
| 1868 Token get endToken => _cascadeSections.endToken; | 1928 Token get endToken => _cascadeSections.endToken; |
| 1869 | 1929 |
| 1930 @override |
| 1870 int get precedence => 2; | 1931 int get precedence => 2; |
| 1871 | 1932 |
| 1872 /** | 1933 /** |
| 1873 * Return the target of the cascade sections. | 1934 * Return the target of the cascade sections. |
| 1874 * | 1935 * |
| 1875 * @return the target of the cascade sections | 1936 * @return the target of the cascade sections |
| 1876 */ | 1937 */ |
| 1877 Expression get target => _target; | 1938 Expression get target => _target; |
| 1878 | 1939 |
| 1879 /** | 1940 /** |
| 1880 * Set the target of the cascade sections to the given expression. | 1941 * Set the target of the cascade sections to the given expression. |
| 1881 * | 1942 * |
| 1882 * @param target the target of the cascade sections | 1943 * @param target the target of the cascade sections |
| 1883 */ | 1944 */ |
| 1884 void set target(Expression target) { | 1945 void set target(Expression target) { |
| 1885 this._target = becomeParentOf(target); | 1946 this._target = becomeParentOf(target); |
| 1886 } | 1947 } |
| 1887 | 1948 |
| 1949 @override |
| 1888 void visitChildren(AstVisitor visitor) { | 1950 void visitChildren(AstVisitor visitor) { |
| 1889 safelyVisitChild(_target, visitor); | 1951 safelyVisitChild(_target, visitor); |
| 1890 _cascadeSections.accept(visitor); | 1952 _cascadeSections.accept(visitor); |
| 1891 } | 1953 } |
| 1892 } | 1954 } |
| 1893 | 1955 |
| 1894 /** | 1956 /** |
| 1895 * Instances of the class `CatchClause` represent a catch clause within a try st
atement. | 1957 * Instances of the class `CatchClause` represent a catch clause within a try st
atement. |
| 1896 * | 1958 * |
| 1897 * <pre> | 1959 * <pre> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1967 */ | 2029 */ |
| 1968 CatchClause(this.onKeyword, TypeName exceptionType, this.catchKeyword, Token l
eftParenthesis, SimpleIdentifier exceptionParameter, this.comma, SimpleIdentifie
r stackTraceParameter, Token rightParenthesis, Block body) { | 2030 CatchClause(this.onKeyword, TypeName exceptionType, this.catchKeyword, Token l
eftParenthesis, SimpleIdentifier exceptionParameter, this.comma, SimpleIdentifie
r stackTraceParameter, Token rightParenthesis, Block body) { |
| 1969 this.exceptionType = becomeParentOf(exceptionType); | 2031 this.exceptionType = becomeParentOf(exceptionType); |
| 1970 this._leftParenthesis = leftParenthesis; | 2032 this._leftParenthesis = leftParenthesis; |
| 1971 this._exceptionParameter = becomeParentOf(exceptionParameter); | 2033 this._exceptionParameter = becomeParentOf(exceptionParameter); |
| 1972 this._stackTraceParameter = becomeParentOf(stackTraceParameter); | 2034 this._stackTraceParameter = becomeParentOf(stackTraceParameter); |
| 1973 this._rightParenthesis = rightParenthesis; | 2035 this._rightParenthesis = rightParenthesis; |
| 1974 this._body = becomeParentOf(body); | 2036 this._body = becomeParentOf(body); |
| 1975 } | 2037 } |
| 1976 | 2038 |
| 2039 @override |
| 1977 accept(AstVisitor visitor) => visitor.visitCatchClause(this); | 2040 accept(AstVisitor visitor) => visitor.visitCatchClause(this); |
| 1978 | 2041 |
| 2042 @override |
| 1979 Token get beginToken { | 2043 Token get beginToken { |
| 1980 if (onKeyword != null) { | 2044 if (onKeyword != null) { |
| 1981 return onKeyword; | 2045 return onKeyword; |
| 1982 } | 2046 } |
| 1983 return catchKeyword; | 2047 return catchKeyword; |
| 1984 } | 2048 } |
| 1985 | 2049 |
| 1986 /** | 2050 /** |
| 1987 * Return the body of the catch block. | 2051 * Return the body of the catch block. |
| 1988 * | 2052 * |
| 1989 * @return the body of the catch block | 2053 * @return the body of the catch block |
| 1990 */ | 2054 */ |
| 1991 Block get body => _body; | 2055 Block get body => _body; |
| 1992 | 2056 |
| 2057 @override |
| 1993 Token get endToken => _body.endToken; | 2058 Token get endToken => _body.endToken; |
| 1994 | 2059 |
| 1995 /** | 2060 /** |
| 1996 * Return the parameter whose value will be the exception that was thrown. | 2061 * Return the parameter whose value will be the exception that was thrown. |
| 1997 * | 2062 * |
| 1998 * @return the parameter whose value will be the exception that was thrown | 2063 * @return the parameter whose value will be the exception that was thrown |
| 1999 */ | 2064 */ |
| 2000 SimpleIdentifier get exceptionParameter => _exceptionParameter; | 2065 SimpleIdentifier get exceptionParameter => _exceptionParameter; |
| 2001 | 2066 |
| 2002 /** | 2067 /** |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2061 * Set the parameter whose value will be the stack trace associated with the e
xception to the | 2126 * Set the parameter whose value will be the stack trace associated with the e
xception to the |
| 2062 * given parameter. | 2127 * given parameter. |
| 2063 * | 2128 * |
| 2064 * @param parameter the parameter whose value will be the stack trace associat
ed with the | 2129 * @param parameter the parameter whose value will be the stack trace associat
ed with the |
| 2065 * exception | 2130 * exception |
| 2066 */ | 2131 */ |
| 2067 void set stackTraceParameter(SimpleIdentifier parameter) { | 2132 void set stackTraceParameter(SimpleIdentifier parameter) { |
| 2068 _stackTraceParameter = becomeParentOf(parameter); | 2133 _stackTraceParameter = becomeParentOf(parameter); |
| 2069 } | 2134 } |
| 2070 | 2135 |
| 2136 @override |
| 2071 void visitChildren(AstVisitor visitor) { | 2137 void visitChildren(AstVisitor visitor) { |
| 2072 safelyVisitChild(exceptionType, visitor); | 2138 safelyVisitChild(exceptionType, visitor); |
| 2073 safelyVisitChild(_exceptionParameter, visitor); | 2139 safelyVisitChild(_exceptionParameter, visitor); |
| 2074 safelyVisitChild(_stackTraceParameter, visitor); | 2140 safelyVisitChild(_stackTraceParameter, visitor); |
| 2075 safelyVisitChild(_body, visitor); | 2141 safelyVisitChild(_body, visitor); |
| 2076 } | 2142 } |
| 2077 } | 2143 } |
| 2078 | 2144 |
| 2079 /** | 2145 /** |
| 2080 * Instances of the class `ClassDeclaration` represent the declaration of a clas
s. | 2146 * Instances of the class `ClassDeclaration` represent the declaration of a clas
s. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2164 ClassDeclaration(Comment comment, List<Annotation> metadata, this.abstractKeyw
ord, this.classKeyword, SimpleIdentifier name, TypeParameterList typeParameters,
ExtendsClause extendsClause, WithClause withClause, ImplementsClause implements
Clause, this.leftBracket, List<ClassMember> members, this.rightBracket) : super(
comment, metadata) { | 2230 ClassDeclaration(Comment comment, List<Annotation> metadata, this.abstractKeyw
ord, this.classKeyword, SimpleIdentifier name, TypeParameterList typeParameters,
ExtendsClause extendsClause, WithClause withClause, ImplementsClause implements
Clause, this.leftBracket, List<ClassMember> members, this.rightBracket) : super(
comment, metadata) { |
| 2165 this._members = new NodeList<ClassMember>(this); | 2231 this._members = new NodeList<ClassMember>(this); |
| 2166 this._name = becomeParentOf(name); | 2232 this._name = becomeParentOf(name); |
| 2167 this.typeParameters = becomeParentOf(typeParameters); | 2233 this.typeParameters = becomeParentOf(typeParameters); |
| 2168 this._extendsClause = becomeParentOf(extendsClause); | 2234 this._extendsClause = becomeParentOf(extendsClause); |
| 2169 this._withClause = becomeParentOf(withClause); | 2235 this._withClause = becomeParentOf(withClause); |
| 2170 this._implementsClause = becomeParentOf(implementsClause); | 2236 this._implementsClause = becomeParentOf(implementsClause); |
| 2171 this._members.addAll(members); | 2237 this._members.addAll(members); |
| 2172 } | 2238 } |
| 2173 | 2239 |
| 2240 @override |
| 2174 accept(AstVisitor visitor) => visitor.visitClassDeclaration(this); | 2241 accept(AstVisitor visitor) => visitor.visitClassDeclaration(this); |
| 2175 | 2242 |
| 2176 /** | 2243 /** |
| 2177 * Return the constructor declared in the class with the given name. | 2244 * Return the constructor declared in the class with the given name. |
| 2178 * | 2245 * |
| 2179 * @param name the name of the constructor to find, `null` for default | 2246 * @param name the name of the constructor to find, `null` for default |
| 2180 * @return the found constructor or `null` if not found | 2247 * @return the found constructor or `null` if not found |
| 2181 */ | 2248 */ |
| 2182 ConstructorDeclaration getConstructor(String name) { | 2249 ConstructorDeclaration getConstructor(String name) { |
| 2183 for (ClassMember classMember in _members) { | 2250 for (ClassMember classMember in _members) { |
| 2184 if (classMember is ConstructorDeclaration) { | 2251 if (classMember is ConstructorDeclaration) { |
| 2185 ConstructorDeclaration constructor = classMember; | 2252 ConstructorDeclaration constructor = classMember; |
| 2186 SimpleIdentifier constructorName = constructor.name; | 2253 SimpleIdentifier constructorName = constructor.name; |
| 2187 if (name == null && constructorName == null) { | 2254 if (name == null && constructorName == null) { |
| 2188 return constructor; | 2255 return constructor; |
| 2189 } | 2256 } |
| 2190 if (constructorName != null && constructorName.name == name) { | 2257 if (constructorName != null && constructorName.name == name) { |
| 2191 return constructor; | 2258 return constructor; |
| 2192 } | 2259 } |
| 2193 } | 2260 } |
| 2194 } | 2261 } |
| 2195 return null; | 2262 return null; |
| 2196 } | 2263 } |
| 2197 | 2264 |
| 2265 @override |
| 2198 ClassElement get element => _name != null ? (_name.staticElement as ClassEleme
nt) : null; | 2266 ClassElement get element => _name != null ? (_name.staticElement as ClassEleme
nt) : null; |
| 2199 | 2267 |
| 2268 @override |
| 2200 Token get endToken => rightBracket; | 2269 Token get endToken => rightBracket; |
| 2201 | 2270 |
| 2202 /** | 2271 /** |
| 2203 * Return the extends clause for this class, or `null` if the class does not e
xtend any | 2272 * Return the extends clause for this class, or `null` if the class does not e
xtend any |
| 2204 * other class. | 2273 * other class. |
| 2205 * | 2274 * |
| 2206 * @return the extends clause for this class | 2275 * @return the extends clause for this class |
| 2207 */ | 2276 */ |
| 2208 ExtendsClause get extendsClause => _extendsClause; | 2277 ExtendsClause get extendsClause => _extendsClause; |
| 2209 | 2278 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2306 | 2375 |
| 2307 /** | 2376 /** |
| 2308 * Set the with clause for the class to the given clause. | 2377 * Set the with clause for the class to the given clause. |
| 2309 * | 2378 * |
| 2310 * @param withClause the with clause for the class | 2379 * @param withClause the with clause for the class |
| 2311 */ | 2380 */ |
| 2312 void set withClause(WithClause withClause) { | 2381 void set withClause(WithClause withClause) { |
| 2313 this._withClause = becomeParentOf(withClause); | 2382 this._withClause = becomeParentOf(withClause); |
| 2314 } | 2383 } |
| 2315 | 2384 |
| 2385 @override |
| 2316 void visitChildren(AstVisitor visitor) { | 2386 void visitChildren(AstVisitor visitor) { |
| 2317 super.visitChildren(visitor); | 2387 super.visitChildren(visitor); |
| 2318 safelyVisitChild(_name, visitor); | 2388 safelyVisitChild(_name, visitor); |
| 2319 safelyVisitChild(typeParameters, visitor); | 2389 safelyVisitChild(typeParameters, visitor); |
| 2320 safelyVisitChild(_extendsClause, visitor); | 2390 safelyVisitChild(_extendsClause, visitor); |
| 2321 safelyVisitChild(_withClause, visitor); | 2391 safelyVisitChild(_withClause, visitor); |
| 2322 safelyVisitChild(_implementsClause, visitor); | 2392 safelyVisitChild(_implementsClause, visitor); |
| 2323 safelyVisitChild(nativeClause, visitor); | 2393 safelyVisitChild(nativeClause, visitor); |
| 2324 members.accept(visitor); | 2394 members.accept(visitor); |
| 2325 } | 2395 } |
| 2326 | 2396 |
| 2397 @override |
| 2327 Token get firstTokenAfterCommentAndMetadata { | 2398 Token get firstTokenAfterCommentAndMetadata { |
| 2328 if (abstractKeyword != null) { | 2399 if (abstractKeyword != null) { |
| 2329 return abstractKeyword; | 2400 return abstractKeyword; |
| 2330 } | 2401 } |
| 2331 return classKeyword; | 2402 return classKeyword; |
| 2332 } | 2403 } |
| 2333 } | 2404 } |
| 2334 | 2405 |
| 2335 /** | 2406 /** |
| 2336 * The abstract class `ClassMember` defines the behavior common to nodes that de
clare a name | 2407 * The abstract class `ClassMember` defines the behavior common to nodes that de
clare a name |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2411 * @param semicolon the semicolon terminating the declaration | 2482 * @param semicolon the semicolon terminating the declaration |
| 2412 */ | 2483 */ |
| 2413 ClassTypeAlias(Comment comment, List<Annotation> metadata, Token keyword, Simp
leIdentifier name, TypeParameterList typeParameters, this.equals, this.abstractK
eyword, TypeName superclass, WithClause withClause, ImplementsClause implementsC
lause, Token semicolon) : super(comment, metadata, keyword, semicolon) { | 2484 ClassTypeAlias(Comment comment, List<Annotation> metadata, Token keyword, Simp
leIdentifier name, TypeParameterList typeParameters, this.equals, this.abstractK
eyword, TypeName superclass, WithClause withClause, ImplementsClause implementsC
lause, Token semicolon) : super(comment, metadata, keyword, semicolon) { |
| 2414 this._name = becomeParentOf(name); | 2485 this._name = becomeParentOf(name); |
| 2415 this._typeParameters = becomeParentOf(typeParameters); | 2486 this._typeParameters = becomeParentOf(typeParameters); |
| 2416 this._superclass = becomeParentOf(superclass); | 2487 this._superclass = becomeParentOf(superclass); |
| 2417 this._withClause = becomeParentOf(withClause); | 2488 this._withClause = becomeParentOf(withClause); |
| 2418 this._implementsClause = becomeParentOf(implementsClause); | 2489 this._implementsClause = becomeParentOf(implementsClause); |
| 2419 } | 2490 } |
| 2420 | 2491 |
| 2492 @override |
| 2421 accept(AstVisitor visitor) => visitor.visitClassTypeAlias(this); | 2493 accept(AstVisitor visitor) => visitor.visitClassTypeAlias(this); |
| 2422 | 2494 |
| 2495 @override |
| 2423 ClassElement get element => _name != null ? (_name.staticElement as ClassEleme
nt) : null; | 2496 ClassElement get element => _name != null ? (_name.staticElement as ClassEleme
nt) : null; |
| 2424 | 2497 |
| 2425 /** | 2498 /** |
| 2426 * Return the implements clause for this class, or `null` if there is no imple
ments clause. | 2499 * Return the implements clause for this class, or `null` if there is no imple
ments clause. |
| 2427 * | 2500 * |
| 2428 * @return the implements clause for this class | 2501 * @return the implements clause for this class |
| 2429 */ | 2502 */ |
| 2430 ImplementsClause get implementsClause => _implementsClause; | 2503 ImplementsClause get implementsClause => _implementsClause; |
| 2431 | 2504 |
| 2432 /** | 2505 /** |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2496 | 2569 |
| 2497 /** | 2570 /** |
| 2498 * Set the with clause for this class to the given with clause. | 2571 * Set the with clause for this class to the given with clause. |
| 2499 * | 2572 * |
| 2500 * @param withClause the with clause for this class | 2573 * @param withClause the with clause for this class |
| 2501 */ | 2574 */ |
| 2502 void set withClause(WithClause withClause) { | 2575 void set withClause(WithClause withClause) { |
| 2503 this._withClause = becomeParentOf(withClause); | 2576 this._withClause = becomeParentOf(withClause); |
| 2504 } | 2577 } |
| 2505 | 2578 |
| 2579 @override |
| 2506 void visitChildren(AstVisitor visitor) { | 2580 void visitChildren(AstVisitor visitor) { |
| 2507 super.visitChildren(visitor); | 2581 super.visitChildren(visitor); |
| 2508 safelyVisitChild(_name, visitor); | 2582 safelyVisitChild(_name, visitor); |
| 2509 safelyVisitChild(_typeParameters, visitor); | 2583 safelyVisitChild(_typeParameters, visitor); |
| 2510 safelyVisitChild(_superclass, visitor); | 2584 safelyVisitChild(_superclass, visitor); |
| 2511 safelyVisitChild(_withClause, visitor); | 2585 safelyVisitChild(_withClause, visitor); |
| 2512 safelyVisitChild(_implementsClause, visitor); | 2586 safelyVisitChild(_implementsClause, visitor); |
| 2513 } | 2587 } |
| 2514 } | 2588 } |
| 2515 | 2589 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2530 Token keyword; | 2604 Token keyword; |
| 2531 | 2605 |
| 2532 /** | 2606 /** |
| 2533 * Initialize a newly created import combinator. | 2607 * Initialize a newly created import combinator. |
| 2534 * | 2608 * |
| 2535 * @param keyword the keyword specifying what kind of processing is to be done
on the imported | 2609 * @param keyword the keyword specifying what kind of processing is to be done
on the imported |
| 2536 * names | 2610 * names |
| 2537 */ | 2611 */ |
| 2538 Combinator(this.keyword); | 2612 Combinator(this.keyword); |
| 2539 | 2613 |
| 2614 @override |
| 2540 Token get beginToken => keyword; | 2615 Token get beginToken => keyword; |
| 2541 } | 2616 } |
| 2542 | 2617 |
| 2543 /** | 2618 /** |
| 2544 * Instances of the class `Comment` represent a comment within the source code. | 2619 * Instances of the class `Comment` represent a comment within the source code. |
| 2545 * | 2620 * |
| 2546 * <pre> | 2621 * <pre> |
| 2547 * comment ::= | 2622 * comment ::= |
| 2548 * endOfLineComment | 2623 * endOfLineComment |
| 2549 * | blockComment | 2624 * | blockComment |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2616 * @param tokens the tokens representing the comment | 2691 * @param tokens the tokens representing the comment |
| 2617 * @param type the type of the comment | 2692 * @param type the type of the comment |
| 2618 * @param references the references embedded within the documentation comment | 2693 * @param references the references embedded within the documentation comment |
| 2619 */ | 2694 */ |
| 2620 Comment(this.tokens, CommentType type, List<CommentReference> references) { | 2695 Comment(this.tokens, CommentType type, List<CommentReference> references) { |
| 2621 this._references = new NodeList<CommentReference>(this); | 2696 this._references = new NodeList<CommentReference>(this); |
| 2622 this._type = type; | 2697 this._type = type; |
| 2623 this._references.addAll(references); | 2698 this._references.addAll(references); |
| 2624 } | 2699 } |
| 2625 | 2700 |
| 2701 @override |
| 2626 accept(AstVisitor visitor) => visitor.visitComment(this); | 2702 accept(AstVisitor visitor) => visitor.visitComment(this); |
| 2627 | 2703 |
| 2704 @override |
| 2628 Token get beginToken => tokens[0]; | 2705 Token get beginToken => tokens[0]; |
| 2629 | 2706 |
| 2707 @override |
| 2630 Token get endToken => tokens[tokens.length - 1]; | 2708 Token get endToken => tokens[tokens.length - 1]; |
| 2631 | 2709 |
| 2632 /** | 2710 /** |
| 2633 * Return the references embedded within the documentation comment. | 2711 * Return the references embedded within the documentation comment. |
| 2634 * | 2712 * |
| 2635 * @return the references embedded within the documentation comment | 2713 * @return the references embedded within the documentation comment |
| 2636 */ | 2714 */ |
| 2637 NodeList<CommentReference> get references => _references; | 2715 NodeList<CommentReference> get references => _references; |
| 2638 | 2716 |
| 2639 /** | 2717 /** |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2650 */ | 2728 */ |
| 2651 bool get isDocumentation => identical(_type, CommentType.DOCUMENTATION); | 2729 bool get isDocumentation => identical(_type, CommentType.DOCUMENTATION); |
| 2652 | 2730 |
| 2653 /** | 2731 /** |
| 2654 * Return `true` if this is an end-of-line comment. | 2732 * Return `true` if this is an end-of-line comment. |
| 2655 * | 2733 * |
| 2656 * @return `true` if this is an end-of-line comment | 2734 * @return `true` if this is an end-of-line comment |
| 2657 */ | 2735 */ |
| 2658 bool get isEndOfLine => identical(_type, CommentType.END_OF_LINE); | 2736 bool get isEndOfLine => identical(_type, CommentType.END_OF_LINE); |
| 2659 | 2737 |
| 2738 @override |
| 2660 void visitChildren(AstVisitor visitor) { | 2739 void visitChildren(AstVisitor visitor) { |
| 2661 _references.accept(visitor); | 2740 _references.accept(visitor); |
| 2662 } | 2741 } |
| 2663 } | 2742 } |
| 2664 | 2743 |
| 2665 /** | 2744 /** |
| 2666 * The enumeration `CommentType` encodes all the different types of comments tha
t are | 2745 * The enumeration `CommentType` encodes all the different types of comments tha
t are |
| 2667 * recognized by the parser. | 2746 * recognized by the parser. |
| 2668 */ | 2747 */ |
| 2669 class CommentType extends Enum<CommentType> { | 2748 class CommentType extends Enum<CommentType> { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2710 /** | 2789 /** |
| 2711 * Initialize a newly created reference to a Dart element. | 2790 * Initialize a newly created reference to a Dart element. |
| 2712 * | 2791 * |
| 2713 * @param newKeyword the token representing the 'new' keyword | 2792 * @param newKeyword the token representing the 'new' keyword |
| 2714 * @param identifier the identifier being referenced | 2793 * @param identifier the identifier being referenced |
| 2715 */ | 2794 */ |
| 2716 CommentReference(this.newKeyword, Identifier identifier) { | 2795 CommentReference(this.newKeyword, Identifier identifier) { |
| 2717 this._identifier = becomeParentOf(identifier); | 2796 this._identifier = becomeParentOf(identifier); |
| 2718 } | 2797 } |
| 2719 | 2798 |
| 2799 @override |
| 2720 accept(AstVisitor visitor) => visitor.visitCommentReference(this); | 2800 accept(AstVisitor visitor) => visitor.visitCommentReference(this); |
| 2721 | 2801 |
| 2802 @override |
| 2722 Token get beginToken => _identifier.beginToken; | 2803 Token get beginToken => _identifier.beginToken; |
| 2723 | 2804 |
| 2805 @override |
| 2724 Token get endToken => _identifier.endToken; | 2806 Token get endToken => _identifier.endToken; |
| 2725 | 2807 |
| 2726 /** | 2808 /** |
| 2727 * Return the identifier being referenced. | 2809 * Return the identifier being referenced. |
| 2728 * | 2810 * |
| 2729 * @return the identifier being referenced | 2811 * @return the identifier being referenced |
| 2730 */ | 2812 */ |
| 2731 Identifier get identifier => _identifier; | 2813 Identifier get identifier => _identifier; |
| 2732 | 2814 |
| 2733 /** | 2815 /** |
| 2734 * Set the identifier being referenced to the given identifier. | 2816 * Set the identifier being referenced to the given identifier. |
| 2735 * | 2817 * |
| 2736 * @param identifier the identifier being referenced | 2818 * @param identifier the identifier being referenced |
| 2737 */ | 2819 */ |
| 2738 void set identifier(Identifier identifier) { | 2820 void set identifier(Identifier identifier) { |
| 2739 identifier = becomeParentOf(identifier); | 2821 identifier = becomeParentOf(identifier); |
| 2740 } | 2822 } |
| 2741 | 2823 |
| 2824 @override |
| 2742 void visitChildren(AstVisitor visitor) { | 2825 void visitChildren(AstVisitor visitor) { |
| 2743 safelyVisitChild(_identifier, visitor); | 2826 safelyVisitChild(_identifier, visitor); |
| 2744 } | 2827 } |
| 2745 } | 2828 } |
| 2746 | 2829 |
| 2747 /** | 2830 /** |
| 2748 * Instances of the class `CompilationUnit` represent a compilation unit. | 2831 * Instances of the class `CompilationUnit` represent a compilation unit. |
| 2749 * | 2832 * |
| 2750 * While the grammar restricts the order of the directives and declarations with
in a compilation | 2833 * While the grammar restricts the order of the directives and declarations with
in a compilation |
| 2751 * unit, this class does not enforce those restrictions. In particular, the chil
dren of a | 2834 * unit, this class does not enforce those restrictions. In particular, the chil
dren of a |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2817 * @param endToken the last token in the token stream | 2900 * @param endToken the last token in the token stream |
| 2818 */ | 2901 */ |
| 2819 CompilationUnit(this.beginToken, ScriptTag scriptTag, List<Directive> directiv
es, List<CompilationUnitMember> declarations, this.endToken) { | 2902 CompilationUnit(this.beginToken, ScriptTag scriptTag, List<Directive> directiv
es, List<CompilationUnitMember> declarations, this.endToken) { |
| 2820 this._directives = new NodeList<Directive>(this); | 2903 this._directives = new NodeList<Directive>(this); |
| 2821 this._declarations = new NodeList<CompilationUnitMember>(this); | 2904 this._declarations = new NodeList<CompilationUnitMember>(this); |
| 2822 this._scriptTag = becomeParentOf(scriptTag); | 2905 this._scriptTag = becomeParentOf(scriptTag); |
| 2823 this._directives.addAll(directives); | 2906 this._directives.addAll(directives); |
| 2824 this._declarations.addAll(declarations); | 2907 this._declarations.addAll(declarations); |
| 2825 } | 2908 } |
| 2826 | 2909 |
| 2910 @override |
| 2827 accept(AstVisitor visitor) => visitor.visitCompilationUnit(this); | 2911 accept(AstVisitor visitor) => visitor.visitCompilationUnit(this); |
| 2828 | 2912 |
| 2829 /** | 2913 /** |
| 2830 * Return the declarations contained in this compilation unit. | 2914 * Return the declarations contained in this compilation unit. |
| 2831 * | 2915 * |
| 2832 * @return the declarations contained in this compilation unit | 2916 * @return the declarations contained in this compilation unit |
| 2833 */ | 2917 */ |
| 2834 NodeList<CompilationUnitMember> get declarations => _declarations; | 2918 NodeList<CompilationUnitMember> get declarations => _declarations; |
| 2835 | 2919 |
| 2836 /** | 2920 /** |
| 2837 * Return the directives contained in this compilation unit. | 2921 * Return the directives contained in this compilation unit. |
| 2838 * | 2922 * |
| 2839 * @return the directives contained in this compilation unit | 2923 * @return the directives contained in this compilation unit |
| 2840 */ | 2924 */ |
| 2841 NodeList<Directive> get directives => _directives; | 2925 NodeList<Directive> get directives => _directives; |
| 2842 | 2926 |
| 2927 @override |
| 2843 int get length { | 2928 int get length { |
| 2844 Token endToken = this.endToken; | 2929 Token endToken = this.endToken; |
| 2845 if (endToken == null) { | 2930 if (endToken == null) { |
| 2846 return 0; | 2931 return 0; |
| 2847 } | 2932 } |
| 2848 return endToken.offset + endToken.length; | 2933 return endToken.offset + endToken.length; |
| 2849 } | 2934 } |
| 2850 | 2935 |
| 2936 @override |
| 2851 int get offset => 0; | 2937 int get offset => 0; |
| 2852 | 2938 |
| 2853 /** | 2939 /** |
| 2854 * Return the script tag at the beginning of the compilation unit, or `null` i
f there is no | 2940 * Return the script tag at the beginning of the compilation unit, or `null` i
f there is no |
| 2855 * script tag in this compilation unit. | 2941 * script tag in this compilation unit. |
| 2856 * | 2942 * |
| 2857 * @return the script tag at the beginning of the compilation unit | 2943 * @return the script tag at the beginning of the compilation unit |
| 2858 */ | 2944 */ |
| 2859 ScriptTag get scriptTag => _scriptTag; | 2945 ScriptTag get scriptTag => _scriptTag; |
| 2860 | 2946 |
| 2861 /** | 2947 /** |
| 2862 * Set the script tag at the beginning of the compilation unit to the given sc
ript tag. | 2948 * Set the script tag at the beginning of the compilation unit to the given sc
ript tag. |
| 2863 * | 2949 * |
| 2864 * @param scriptTag the script tag at the beginning of the compilation unit | 2950 * @param scriptTag the script tag at the beginning of the compilation unit |
| 2865 */ | 2951 */ |
| 2866 void set scriptTag(ScriptTag scriptTag) { | 2952 void set scriptTag(ScriptTag scriptTag) { |
| 2867 this._scriptTag = becomeParentOf(scriptTag); | 2953 this._scriptTag = becomeParentOf(scriptTag); |
| 2868 } | 2954 } |
| 2869 | 2955 |
| 2956 @override |
| 2870 void visitChildren(AstVisitor visitor) { | 2957 void visitChildren(AstVisitor visitor) { |
| 2871 safelyVisitChild(_scriptTag, visitor); | 2958 safelyVisitChild(_scriptTag, visitor); |
| 2872 if (_directivesAreBeforeDeclarations()) { | 2959 if (_directivesAreBeforeDeclarations()) { |
| 2873 _directives.accept(visitor); | 2960 _directives.accept(visitor); |
| 2874 _declarations.accept(visitor); | 2961 _declarations.accept(visitor); |
| 2875 } else { | 2962 } else { |
| 2876 for (AstNode child in sortedDirectivesAndDeclarations) { | 2963 for (AstNode child in sortedDirectivesAndDeclarations) { |
| 2877 child.accept(visitor); | 2964 child.accept(visitor); |
| 2878 } | 2965 } |
| 2879 } | 2966 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2978 * @param colon the token used to separate the then expression from the else e
xpression | 3065 * @param colon the token used to separate the then expression from the else e
xpression |
| 2979 * @param elseExpression the expression that is executed if the condition eval
uates to | 3066 * @param elseExpression the expression that is executed if the condition eval
uates to |
| 2980 * `false` | 3067 * `false` |
| 2981 */ | 3068 */ |
| 2982 ConditionalExpression(Expression condition, this.question, Expression thenExpr
ession, this.colon, Expression elseExpression) { | 3069 ConditionalExpression(Expression condition, this.question, Expression thenExpr
ession, this.colon, Expression elseExpression) { |
| 2983 this._condition = becomeParentOf(condition); | 3070 this._condition = becomeParentOf(condition); |
| 2984 this._thenExpression = becomeParentOf(thenExpression); | 3071 this._thenExpression = becomeParentOf(thenExpression); |
| 2985 this._elseExpression = becomeParentOf(elseExpression); | 3072 this._elseExpression = becomeParentOf(elseExpression); |
| 2986 } | 3073 } |
| 2987 | 3074 |
| 3075 @override |
| 2988 accept(AstVisitor visitor) => visitor.visitConditionalExpression(this); | 3076 accept(AstVisitor visitor) => visitor.visitConditionalExpression(this); |
| 2989 | 3077 |
| 3078 @override |
| 2990 Token get beginToken => _condition.beginToken; | 3079 Token get beginToken => _condition.beginToken; |
| 2991 | 3080 |
| 2992 /** | 3081 /** |
| 2993 * Return the condition used to determine which of the expressions is executed
next. | 3082 * Return the condition used to determine which of the expressions is executed
next. |
| 2994 * | 3083 * |
| 2995 * @return the condition used to determine which expression is executed next | 3084 * @return the condition used to determine which expression is executed next |
| 2996 */ | 3085 */ |
| 2997 Expression get condition => _condition; | 3086 Expression get condition => _condition; |
| 2998 | 3087 |
| 2999 /** | 3088 /** |
| 3000 * Return the expression that is executed if the condition evaluates to `false
`. | 3089 * Return the expression that is executed if the condition evaluates to `false
`. |
| 3001 * | 3090 * |
| 3002 * @return the expression that is executed if the condition evaluates to `fals
e` | 3091 * @return the expression that is executed if the condition evaluates to `fals
e` |
| 3003 */ | 3092 */ |
| 3004 Expression get elseExpression => _elseExpression; | 3093 Expression get elseExpression => _elseExpression; |
| 3005 | 3094 |
| 3095 @override |
| 3006 Token get endToken => _elseExpression.endToken; | 3096 Token get endToken => _elseExpression.endToken; |
| 3007 | 3097 |
| 3098 @override |
| 3008 int get precedence => 3; | 3099 int get precedence => 3; |
| 3009 | 3100 |
| 3010 /** | 3101 /** |
| 3011 * Return the expression that is executed if the condition evaluates to `true`
. | 3102 * Return the expression that is executed if the condition evaluates to `true`
. |
| 3012 * | 3103 * |
| 3013 * @return the expression that is executed if the condition evaluates to `true
` | 3104 * @return the expression that is executed if the condition evaluates to `true
` |
| 3014 */ | 3105 */ |
| 3015 Expression get thenExpression => _thenExpression; | 3106 Expression get thenExpression => _thenExpression; |
| 3016 | 3107 |
| 3017 /** | 3108 /** |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3037 /** | 3128 /** |
| 3038 * Set the expression that is executed if the condition evaluates to `true` to
the given | 3129 * Set the expression that is executed if the condition evaluates to `true` to
the given |
| 3039 * expression. | 3130 * expression. |
| 3040 * | 3131 * |
| 3041 * @param expression the expression that is executed if the condition evaluate
s to `true` | 3132 * @param expression the expression that is executed if the condition evaluate
s to `true` |
| 3042 */ | 3133 */ |
| 3043 void set thenExpression(Expression expression) { | 3134 void set thenExpression(Expression expression) { |
| 3044 _thenExpression = becomeParentOf(expression); | 3135 _thenExpression = becomeParentOf(expression); |
| 3045 } | 3136 } |
| 3046 | 3137 |
| 3138 @override |
| 3047 void visitChildren(AstVisitor visitor) { | 3139 void visitChildren(AstVisitor visitor) { |
| 3048 safelyVisitChild(_condition, visitor); | 3140 safelyVisitChild(_condition, visitor); |
| 3049 safelyVisitChild(_thenExpression, visitor); | 3141 safelyVisitChild(_thenExpression, visitor); |
| 3050 safelyVisitChild(_elseExpression, visitor); | 3142 safelyVisitChild(_elseExpression, visitor); |
| 3051 } | 3143 } |
| 3052 } | 3144 } |
| 3053 | 3145 |
| 3054 /** | 3146 /** |
| 3055 * Instances of the class `ConstructorDeclaration` represent a constructor decla
ration. | 3147 * Instances of the class `ConstructorDeclaration` represent a constructor decla
ration. |
| 3056 * | 3148 * |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3163 ConstructorDeclaration(Comment comment, List<Annotation> metadata, this.extern
alKeyword, this.constKeyword, this.factoryKeyword, Identifier returnType, this.p
eriod, SimpleIdentifier name, FormalParameterList parameters, this.separator, Li
st<ConstructorInitializer> initializers, ConstructorName redirectedConstructor,
FunctionBody body) : super(comment, metadata) { | 3255 ConstructorDeclaration(Comment comment, List<Annotation> metadata, this.extern
alKeyword, this.constKeyword, this.factoryKeyword, Identifier returnType, this.p
eriod, SimpleIdentifier name, FormalParameterList parameters, this.separator, Li
st<ConstructorInitializer> initializers, ConstructorName redirectedConstructor,
FunctionBody body) : super(comment, metadata) { |
| 3164 this._initializers = new NodeList<ConstructorInitializer>(this); | 3256 this._initializers = new NodeList<ConstructorInitializer>(this); |
| 3165 this._returnType = becomeParentOf(returnType); | 3257 this._returnType = becomeParentOf(returnType); |
| 3166 this._name = becomeParentOf(name); | 3258 this._name = becomeParentOf(name); |
| 3167 this._parameters = becomeParentOf(parameters); | 3259 this._parameters = becomeParentOf(parameters); |
| 3168 this._initializers.addAll(initializers); | 3260 this._initializers.addAll(initializers); |
| 3169 this._redirectedConstructor = becomeParentOf(redirectedConstructor); | 3261 this._redirectedConstructor = becomeParentOf(redirectedConstructor); |
| 3170 this._body = becomeParentOf(body); | 3262 this._body = becomeParentOf(body); |
| 3171 } | 3263 } |
| 3172 | 3264 |
| 3265 @override |
| 3173 accept(AstVisitor visitor) => visitor.visitConstructorDeclaration(this); | 3266 accept(AstVisitor visitor) => visitor.visitConstructorDeclaration(this); |
| 3174 | 3267 |
| 3175 /** | 3268 /** |
| 3176 * Return the body of the constructor, or `null` if the constructor does not h
ave a body. | 3269 * Return the body of the constructor, or `null` if the constructor does not h
ave a body. |
| 3177 * | 3270 * |
| 3178 * @return the body of the constructor | 3271 * @return the body of the constructor |
| 3179 */ | 3272 */ |
| 3180 FunctionBody get body => _body; | 3273 FunctionBody get body => _body; |
| 3181 | 3274 |
| 3275 @override |
| 3182 Token get endToken { | 3276 Token get endToken { |
| 3183 if (_body != null) { | 3277 if (_body != null) { |
| 3184 return _body.endToken; | 3278 return _body.endToken; |
| 3185 } else if (!_initializers.isEmpty) { | 3279 } else if (!_initializers.isEmpty) { |
| 3186 return _initializers.endToken; | 3280 return _initializers.endToken; |
| 3187 } | 3281 } |
| 3188 return _parameters.endToken; | 3282 return _parameters.endToken; |
| 3189 } | 3283 } |
| 3190 | 3284 |
| 3191 /** | 3285 /** |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3267 | 3361 |
| 3268 /** | 3362 /** |
| 3269 * Set the type of object being created to the given type name. | 3363 * Set the type of object being created to the given type name. |
| 3270 * | 3364 * |
| 3271 * @param typeName the type of object being created | 3365 * @param typeName the type of object being created |
| 3272 */ | 3366 */ |
| 3273 void set returnType(Identifier typeName) { | 3367 void set returnType(Identifier typeName) { |
| 3274 _returnType = becomeParentOf(typeName); | 3368 _returnType = becomeParentOf(typeName); |
| 3275 } | 3369 } |
| 3276 | 3370 |
| 3371 @override |
| 3277 void visitChildren(AstVisitor visitor) { | 3372 void visitChildren(AstVisitor visitor) { |
| 3278 super.visitChildren(visitor); | 3373 super.visitChildren(visitor); |
| 3279 safelyVisitChild(_returnType, visitor); | 3374 safelyVisitChild(_returnType, visitor); |
| 3280 safelyVisitChild(_name, visitor); | 3375 safelyVisitChild(_name, visitor); |
| 3281 safelyVisitChild(_parameters, visitor); | 3376 safelyVisitChild(_parameters, visitor); |
| 3282 _initializers.accept(visitor); | 3377 _initializers.accept(visitor); |
| 3283 safelyVisitChild(_redirectedConstructor, visitor); | 3378 safelyVisitChild(_redirectedConstructor, visitor); |
| 3284 safelyVisitChild(_body, visitor); | 3379 safelyVisitChild(_body, visitor); |
| 3285 } | 3380 } |
| 3286 | 3381 |
| 3382 @override |
| 3287 Token get firstTokenAfterCommentAndMetadata { | 3383 Token get firstTokenAfterCommentAndMetadata { |
| 3288 Token leftMost = _leftMost([externalKeyword, constKeyword, factoryKeyword]); | 3384 Token leftMost = _leftMost([externalKeyword, constKeyword, factoryKeyword]); |
| 3289 if (leftMost != null) { | 3385 if (leftMost != null) { |
| 3290 return leftMost; | 3386 return leftMost; |
| 3291 } | 3387 } |
| 3292 return _returnType.beginToken; | 3388 return _returnType.beginToken; |
| 3293 } | 3389 } |
| 3294 | 3390 |
| 3295 /** | 3391 /** |
| 3296 * Return the left-most of the given tokens, or `null` if there are no tokens
given or if | 3392 * Return the left-most of the given tokens, or `null` if there are no tokens
given or if |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3355 * @param period the token for the period after the 'this' keyword | 3451 * @param period the token for the period after the 'this' keyword |
| 3356 * @param fieldName the name of the field being initialized | 3452 * @param fieldName the name of the field being initialized |
| 3357 * @param equals the token for the equal sign between the field name and the e
xpression | 3453 * @param equals the token for the equal sign between the field name and the e
xpression |
| 3358 * @param expression the expression computing the value to which the field wil
l be initialized | 3454 * @param expression the expression computing the value to which the field wil
l be initialized |
| 3359 */ | 3455 */ |
| 3360 ConstructorFieldInitializer(this.keyword, this.period, SimpleIdentifier fieldN
ame, this.equals, Expression expression) { | 3456 ConstructorFieldInitializer(this.keyword, this.period, SimpleIdentifier fieldN
ame, this.equals, Expression expression) { |
| 3361 this._fieldName = becomeParentOf(fieldName); | 3457 this._fieldName = becomeParentOf(fieldName); |
| 3362 this._expression = becomeParentOf(expression); | 3458 this._expression = becomeParentOf(expression); |
| 3363 } | 3459 } |
| 3364 | 3460 |
| 3461 @override |
| 3365 accept(AstVisitor visitor) => visitor.visitConstructorFieldInitializer(this); | 3462 accept(AstVisitor visitor) => visitor.visitConstructorFieldInitializer(this); |
| 3366 | 3463 |
| 3464 @override |
| 3367 Token get beginToken { | 3465 Token get beginToken { |
| 3368 if (keyword != null) { | 3466 if (keyword != null) { |
| 3369 return keyword; | 3467 return keyword; |
| 3370 } | 3468 } |
| 3371 return _fieldName.beginToken; | 3469 return _fieldName.beginToken; |
| 3372 } | 3470 } |
| 3373 | 3471 |
| 3472 @override |
| 3374 Token get endToken => _expression.endToken; | 3473 Token get endToken => _expression.endToken; |
| 3375 | 3474 |
| 3376 /** | 3475 /** |
| 3377 * Return the expression computing the value to which the field will be initia
lized. | 3476 * Return the expression computing the value to which the field will be initia
lized. |
| 3378 * | 3477 * |
| 3379 * @return the expression computing the value to which the field will be initi
alized | 3478 * @return the expression computing the value to which the field will be initi
alized |
| 3380 */ | 3479 */ |
| 3381 Expression get expression => _expression; | 3480 Expression get expression => _expression; |
| 3382 | 3481 |
| 3383 /** | 3482 /** |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3399 | 3498 |
| 3400 /** | 3499 /** |
| 3401 * Set the name of the field being initialized to the given identifier. | 3500 * Set the name of the field being initialized to the given identifier. |
| 3402 * | 3501 * |
| 3403 * @param identifier the name of the field being initialized | 3502 * @param identifier the name of the field being initialized |
| 3404 */ | 3503 */ |
| 3405 void set fieldName(SimpleIdentifier identifier) { | 3504 void set fieldName(SimpleIdentifier identifier) { |
| 3406 _fieldName = becomeParentOf(identifier); | 3505 _fieldName = becomeParentOf(identifier); |
| 3407 } | 3506 } |
| 3408 | 3507 |
| 3508 @override |
| 3409 void visitChildren(AstVisitor visitor) { | 3509 void visitChildren(AstVisitor visitor) { |
| 3410 safelyVisitChild(_fieldName, visitor); | 3510 safelyVisitChild(_fieldName, visitor); |
| 3411 safelyVisitChild(_expression, visitor); | 3511 safelyVisitChild(_expression, visitor); |
| 3412 } | 3512 } |
| 3413 } | 3513 } |
| 3414 | 3514 |
| 3415 /** | 3515 /** |
| 3416 * Instances of the class `ConstructorInitializer` defines the behavior of nodes
that can | 3516 * Instances of the class `ConstructorInitializer` defines the behavior of nodes
that can |
| 3417 * occur in the initializer list of a constructor declaration. | 3517 * occur in the initializer list of a constructor declaration. |
| 3418 * | 3518 * |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3463 * | 3563 * |
| 3464 * @param type the name of the type defining the constructor | 3564 * @param type the name of the type defining the constructor |
| 3465 * @param period the token for the period before the constructor name | 3565 * @param period the token for the period before the constructor name |
| 3466 * @param name the name of the constructor | 3566 * @param name the name of the constructor |
| 3467 */ | 3567 */ |
| 3468 ConstructorName(TypeName type, this.period, SimpleIdentifier name) { | 3568 ConstructorName(TypeName type, this.period, SimpleIdentifier name) { |
| 3469 this._type = becomeParentOf(type); | 3569 this._type = becomeParentOf(type); |
| 3470 this._name = becomeParentOf(name); | 3570 this._name = becomeParentOf(name); |
| 3471 } | 3571 } |
| 3472 | 3572 |
| 3573 @override |
| 3473 accept(AstVisitor visitor) => visitor.visitConstructorName(this); | 3574 accept(AstVisitor visitor) => visitor.visitConstructorName(this); |
| 3474 | 3575 |
| 3576 @override |
| 3475 Token get beginToken => _type.beginToken; | 3577 Token get beginToken => _type.beginToken; |
| 3476 | 3578 |
| 3579 @override |
| 3477 Token get endToken { | 3580 Token get endToken { |
| 3478 if (_name != null) { | 3581 if (_name != null) { |
| 3479 return _name.endToken; | 3582 return _name.endToken; |
| 3480 } | 3583 } |
| 3481 return _type.endToken; | 3584 return _type.endToken; |
| 3482 } | 3585 } |
| 3483 | 3586 |
| 3484 /** | 3587 /** |
| 3485 * Return the name of the constructor, or `null` if the specified constructor
is the unnamed | 3588 * Return the name of the constructor, or `null` if the specified constructor
is the unnamed |
| 3486 * constructor. | 3589 * constructor. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3526 | 3629 |
| 3527 /** | 3630 /** |
| 3528 * Set the name of the type defining the constructor to the given type name. | 3631 * Set the name of the type defining the constructor to the given type name. |
| 3529 * | 3632 * |
| 3530 * @param type the name of the type defining the constructor | 3633 * @param type the name of the type defining the constructor |
| 3531 */ | 3634 */ |
| 3532 void set type(TypeName type) { | 3635 void set type(TypeName type) { |
| 3533 this._type = becomeParentOf(type); | 3636 this._type = becomeParentOf(type); |
| 3534 } | 3637 } |
| 3535 | 3638 |
| 3639 @override |
| 3536 void visitChildren(AstVisitor visitor) { | 3640 void visitChildren(AstVisitor visitor) { |
| 3537 safelyVisitChild(_type, visitor); | 3641 safelyVisitChild(_type, visitor); |
| 3538 safelyVisitChild(_name, visitor); | 3642 safelyVisitChild(_name, visitor); |
| 3539 } | 3643 } |
| 3540 } | 3644 } |
| 3541 | 3645 |
| 3542 /** | 3646 /** |
| 3543 * Instances of the class `ContinueStatement` represent a continue statement. | 3647 * Instances of the class `ContinueStatement` represent a continue statement. |
| 3544 * | 3648 * |
| 3545 * <pre> | 3649 * <pre> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 3567 * Initialize a newly created continue statement. | 3671 * Initialize a newly created continue statement. |
| 3568 * | 3672 * |
| 3569 * @param keyword the token representing the 'continue' keyword | 3673 * @param keyword the token representing the 'continue' keyword |
| 3570 * @param label the label associated with the statement | 3674 * @param label the label associated with the statement |
| 3571 * @param semicolon the semicolon terminating the statement | 3675 * @param semicolon the semicolon terminating the statement |
| 3572 */ | 3676 */ |
| 3573 ContinueStatement(this.keyword, SimpleIdentifier label, this.semicolon) { | 3677 ContinueStatement(this.keyword, SimpleIdentifier label, this.semicolon) { |
| 3574 this._label = becomeParentOf(label); | 3678 this._label = becomeParentOf(label); |
| 3575 } | 3679 } |
| 3576 | 3680 |
| 3681 @override |
| 3577 accept(AstVisitor visitor) => visitor.visitContinueStatement(this); | 3682 accept(AstVisitor visitor) => visitor.visitContinueStatement(this); |
| 3578 | 3683 |
| 3684 @override |
| 3579 Token get beginToken => keyword; | 3685 Token get beginToken => keyword; |
| 3580 | 3686 |
| 3687 @override |
| 3581 Token get endToken => semicolon; | 3688 Token get endToken => semicolon; |
| 3582 | 3689 |
| 3583 /** | 3690 /** |
| 3584 * Return the label associated with the statement, or `null` if there is no la
bel. | 3691 * Return the label associated with the statement, or `null` if there is no la
bel. |
| 3585 * | 3692 * |
| 3586 * @return the label associated with the statement | 3693 * @return the label associated with the statement |
| 3587 */ | 3694 */ |
| 3588 SimpleIdentifier get label => _label; | 3695 SimpleIdentifier get label => _label; |
| 3589 | 3696 |
| 3590 /** | 3697 /** |
| 3591 * Set the label associated with the statement to the given label. | 3698 * Set the label associated with the statement to the given label. |
| 3592 * | 3699 * |
| 3593 * @param identifier the label associated with the statement | 3700 * @param identifier the label associated with the statement |
| 3594 */ | 3701 */ |
| 3595 void set label(SimpleIdentifier identifier) { | 3702 void set label(SimpleIdentifier identifier) { |
| 3596 _label = becomeParentOf(identifier); | 3703 _label = becomeParentOf(identifier); |
| 3597 } | 3704 } |
| 3598 | 3705 |
| 3706 @override |
| 3599 void visitChildren(AstVisitor visitor) { | 3707 void visitChildren(AstVisitor visitor) { |
| 3600 safelyVisitChild(_label, visitor); | 3708 safelyVisitChild(_label, visitor); |
| 3601 } | 3709 } |
| 3602 } | 3710 } |
| 3603 | 3711 |
| 3604 /** | 3712 /** |
| 3605 * The abstract class `Declaration` defines the behavior common to nodes that re
present the | 3713 * The abstract class `Declaration` defines the behavior common to nodes that re
present the |
| 3606 * declaration of a name. Each declared name is visible within a name scope. | 3714 * declaration of a name. Each declared name is visible within a name scope. |
| 3607 */ | 3715 */ |
| 3608 abstract class Declaration extends AnnotatedNode { | 3716 abstract class Declaration extends AnnotatedNode { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3657 * @param metadata the annotations associated with this parameter | 3765 * @param metadata the annotations associated with this parameter |
| 3658 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword | 3766 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword |
| 3659 * @param type the name of the declared type of the parameter | 3767 * @param type the name of the declared type of the parameter |
| 3660 * @param identifier the name of the parameter being declared | 3768 * @param identifier the name of the parameter being declared |
| 3661 */ | 3769 */ |
| 3662 DeclaredIdentifier(Comment comment, List<Annotation> metadata, this.keyword, T
ypeName type, SimpleIdentifier identifier) : super(comment, metadata) { | 3770 DeclaredIdentifier(Comment comment, List<Annotation> metadata, this.keyword, T
ypeName type, SimpleIdentifier identifier) : super(comment, metadata) { |
| 3663 this._type = becomeParentOf(type); | 3771 this._type = becomeParentOf(type); |
| 3664 this._identifier = becomeParentOf(identifier); | 3772 this._identifier = becomeParentOf(identifier); |
| 3665 } | 3773 } |
| 3666 | 3774 |
| 3775 @override |
| 3667 accept(AstVisitor visitor) => visitor.visitDeclaredIdentifier(this); | 3776 accept(AstVisitor visitor) => visitor.visitDeclaredIdentifier(this); |
| 3668 | 3777 |
| 3778 @override |
| 3669 LocalVariableElement get element { | 3779 LocalVariableElement get element { |
| 3670 SimpleIdentifier identifier = this.identifier; | 3780 SimpleIdentifier identifier = this.identifier; |
| 3671 if (identifier == null) { | 3781 if (identifier == null) { |
| 3672 return null; | 3782 return null; |
| 3673 } | 3783 } |
| 3674 return identifier.staticElement as LocalVariableElement; | 3784 return identifier.staticElement as LocalVariableElement; |
| 3675 } | 3785 } |
| 3676 | 3786 |
| 3787 @override |
| 3677 Token get endToken => _identifier.endToken; | 3788 Token get endToken => _identifier.endToken; |
| 3678 | 3789 |
| 3679 /** | 3790 /** |
| 3680 * Return the name of the variable being declared. | 3791 * Return the name of the variable being declared. |
| 3681 * | 3792 * |
| 3682 * @return the name of the variable being declared | 3793 * @return the name of the variable being declared |
| 3683 */ | 3794 */ |
| 3684 SimpleIdentifier get identifier => _identifier; | 3795 SimpleIdentifier get identifier => _identifier; |
| 3685 | 3796 |
| 3686 /** | 3797 /** |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3709 | 3820 |
| 3710 /** | 3821 /** |
| 3711 * Set the name of the declared type of the parameter to the given type name. | 3822 * Set the name of the declared type of the parameter to the given type name. |
| 3712 * | 3823 * |
| 3713 * @param typeName the name of the declared type of the parameter | 3824 * @param typeName the name of the declared type of the parameter |
| 3714 */ | 3825 */ |
| 3715 void set type(TypeName typeName) { | 3826 void set type(TypeName typeName) { |
| 3716 _type = becomeParentOf(typeName); | 3827 _type = becomeParentOf(typeName); |
| 3717 } | 3828 } |
| 3718 | 3829 |
| 3830 @override |
| 3719 void visitChildren(AstVisitor visitor) { | 3831 void visitChildren(AstVisitor visitor) { |
| 3720 super.visitChildren(visitor); | 3832 super.visitChildren(visitor); |
| 3721 safelyVisitChild(_type, visitor); | 3833 safelyVisitChild(_type, visitor); |
| 3722 safelyVisitChild(_identifier, visitor); | 3834 safelyVisitChild(_identifier, visitor); |
| 3723 } | 3835 } |
| 3724 | 3836 |
| 3837 @override |
| 3725 Token get firstTokenAfterCommentAndMetadata { | 3838 Token get firstTokenAfterCommentAndMetadata { |
| 3726 if (keyword != null) { | 3839 if (keyword != null) { |
| 3727 return keyword; | 3840 return keyword; |
| 3728 } else if (_type != null) { | 3841 } else if (_type != null) { |
| 3729 return _type.beginToken; | 3842 return _type.beginToken; |
| 3730 } | 3843 } |
| 3731 return _identifier.beginToken; | 3844 return _identifier.beginToken; |
| 3732 } | 3845 } |
| 3733 } | 3846 } |
| 3734 | 3847 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3774 * @param parameter the formal parameter with which the default value is assoc
iated | 3887 * @param parameter the formal parameter with which the default value is assoc
iated |
| 3775 * @param kind the kind of this parameter | 3888 * @param kind the kind of this parameter |
| 3776 * @param separator the token separating the parameter from the default value | 3889 * @param separator the token separating the parameter from the default value |
| 3777 * @param defaultValue the expression computing the default value for the para
meter | 3890 * @param defaultValue the expression computing the default value for the para
meter |
| 3778 */ | 3891 */ |
| 3779 DefaultFormalParameter(NormalFormalParameter parameter, this.kind, this.separa
tor, Expression defaultValue) { | 3892 DefaultFormalParameter(NormalFormalParameter parameter, this.kind, this.separa
tor, Expression defaultValue) { |
| 3780 this._parameter = becomeParentOf(parameter); | 3893 this._parameter = becomeParentOf(parameter); |
| 3781 this._defaultValue = becomeParentOf(defaultValue); | 3894 this._defaultValue = becomeParentOf(defaultValue); |
| 3782 } | 3895 } |
| 3783 | 3896 |
| 3897 @override |
| 3784 accept(AstVisitor visitor) => visitor.visitDefaultFormalParameter(this); | 3898 accept(AstVisitor visitor) => visitor.visitDefaultFormalParameter(this); |
| 3785 | 3899 |
| 3900 @override |
| 3786 Token get beginToken => _parameter.beginToken; | 3901 Token get beginToken => _parameter.beginToken; |
| 3787 | 3902 |
| 3788 /** | 3903 /** |
| 3789 * Return the expression computing the default value for the parameter, or `nu
ll` if there | 3904 * Return the expression computing the default value for the parameter, or `nu
ll` if there |
| 3790 * is no default value. | 3905 * is no default value. |
| 3791 * | 3906 * |
| 3792 * @return the expression computing the default value for the parameter | 3907 * @return the expression computing the default value for the parameter |
| 3793 */ | 3908 */ |
| 3794 Expression get defaultValue => _defaultValue; | 3909 Expression get defaultValue => _defaultValue; |
| 3795 | 3910 |
| 3911 @override |
| 3796 Token get endToken { | 3912 Token get endToken { |
| 3797 if (_defaultValue != null) { | 3913 if (_defaultValue != null) { |
| 3798 return _defaultValue.endToken; | 3914 return _defaultValue.endToken; |
| 3799 } | 3915 } |
| 3800 return _parameter.endToken; | 3916 return _parameter.endToken; |
| 3801 } | 3917 } |
| 3802 | 3918 |
| 3919 @override |
| 3803 SimpleIdentifier get identifier => _parameter.identifier; | 3920 SimpleIdentifier get identifier => _parameter.identifier; |
| 3804 | 3921 |
| 3805 /** | 3922 /** |
| 3806 * Return the formal parameter with which the default value is associated. | 3923 * Return the formal parameter with which the default value is associated. |
| 3807 * | 3924 * |
| 3808 * @return the formal parameter with which the default value is associated | 3925 * @return the formal parameter with which the default value is associated |
| 3809 */ | 3926 */ |
| 3810 NormalFormalParameter get parameter => _parameter; | 3927 NormalFormalParameter get parameter => _parameter; |
| 3811 | 3928 |
| 3929 @override |
| 3812 bool get isConst => _parameter != null && _parameter.isConst; | 3930 bool get isConst => _parameter != null && _parameter.isConst; |
| 3813 | 3931 |
| 3932 @override |
| 3814 bool get isFinal => _parameter != null && _parameter.isFinal; | 3933 bool get isFinal => _parameter != null && _parameter.isFinal; |
| 3815 | 3934 |
| 3816 /** | 3935 /** |
| 3817 * Set the expression computing the default value for the parameter to the giv
en expression. | 3936 * Set the expression computing the default value for the parameter to the giv
en expression. |
| 3818 * | 3937 * |
| 3819 * @param expression the expression computing the default value for the parame
ter | 3938 * @param expression the expression computing the default value for the parame
ter |
| 3820 */ | 3939 */ |
| 3821 void set defaultValue(Expression expression) { | 3940 void set defaultValue(Expression expression) { |
| 3822 _defaultValue = becomeParentOf(expression); | 3941 _defaultValue = becomeParentOf(expression); |
| 3823 } | 3942 } |
| 3824 | 3943 |
| 3825 /** | 3944 /** |
| 3826 * Set the formal parameter with which the default value is associated to the
given parameter. | 3945 * Set the formal parameter with which the default value is associated to the
given parameter. |
| 3827 * | 3946 * |
| 3828 * @param formalParameter the formal parameter with which the default value is
associated | 3947 * @param formalParameter the formal parameter with which the default value is
associated |
| 3829 */ | 3948 */ |
| 3830 void set parameter(NormalFormalParameter formalParameter) { | 3949 void set parameter(NormalFormalParameter formalParameter) { |
| 3831 _parameter = becomeParentOf(formalParameter); | 3950 _parameter = becomeParentOf(formalParameter); |
| 3832 } | 3951 } |
| 3833 | 3952 |
| 3953 @override |
| 3834 void visitChildren(AstVisitor visitor) { | 3954 void visitChildren(AstVisitor visitor) { |
| 3835 safelyVisitChild(_parameter, visitor); | 3955 safelyVisitChild(_parameter, visitor); |
| 3836 safelyVisitChild(_defaultValue, visitor); | 3956 safelyVisitChild(_defaultValue, visitor); |
| 3837 } | 3957 } |
| 3838 } | 3958 } |
| 3839 | 3959 |
| 3840 /** | 3960 /** |
| 3841 * The abstract class `Directive` defines the behavior common to nodes that repr
esent a | 3961 * The abstract class `Directive` defines the behavior common to nodes that repr
esent a |
| 3842 * directive. | 3962 * directive. |
| 3843 * | 3963 * |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3947 * @param rightParenthesis the right parenthesis | 4067 * @param rightParenthesis the right parenthesis |
| 3948 * @param semicolon the semicolon terminating the statement | 4068 * @param semicolon the semicolon terminating the statement |
| 3949 */ | 4069 */ |
| 3950 DoStatement(this.doKeyword, Statement body, this.whileKeyword, Token leftParen
thesis, Expression condition, Token rightParenthesis, this.semicolon) { | 4070 DoStatement(this.doKeyword, Statement body, this.whileKeyword, Token leftParen
thesis, Expression condition, Token rightParenthesis, this.semicolon) { |
| 3951 this._body = becomeParentOf(body); | 4071 this._body = becomeParentOf(body); |
| 3952 this._leftParenthesis = leftParenthesis; | 4072 this._leftParenthesis = leftParenthesis; |
| 3953 this._condition = becomeParentOf(condition); | 4073 this._condition = becomeParentOf(condition); |
| 3954 this._rightParenthesis = rightParenthesis; | 4074 this._rightParenthesis = rightParenthesis; |
| 3955 } | 4075 } |
| 3956 | 4076 |
| 4077 @override |
| 3957 accept(AstVisitor visitor) => visitor.visitDoStatement(this); | 4078 accept(AstVisitor visitor) => visitor.visitDoStatement(this); |
| 3958 | 4079 |
| 4080 @override |
| 3959 Token get beginToken => doKeyword; | 4081 Token get beginToken => doKeyword; |
| 3960 | 4082 |
| 3961 /** | 4083 /** |
| 3962 * Return the body of the loop. | 4084 * Return the body of the loop. |
| 3963 * | 4085 * |
| 3964 * @return the body of the loop | 4086 * @return the body of the loop |
| 3965 */ | 4087 */ |
| 3966 Statement get body => _body; | 4088 Statement get body => _body; |
| 3967 | 4089 |
| 3968 /** | 4090 /** |
| 3969 * Return the condition that determines when the loop will terminate. | 4091 * Return the condition that determines when the loop will terminate. |
| 3970 * | 4092 * |
| 3971 * @return the condition that determines when the loop will terminate | 4093 * @return the condition that determines when the loop will terminate |
| 3972 */ | 4094 */ |
| 3973 Expression get condition => _condition; | 4095 Expression get condition => _condition; |
| 3974 | 4096 |
| 4097 @override |
| 3975 Token get endToken => semicolon; | 4098 Token get endToken => semicolon; |
| 3976 | 4099 |
| 3977 /** | 4100 /** |
| 3978 * Return the left parenthesis. | 4101 * Return the left parenthesis. |
| 3979 * | 4102 * |
| 3980 * @return the left parenthesis | 4103 * @return the left parenthesis |
| 3981 */ | 4104 */ |
| 3982 Token get leftParenthesis => _leftParenthesis; | 4105 Token get leftParenthesis => _leftParenthesis; |
| 3983 | 4106 |
| 3984 /** | 4107 /** |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4017 | 4140 |
| 4018 /** | 4141 /** |
| 4019 * Set the right parenthesis to the given token. | 4142 * Set the right parenthesis to the given token. |
| 4020 * | 4143 * |
| 4021 * @param parenthesis the right parenthesis | 4144 * @param parenthesis the right parenthesis |
| 4022 */ | 4145 */ |
| 4023 void set rightParenthesis(Token parenthesis) { | 4146 void set rightParenthesis(Token parenthesis) { |
| 4024 _rightParenthesis = parenthesis; | 4147 _rightParenthesis = parenthesis; |
| 4025 } | 4148 } |
| 4026 | 4149 |
| 4150 @override |
| 4027 void visitChildren(AstVisitor visitor) { | 4151 void visitChildren(AstVisitor visitor) { |
| 4028 safelyVisitChild(_body, visitor); | 4152 safelyVisitChild(_body, visitor); |
| 4029 safelyVisitChild(_condition, visitor); | 4153 safelyVisitChild(_condition, visitor); |
| 4030 } | 4154 } |
| 4031 } | 4155 } |
| 4032 | 4156 |
| 4033 /** | 4157 /** |
| 4034 * Instances of the class `DoubleLiteral` represent a floating point literal exp
ression. | 4158 * Instances of the class `DoubleLiteral` represent a floating point literal exp
ression. |
| 4035 * | 4159 * |
| 4036 * <pre> | 4160 * <pre> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 4054 double value = 0.0; | 4178 double value = 0.0; |
| 4055 | 4179 |
| 4056 /** | 4180 /** |
| 4057 * Initialize a newly created floating point literal. | 4181 * Initialize a newly created floating point literal. |
| 4058 * | 4182 * |
| 4059 * @param literal the token representing the literal | 4183 * @param literal the token representing the literal |
| 4060 * @param value the value of the literal | 4184 * @param value the value of the literal |
| 4061 */ | 4185 */ |
| 4062 DoubleLiteral(this.literal, this.value); | 4186 DoubleLiteral(this.literal, this.value); |
| 4063 | 4187 |
| 4188 @override |
| 4064 accept(AstVisitor visitor) => visitor.visitDoubleLiteral(this); | 4189 accept(AstVisitor visitor) => visitor.visitDoubleLiteral(this); |
| 4065 | 4190 |
| 4191 @override |
| 4066 Token get beginToken => literal; | 4192 Token get beginToken => literal; |
| 4067 | 4193 |
| 4194 @override |
| 4068 Token get endToken => literal; | 4195 Token get endToken => literal; |
| 4069 | 4196 |
| 4197 @override |
| 4070 void visitChildren(AstVisitor visitor) { | 4198 void visitChildren(AstVisitor visitor) { |
| 4071 } | 4199 } |
| 4072 } | 4200 } |
| 4073 | 4201 |
| 4074 /** | 4202 /** |
| 4075 * Instances of the class `EmptyFunctionBody` represent an empty function body,
which can only | 4203 * Instances of the class `EmptyFunctionBody` represent an empty function body,
which can only |
| 4076 * appear in constructors or abstract methods. | 4204 * appear in constructors or abstract methods. |
| 4077 * | 4205 * |
| 4078 * <pre> | 4206 * <pre> |
| 4079 * emptyFunctionBody ::= | 4207 * emptyFunctionBody ::= |
| 4080 * ';' | 4208 * ';' |
| 4081 * </pre> | 4209 * </pre> |
| 4082 */ | 4210 */ |
| 4083 class EmptyFunctionBody extends FunctionBody { | 4211 class EmptyFunctionBody extends FunctionBody { |
| 4084 /** | 4212 /** |
| 4085 * The token representing the semicolon that marks the end of the function bod
y. | 4213 * The token representing the semicolon that marks the end of the function bod
y. |
| 4086 */ | 4214 */ |
| 4087 Token semicolon; | 4215 Token semicolon; |
| 4088 | 4216 |
| 4089 /** | 4217 /** |
| 4090 * Initialize a newly created function body. | 4218 * Initialize a newly created function body. |
| 4091 * | 4219 * |
| 4092 * @param semicolon the token representing the semicolon that marks the end of
the function body | 4220 * @param semicolon the token representing the semicolon that marks the end of
the function body |
| 4093 */ | 4221 */ |
| 4094 EmptyFunctionBody(this.semicolon); | 4222 EmptyFunctionBody(this.semicolon); |
| 4095 | 4223 |
| 4224 @override |
| 4096 accept(AstVisitor visitor) => visitor.visitEmptyFunctionBody(this); | 4225 accept(AstVisitor visitor) => visitor.visitEmptyFunctionBody(this); |
| 4097 | 4226 |
| 4227 @override |
| 4098 Token get beginToken => semicolon; | 4228 Token get beginToken => semicolon; |
| 4099 | 4229 |
| 4230 @override |
| 4100 Token get endToken => semicolon; | 4231 Token get endToken => semicolon; |
| 4101 | 4232 |
| 4233 @override |
| 4102 void visitChildren(AstVisitor visitor) { | 4234 void visitChildren(AstVisitor visitor) { |
| 4103 } | 4235 } |
| 4104 } | 4236 } |
| 4105 | 4237 |
| 4106 /** | 4238 /** |
| 4107 * Instances of the class `EmptyStatement` represent an empty statement. | 4239 * Instances of the class `EmptyStatement` represent an empty statement. |
| 4108 * | 4240 * |
| 4109 * <pre> | 4241 * <pre> |
| 4110 * emptyStatement ::= | 4242 * emptyStatement ::= |
| 4111 * ';' | 4243 * ';' |
| 4112 * </pre> | 4244 * </pre> |
| 4113 */ | 4245 */ |
| 4114 class EmptyStatement extends Statement { | 4246 class EmptyStatement extends Statement { |
| 4115 /** | 4247 /** |
| 4116 * The semicolon terminating the statement. | 4248 * The semicolon terminating the statement. |
| 4117 */ | 4249 */ |
| 4118 Token semicolon; | 4250 Token semicolon; |
| 4119 | 4251 |
| 4120 /** | 4252 /** |
| 4121 * Initialize a newly created empty statement. | 4253 * Initialize a newly created empty statement. |
| 4122 * | 4254 * |
| 4123 * @param semicolon the semicolon terminating the statement | 4255 * @param semicolon the semicolon terminating the statement |
| 4124 */ | 4256 */ |
| 4125 EmptyStatement(this.semicolon); | 4257 EmptyStatement(this.semicolon); |
| 4126 | 4258 |
| 4259 @override |
| 4127 accept(AstVisitor visitor) => visitor.visitEmptyStatement(this); | 4260 accept(AstVisitor visitor) => visitor.visitEmptyStatement(this); |
| 4128 | 4261 |
| 4262 @override |
| 4129 Token get beginToken => semicolon; | 4263 Token get beginToken => semicolon; |
| 4130 | 4264 |
| 4265 @override |
| 4131 Token get endToken => semicolon; | 4266 Token get endToken => semicolon; |
| 4132 | 4267 |
| 4268 @override |
| 4133 void visitChildren(AstVisitor visitor) { | 4269 void visitChildren(AstVisitor visitor) { |
| 4134 } | 4270 } |
| 4135 } | 4271 } |
| 4136 | 4272 |
| 4137 /** | 4273 /** |
| 4138 * Ephemeral identifiers are created as needed to mimic the presence of an empty
identifier. | 4274 * Ephemeral identifiers are created as needed to mimic the presence of an empty
identifier. |
| 4139 */ | 4275 */ |
| 4140 class EphemeralIdentifier extends SimpleIdentifier { | 4276 class EphemeralIdentifier extends SimpleIdentifier { |
| 4141 EphemeralIdentifier(AstNode parent, int location) : super(new StringToken(Toke
nType.IDENTIFIER, "", location)) { | 4277 EphemeralIdentifier(AstNode parent, int location) : super(new StringToken(Toke
nType.IDENTIFIER, "", location)) { |
| 4142 parent.becomeParentOf(this); | 4278 parent.becomeParentOf(this); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4157 * | 4293 * |
| 4158 * @param comment the documentation comment associated with this directive | 4294 * @param comment the documentation comment associated with this directive |
| 4159 * @param metadata the annotations associated with the directive | 4295 * @param metadata the annotations associated with the directive |
| 4160 * @param keyword the token representing the 'export' keyword | 4296 * @param keyword the token representing the 'export' keyword |
| 4161 * @param libraryUri the URI of the library being exported | 4297 * @param libraryUri the URI of the library being exported |
| 4162 * @param combinators the combinators used to control which names are exported | 4298 * @param combinators the combinators used to control which names are exported |
| 4163 * @param semicolon the semicolon terminating the directive | 4299 * @param semicolon the semicolon terminating the directive |
| 4164 */ | 4300 */ |
| 4165 ExportDirective(Comment comment, List<Annotation> metadata, Token keyword, Str
ingLiteral libraryUri, List<Combinator> combinators, Token semicolon) : super(co
mment, metadata, keyword, libraryUri, combinators, semicolon); | 4301 ExportDirective(Comment comment, List<Annotation> metadata, Token keyword, Str
ingLiteral libraryUri, List<Combinator> combinators, Token semicolon) : super(co
mment, metadata, keyword, libraryUri, combinators, semicolon); |
| 4166 | 4302 |
| 4303 @override |
| 4167 accept(AstVisitor visitor) => visitor.visitExportDirective(this); | 4304 accept(AstVisitor visitor) => visitor.visitExportDirective(this); |
| 4168 | 4305 |
| 4306 @override |
| 4169 ExportElement get element => super.element as ExportElement; | 4307 ExportElement get element => super.element as ExportElement; |
| 4170 | 4308 |
| 4309 @override |
| 4171 LibraryElement get uriElement { | 4310 LibraryElement get uriElement { |
| 4172 ExportElement exportElement = element; | 4311 ExportElement exportElement = element; |
| 4173 if (exportElement != null) { | 4312 if (exportElement != null) { |
| 4174 return exportElement.exportedLibrary; | 4313 return exportElement.exportedLibrary; |
| 4175 } | 4314 } |
| 4176 return null; | 4315 return null; |
| 4177 } | 4316 } |
| 4178 | 4317 |
| 4318 @override |
| 4179 void visitChildren(AstVisitor visitor) { | 4319 void visitChildren(AstVisitor visitor) { |
| 4180 super.visitChildren(visitor); | 4320 super.visitChildren(visitor); |
| 4181 combinators.accept(visitor); | 4321 combinators.accept(visitor); |
| 4182 } | 4322 } |
| 4183 } | 4323 } |
| 4184 | 4324 |
| 4185 /** | 4325 /** |
| 4186 * Instances of the class `Expression` defines the behavior common to nodes that
represent an | 4326 * Instances of the class `Expression` defines the behavior common to nodes that
represent an |
| 4187 * expression. | 4327 * expression. |
| 4188 * | 4328 * |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4369 * | 4509 * |
| 4370 * @param functionDefinition the token introducing the expression that represe
nts the body of the | 4510 * @param functionDefinition the token introducing the expression that represe
nts the body of the |
| 4371 * function | 4511 * function |
| 4372 * @param expression the expression representing the body of the function | 4512 * @param expression the expression representing the body of the function |
| 4373 * @param semicolon the semicolon terminating the statement | 4513 * @param semicolon the semicolon terminating the statement |
| 4374 */ | 4514 */ |
| 4375 ExpressionFunctionBody(this.functionDefinition, Expression expression, this.se
micolon) { | 4515 ExpressionFunctionBody(this.functionDefinition, Expression expression, this.se
micolon) { |
| 4376 this._expression = becomeParentOf(expression); | 4516 this._expression = becomeParentOf(expression); |
| 4377 } | 4517 } |
| 4378 | 4518 |
| 4519 @override |
| 4379 accept(AstVisitor visitor) => visitor.visitExpressionFunctionBody(this); | 4520 accept(AstVisitor visitor) => visitor.visitExpressionFunctionBody(this); |
| 4380 | 4521 |
| 4522 @override |
| 4381 Token get beginToken => functionDefinition; | 4523 Token get beginToken => functionDefinition; |
| 4382 | 4524 |
| 4525 @override |
| 4383 Token get endToken { | 4526 Token get endToken { |
| 4384 if (semicolon != null) { | 4527 if (semicolon != null) { |
| 4385 return semicolon; | 4528 return semicolon; |
| 4386 } | 4529 } |
| 4387 return _expression.endToken; | 4530 return _expression.endToken; |
| 4388 } | 4531 } |
| 4389 | 4532 |
| 4390 /** | 4533 /** |
| 4391 * Return the expression representing the body of the function. | 4534 * Return the expression representing the body of the function. |
| 4392 * | 4535 * |
| 4393 * @return the expression representing the body of the function | 4536 * @return the expression representing the body of the function |
| 4394 */ | 4537 */ |
| 4395 Expression get expression => _expression; | 4538 Expression get expression => _expression; |
| 4396 | 4539 |
| 4397 /** | 4540 /** |
| 4398 * Set the expression representing the body of the function to the given expre
ssion. | 4541 * Set the expression representing the body of the function to the given expre
ssion. |
| 4399 * | 4542 * |
| 4400 * @param expression the expression representing the body of the function | 4543 * @param expression the expression representing the body of the function |
| 4401 */ | 4544 */ |
| 4402 void set expression(Expression expression) { | 4545 void set expression(Expression expression) { |
| 4403 this._expression = becomeParentOf(expression); | 4546 this._expression = becomeParentOf(expression); |
| 4404 } | 4547 } |
| 4405 | 4548 |
| 4549 @override |
| 4406 void visitChildren(AstVisitor visitor) { | 4550 void visitChildren(AstVisitor visitor) { |
| 4407 safelyVisitChild(_expression, visitor); | 4551 safelyVisitChild(_expression, visitor); |
| 4408 } | 4552 } |
| 4409 } | 4553 } |
| 4410 | 4554 |
| 4411 /** | 4555 /** |
| 4412 * Instances of the class `ExpressionStatement` wrap an expression as a statemen
t. | 4556 * Instances of the class `ExpressionStatement` wrap an expression as a statemen
t. |
| 4413 * | 4557 * |
| 4414 * <pre> | 4558 * <pre> |
| 4415 * expressionStatement ::= | 4559 * expressionStatement ::= |
| (...skipping 15 matching lines...) Expand all Loading... |
| 4431 /** | 4575 /** |
| 4432 * Initialize a newly created expression statement. | 4576 * Initialize a newly created expression statement. |
| 4433 * | 4577 * |
| 4434 * @param expression the expression that comprises the statement | 4578 * @param expression the expression that comprises the statement |
| 4435 * @param semicolon the semicolon terminating the statement | 4579 * @param semicolon the semicolon terminating the statement |
| 4436 */ | 4580 */ |
| 4437 ExpressionStatement(Expression expression, this.semicolon) { | 4581 ExpressionStatement(Expression expression, this.semicolon) { |
| 4438 this._expression = becomeParentOf(expression); | 4582 this._expression = becomeParentOf(expression); |
| 4439 } | 4583 } |
| 4440 | 4584 |
| 4585 @override |
| 4441 accept(AstVisitor visitor) => visitor.visitExpressionStatement(this); | 4586 accept(AstVisitor visitor) => visitor.visitExpressionStatement(this); |
| 4442 | 4587 |
| 4588 @override |
| 4443 Token get beginToken => _expression.beginToken; | 4589 Token get beginToken => _expression.beginToken; |
| 4444 | 4590 |
| 4591 @override |
| 4445 Token get endToken { | 4592 Token get endToken { |
| 4446 if (semicolon != null) { | 4593 if (semicolon != null) { |
| 4447 return semicolon; | 4594 return semicolon; |
| 4448 } | 4595 } |
| 4449 return _expression.endToken; | 4596 return _expression.endToken; |
| 4450 } | 4597 } |
| 4451 | 4598 |
| 4452 /** | 4599 /** |
| 4453 * Return the expression that comprises the statement. | 4600 * Return the expression that comprises the statement. |
| 4454 * | 4601 * |
| 4455 * @return the expression that comprises the statement | 4602 * @return the expression that comprises the statement |
| 4456 */ | 4603 */ |
| 4457 Expression get expression => _expression; | 4604 Expression get expression => _expression; |
| 4458 | 4605 |
| 4606 @override |
| 4459 bool get isSynthetic => _expression.isSynthetic && semicolon.isSynthetic; | 4607 bool get isSynthetic => _expression.isSynthetic && semicolon.isSynthetic; |
| 4460 | 4608 |
| 4461 /** | 4609 /** |
| 4462 * Set the expression that comprises the statement to the given expression. | 4610 * Set the expression that comprises the statement to the given expression. |
| 4463 * | 4611 * |
| 4464 * @param expression the expression that comprises the statement | 4612 * @param expression the expression that comprises the statement |
| 4465 */ | 4613 */ |
| 4466 void set expression(Expression expression) { | 4614 void set expression(Expression expression) { |
| 4467 this._expression = becomeParentOf(expression); | 4615 this._expression = becomeParentOf(expression); |
| 4468 } | 4616 } |
| 4469 | 4617 |
| 4618 @override |
| 4470 void visitChildren(AstVisitor visitor) { | 4619 void visitChildren(AstVisitor visitor) { |
| 4471 safelyVisitChild(_expression, visitor); | 4620 safelyVisitChild(_expression, visitor); |
| 4472 } | 4621 } |
| 4473 } | 4622 } |
| 4474 | 4623 |
| 4475 /** | 4624 /** |
| 4476 * Instances of the class `ExtendsClause` represent the "extends" clause in a cl
ass | 4625 * Instances of the class `ExtendsClause` represent the "extends" clause in a cl
ass |
| 4477 * declaration. | 4626 * declaration. |
| 4478 * | 4627 * |
| 4479 * <pre> | 4628 * <pre> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 4495 /** | 4644 /** |
| 4496 * Initialize a newly created extends clause. | 4645 * Initialize a newly created extends clause. |
| 4497 * | 4646 * |
| 4498 * @param keyword the token representing the 'extends' keyword | 4647 * @param keyword the token representing the 'extends' keyword |
| 4499 * @param superclass the name of the class that is being extended | 4648 * @param superclass the name of the class that is being extended |
| 4500 */ | 4649 */ |
| 4501 ExtendsClause(this.keyword, TypeName superclass) { | 4650 ExtendsClause(this.keyword, TypeName superclass) { |
| 4502 this._superclass = becomeParentOf(superclass); | 4651 this._superclass = becomeParentOf(superclass); |
| 4503 } | 4652 } |
| 4504 | 4653 |
| 4654 @override |
| 4505 accept(AstVisitor visitor) => visitor.visitExtendsClause(this); | 4655 accept(AstVisitor visitor) => visitor.visitExtendsClause(this); |
| 4506 | 4656 |
| 4657 @override |
| 4507 Token get beginToken => keyword; | 4658 Token get beginToken => keyword; |
| 4508 | 4659 |
| 4660 @override |
| 4509 Token get endToken => _superclass.endToken; | 4661 Token get endToken => _superclass.endToken; |
| 4510 | 4662 |
| 4511 /** | 4663 /** |
| 4512 * Return the name of the class that is being extended. | 4664 * Return the name of the class that is being extended. |
| 4513 * | 4665 * |
| 4514 * @return the name of the class that is being extended | 4666 * @return the name of the class that is being extended |
| 4515 */ | 4667 */ |
| 4516 TypeName get superclass => _superclass; | 4668 TypeName get superclass => _superclass; |
| 4517 | 4669 |
| 4518 /** | 4670 /** |
| 4519 * Set the name of the class that is being extended to the given name. | 4671 * Set the name of the class that is being extended to the given name. |
| 4520 * | 4672 * |
| 4521 * @param name the name of the class that is being extended | 4673 * @param name the name of the class that is being extended |
| 4522 */ | 4674 */ |
| 4523 void set superclass(TypeName name) { | 4675 void set superclass(TypeName name) { |
| 4524 _superclass = becomeParentOf(name); | 4676 _superclass = becomeParentOf(name); |
| 4525 } | 4677 } |
| 4526 | 4678 |
| 4679 @override |
| 4527 void visitChildren(AstVisitor visitor) { | 4680 void visitChildren(AstVisitor visitor) { |
| 4528 safelyVisitChild(_superclass, visitor); | 4681 safelyVisitChild(_superclass, visitor); |
| 4529 } | 4682 } |
| 4530 } | 4683 } |
| 4531 | 4684 |
| 4532 /** | 4685 /** |
| 4533 * Instances of the class `FieldDeclaration` represent the declaration of one or
more fields | 4686 * Instances of the class `FieldDeclaration` represent the declaration of one or
more fields |
| 4534 * of the same type. | 4687 * of the same type. |
| 4535 * | 4688 * |
| 4536 * <pre> | 4689 * <pre> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 4560 * @param comment the documentation comment associated with this field | 4713 * @param comment the documentation comment associated with this field |
| 4561 * @param metadata the annotations associated with this field | 4714 * @param metadata the annotations associated with this field |
| 4562 * @param staticKeyword the token representing the 'static' keyword | 4715 * @param staticKeyword the token representing the 'static' keyword |
| 4563 * @param fieldList the fields being declared | 4716 * @param fieldList the fields being declared |
| 4564 * @param semicolon the semicolon terminating the declaration | 4717 * @param semicolon the semicolon terminating the declaration |
| 4565 */ | 4718 */ |
| 4566 FieldDeclaration(Comment comment, List<Annotation> metadata, this.staticKeywor
d, VariableDeclarationList fieldList, this.semicolon) : super(comment, metadata)
{ | 4719 FieldDeclaration(Comment comment, List<Annotation> metadata, this.staticKeywor
d, VariableDeclarationList fieldList, this.semicolon) : super(comment, metadata)
{ |
| 4567 this._fieldList = becomeParentOf(fieldList); | 4720 this._fieldList = becomeParentOf(fieldList); |
| 4568 } | 4721 } |
| 4569 | 4722 |
| 4723 @override |
| 4570 accept(AstVisitor visitor) => visitor.visitFieldDeclaration(this); | 4724 accept(AstVisitor visitor) => visitor.visitFieldDeclaration(this); |
| 4571 | 4725 |
| 4726 @override |
| 4572 Element get element => null; | 4727 Element get element => null; |
| 4573 | 4728 |
| 4729 @override |
| 4574 Token get endToken => semicolon; | 4730 Token get endToken => semicolon; |
| 4575 | 4731 |
| 4576 /** | 4732 /** |
| 4577 * Return the fields being declared. | 4733 * Return the fields being declared. |
| 4578 * | 4734 * |
| 4579 * @return the fields being declared | 4735 * @return the fields being declared |
| 4580 */ | 4736 */ |
| 4581 VariableDeclarationList get fields => _fieldList; | 4737 VariableDeclarationList get fields => _fieldList; |
| 4582 | 4738 |
| 4583 /** | 4739 /** |
| 4584 * Return `true` if the fields are static. | 4740 * Return `true` if the fields are static. |
| 4585 * | 4741 * |
| 4586 * @return `true` if the fields are declared to be static | 4742 * @return `true` if the fields are declared to be static |
| 4587 */ | 4743 */ |
| 4588 bool get isStatic => staticKeyword != null; | 4744 bool get isStatic => staticKeyword != null; |
| 4589 | 4745 |
| 4590 /** | 4746 /** |
| 4591 * Set the fields being declared to the given list of variables. | 4747 * Set the fields being declared to the given list of variables. |
| 4592 * | 4748 * |
| 4593 * @param fieldList the fields being declared | 4749 * @param fieldList the fields being declared |
| 4594 */ | 4750 */ |
| 4595 void set fields(VariableDeclarationList fieldList) { | 4751 void set fields(VariableDeclarationList fieldList) { |
| 4596 fieldList = becomeParentOf(fieldList); | 4752 fieldList = becomeParentOf(fieldList); |
| 4597 } | 4753 } |
| 4598 | 4754 |
| 4755 @override |
| 4599 void visitChildren(AstVisitor visitor) { | 4756 void visitChildren(AstVisitor visitor) { |
| 4600 super.visitChildren(visitor); | 4757 super.visitChildren(visitor); |
| 4601 safelyVisitChild(_fieldList, visitor); | 4758 safelyVisitChild(_fieldList, visitor); |
| 4602 } | 4759 } |
| 4603 | 4760 |
| 4761 @override |
| 4604 Token get firstTokenAfterCommentAndMetadata { | 4762 Token get firstTokenAfterCommentAndMetadata { |
| 4605 if (staticKeyword != null) { | 4763 if (staticKeyword != null) { |
| 4606 return staticKeyword; | 4764 return staticKeyword; |
| 4607 } | 4765 } |
| 4608 return _fieldList.beginToken; | 4766 return _fieldList.beginToken; |
| 4609 } | 4767 } |
| 4610 } | 4768 } |
| 4611 | 4769 |
| 4612 /** | 4770 /** |
| 4613 * Instances of the class `FieldFormalParameter` represent a field formal parame
ter. | 4771 * Instances of the class `FieldFormalParameter` represent a field formal parame
ter. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4657 * @param period the token representing the period | 4815 * @param period the token representing the period |
| 4658 * @param identifier the name of the parameter being declared | 4816 * @param identifier the name of the parameter being declared |
| 4659 * @param parameters the parameters of the function-typed parameter, or `null`
if this is | 4817 * @param parameters the parameters of the function-typed parameter, or `null`
if this is |
| 4660 * not a function-typed field formal parameter | 4818 * not a function-typed field formal parameter |
| 4661 */ | 4819 */ |
| 4662 FieldFormalParameter(Comment comment, List<Annotation> metadata, this.keyword,
TypeName type, this.thisToken, this.period, SimpleIdentifier identifier, Formal
ParameterList parameters) : super(comment, metadata, identifier) { | 4820 FieldFormalParameter(Comment comment, List<Annotation> metadata, this.keyword,
TypeName type, this.thisToken, this.period, SimpleIdentifier identifier, Formal
ParameterList parameters) : super(comment, metadata, identifier) { |
| 4663 this._type = becomeParentOf(type); | 4821 this._type = becomeParentOf(type); |
| 4664 this._parameters = becomeParentOf(parameters); | 4822 this._parameters = becomeParentOf(parameters); |
| 4665 } | 4823 } |
| 4666 | 4824 |
| 4825 @override |
| 4667 accept(AstVisitor visitor) => visitor.visitFieldFormalParameter(this); | 4826 accept(AstVisitor visitor) => visitor.visitFieldFormalParameter(this); |
| 4668 | 4827 |
| 4828 @override |
| 4669 Token get beginToken { | 4829 Token get beginToken { |
| 4670 if (keyword != null) { | 4830 if (keyword != null) { |
| 4671 return keyword; | 4831 return keyword; |
| 4672 } else if (_type != null) { | 4832 } else if (_type != null) { |
| 4673 return _type.beginToken; | 4833 return _type.beginToken; |
| 4674 } | 4834 } |
| 4675 return thisToken; | 4835 return thisToken; |
| 4676 } | 4836 } |
| 4677 | 4837 |
| 4838 @override |
| 4678 Token get endToken => identifier.endToken; | 4839 Token get endToken => identifier.endToken; |
| 4679 | 4840 |
| 4680 /** | 4841 /** |
| 4681 * Return the parameters of the function-typed parameter, or `null` if this is
not a | 4842 * Return the parameters of the function-typed parameter, or `null` if this is
not a |
| 4682 * function-typed field formal parameter. | 4843 * function-typed field formal parameter. |
| 4683 * | 4844 * |
| 4684 * @return the parameters of the function-typed parameter | 4845 * @return the parameters of the function-typed parameter |
| 4685 */ | 4846 */ |
| 4686 FormalParameterList get parameters => _parameters; | 4847 FormalParameterList get parameters => _parameters; |
| 4687 | 4848 |
| 4688 /** | 4849 /** |
| 4689 * Return the name of the declared type of the parameter, or `null` if the par
ameter does | 4850 * Return the name of the declared type of the parameter, or `null` if the par
ameter does |
| 4690 * not have a declared type. Note that if this is a function-typed field forma
l parameter this is | 4851 * not have a declared type. Note that if this is a function-typed field forma
l parameter this is |
| 4691 * the return type of the function. | 4852 * the return type of the function. |
| 4692 * | 4853 * |
| 4693 * @return the name of the declared type of the parameter | 4854 * @return the name of the declared type of the parameter |
| 4694 */ | 4855 */ |
| 4695 TypeName get type => _type; | 4856 TypeName get type => _type; |
| 4696 | 4857 |
| 4858 @override |
| 4697 bool get isConst => (keyword is KeywordToken) && identical((keyword as Keyword
Token).keyword, Keyword.CONST); | 4859 bool get isConst => (keyword is KeywordToken) && identical((keyword as Keyword
Token).keyword, Keyword.CONST); |
| 4698 | 4860 |
| 4861 @override |
| 4699 bool get isFinal => (keyword is KeywordToken) && identical((keyword as Keyword
Token).keyword, Keyword.FINAL); | 4862 bool get isFinal => (keyword is KeywordToken) && identical((keyword as Keyword
Token).keyword, Keyword.FINAL); |
| 4700 | 4863 |
| 4701 /** | 4864 /** |
| 4702 * Set the parameters of the function-typed parameter to the given parameters. | 4865 * Set the parameters of the function-typed parameter to the given parameters. |
| 4703 * | 4866 * |
| 4704 * @param parameters the parameters of the function-typed parameter | 4867 * @param parameters the parameters of the function-typed parameter |
| 4705 */ | 4868 */ |
| 4706 void set parameters(FormalParameterList parameters) { | 4869 void set parameters(FormalParameterList parameters) { |
| 4707 this._parameters = becomeParentOf(parameters); | 4870 this._parameters = becomeParentOf(parameters); |
| 4708 } | 4871 } |
| 4709 | 4872 |
| 4710 /** | 4873 /** |
| 4711 * Set the name of the declared type of the parameter to the given type name. | 4874 * Set the name of the declared type of the parameter to the given type name. |
| 4712 * | 4875 * |
| 4713 * @param typeName the name of the declared type of the parameter | 4876 * @param typeName the name of the declared type of the parameter |
| 4714 */ | 4877 */ |
| 4715 void set type(TypeName typeName) { | 4878 void set type(TypeName typeName) { |
| 4716 _type = becomeParentOf(typeName); | 4879 _type = becomeParentOf(typeName); |
| 4717 } | 4880 } |
| 4718 | 4881 |
| 4882 @override |
| 4719 void visitChildren(AstVisitor visitor) { | 4883 void visitChildren(AstVisitor visitor) { |
| 4720 super.visitChildren(visitor); | 4884 super.visitChildren(visitor); |
| 4721 safelyVisitChild(_type, visitor); | 4885 safelyVisitChild(_type, visitor); |
| 4722 safelyVisitChild(identifier, visitor); | 4886 safelyVisitChild(identifier, visitor); |
| 4723 safelyVisitChild(_parameters, visitor); | 4887 safelyVisitChild(_parameters, visitor); |
| 4724 } | 4888 } |
| 4725 } | 4889 } |
| 4726 | 4890 |
| 4727 /** | 4891 /** |
| 4728 * Instances of the class `ForEachStatement` represent a for-each statement. | 4892 * Instances of the class `ForEachStatement` represent a for-each statement. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4800 * @param iterator the expression evaluated to produce the iterator | 4964 * @param iterator the expression evaluated to produce the iterator |
| 4801 * @param rightParenthesis the right parenthesis | 4965 * @param rightParenthesis the right parenthesis |
| 4802 * @param body the body of the loop | 4966 * @param body the body of the loop |
| 4803 */ | 4967 */ |
| 4804 ForEachStatement.con2(this.forKeyword, this.leftParenthesis, SimpleIdentifier
identifier, this.inKeyword, Expression iterator, this.rightParenthesis, Statemen
t body) { | 4968 ForEachStatement.con2(this.forKeyword, this.leftParenthesis, SimpleIdentifier
identifier, this.inKeyword, Expression iterator, this.rightParenthesis, Statemen
t body) { |
| 4805 this._identifier = becomeParentOf(identifier); | 4969 this._identifier = becomeParentOf(identifier); |
| 4806 this._iterator = becomeParentOf(iterator); | 4970 this._iterator = becomeParentOf(iterator); |
| 4807 this._body = becomeParentOf(body); | 4971 this._body = becomeParentOf(body); |
| 4808 } | 4972 } |
| 4809 | 4973 |
| 4974 @override |
| 4810 accept(AstVisitor visitor) => visitor.visitForEachStatement(this); | 4975 accept(AstVisitor visitor) => visitor.visitForEachStatement(this); |
| 4811 | 4976 |
| 4977 @override |
| 4812 Token get beginToken => forKeyword; | 4978 Token get beginToken => forKeyword; |
| 4813 | 4979 |
| 4814 /** | 4980 /** |
| 4815 * Return the body of the loop. | 4981 * Return the body of the loop. |
| 4816 * | 4982 * |
| 4817 * @return the body of the loop | 4983 * @return the body of the loop |
| 4818 */ | 4984 */ |
| 4819 Statement get body => _body; | 4985 Statement get body => _body; |
| 4820 | 4986 |
| 4987 @override |
| 4821 Token get endToken => _body.endToken; | 4988 Token get endToken => _body.endToken; |
| 4822 | 4989 |
| 4823 /** | 4990 /** |
| 4824 * Return the loop variable, or `null` if the loop variable is declared in the
'for'. | 4991 * Return the loop variable, or `null` if the loop variable is declared in the
'for'. |
| 4825 * | 4992 * |
| 4826 * @return the loop variable | 4993 * @return the loop variable |
| 4827 */ | 4994 */ |
| 4828 SimpleIdentifier get identifier => _identifier; | 4995 SimpleIdentifier get identifier => _identifier; |
| 4829 | 4996 |
| 4830 /** | 4997 /** |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4871 | 5038 |
| 4872 /** | 5039 /** |
| 4873 * Set the declaration of the loop variable to the given variable. | 5040 * Set the declaration of the loop variable to the given variable. |
| 4874 * | 5041 * |
| 4875 * @param variable the declaration of the loop variable | 5042 * @param variable the declaration of the loop variable |
| 4876 */ | 5043 */ |
| 4877 void set loopVariable(DeclaredIdentifier variable) { | 5044 void set loopVariable(DeclaredIdentifier variable) { |
| 4878 _loopVariable = becomeParentOf(variable); | 5045 _loopVariable = becomeParentOf(variable); |
| 4879 } | 5046 } |
| 4880 | 5047 |
| 5048 @override |
| 4881 void visitChildren(AstVisitor visitor) { | 5049 void visitChildren(AstVisitor visitor) { |
| 4882 safelyVisitChild(_loopVariable, visitor); | 5050 safelyVisitChild(_loopVariable, visitor); |
| 4883 safelyVisitChild(_identifier, visitor); | 5051 safelyVisitChild(_identifier, visitor); |
| 4884 safelyVisitChild(_iterator, visitor); | 5052 safelyVisitChild(_iterator, visitor); |
| 4885 safelyVisitChild(_body, visitor); | 5053 safelyVisitChild(_body, visitor); |
| 4886 } | 5054 } |
| 4887 } | 5055 } |
| 4888 | 5056 |
| 4889 /** | 5057 /** |
| 4890 * Instances of the class `ForStatement` represent a for statement. | 5058 * Instances of the class `ForStatement` represent a for statement. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4973 */ | 5141 */ |
| 4974 ForStatement(this.forKeyword, this.leftParenthesis, VariableDeclarationList va
riableList, Expression initialization, this.leftSeparator, Expression condition,
this.rightSeparator, List<Expression> updaters, this.rightParenthesis, Statemen
t body) { | 5142 ForStatement(this.forKeyword, this.leftParenthesis, VariableDeclarationList va
riableList, Expression initialization, this.leftSeparator, Expression condition,
this.rightSeparator, List<Expression> updaters, this.rightParenthesis, Statemen
t body) { |
| 4975 this._updaters = new NodeList<Expression>(this); | 5143 this._updaters = new NodeList<Expression>(this); |
| 4976 this._variableList = becomeParentOf(variableList); | 5144 this._variableList = becomeParentOf(variableList); |
| 4977 this._initialization = becomeParentOf(initialization); | 5145 this._initialization = becomeParentOf(initialization); |
| 4978 this._condition = becomeParentOf(condition); | 5146 this._condition = becomeParentOf(condition); |
| 4979 this._updaters.addAll(updaters); | 5147 this._updaters.addAll(updaters); |
| 4980 this._body = becomeParentOf(body); | 5148 this._body = becomeParentOf(body); |
| 4981 } | 5149 } |
| 4982 | 5150 |
| 5151 @override |
| 4983 accept(AstVisitor visitor) => visitor.visitForStatement(this); | 5152 accept(AstVisitor visitor) => visitor.visitForStatement(this); |
| 4984 | 5153 |
| 5154 @override |
| 4985 Token get beginToken => forKeyword; | 5155 Token get beginToken => forKeyword; |
| 4986 | 5156 |
| 4987 /** | 5157 /** |
| 4988 * Return the body of the loop. | 5158 * Return the body of the loop. |
| 4989 * | 5159 * |
| 4990 * @return the body of the loop | 5160 * @return the body of the loop |
| 4991 */ | 5161 */ |
| 4992 Statement get body => _body; | 5162 Statement get body => _body; |
| 4993 | 5163 |
| 4994 /** | 5164 /** |
| 4995 * Return the condition used to determine when to terminate the loop, or `null
` if there is | 5165 * Return the condition used to determine when to terminate the loop, or `null
` if there is |
| 4996 * no condition. | 5166 * no condition. |
| 4997 * | 5167 * |
| 4998 * @return the condition used to determine when to terminate the loop | 5168 * @return the condition used to determine when to terminate the loop |
| 4999 */ | 5169 */ |
| 5000 Expression get condition => _condition; | 5170 Expression get condition => _condition; |
| 5001 | 5171 |
| 5172 @override |
| 5002 Token get endToken => _body.endToken; | 5173 Token get endToken => _body.endToken; |
| 5003 | 5174 |
| 5004 /** | 5175 /** |
| 5005 * Return the initialization expression, or `null` if there is no initializati
on expression. | 5176 * Return the initialization expression, or `null` if there is no initializati
on expression. |
| 5006 * | 5177 * |
| 5007 * @return the initialization expression | 5178 * @return the initialization expression |
| 5008 */ | 5179 */ |
| 5009 Expression get initialization => _initialization; | 5180 Expression get initialization => _initialization; |
| 5010 | 5181 |
| 5011 /** | 5182 /** |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5051 | 5222 |
| 5052 /** | 5223 /** |
| 5053 * Set the declaration of the loop variables to the given parameter. | 5224 * Set the declaration of the loop variables to the given parameter. |
| 5054 * | 5225 * |
| 5055 * @param variableList the declaration of the loop variables | 5226 * @param variableList the declaration of the loop variables |
| 5056 */ | 5227 */ |
| 5057 void set variables(VariableDeclarationList variableList) { | 5228 void set variables(VariableDeclarationList variableList) { |
| 5058 variableList = becomeParentOf(variableList); | 5229 variableList = becomeParentOf(variableList); |
| 5059 } | 5230 } |
| 5060 | 5231 |
| 5232 @override |
| 5061 void visitChildren(AstVisitor visitor) { | 5233 void visitChildren(AstVisitor visitor) { |
| 5062 safelyVisitChild(_variableList, visitor); | 5234 safelyVisitChild(_variableList, visitor); |
| 5063 safelyVisitChild(_initialization, visitor); | 5235 safelyVisitChild(_initialization, visitor); |
| 5064 safelyVisitChild(_condition, visitor); | 5236 safelyVisitChild(_condition, visitor); |
| 5065 _updaters.accept(visitor); | 5237 _updaters.accept(visitor); |
| 5066 safelyVisitChild(_body, visitor); | 5238 safelyVisitChild(_body, visitor); |
| 5067 } | 5239 } |
| 5068 } | 5240 } |
| 5069 | 5241 |
| 5070 /** | 5242 /** |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5192 */ | 5364 */ |
| 5193 FormalParameterList(Token leftParenthesis, List<FormalParameter> parameters, T
oken leftDelimiter, Token rightDelimiter, Token rightParenthesis) { | 5365 FormalParameterList(Token leftParenthesis, List<FormalParameter> parameters, T
oken leftDelimiter, Token rightDelimiter, Token rightParenthesis) { |
| 5194 this._parameters = new NodeList<FormalParameter>(this); | 5366 this._parameters = new NodeList<FormalParameter>(this); |
| 5195 this._leftParenthesis = leftParenthesis; | 5367 this._leftParenthesis = leftParenthesis; |
| 5196 this._parameters.addAll(parameters); | 5368 this._parameters.addAll(parameters); |
| 5197 this._leftDelimiter = leftDelimiter; | 5369 this._leftDelimiter = leftDelimiter; |
| 5198 this._rightDelimiter = rightDelimiter; | 5370 this._rightDelimiter = rightDelimiter; |
| 5199 this._rightParenthesis = rightParenthesis; | 5371 this._rightParenthesis = rightParenthesis; |
| 5200 } | 5372 } |
| 5201 | 5373 |
| 5374 @override |
| 5202 accept(AstVisitor visitor) => visitor.visitFormalParameterList(this); | 5375 accept(AstVisitor visitor) => visitor.visitFormalParameterList(this); |
| 5203 | 5376 |
| 5377 @override |
| 5204 Token get beginToken => _leftParenthesis; | 5378 Token get beginToken => _leftParenthesis; |
| 5205 | 5379 |
| 5380 @override |
| 5206 Token get endToken => _rightParenthesis; | 5381 Token get endToken => _rightParenthesis; |
| 5207 | 5382 |
| 5208 /** | 5383 /** |
| 5209 * Return the left square bracket ('[') or left curly brace ('{') introducing
the optional | 5384 * Return the left square bracket ('[') or left curly brace ('{') introducing
the optional |
| 5210 * parameters, or `null` if there are no optional parameters. | 5385 * parameters, or `null` if there are no optional parameters. |
| 5211 * | 5386 * |
| 5212 * @return the left square bracket ('[') or left curly brace ('{') introducing
the optional | 5387 * @return the left square bracket ('[') or left curly brace ('{') introducing
the optional |
| 5213 * parameters | 5388 * parameters |
| 5214 */ | 5389 */ |
| 5215 Token get leftDelimiter => _leftDelimiter; | 5390 Token get leftDelimiter => _leftDelimiter; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5290 | 5465 |
| 5291 /** | 5466 /** |
| 5292 * Set the right parenthesis to the given token. | 5467 * Set the right parenthesis to the given token. |
| 5293 * | 5468 * |
| 5294 * @param parenthesis the right parenthesis | 5469 * @param parenthesis the right parenthesis |
| 5295 */ | 5470 */ |
| 5296 void set rightParenthesis(Token parenthesis) { | 5471 void set rightParenthesis(Token parenthesis) { |
| 5297 _rightParenthesis = parenthesis; | 5472 _rightParenthesis = parenthesis; |
| 5298 } | 5473 } |
| 5299 | 5474 |
| 5475 @override |
| 5300 void visitChildren(AstVisitor visitor) { | 5476 void visitChildren(AstVisitor visitor) { |
| 5301 _parameters.accept(visitor); | 5477 _parameters.accept(visitor); |
| 5302 } | 5478 } |
| 5303 } | 5479 } |
| 5304 | 5480 |
| 5305 /** | 5481 /** |
| 5306 * The abstract class `FunctionBody` defines the behavior common to objects repr
esenting the | 5482 * The abstract class `FunctionBody` defines the behavior common to objects repr
esenting the |
| 5307 * body of a function or method. | 5483 * body of a function or method. |
| 5308 * | 5484 * |
| 5309 * <pre> | 5485 * <pre> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5366 * @param propertyKeyword the token representing the 'get' or 'set' keyword | 5542 * @param propertyKeyword the token representing the 'get' or 'set' keyword |
| 5367 * @param name the name of the function | 5543 * @param name the name of the function |
| 5368 * @param functionExpression the function expression being wrapped | 5544 * @param functionExpression the function expression being wrapped |
| 5369 */ | 5545 */ |
| 5370 FunctionDeclaration(Comment comment, List<Annotation> metadata, this.externalK
eyword, TypeName returnType, this.propertyKeyword, SimpleIdentifier name, Functi
onExpression functionExpression) : super(comment, metadata) { | 5546 FunctionDeclaration(Comment comment, List<Annotation> metadata, this.externalK
eyword, TypeName returnType, this.propertyKeyword, SimpleIdentifier name, Functi
onExpression functionExpression) : super(comment, metadata) { |
| 5371 this._returnType = becomeParentOf(returnType); | 5547 this._returnType = becomeParentOf(returnType); |
| 5372 this._name = becomeParentOf(name); | 5548 this._name = becomeParentOf(name); |
| 5373 this._functionExpression = becomeParentOf(functionExpression); | 5549 this._functionExpression = becomeParentOf(functionExpression); |
| 5374 } | 5550 } |
| 5375 | 5551 |
| 5552 @override |
| 5376 accept(AstVisitor visitor) => visitor.visitFunctionDeclaration(this); | 5553 accept(AstVisitor visitor) => visitor.visitFunctionDeclaration(this); |
| 5377 | 5554 |
| 5555 @override |
| 5378 ExecutableElement get element => _name != null ? (_name.staticElement as Execu
tableElement) : null; | 5556 ExecutableElement get element => _name != null ? (_name.staticElement as Execu
tableElement) : null; |
| 5379 | 5557 |
| 5558 @override |
| 5380 Token get endToken => _functionExpression.endToken; | 5559 Token get endToken => _functionExpression.endToken; |
| 5381 | 5560 |
| 5382 /** | 5561 /** |
| 5383 * Return the function expression being wrapped. | 5562 * Return the function expression being wrapped. |
| 5384 * | 5563 * |
| 5385 * @return the function expression being wrapped | 5564 * @return the function expression being wrapped |
| 5386 */ | 5565 */ |
| 5387 FunctionExpression get functionExpression => _functionExpression; | 5566 FunctionExpression get functionExpression => _functionExpression; |
| 5388 | 5567 |
| 5389 /** | 5568 /** |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5434 | 5613 |
| 5435 /** | 5614 /** |
| 5436 * Set the return type of the function to the given name. | 5615 * Set the return type of the function to the given name. |
| 5437 * | 5616 * |
| 5438 * @param name the return type of the function | 5617 * @param name the return type of the function |
| 5439 */ | 5618 */ |
| 5440 void set returnType(TypeName name) { | 5619 void set returnType(TypeName name) { |
| 5441 _returnType = becomeParentOf(name); | 5620 _returnType = becomeParentOf(name); |
| 5442 } | 5621 } |
| 5443 | 5622 |
| 5623 @override |
| 5444 void visitChildren(AstVisitor visitor) { | 5624 void visitChildren(AstVisitor visitor) { |
| 5445 super.visitChildren(visitor); | 5625 super.visitChildren(visitor); |
| 5446 safelyVisitChild(_returnType, visitor); | 5626 safelyVisitChild(_returnType, visitor); |
| 5447 safelyVisitChild(_name, visitor); | 5627 safelyVisitChild(_name, visitor); |
| 5448 safelyVisitChild(_functionExpression, visitor); | 5628 safelyVisitChild(_functionExpression, visitor); |
| 5449 } | 5629 } |
| 5450 | 5630 |
| 5631 @override |
| 5451 Token get firstTokenAfterCommentAndMetadata { | 5632 Token get firstTokenAfterCommentAndMetadata { |
| 5452 if (externalKeyword != null) { | 5633 if (externalKeyword != null) { |
| 5453 return externalKeyword; | 5634 return externalKeyword; |
| 5454 } | 5635 } |
| 5455 if (_returnType != null) { | 5636 if (_returnType != null) { |
| 5456 return _returnType.beginToken; | 5637 return _returnType.beginToken; |
| 5457 } else if (propertyKeyword != null) { | 5638 } else if (propertyKeyword != null) { |
| 5458 return propertyKeyword; | 5639 return propertyKeyword; |
| 5459 } else if (_name != null) { | 5640 } else if (_name != null) { |
| 5460 return _name.beginToken; | 5641 return _name.beginToken; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 5475 | 5656 |
| 5476 /** | 5657 /** |
| 5477 * Initialize a newly created function declaration statement. | 5658 * Initialize a newly created function declaration statement. |
| 5478 * | 5659 * |
| 5479 * @param functionDeclaration the the function declaration being wrapped | 5660 * @param functionDeclaration the the function declaration being wrapped |
| 5480 */ | 5661 */ |
| 5481 FunctionDeclarationStatement(FunctionDeclaration functionDeclaration) { | 5662 FunctionDeclarationStatement(FunctionDeclaration functionDeclaration) { |
| 5482 this._functionDeclaration = becomeParentOf(functionDeclaration); | 5663 this._functionDeclaration = becomeParentOf(functionDeclaration); |
| 5483 } | 5664 } |
| 5484 | 5665 |
| 5666 @override |
| 5485 accept(AstVisitor visitor) => visitor.visitFunctionDeclarationStatement(this); | 5667 accept(AstVisitor visitor) => visitor.visitFunctionDeclarationStatement(this); |
| 5486 | 5668 |
| 5669 @override |
| 5487 Token get beginToken => _functionDeclaration.beginToken; | 5670 Token get beginToken => _functionDeclaration.beginToken; |
| 5488 | 5671 |
| 5672 @override |
| 5489 Token get endToken => _functionDeclaration.endToken; | 5673 Token get endToken => _functionDeclaration.endToken; |
| 5490 | 5674 |
| 5491 /** | 5675 /** |
| 5492 * Return the function declaration being wrapped. | 5676 * Return the function declaration being wrapped. |
| 5493 * | 5677 * |
| 5494 * @return the function declaration being wrapped | 5678 * @return the function declaration being wrapped |
| 5495 */ | 5679 */ |
| 5496 FunctionDeclaration get functionDeclaration => _functionDeclaration; | 5680 FunctionDeclaration get functionDeclaration => _functionDeclaration; |
| 5497 | 5681 |
| 5498 /** | 5682 /** |
| 5499 * Set the function declaration being wrapped to the given function declaratio
n. | 5683 * Set the function declaration being wrapped to the given function declaratio
n. |
| 5500 * | 5684 * |
| 5501 * @param functionDeclaration the function declaration being wrapped | 5685 * @param functionDeclaration the function declaration being wrapped |
| 5502 */ | 5686 */ |
| 5503 void set functionExpression(FunctionDeclaration functionDeclaration) { | 5687 void set functionExpression(FunctionDeclaration functionDeclaration) { |
| 5504 this._functionDeclaration = becomeParentOf(functionDeclaration); | 5688 this._functionDeclaration = becomeParentOf(functionDeclaration); |
| 5505 } | 5689 } |
| 5506 | 5690 |
| 5691 @override |
| 5507 void visitChildren(AstVisitor visitor) { | 5692 void visitChildren(AstVisitor visitor) { |
| 5508 safelyVisitChild(_functionDeclaration, visitor); | 5693 safelyVisitChild(_functionDeclaration, visitor); |
| 5509 } | 5694 } |
| 5510 } | 5695 } |
| 5511 | 5696 |
| 5512 /** | 5697 /** |
| 5513 * Instances of the class `FunctionExpression` represent a function expression. | 5698 * Instances of the class `FunctionExpression` represent a function expression. |
| 5514 * | 5699 * |
| 5515 * <pre> | 5700 * <pre> |
| 5516 * functionExpression ::= | 5701 * functionExpression ::= |
| (...skipping 21 matching lines...) Expand all Loading... |
| 5538 * Initialize a newly created function declaration. | 5723 * Initialize a newly created function declaration. |
| 5539 * | 5724 * |
| 5540 * @param parameters the parameters associated with the function | 5725 * @param parameters the parameters associated with the function |
| 5541 * @param body the body of the function | 5726 * @param body the body of the function |
| 5542 */ | 5727 */ |
| 5543 FunctionExpression(FormalParameterList parameters, FunctionBody body) { | 5728 FunctionExpression(FormalParameterList parameters, FunctionBody body) { |
| 5544 this._parameters = becomeParentOf(parameters); | 5729 this._parameters = becomeParentOf(parameters); |
| 5545 this._body = becomeParentOf(body); | 5730 this._body = becomeParentOf(body); |
| 5546 } | 5731 } |
| 5547 | 5732 |
| 5733 @override |
| 5548 accept(AstVisitor visitor) => visitor.visitFunctionExpression(this); | 5734 accept(AstVisitor visitor) => visitor.visitFunctionExpression(this); |
| 5549 | 5735 |
| 5736 @override |
| 5550 Token get beginToken { | 5737 Token get beginToken { |
| 5551 if (_parameters != null) { | 5738 if (_parameters != null) { |
| 5552 return _parameters.beginToken; | 5739 return _parameters.beginToken; |
| 5553 } else if (_body != null) { | 5740 } else if (_body != null) { |
| 5554 return _body.beginToken; | 5741 return _body.beginToken; |
| 5555 } | 5742 } |
| 5556 // This should never be reached because external functions must be named, he
nce either the body | 5743 // This should never be reached because external functions must be named, he
nce either the body |
| 5557 // or the name should be non-null. | 5744 // or the name should be non-null. |
| 5558 throw new IllegalStateException("Non-external functions must have a body"); | 5745 throw new IllegalStateException("Non-external functions must have a body"); |
| 5559 } | 5746 } |
| 5560 | 5747 |
| 5561 /** | 5748 /** |
| 5562 * Return the body of the function, or `null` if this is an external function. | 5749 * Return the body of the function, or `null` if this is an external function. |
| 5563 * | 5750 * |
| 5564 * @return the body of the function | 5751 * @return the body of the function |
| 5565 */ | 5752 */ |
| 5566 FunctionBody get body => _body; | 5753 FunctionBody get body => _body; |
| 5567 | 5754 |
| 5755 @override |
| 5568 Token get endToken { | 5756 Token get endToken { |
| 5569 if (_body != null) { | 5757 if (_body != null) { |
| 5570 return _body.endToken; | 5758 return _body.endToken; |
| 5571 } else if (_parameters != null) { | 5759 } else if (_parameters != null) { |
| 5572 return _parameters.endToken; | 5760 return _parameters.endToken; |
| 5573 } | 5761 } |
| 5574 // This should never be reached because external functions must be named, he
nce either the body | 5762 // This should never be reached because external functions must be named, he
nce either the body |
| 5575 // or the name should be non-null. | 5763 // or the name should be non-null. |
| 5576 throw new IllegalStateException("Non-external functions must have a body"); | 5764 throw new IllegalStateException("Non-external functions must have a body"); |
| 5577 } | 5765 } |
| 5578 | 5766 |
| 5579 /** | 5767 /** |
| 5580 * Return the parameters associated with the function. | 5768 * Return the parameters associated with the function. |
| 5581 * | 5769 * |
| 5582 * @return the parameters associated with the function | 5770 * @return the parameters associated with the function |
| 5583 */ | 5771 */ |
| 5584 FormalParameterList get parameters => _parameters; | 5772 FormalParameterList get parameters => _parameters; |
| 5585 | 5773 |
| 5774 @override |
| 5586 int get precedence => 16; | 5775 int get precedence => 16; |
| 5587 | 5776 |
| 5588 /** | 5777 /** |
| 5589 * Set the body of the function to the given function body. | 5778 * Set the body of the function to the given function body. |
| 5590 * | 5779 * |
| 5591 * @param functionBody the body of the function | 5780 * @param functionBody the body of the function |
| 5592 */ | 5781 */ |
| 5593 void set body(FunctionBody functionBody) { | 5782 void set body(FunctionBody functionBody) { |
| 5594 _body = becomeParentOf(functionBody); | 5783 _body = becomeParentOf(functionBody); |
| 5595 } | 5784 } |
| 5596 | 5785 |
| 5597 /** | 5786 /** |
| 5598 * Set the parameters associated with the function to the given list of parame
ters. | 5787 * Set the parameters associated with the function to the given list of parame
ters. |
| 5599 * | 5788 * |
| 5600 * @param parameters the parameters associated with the function | 5789 * @param parameters the parameters associated with the function |
| 5601 */ | 5790 */ |
| 5602 void set parameters(FormalParameterList parameters) { | 5791 void set parameters(FormalParameterList parameters) { |
| 5603 this._parameters = becomeParentOf(parameters); | 5792 this._parameters = becomeParentOf(parameters); |
| 5604 } | 5793 } |
| 5605 | 5794 |
| 5795 @override |
| 5606 void visitChildren(AstVisitor visitor) { | 5796 void visitChildren(AstVisitor visitor) { |
| 5607 safelyVisitChild(_parameters, visitor); | 5797 safelyVisitChild(_parameters, visitor); |
| 5608 safelyVisitChild(_body, visitor); | 5798 safelyVisitChild(_body, visitor); |
| 5609 } | 5799 } |
| 5610 } | 5800 } |
| 5611 | 5801 |
| 5612 /** | 5802 /** |
| 5613 * Instances of the class `FunctionExpressionInvocation` represent the invocatio
n of a | 5803 * Instances of the class `FunctionExpressionInvocation` represent the invocatio
n of a |
| 5614 * function resulting from evaluating an expression. Invocations of methods and
other forms of | 5804 * function resulting from evaluating an expression. Invocations of methods and
other forms of |
| 5615 * functions are represented by [MethodInvocation] nodes. Invocations of | 5805 * functions are represented by [MethodInvocation] nodes. Invocations of |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5648 * Initialize a newly created function expression invocation. | 5838 * Initialize a newly created function expression invocation. |
| 5649 * | 5839 * |
| 5650 * @param function the expression producing the function being invoked | 5840 * @param function the expression producing the function being invoked |
| 5651 * @param argumentList the list of arguments to the method | 5841 * @param argumentList the list of arguments to the method |
| 5652 */ | 5842 */ |
| 5653 FunctionExpressionInvocation(Expression function, ArgumentList argumentList) { | 5843 FunctionExpressionInvocation(Expression function, ArgumentList argumentList) { |
| 5654 this._function = becomeParentOf(function); | 5844 this._function = becomeParentOf(function); |
| 5655 this._argumentList = becomeParentOf(argumentList); | 5845 this._argumentList = becomeParentOf(argumentList); |
| 5656 } | 5846 } |
| 5657 | 5847 |
| 5848 @override |
| 5658 accept(AstVisitor visitor) => visitor.visitFunctionExpressionInvocation(this); | 5849 accept(AstVisitor visitor) => visitor.visitFunctionExpressionInvocation(this); |
| 5659 | 5850 |
| 5660 /** | 5851 /** |
| 5661 * Return the list of arguments to the method. | 5852 * Return the list of arguments to the method. |
| 5662 * | 5853 * |
| 5663 * @return the list of arguments to the method | 5854 * @return the list of arguments to the method |
| 5664 */ | 5855 */ |
| 5665 ArgumentList get argumentList => _argumentList; | 5856 ArgumentList get argumentList => _argumentList; |
| 5666 | 5857 |
| 5858 @override |
| 5667 Token get beginToken => _function.beginToken; | 5859 Token get beginToken => _function.beginToken; |
| 5668 | 5860 |
| 5669 /** | 5861 /** |
| 5670 * Return the best element available for the function being invoked. If resolu
tion was able to | 5862 * Return the best element available for the function being invoked. If resolu
tion was able to |
| 5671 * find a better element based on type propagation, that element will be retur
ned. Otherwise, the | 5863 * find a better element based on type propagation, that element will be retur
ned. Otherwise, the |
| 5672 * element found using the result of static analysis will be returned. If reso
lution has not been | 5864 * element found using the result of static analysis will be returned. If reso
lution has not been |
| 5673 * performed, then `null` will be returned. | 5865 * performed, then `null` will be returned. |
| 5674 * | 5866 * |
| 5675 * @return the best element available for this function | 5867 * @return the best element available for this function |
| 5676 */ | 5868 */ |
| 5677 ExecutableElement get bestElement { | 5869 ExecutableElement get bestElement { |
| 5678 ExecutableElement element = propagatedElement; | 5870 ExecutableElement element = propagatedElement; |
| 5679 if (element == null) { | 5871 if (element == null) { |
| 5680 element = staticElement; | 5872 element = staticElement; |
| 5681 } | 5873 } |
| 5682 return element; | 5874 return element; |
| 5683 } | 5875 } |
| 5684 | 5876 |
| 5877 @override |
| 5685 Token get endToken => _argumentList.endToken; | 5878 Token get endToken => _argumentList.endToken; |
| 5686 | 5879 |
| 5687 /** | 5880 /** |
| 5688 * Return the expression producing the function being invoked. | 5881 * Return the expression producing the function being invoked. |
| 5689 * | 5882 * |
| 5690 * @return the expression producing the function being invoked | 5883 * @return the expression producing the function being invoked |
| 5691 */ | 5884 */ |
| 5692 Expression get function => _function; | 5885 Expression get function => _function; |
| 5693 | 5886 |
| 5887 @override |
| 5694 int get precedence => 15; | 5888 int get precedence => 15; |
| 5695 | 5889 |
| 5696 /** | 5890 /** |
| 5697 * Return the element associated with the function being invoked based on prop
agated type | 5891 * Return the element associated with the function being invoked based on prop
agated type |
| 5698 * information, or `null` if the AST structure has not been resolved or the fu
nction could | 5892 * information, or `null` if the AST structure has not been resolved or the fu
nction could |
| 5699 * not be resolved. One common example of the latter case is an expression who
se value can change | 5893 * not be resolved. One common example of the latter case is an expression who
se value can change |
| 5700 * over time. | 5894 * over time. |
| 5701 * | 5895 * |
| 5702 * @return the element associated with the function being invoked | 5896 * @return the element associated with the function being invoked |
| 5703 */ | 5897 */ |
| (...skipping 20 matching lines...) Expand all Loading... |
| 5724 /** | 5918 /** |
| 5725 * Set the element associated with the function being invoked based on propaga
ted type information | 5919 * Set the element associated with the function being invoked based on propaga
ted type information |
| 5726 * to the given element. | 5920 * to the given element. |
| 5727 * | 5921 * |
| 5728 * @param element the element to be associated with the function being invoked | 5922 * @param element the element to be associated with the function being invoked |
| 5729 */ | 5923 */ |
| 5730 void set propagatedElement(ExecutableElement element) { | 5924 void set propagatedElement(ExecutableElement element) { |
| 5731 _propagatedElement = element; | 5925 _propagatedElement = element; |
| 5732 } | 5926 } |
| 5733 | 5927 |
| 5928 @override |
| 5734 void visitChildren(AstVisitor visitor) { | 5929 void visitChildren(AstVisitor visitor) { |
| 5735 safelyVisitChild(_function, visitor); | 5930 safelyVisitChild(_function, visitor); |
| 5736 safelyVisitChild(_argumentList, visitor); | 5931 safelyVisitChild(_argumentList, visitor); |
| 5737 } | 5932 } |
| 5738 } | 5933 } |
| 5739 | 5934 |
| 5740 /** | 5935 /** |
| 5741 * Instances of the class `FunctionTypeAlias` represent a function type alias. | 5936 * Instances of the class `FunctionTypeAlias` represent a function type alias. |
| 5742 * | 5937 * |
| 5743 * <pre> | 5938 * <pre> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5783 * @param parameters the parameters associated with the function | 5978 * @param parameters the parameters associated with the function |
| 5784 * @param semicolon the semicolon terminating the declaration | 5979 * @param semicolon the semicolon terminating the declaration |
| 5785 */ | 5980 */ |
| 5786 FunctionTypeAlias(Comment comment, List<Annotation> metadata, Token keyword, T
ypeName returnType, SimpleIdentifier name, TypeParameterList typeParameters, For
malParameterList parameters, Token semicolon) : super(comment, metadata, keyword
, semicolon) { | 5981 FunctionTypeAlias(Comment comment, List<Annotation> metadata, Token keyword, T
ypeName returnType, SimpleIdentifier name, TypeParameterList typeParameters, For
malParameterList parameters, Token semicolon) : super(comment, metadata, keyword
, semicolon) { |
| 5787 this._returnType = becomeParentOf(returnType); | 5982 this._returnType = becomeParentOf(returnType); |
| 5788 this._name = becomeParentOf(name); | 5983 this._name = becomeParentOf(name); |
| 5789 this._typeParameters = becomeParentOf(typeParameters); | 5984 this._typeParameters = becomeParentOf(typeParameters); |
| 5790 this._parameters = becomeParentOf(parameters); | 5985 this._parameters = becomeParentOf(parameters); |
| 5791 } | 5986 } |
| 5792 | 5987 |
| 5988 @override |
| 5793 accept(AstVisitor visitor) => visitor.visitFunctionTypeAlias(this); | 5989 accept(AstVisitor visitor) => visitor.visitFunctionTypeAlias(this); |
| 5794 | 5990 |
| 5991 @override |
| 5795 FunctionTypeAliasElement get element => _name != null ? (_name.staticElement a
s FunctionTypeAliasElement) : null; | 5992 FunctionTypeAliasElement get element => _name != null ? (_name.staticElement a
s FunctionTypeAliasElement) : null; |
| 5796 | 5993 |
| 5797 /** | 5994 /** |
| 5798 * Return the name of the function type being declared. | 5995 * Return the name of the function type being declared. |
| 5799 * | 5996 * |
| 5800 * @return the name of the function type being declared | 5997 * @return the name of the function type being declared |
| 5801 */ | 5998 */ |
| 5802 SimpleIdentifier get name => _name; | 5999 SimpleIdentifier get name => _name; |
| 5803 | 6000 |
| 5804 /** | 6001 /** |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5853 | 6050 |
| 5854 /** | 6051 /** |
| 5855 * Set the type parameters for the function type to the given list of paramete
rs. | 6052 * Set the type parameters for the function type to the given list of paramete
rs. |
| 5856 * | 6053 * |
| 5857 * @param typeParameters the type parameters for the function type | 6054 * @param typeParameters the type parameters for the function type |
| 5858 */ | 6055 */ |
| 5859 void set typeParameters(TypeParameterList typeParameters) { | 6056 void set typeParameters(TypeParameterList typeParameters) { |
| 5860 this._typeParameters = becomeParentOf(typeParameters); | 6057 this._typeParameters = becomeParentOf(typeParameters); |
| 5861 } | 6058 } |
| 5862 | 6059 |
| 6060 @override |
| 5863 void visitChildren(AstVisitor visitor) { | 6061 void visitChildren(AstVisitor visitor) { |
| 5864 super.visitChildren(visitor); | 6062 super.visitChildren(visitor); |
| 5865 safelyVisitChild(_returnType, visitor); | 6063 safelyVisitChild(_returnType, visitor); |
| 5866 safelyVisitChild(_name, visitor); | 6064 safelyVisitChild(_name, visitor); |
| 5867 safelyVisitChild(_typeParameters, visitor); | 6065 safelyVisitChild(_typeParameters, visitor); |
| 5868 safelyVisitChild(_parameters, visitor); | 6066 safelyVisitChild(_parameters, visitor); |
| 5869 } | 6067 } |
| 5870 } | 6068 } |
| 5871 | 6069 |
| 5872 /** | 6070 /** |
| (...skipping 24 matching lines...) Expand all Loading... |
| 5897 * @param returnType the return type of the function, or `null` if the functio
n does not | 6095 * @param returnType the return type of the function, or `null` if the functio
n does not |
| 5898 * have a return type | 6096 * have a return type |
| 5899 * @param identifier the name of the function-typed parameter | 6097 * @param identifier the name of the function-typed parameter |
| 5900 * @param parameters the parameters of the function-typed parameter | 6098 * @param parameters the parameters of the function-typed parameter |
| 5901 */ | 6099 */ |
| 5902 FunctionTypedFormalParameter(Comment comment, List<Annotation> metadata, TypeN
ame returnType, SimpleIdentifier identifier, FormalParameterList parameters) : s
uper(comment, metadata, identifier) { | 6100 FunctionTypedFormalParameter(Comment comment, List<Annotation> metadata, TypeN
ame returnType, SimpleIdentifier identifier, FormalParameterList parameters) : s
uper(comment, metadata, identifier) { |
| 5903 this._returnType = becomeParentOf(returnType); | 6101 this._returnType = becomeParentOf(returnType); |
| 5904 this._parameters = becomeParentOf(parameters); | 6102 this._parameters = becomeParentOf(parameters); |
| 5905 } | 6103 } |
| 5906 | 6104 |
| 6105 @override |
| 5907 accept(AstVisitor visitor) => visitor.visitFunctionTypedFormalParameter(this); | 6106 accept(AstVisitor visitor) => visitor.visitFunctionTypedFormalParameter(this); |
| 5908 | 6107 |
| 6108 @override |
| 5909 Token get beginToken { | 6109 Token get beginToken { |
| 5910 if (_returnType != null) { | 6110 if (_returnType != null) { |
| 5911 return _returnType.beginToken; | 6111 return _returnType.beginToken; |
| 5912 } | 6112 } |
| 5913 return identifier.beginToken; | 6113 return identifier.beginToken; |
| 5914 } | 6114 } |
| 5915 | 6115 |
| 6116 @override |
| 5916 Token get endToken => _parameters.endToken; | 6117 Token get endToken => _parameters.endToken; |
| 5917 | 6118 |
| 5918 /** | 6119 /** |
| 5919 * Return the parameters of the function-typed parameter. | 6120 * Return the parameters of the function-typed parameter. |
| 5920 * | 6121 * |
| 5921 * @return the parameters of the function-typed parameter | 6122 * @return the parameters of the function-typed parameter |
| 5922 */ | 6123 */ |
| 5923 FormalParameterList get parameters => _parameters; | 6124 FormalParameterList get parameters => _parameters; |
| 5924 | 6125 |
| 5925 /** | 6126 /** |
| 5926 * Return the return type of the function, or `null` if the function does not
have a return | 6127 * Return the return type of the function, or `null` if the function does not
have a return |
| 5927 * type. | 6128 * type. |
| 5928 * | 6129 * |
| 5929 * @return the return type of the function | 6130 * @return the return type of the function |
| 5930 */ | 6131 */ |
| 5931 TypeName get returnType => _returnType; | 6132 TypeName get returnType => _returnType; |
| 5932 | 6133 |
| 6134 @override |
| 5933 bool get isConst => false; | 6135 bool get isConst => false; |
| 5934 | 6136 |
| 6137 @override |
| 5935 bool get isFinal => false; | 6138 bool get isFinal => false; |
| 5936 | 6139 |
| 5937 /** | 6140 /** |
| 5938 * Set the parameters of the function-typed parameter to the given parameters. | 6141 * Set the parameters of the function-typed parameter to the given parameters. |
| 5939 * | 6142 * |
| 5940 * @param parameters the parameters of the function-typed parameter | 6143 * @param parameters the parameters of the function-typed parameter |
| 5941 */ | 6144 */ |
| 5942 void set parameters(FormalParameterList parameters) { | 6145 void set parameters(FormalParameterList parameters) { |
| 5943 this._parameters = becomeParentOf(parameters); | 6146 this._parameters = becomeParentOf(parameters); |
| 5944 } | 6147 } |
| 5945 | 6148 |
| 5946 /** | 6149 /** |
| 5947 * Set the return type of the function to the given type. | 6150 * Set the return type of the function to the given type. |
| 5948 * | 6151 * |
| 5949 * @param returnType the return type of the function | 6152 * @param returnType the return type of the function |
| 5950 */ | 6153 */ |
| 5951 void set returnType(TypeName returnType) { | 6154 void set returnType(TypeName returnType) { |
| 5952 this._returnType = becomeParentOf(returnType); | 6155 this._returnType = becomeParentOf(returnType); |
| 5953 } | 6156 } |
| 5954 | 6157 |
| 6158 @override |
| 5955 void visitChildren(AstVisitor visitor) { | 6159 void visitChildren(AstVisitor visitor) { |
| 5956 super.visitChildren(visitor); | 6160 super.visitChildren(visitor); |
| 5957 safelyVisitChild(_returnType, visitor); | 6161 safelyVisitChild(_returnType, visitor); |
| 5958 safelyVisitChild(identifier, visitor); | 6162 safelyVisitChild(identifier, visitor); |
| 5959 safelyVisitChild(_parameters, visitor); | 6163 safelyVisitChild(_parameters, visitor); |
| 5960 } | 6164 } |
| 5961 } | 6165 } |
| 5962 | 6166 |
| 5963 /** | 6167 /** |
| 5964 * Instances of the class `HideCombinator` represent a combinator that restricts
the names | 6168 * Instances of the class `HideCombinator` represent a combinator that restricts
the names |
| (...skipping 14 matching lines...) Expand all Loading... |
| 5979 * Initialize a newly created import show combinator. | 6183 * Initialize a newly created import show combinator. |
| 5980 * | 6184 * |
| 5981 * @param keyword the comma introducing the combinator | 6185 * @param keyword the comma introducing the combinator |
| 5982 * @param hiddenNames the list of names from the library that are hidden by th
is combinator | 6186 * @param hiddenNames the list of names from the library that are hidden by th
is combinator |
| 5983 */ | 6187 */ |
| 5984 HideCombinator(Token keyword, List<SimpleIdentifier> hiddenNames) : super(keyw
ord) { | 6188 HideCombinator(Token keyword, List<SimpleIdentifier> hiddenNames) : super(keyw
ord) { |
| 5985 this._hiddenNames = new NodeList<SimpleIdentifier>(this); | 6189 this._hiddenNames = new NodeList<SimpleIdentifier>(this); |
| 5986 this._hiddenNames.addAll(hiddenNames); | 6190 this._hiddenNames.addAll(hiddenNames); |
| 5987 } | 6191 } |
| 5988 | 6192 |
| 6193 @override |
| 5989 accept(AstVisitor visitor) => visitor.visitHideCombinator(this); | 6194 accept(AstVisitor visitor) => visitor.visitHideCombinator(this); |
| 5990 | 6195 |
| 6196 @override |
| 5991 Token get endToken => _hiddenNames.endToken; | 6197 Token get endToken => _hiddenNames.endToken; |
| 5992 | 6198 |
| 5993 /** | 6199 /** |
| 5994 * Return the list of names from the library that are hidden by this combinato
r. | 6200 * Return the list of names from the library that are hidden by this combinato
r. |
| 5995 * | 6201 * |
| 5996 * @return the list of names from the library that are hidden by this combinat
or | 6202 * @return the list of names from the library that are hidden by this combinat
or |
| 5997 */ | 6203 */ |
| 5998 NodeList<SimpleIdentifier> get hiddenNames => _hiddenNames; | 6204 NodeList<SimpleIdentifier> get hiddenNames => _hiddenNames; |
| 5999 | 6205 |
| 6206 @override |
| 6000 void visitChildren(AstVisitor visitor) { | 6207 void visitChildren(AstVisitor visitor) { |
| 6001 _hiddenNames.accept(visitor); | 6208 _hiddenNames.accept(visitor); |
| 6002 } | 6209 } |
| 6003 } | 6210 } |
| 6004 | 6211 |
| 6005 /** | 6212 /** |
| 6006 * The abstract class `Identifier` defines the behavior common to nodes that rep
resent an | 6213 * The abstract class `Identifier` defines the behavior common to nodes that rep
resent an |
| 6007 * identifier. | 6214 * identifier. |
| 6008 * | 6215 * |
| 6009 * <pre> | 6216 * <pre> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6052 /** | 6259 /** |
| 6053 * Return the element associated with this identifier based on static type inf
ormation, or | 6260 * Return the element associated with this identifier based on static type inf
ormation, or |
| 6054 * `null` if the AST structure has not been resolved or if this identifier cou
ld not be | 6261 * `null` if the AST structure has not been resolved or if this identifier cou
ld not be |
| 6055 * resolved. One example of the latter case is an identifier that is not defin
ed within the scope | 6262 * resolved. One example of the latter case is an identifier that is not defin
ed within the scope |
| 6056 * in which it appears | 6263 * in which it appears |
| 6057 * | 6264 * |
| 6058 * @return the element associated with the operator | 6265 * @return the element associated with the operator |
| 6059 */ | 6266 */ |
| 6060 Element get staticElement; | 6267 Element get staticElement; |
| 6061 | 6268 |
| 6269 @override |
| 6062 bool get isAssignable => true; | 6270 bool get isAssignable => true; |
| 6063 } | 6271 } |
| 6064 | 6272 |
| 6065 /** | 6273 /** |
| 6066 * Instances of the class `IfStatement` represent an if statement. | 6274 * Instances of the class `IfStatement` represent an if statement. |
| 6067 * | 6275 * |
| 6068 * <pre> | 6276 * <pre> |
| 6069 * ifStatement ::= | 6277 * ifStatement ::= |
| 6070 * 'if' '(' [Expression] ')' [Statement] ('else' [Statement])? | 6278 * 'if' '(' [Expression] ')' [Statement] ('else' [Statement])? |
| 6071 * </pre> | 6279 * </pre> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6117 * @param thenStatement the statement that is executed if the condition evalua
tes to `true` | 6325 * @param thenStatement the statement that is executed if the condition evalua
tes to `true` |
| 6118 * @param elseKeyword the token representing the 'else' keyword | 6326 * @param elseKeyword the token representing the 'else' keyword |
| 6119 * @param elseStatement the statement that is executed if the condition evalua
tes to `false` | 6327 * @param elseStatement the statement that is executed if the condition evalua
tes to `false` |
| 6120 */ | 6328 */ |
| 6121 IfStatement(this.ifKeyword, this.leftParenthesis, Expression condition, this.r
ightParenthesis, Statement thenStatement, this.elseKeyword, Statement elseStatem
ent) { | 6329 IfStatement(this.ifKeyword, this.leftParenthesis, Expression condition, this.r
ightParenthesis, Statement thenStatement, this.elseKeyword, Statement elseStatem
ent) { |
| 6122 this._condition = becomeParentOf(condition); | 6330 this._condition = becomeParentOf(condition); |
| 6123 this._thenStatement = becomeParentOf(thenStatement); | 6331 this._thenStatement = becomeParentOf(thenStatement); |
| 6124 this._elseStatement = becomeParentOf(elseStatement); | 6332 this._elseStatement = becomeParentOf(elseStatement); |
| 6125 } | 6333 } |
| 6126 | 6334 |
| 6335 @override |
| 6127 accept(AstVisitor visitor) => visitor.visitIfStatement(this); | 6336 accept(AstVisitor visitor) => visitor.visitIfStatement(this); |
| 6128 | 6337 |
| 6338 @override |
| 6129 Token get beginToken => ifKeyword; | 6339 Token get beginToken => ifKeyword; |
| 6130 | 6340 |
| 6131 /** | 6341 /** |
| 6132 * Return the condition used to determine which of the statements is executed
next. | 6342 * Return the condition used to determine which of the statements is executed
next. |
| 6133 * | 6343 * |
| 6134 * @return the condition used to determine which statement is executed next | 6344 * @return the condition used to determine which statement is executed next |
| 6135 */ | 6345 */ |
| 6136 Expression get condition => _condition; | 6346 Expression get condition => _condition; |
| 6137 | 6347 |
| 6138 /** | 6348 /** |
| 6139 * Return the statement that is executed if the condition evaluates to `false`
, or | 6349 * Return the statement that is executed if the condition evaluates to `false`
, or |
| 6140 * `null` if there is no else statement. | 6350 * `null` if there is no else statement. |
| 6141 * | 6351 * |
| 6142 * @return the statement that is executed if the condition evaluates to `false
` | 6352 * @return the statement that is executed if the condition evaluates to `false
` |
| 6143 */ | 6353 */ |
| 6144 Statement get elseStatement => _elseStatement; | 6354 Statement get elseStatement => _elseStatement; |
| 6145 | 6355 |
| 6356 @override |
| 6146 Token get endToken { | 6357 Token get endToken { |
| 6147 if (_elseStatement != null) { | 6358 if (_elseStatement != null) { |
| 6148 return _elseStatement.endToken; | 6359 return _elseStatement.endToken; |
| 6149 } | 6360 } |
| 6150 return _thenStatement.endToken; | 6361 return _thenStatement.endToken; |
| 6151 } | 6362 } |
| 6152 | 6363 |
| 6153 /** | 6364 /** |
| 6154 * Return the statement that is executed if the condition evaluates to `true`. | 6365 * Return the statement that is executed if the condition evaluates to `true`. |
| 6155 * | 6366 * |
| (...skipping 24 matching lines...) Expand all Loading... |
| 6180 /** | 6391 /** |
| 6181 * Set the statement that is executed if the condition evaluates to `true` to
the given | 6392 * Set the statement that is executed if the condition evaluates to `true` to
the given |
| 6182 * statement. | 6393 * statement. |
| 6183 * | 6394 * |
| 6184 * @param statement the statement that is executed if the condition evaluates
to `true` | 6395 * @param statement the statement that is executed if the condition evaluates
to `true` |
| 6185 */ | 6396 */ |
| 6186 void set thenStatement(Statement statement) { | 6397 void set thenStatement(Statement statement) { |
| 6187 _thenStatement = becomeParentOf(statement); | 6398 _thenStatement = becomeParentOf(statement); |
| 6188 } | 6399 } |
| 6189 | 6400 |
| 6401 @override |
| 6190 void visitChildren(AstVisitor visitor) { | 6402 void visitChildren(AstVisitor visitor) { |
| 6191 safelyVisitChild(_condition, visitor); | 6403 safelyVisitChild(_condition, visitor); |
| 6192 safelyVisitChild(_thenStatement, visitor); | 6404 safelyVisitChild(_thenStatement, visitor); |
| 6193 safelyVisitChild(_elseStatement, visitor); | 6405 safelyVisitChild(_elseStatement, visitor); |
| 6194 } | 6406 } |
| 6195 } | 6407 } |
| 6196 | 6408 |
| 6197 /** | 6409 /** |
| 6198 * Instances of the class `ImplementsClause` represent the "implements" clause i
n an class | 6410 * Instances of the class `ImplementsClause` represent the "implements" clause i
n an class |
| 6199 * declaration. | 6411 * declaration. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 6218 * Initialize a newly created implements clause. | 6430 * Initialize a newly created implements clause. |
| 6219 * | 6431 * |
| 6220 * @param keyword the token representing the 'implements' keyword | 6432 * @param keyword the token representing the 'implements' keyword |
| 6221 * @param interfaces the interfaces that are being implemented | 6433 * @param interfaces the interfaces that are being implemented |
| 6222 */ | 6434 */ |
| 6223 ImplementsClause(this.keyword, List<TypeName> interfaces) { | 6435 ImplementsClause(this.keyword, List<TypeName> interfaces) { |
| 6224 this._interfaces = new NodeList<TypeName>(this); | 6436 this._interfaces = new NodeList<TypeName>(this); |
| 6225 this._interfaces.addAll(interfaces); | 6437 this._interfaces.addAll(interfaces); |
| 6226 } | 6438 } |
| 6227 | 6439 |
| 6440 @override |
| 6228 accept(AstVisitor visitor) => visitor.visitImplementsClause(this); | 6441 accept(AstVisitor visitor) => visitor.visitImplementsClause(this); |
| 6229 | 6442 |
| 6443 @override |
| 6230 Token get beginToken => keyword; | 6444 Token get beginToken => keyword; |
| 6231 | 6445 |
| 6446 @override |
| 6232 Token get endToken => _interfaces.endToken; | 6447 Token get endToken => _interfaces.endToken; |
| 6233 | 6448 |
| 6234 /** | 6449 /** |
| 6235 * Return the list of the interfaces that are being implemented. | 6450 * Return the list of the interfaces that are being implemented. |
| 6236 * | 6451 * |
| 6237 * @return the list of the interfaces that are being implemented | 6452 * @return the list of the interfaces that are being implemented |
| 6238 */ | 6453 */ |
| 6239 NodeList<TypeName> get interfaces => _interfaces; | 6454 NodeList<TypeName> get interfaces => _interfaces; |
| 6240 | 6455 |
| 6456 @override |
| 6241 void visitChildren(AstVisitor visitor) { | 6457 void visitChildren(AstVisitor visitor) { |
| 6242 _interfaces.accept(visitor); | 6458 _interfaces.accept(visitor); |
| 6243 } | 6459 } |
| 6244 } | 6460 } |
| 6245 | 6461 |
| 6246 /** | 6462 /** |
| 6247 * Instances of the class `ImportDirective` represent an import directive. | 6463 * Instances of the class `ImportDirective` represent an import directive. |
| 6248 * | 6464 * |
| 6249 * <pre> | 6465 * <pre> |
| 6250 * importDirective ::= | 6466 * importDirective ::= |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6363 * @param libraryUri the URI of the library being imported | 6579 * @param libraryUri the URI of the library being imported |
| 6364 * @param asToken the token representing the 'as' token | 6580 * @param asToken the token representing the 'as' token |
| 6365 * @param prefix the prefix to be used with the imported names | 6581 * @param prefix the prefix to be used with the imported names |
| 6366 * @param combinators the combinators used to control how names are imported | 6582 * @param combinators the combinators used to control how names are imported |
| 6367 * @param semicolon the semicolon terminating the directive | 6583 * @param semicolon the semicolon terminating the directive |
| 6368 */ | 6584 */ |
| 6369 ImportDirective(Comment comment, List<Annotation> metadata, Token keyword, Str
ingLiteral libraryUri, this.asToken, SimpleIdentifier prefix, List<Combinator> c
ombinators, Token semicolon) : super(comment, metadata, keyword, libraryUri, com
binators, semicolon) { | 6585 ImportDirective(Comment comment, List<Annotation> metadata, Token keyword, Str
ingLiteral libraryUri, this.asToken, SimpleIdentifier prefix, List<Combinator> c
ombinators, Token semicolon) : super(comment, metadata, keyword, libraryUri, com
binators, semicolon) { |
| 6370 this._prefix = becomeParentOf(prefix); | 6586 this._prefix = becomeParentOf(prefix); |
| 6371 } | 6587 } |
| 6372 | 6588 |
| 6589 @override |
| 6373 accept(AstVisitor visitor) => visitor.visitImportDirective(this); | 6590 accept(AstVisitor visitor) => visitor.visitImportDirective(this); |
| 6374 | 6591 |
| 6592 @override |
| 6375 ImportElement get element => super.element as ImportElement; | 6593 ImportElement get element => super.element as ImportElement; |
| 6376 | 6594 |
| 6377 /** | 6595 /** |
| 6378 * Return the prefix to be used with the imported names, or `null` if the impo
rted names are | 6596 * Return the prefix to be used with the imported names, or `null` if the impo
rted names are |
| 6379 * not prefixed. | 6597 * not prefixed. |
| 6380 * | 6598 * |
| 6381 * @return the prefix to be used with the imported names | 6599 * @return the prefix to be used with the imported names |
| 6382 */ | 6600 */ |
| 6383 SimpleIdentifier get prefix => _prefix; | 6601 SimpleIdentifier get prefix => _prefix; |
| 6384 | 6602 |
| 6603 @override |
| 6385 LibraryElement get uriElement { | 6604 LibraryElement get uriElement { |
| 6386 ImportElement element = this.element; | 6605 ImportElement element = this.element; |
| 6387 if (element == null) { | 6606 if (element == null) { |
| 6388 return null; | 6607 return null; |
| 6389 } | 6608 } |
| 6390 return element.importedLibrary; | 6609 return element.importedLibrary; |
| 6391 } | 6610 } |
| 6392 | 6611 |
| 6393 /** | 6612 /** |
| 6394 * Set the prefix to be used with the imported names to the given identifier. | 6613 * Set the prefix to be used with the imported names to the given identifier. |
| 6395 * | 6614 * |
| 6396 * @param prefix the prefix to be used with the imported names | 6615 * @param prefix the prefix to be used with the imported names |
| 6397 */ | 6616 */ |
| 6398 void set prefix(SimpleIdentifier prefix) { | 6617 void set prefix(SimpleIdentifier prefix) { |
| 6399 this._prefix = becomeParentOf(prefix); | 6618 this._prefix = becomeParentOf(prefix); |
| 6400 } | 6619 } |
| 6401 | 6620 |
| 6621 @override |
| 6402 void visitChildren(AstVisitor visitor) { | 6622 void visitChildren(AstVisitor visitor) { |
| 6403 super.visitChildren(visitor); | 6623 super.visitChildren(visitor); |
| 6404 safelyVisitChild(_prefix, visitor); | 6624 safelyVisitChild(_prefix, visitor); |
| 6405 combinators.accept(visitor); | 6625 combinators.accept(visitor); |
| 6406 } | 6626 } |
| 6407 } | 6627 } |
| 6408 | 6628 |
| 6409 /** | 6629 /** |
| 6410 * Instances of the class `IndexExpression` represent an index expression. | 6630 * Instances of the class `IndexExpression` represent an index expression. |
| 6411 * | 6631 * |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6485 * @param leftBracket the left square bracket | 6705 * @param leftBracket the left square bracket |
| 6486 * @param index the expression used to compute the index | 6706 * @param index the expression used to compute the index |
| 6487 * @param rightBracket the right square bracket | 6707 * @param rightBracket the right square bracket |
| 6488 */ | 6708 */ |
| 6489 IndexExpression.forCascade(this.period, Token leftBracket, Expression index, T
oken rightBracket) { | 6709 IndexExpression.forCascade(this.period, Token leftBracket, Expression index, T
oken rightBracket) { |
| 6490 this._leftBracket = leftBracket; | 6710 this._leftBracket = leftBracket; |
| 6491 this._index = becomeParentOf(index); | 6711 this._index = becomeParentOf(index); |
| 6492 this._rightBracket = rightBracket; | 6712 this._rightBracket = rightBracket; |
| 6493 } | 6713 } |
| 6494 | 6714 |
| 6715 @override |
| 6495 accept(AstVisitor visitor) => visitor.visitIndexExpression(this); | 6716 accept(AstVisitor visitor) => visitor.visitIndexExpression(this); |
| 6496 | 6717 |
| 6718 @override |
| 6497 Token get beginToken { | 6719 Token get beginToken { |
| 6498 if (_target != null) { | 6720 if (_target != null) { |
| 6499 return _target.beginToken; | 6721 return _target.beginToken; |
| 6500 } | 6722 } |
| 6501 return period; | 6723 return period; |
| 6502 } | 6724 } |
| 6503 | 6725 |
| 6504 /** | 6726 /** |
| 6505 * Return the best element available for this operator. If resolution was able
to find a better | 6727 * Return the best element available for this operator. If resolution was able
to find a better |
| 6506 * element based on type propagation, that element will be returned. Otherwise
, the element found | 6728 * element based on type propagation, that element will be returned. Otherwise
, the element found |
| 6507 * using the result of static analysis will be returned. If resolution has not
been performed, | 6729 * using the result of static analysis will be returned. If resolution has not
been performed, |
| 6508 * then `null` will be returned. | 6730 * then `null` will be returned. |
| 6509 * | 6731 * |
| 6510 * @return the best element available for this operator | 6732 * @return the best element available for this operator |
| 6511 */ | 6733 */ |
| 6512 MethodElement get bestElement { | 6734 MethodElement get bestElement { |
| 6513 MethodElement element = propagatedElement; | 6735 MethodElement element = propagatedElement; |
| 6514 if (element == null) { | 6736 if (element == null) { |
| 6515 element = staticElement; | 6737 element = staticElement; |
| 6516 } | 6738 } |
| 6517 return element; | 6739 return element; |
| 6518 } | 6740 } |
| 6519 | 6741 |
| 6742 @override |
| 6520 Token get endToken => _rightBracket; | 6743 Token get endToken => _rightBracket; |
| 6521 | 6744 |
| 6522 /** | 6745 /** |
| 6523 * Return the expression used to compute the index. | 6746 * Return the expression used to compute the index. |
| 6524 * | 6747 * |
| 6525 * @return the expression used to compute the index | 6748 * @return the expression used to compute the index |
| 6526 */ | 6749 */ |
| 6527 Expression get index => _index; | 6750 Expression get index => _index; |
| 6528 | 6751 |
| 6529 /** | 6752 /** |
| 6530 * Return the left square bracket. | 6753 * Return the left square bracket. |
| 6531 * | 6754 * |
| 6532 * @return the left square bracket | 6755 * @return the left square bracket |
| 6533 */ | 6756 */ |
| 6534 Token get leftBracket => _leftBracket; | 6757 Token get leftBracket => _leftBracket; |
| 6535 | 6758 |
| 6759 @override |
| 6536 int get precedence => 15; | 6760 int get precedence => 15; |
| 6537 | 6761 |
| 6538 /** | 6762 /** |
| 6539 * Return the element associated with the operator based on the propagated typ
e of the target, or | 6763 * Return the element associated with the operator based on the propagated typ
e of the target, or |
| 6540 * `null` if the AST structure has not been resolved or if the operator could
not be | 6764 * `null` if the AST structure has not been resolved or if the operator could
not be |
| 6541 * resolved. One example of the latter case is an operator that is not defined
for the type of the | 6765 * resolved. One example of the latter case is an operator that is not defined
for the type of the |
| 6542 * target. | 6766 * target. |
| 6543 * | 6767 * |
| 6544 * @return the element associated with this operator | 6768 * @return the element associated with this operator |
| 6545 */ | 6769 */ |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6629 if (parent is PrefixExpression) { | 6853 if (parent is PrefixExpression) { |
| 6630 return parent.operator.type.isIncrementOperator; | 6854 return parent.operator.type.isIncrementOperator; |
| 6631 } else if (parent is PostfixExpression) { | 6855 } else if (parent is PostfixExpression) { |
| 6632 return true; | 6856 return true; |
| 6633 } else if (parent is AssignmentExpression) { | 6857 } else if (parent is AssignmentExpression) { |
| 6634 return identical(parent.leftHandSide, this); | 6858 return identical(parent.leftHandSide, this); |
| 6635 } | 6859 } |
| 6636 return false; | 6860 return false; |
| 6637 } | 6861 } |
| 6638 | 6862 |
| 6863 @override |
| 6639 bool get isAssignable => true; | 6864 bool get isAssignable => true; |
| 6640 | 6865 |
| 6641 /** | 6866 /** |
| 6642 * Return `true` if this expression is cascaded. If it is, then the target of
this | 6867 * Return `true` if this expression is cascaded. If it is, then the target of
this |
| 6643 * expression is not stored locally but is stored in the nearest ancestor that
is a | 6868 * expression is not stored locally but is stored in the nearest ancestor that
is a |
| 6644 * [CascadeExpression]. | 6869 * [CascadeExpression]. |
| 6645 * | 6870 * |
| 6646 * @return `true` if this expression is cascaded | 6871 * @return `true` if this expression is cascaded |
| 6647 */ | 6872 */ |
| 6648 bool get isCascaded => period != null; | 6873 bool get isCascaded => period != null; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6696 | 6921 |
| 6697 /** | 6922 /** |
| 6698 * Set the expression used to compute the object being indexed to the given ex
pression. | 6923 * Set the expression used to compute the object being indexed to the given ex
pression. |
| 6699 * | 6924 * |
| 6700 * @param expression the expression used to compute the object being indexed | 6925 * @param expression the expression used to compute the object being indexed |
| 6701 */ | 6926 */ |
| 6702 void set target(Expression expression) { | 6927 void set target(Expression expression) { |
| 6703 _target = becomeParentOf(expression); | 6928 _target = becomeParentOf(expression); |
| 6704 } | 6929 } |
| 6705 | 6930 |
| 6931 @override |
| 6706 void visitChildren(AstVisitor visitor) { | 6932 void visitChildren(AstVisitor visitor) { |
| 6707 safelyVisitChild(_target, visitor); | 6933 safelyVisitChild(_target, visitor); |
| 6708 safelyVisitChild(_index, visitor); | 6934 safelyVisitChild(_index, visitor); |
| 6709 } | 6935 } |
| 6710 | 6936 |
| 6711 /** | 6937 /** |
| 6712 * If the AST structure has been resolved, and the function being invoked is k
nown based on | 6938 * If the AST structure has been resolved, and the function being invoked is k
nown based on |
| 6713 * propagated type information, then return the parameter element representing
the parameter to | 6939 * propagated type information, then return the parameter element representing
the parameter to |
| 6714 * which the value of the index expression will be bound. Otherwise, return `n
ull`. | 6940 * which the value of the index expression will be bound. Otherwise, return `n
ull`. |
| 6715 * | 6941 * |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6787 * | 7013 * |
| 6788 * @param keyword the keyword used to indicate how an object should be created | 7014 * @param keyword the keyword used to indicate how an object should be created |
| 6789 * @param constructorName the name of the constructor to be invoked | 7015 * @param constructorName the name of the constructor to be invoked |
| 6790 * @param argumentList the list of arguments to the constructor | 7016 * @param argumentList the list of arguments to the constructor |
| 6791 */ | 7017 */ |
| 6792 InstanceCreationExpression(this.keyword, ConstructorName constructorName, Argu
mentList argumentList) { | 7018 InstanceCreationExpression(this.keyword, ConstructorName constructorName, Argu
mentList argumentList) { |
| 6793 this.constructorName = becomeParentOf(constructorName); | 7019 this.constructorName = becomeParentOf(constructorName); |
| 6794 this._argumentList = becomeParentOf(argumentList); | 7020 this._argumentList = becomeParentOf(argumentList); |
| 6795 } | 7021 } |
| 6796 | 7022 |
| 7023 @override |
| 6797 accept(AstVisitor visitor) => visitor.visitInstanceCreationExpression(this); | 7024 accept(AstVisitor visitor) => visitor.visitInstanceCreationExpression(this); |
| 6798 | 7025 |
| 6799 /** | 7026 /** |
| 6800 * Return the list of arguments to the constructor. | 7027 * Return the list of arguments to the constructor. |
| 6801 * | 7028 * |
| 6802 * @return the list of arguments to the constructor | 7029 * @return the list of arguments to the constructor |
| 6803 */ | 7030 */ |
| 6804 ArgumentList get argumentList => _argumentList; | 7031 ArgumentList get argumentList => _argumentList; |
| 6805 | 7032 |
| 7033 @override |
| 6806 Token get beginToken => keyword; | 7034 Token get beginToken => keyword; |
| 6807 | 7035 |
| 7036 @override |
| 6808 Token get endToken => _argumentList.endToken; | 7037 Token get endToken => _argumentList.endToken; |
| 6809 | 7038 |
| 7039 @override |
| 6810 int get precedence => 15; | 7040 int get precedence => 15; |
| 6811 | 7041 |
| 6812 /** | 7042 /** |
| 6813 * Return `true` if this creation expression is used to invoke a constant cons
tructor. | 7043 * Return `true` if this creation expression is used to invoke a constant cons
tructor. |
| 6814 * | 7044 * |
| 6815 * @return `true` if this creation expression is used to invoke a constant con
structor | 7045 * @return `true` if this creation expression is used to invoke a constant con
structor |
| 6816 */ | 7046 */ |
| 6817 bool get isConst => keyword is KeywordToken && identical((keyword as KeywordTo
ken).keyword, Keyword.CONST); | 7047 bool get isConst => keyword is KeywordToken && identical((keyword as KeywordTo
ken).keyword, Keyword.CONST); |
| 6818 | 7048 |
| 6819 /** | 7049 /** |
| 6820 * Set the list of arguments to the constructor to the given list. | 7050 * Set the list of arguments to the constructor to the given list. |
| 6821 * | 7051 * |
| 6822 * @param argumentList the list of arguments to the constructor | 7052 * @param argumentList the list of arguments to the constructor |
| 6823 */ | 7053 */ |
| 6824 void set argumentList(ArgumentList argumentList) { | 7054 void set argumentList(ArgumentList argumentList) { |
| 6825 this._argumentList = becomeParentOf(argumentList); | 7055 this._argumentList = becomeParentOf(argumentList); |
| 6826 } | 7056 } |
| 6827 | 7057 |
| 7058 @override |
| 6828 void visitChildren(AstVisitor visitor) { | 7059 void visitChildren(AstVisitor visitor) { |
| 6829 safelyVisitChild(constructorName, visitor); | 7060 safelyVisitChild(constructorName, visitor); |
| 6830 safelyVisitChild(_argumentList, visitor); | 7061 safelyVisitChild(_argumentList, visitor); |
| 6831 } | 7062 } |
| 6832 } | 7063 } |
| 6833 | 7064 |
| 6834 /** | 7065 /** |
| 6835 * Instances of the class `IntegerLiteral` represent an integer literal expressi
on. | 7066 * Instances of the class `IntegerLiteral` represent an integer literal expressi
on. |
| 6836 * | 7067 * |
| 6837 * <pre> | 7068 * <pre> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 6859 int value = 0; | 7090 int value = 0; |
| 6860 | 7091 |
| 6861 /** | 7092 /** |
| 6862 * Initialize a newly created integer literal. | 7093 * Initialize a newly created integer literal. |
| 6863 * | 7094 * |
| 6864 * @param literal the token representing the literal | 7095 * @param literal the token representing the literal |
| 6865 * @param value the value of the literal | 7096 * @param value the value of the literal |
| 6866 */ | 7097 */ |
| 6867 IntegerLiteral(this.literal, this.value); | 7098 IntegerLiteral(this.literal, this.value); |
| 6868 | 7099 |
| 7100 @override |
| 6869 accept(AstVisitor visitor) => visitor.visitIntegerLiteral(this); | 7101 accept(AstVisitor visitor) => visitor.visitIntegerLiteral(this); |
| 6870 | 7102 |
| 7103 @override |
| 6871 Token get beginToken => literal; | 7104 Token get beginToken => literal; |
| 6872 | 7105 |
| 7106 @override |
| 6873 Token get endToken => literal; | 7107 Token get endToken => literal; |
| 6874 | 7108 |
| 7109 @override |
| 6875 void visitChildren(AstVisitor visitor) { | 7110 void visitChildren(AstVisitor visitor) { |
| 6876 } | 7111 } |
| 6877 } | 7112 } |
| 6878 | 7113 |
| 6879 /** | 7114 /** |
| 6880 * The abstract class `InterpolationElement` defines the behavior common to elem
ents within a | 7115 * The abstract class `InterpolationElement` defines the behavior common to elem
ents within a |
| 6881 * [StringInterpolation]. | 7116 * [StringInterpolation]. |
| 6882 * | 7117 * |
| 6883 * <pre> | 7118 * <pre> |
| 6884 * interpolationElement ::= | 7119 * interpolationElement ::= |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6920 * Initialize a newly created interpolation expression. | 7155 * Initialize a newly created interpolation expression. |
| 6921 * | 7156 * |
| 6922 * @param leftBracket the left curly bracket | 7157 * @param leftBracket the left curly bracket |
| 6923 * @param expression the expression to be evaluated for the value to be conver
ted into a string | 7158 * @param expression the expression to be evaluated for the value to be conver
ted into a string |
| 6924 * @param rightBracket the right curly bracket | 7159 * @param rightBracket the right curly bracket |
| 6925 */ | 7160 */ |
| 6926 InterpolationExpression(this.leftBracket, Expression expression, this.rightBra
cket) { | 7161 InterpolationExpression(this.leftBracket, Expression expression, this.rightBra
cket) { |
| 6927 this._expression = becomeParentOf(expression); | 7162 this._expression = becomeParentOf(expression); |
| 6928 } | 7163 } |
| 6929 | 7164 |
| 7165 @override |
| 6930 accept(AstVisitor visitor) => visitor.visitInterpolationExpression(this); | 7166 accept(AstVisitor visitor) => visitor.visitInterpolationExpression(this); |
| 6931 | 7167 |
| 7168 @override |
| 6932 Token get beginToken => leftBracket; | 7169 Token get beginToken => leftBracket; |
| 6933 | 7170 |
| 7171 @override |
| 6934 Token get endToken { | 7172 Token get endToken { |
| 6935 if (rightBracket != null) { | 7173 if (rightBracket != null) { |
| 6936 return rightBracket; | 7174 return rightBracket; |
| 6937 } | 7175 } |
| 6938 return _expression.endToken; | 7176 return _expression.endToken; |
| 6939 } | 7177 } |
| 6940 | 7178 |
| 6941 /** | 7179 /** |
| 6942 * Return the expression to be evaluated for the value to be converted into a
string. | 7180 * Return the expression to be evaluated for the value to be converted into a
string. |
| 6943 * | 7181 * |
| 6944 * @return the expression to be evaluated for the value to be converted into a
string | 7182 * @return the expression to be evaluated for the value to be converted into a
string |
| 6945 */ | 7183 */ |
| 6946 Expression get expression => _expression; | 7184 Expression get expression => _expression; |
| 6947 | 7185 |
| 6948 /** | 7186 /** |
| 6949 * Set the expression to be evaluated for the value to be converted into a str
ing to the given | 7187 * Set the expression to be evaluated for the value to be converted into a str
ing to the given |
| 6950 * expression. | 7188 * expression. |
| 6951 * | 7189 * |
| 6952 * @param expression the expression to be evaluated for the value to be conver
ted into a string | 7190 * @param expression the expression to be evaluated for the value to be conver
ted into a string |
| 6953 */ | 7191 */ |
| 6954 void set expression(Expression expression) { | 7192 void set expression(Expression expression) { |
| 6955 this._expression = becomeParentOf(expression); | 7193 this._expression = becomeParentOf(expression); |
| 6956 } | 7194 } |
| 6957 | 7195 |
| 7196 @override |
| 6958 void visitChildren(AstVisitor visitor) { | 7197 void visitChildren(AstVisitor visitor) { |
| 6959 safelyVisitChild(_expression, visitor); | 7198 safelyVisitChild(_expression, visitor); |
| 6960 } | 7199 } |
| 6961 } | 7200 } |
| 6962 | 7201 |
| 6963 /** | 7202 /** |
| 6964 * Instances of the class `InterpolationString` represent a non-empty substring
of an | 7203 * Instances of the class `InterpolationString` represent a non-empty substring
of an |
| 6965 * interpolated string. | 7204 * interpolated string. |
| 6966 * | 7205 * |
| 6967 * <pre> | 7206 * <pre> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 6984 * Initialize a newly created string of characters that are part of a string i
nterpolation. | 7223 * Initialize a newly created string of characters that are part of a string i
nterpolation. |
| 6985 * | 7224 * |
| 6986 * @param the characters that will be added to the string | 7225 * @param the characters that will be added to the string |
| 6987 * @param value the value of the literal | 7226 * @param value the value of the literal |
| 6988 */ | 7227 */ |
| 6989 InterpolationString(Token contents, String value) { | 7228 InterpolationString(Token contents, String value) { |
| 6990 this._contents = contents; | 7229 this._contents = contents; |
| 6991 this._value = value; | 7230 this._value = value; |
| 6992 } | 7231 } |
| 6993 | 7232 |
| 7233 @override |
| 6994 accept(AstVisitor visitor) => visitor.visitInterpolationString(this); | 7234 accept(AstVisitor visitor) => visitor.visitInterpolationString(this); |
| 6995 | 7235 |
| 7236 @override |
| 6996 Token get beginToken => _contents; | 7237 Token get beginToken => _contents; |
| 6997 | 7238 |
| 6998 /** | 7239 /** |
| 6999 * Return the characters that will be added to the string. | 7240 * Return the characters that will be added to the string. |
| 7000 * | 7241 * |
| 7001 * @return the characters that will be added to the string | 7242 * @return the characters that will be added to the string |
| 7002 */ | 7243 */ |
| 7003 Token get contents => _contents; | 7244 Token get contents => _contents; |
| 7004 | 7245 |
| 7246 @override |
| 7005 Token get endToken => _contents; | 7247 Token get endToken => _contents; |
| 7006 | 7248 |
| 7007 /** | 7249 /** |
| 7008 * Return the value of the literal. | 7250 * Return the value of the literal. |
| 7009 * | 7251 * |
| 7010 * @return the value of the literal | 7252 * @return the value of the literal |
| 7011 */ | 7253 */ |
| 7012 String get value => _value; | 7254 String get value => _value; |
| 7013 | 7255 |
| 7014 /** | 7256 /** |
| 7015 * Set the characters that will be added to the string to those in the given s
tring. | 7257 * Set the characters that will be added to the string to those in the given s
tring. |
| 7016 * | 7258 * |
| 7017 * @param string the characters that will be added to the string | 7259 * @param string the characters that will be added to the string |
| 7018 */ | 7260 */ |
| 7019 void set contents(Token string) { | 7261 void set contents(Token string) { |
| 7020 _contents = string; | 7262 _contents = string; |
| 7021 } | 7263 } |
| 7022 | 7264 |
| 7023 /** | 7265 /** |
| 7024 * Set the value of the literal to the given string. | 7266 * Set the value of the literal to the given string. |
| 7025 * | 7267 * |
| 7026 * @param string the value of the literal | 7268 * @param string the value of the literal |
| 7027 */ | 7269 */ |
| 7028 void set value(String string) { | 7270 void set value(String string) { |
| 7029 _value = string; | 7271 _value = string; |
| 7030 } | 7272 } |
| 7031 | 7273 |
| 7274 @override |
| 7032 void visitChildren(AstVisitor visitor) { | 7275 void visitChildren(AstVisitor visitor) { |
| 7033 } | 7276 } |
| 7034 } | 7277 } |
| 7035 | 7278 |
| 7036 /** | 7279 /** |
| 7037 * Instances of the class `IsExpression` represent an is expression. | 7280 * Instances of the class `IsExpression` represent an is expression. |
| 7038 * | 7281 * |
| 7039 * <pre> | 7282 * <pre> |
| 7040 * isExpression ::= | 7283 * isExpression ::= |
| 7041 * [Expression] 'is' '!'? [TypeName] | 7284 * [Expression] 'is' '!'? [TypeName] |
| (...skipping 26 matching lines...) Expand all Loading... |
| 7068 * @param expression the expression used to compute the value whose type is be
ing tested | 7311 * @param expression the expression used to compute the value whose type is be
ing tested |
| 7069 * @param isOperator the is operator | 7312 * @param isOperator the is operator |
| 7070 * @param notOperator the not operator, or `null` if the sense of the test is
not negated | 7313 * @param notOperator the not operator, or `null` if the sense of the test is
not negated |
| 7071 * @param type the name of the type being tested for | 7314 * @param type the name of the type being tested for |
| 7072 */ | 7315 */ |
| 7073 IsExpression(Expression expression, this.isOperator, this.notOperator, TypeNam
e type) { | 7316 IsExpression(Expression expression, this.isOperator, this.notOperator, TypeNam
e type) { |
| 7074 this._expression = becomeParentOf(expression); | 7317 this._expression = becomeParentOf(expression); |
| 7075 this._type = becomeParentOf(type); | 7318 this._type = becomeParentOf(type); |
| 7076 } | 7319 } |
| 7077 | 7320 |
| 7321 @override |
| 7078 accept(AstVisitor visitor) => visitor.visitIsExpression(this); | 7322 accept(AstVisitor visitor) => visitor.visitIsExpression(this); |
| 7079 | 7323 |
| 7324 @override |
| 7080 Token get beginToken => _expression.beginToken; | 7325 Token get beginToken => _expression.beginToken; |
| 7081 | 7326 |
| 7327 @override |
| 7082 Token get endToken => _type.endToken; | 7328 Token get endToken => _type.endToken; |
| 7083 | 7329 |
| 7084 /** | 7330 /** |
| 7085 * Return the expression used to compute the value whose type is being tested. | 7331 * Return the expression used to compute the value whose type is being tested. |
| 7086 * | 7332 * |
| 7087 * @return the expression used to compute the value whose type is being tested | 7333 * @return the expression used to compute the value whose type is being tested |
| 7088 */ | 7334 */ |
| 7089 Expression get expression => _expression; | 7335 Expression get expression => _expression; |
| 7090 | 7336 |
| 7337 @override |
| 7091 int get precedence => 7; | 7338 int get precedence => 7; |
| 7092 | 7339 |
| 7093 /** | 7340 /** |
| 7094 * Return the name of the type being tested for. | 7341 * Return the name of the type being tested for. |
| 7095 * | 7342 * |
| 7096 * @return the name of the type being tested for | 7343 * @return the name of the type being tested for |
| 7097 */ | 7344 */ |
| 7098 TypeName get type => _type; | 7345 TypeName get type => _type; |
| 7099 | 7346 |
| 7100 /** | 7347 /** |
| 7101 * Set the expression used to compute the value whose type is being tested to
the given | 7348 * Set the expression used to compute the value whose type is being tested to
the given |
| 7102 * expression. | 7349 * expression. |
| 7103 * | 7350 * |
| 7104 * @param expression the expression used to compute the value whose type is be
ing tested | 7351 * @param expression the expression used to compute the value whose type is be
ing tested |
| 7105 */ | 7352 */ |
| 7106 void set expression(Expression expression) { | 7353 void set expression(Expression expression) { |
| 7107 this._expression = becomeParentOf(expression); | 7354 this._expression = becomeParentOf(expression); |
| 7108 } | 7355 } |
| 7109 | 7356 |
| 7110 /** | 7357 /** |
| 7111 * Set the name of the type being tested for to the given name. | 7358 * Set the name of the type being tested for to the given name. |
| 7112 * | 7359 * |
| 7113 * @param name the name of the type being tested for | 7360 * @param name the name of the type being tested for |
| 7114 */ | 7361 */ |
| 7115 void set type(TypeName name) { | 7362 void set type(TypeName name) { |
| 7116 this._type = becomeParentOf(name); | 7363 this._type = becomeParentOf(name); |
| 7117 } | 7364 } |
| 7118 | 7365 |
| 7366 @override |
| 7119 void visitChildren(AstVisitor visitor) { | 7367 void visitChildren(AstVisitor visitor) { |
| 7120 safelyVisitChild(_expression, visitor); | 7368 safelyVisitChild(_expression, visitor); |
| 7121 safelyVisitChild(_type, visitor); | 7369 safelyVisitChild(_type, visitor); |
| 7122 } | 7370 } |
| 7123 } | 7371 } |
| 7124 | 7372 |
| 7125 /** | 7373 /** |
| 7126 * Instances of the class `Label` represent a label. | 7374 * Instances of the class `Label` represent a label. |
| 7127 * | 7375 * |
| 7128 * <pre> | 7376 * <pre> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 7144 /** | 7392 /** |
| 7145 * Initialize a newly created label. | 7393 * Initialize a newly created label. |
| 7146 * | 7394 * |
| 7147 * @param label the label being applied | 7395 * @param label the label being applied |
| 7148 * @param colon the colon that separates the label from whatever follows | 7396 * @param colon the colon that separates the label from whatever follows |
| 7149 */ | 7397 */ |
| 7150 Label(SimpleIdentifier label, this.colon) { | 7398 Label(SimpleIdentifier label, this.colon) { |
| 7151 this._label = becomeParentOf(label); | 7399 this._label = becomeParentOf(label); |
| 7152 } | 7400 } |
| 7153 | 7401 |
| 7402 @override |
| 7154 accept(AstVisitor visitor) => visitor.visitLabel(this); | 7403 accept(AstVisitor visitor) => visitor.visitLabel(this); |
| 7155 | 7404 |
| 7405 @override |
| 7156 Token get beginToken => _label.beginToken; | 7406 Token get beginToken => _label.beginToken; |
| 7157 | 7407 |
| 7408 @override |
| 7158 Token get endToken => colon; | 7409 Token get endToken => colon; |
| 7159 | 7410 |
| 7160 /** | 7411 /** |
| 7161 * Return the label being associated with the statement. | 7412 * Return the label being associated with the statement. |
| 7162 * | 7413 * |
| 7163 * @return the label being associated with the statement | 7414 * @return the label being associated with the statement |
| 7164 */ | 7415 */ |
| 7165 SimpleIdentifier get label => _label; | 7416 SimpleIdentifier get label => _label; |
| 7166 | 7417 |
| 7167 /** | 7418 /** |
| 7168 * Set the label being associated with the statement to the given label. | 7419 * Set the label being associated with the statement to the given label. |
| 7169 * | 7420 * |
| 7170 * @param label the label being associated with the statement | 7421 * @param label the label being associated with the statement |
| 7171 */ | 7422 */ |
| 7172 void set label(SimpleIdentifier label) { | 7423 void set label(SimpleIdentifier label) { |
| 7173 this._label = becomeParentOf(label); | 7424 this._label = becomeParentOf(label); |
| 7174 } | 7425 } |
| 7175 | 7426 |
| 7427 @override |
| 7176 void visitChildren(AstVisitor visitor) { | 7428 void visitChildren(AstVisitor visitor) { |
| 7177 safelyVisitChild(_label, visitor); | 7429 safelyVisitChild(_label, visitor); |
| 7178 } | 7430 } |
| 7179 } | 7431 } |
| 7180 | 7432 |
| 7181 /** | 7433 /** |
| 7182 * Instances of the class `LabeledStatement` represent a statement that has a la
bel associated | 7434 * Instances of the class `LabeledStatement` represent a statement that has a la
bel associated |
| 7183 * with them. | 7435 * with them. |
| 7184 * | 7436 * |
| 7185 * <pre> | 7437 * <pre> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 7203 * | 7455 * |
| 7204 * @param labels the labels being associated with the statement | 7456 * @param labels the labels being associated with the statement |
| 7205 * @param statement the statement with which the labels are being associated | 7457 * @param statement the statement with which the labels are being associated |
| 7206 */ | 7458 */ |
| 7207 LabeledStatement(List<Label> labels, Statement statement) { | 7459 LabeledStatement(List<Label> labels, Statement statement) { |
| 7208 this._labels = new NodeList<Label>(this); | 7460 this._labels = new NodeList<Label>(this); |
| 7209 this._labels.addAll(labels); | 7461 this._labels.addAll(labels); |
| 7210 this._statement = becomeParentOf(statement); | 7462 this._statement = becomeParentOf(statement); |
| 7211 } | 7463 } |
| 7212 | 7464 |
| 7465 @override |
| 7213 accept(AstVisitor visitor) => visitor.visitLabeledStatement(this); | 7466 accept(AstVisitor visitor) => visitor.visitLabeledStatement(this); |
| 7214 | 7467 |
| 7468 @override |
| 7215 Token get beginToken { | 7469 Token get beginToken { |
| 7216 if (!_labels.isEmpty) { | 7470 if (!_labels.isEmpty) { |
| 7217 return _labels.beginToken; | 7471 return _labels.beginToken; |
| 7218 } | 7472 } |
| 7219 return _statement.beginToken; | 7473 return _statement.beginToken; |
| 7220 } | 7474 } |
| 7221 | 7475 |
| 7476 @override |
| 7222 Token get endToken => _statement.endToken; | 7477 Token get endToken => _statement.endToken; |
| 7223 | 7478 |
| 7224 /** | 7479 /** |
| 7225 * Return the labels being associated with the statement. | 7480 * Return the labels being associated with the statement. |
| 7226 * | 7481 * |
| 7227 * @return the labels being associated with the statement | 7482 * @return the labels being associated with the statement |
| 7228 */ | 7483 */ |
| 7229 NodeList<Label> get labels => _labels; | 7484 NodeList<Label> get labels => _labels; |
| 7230 | 7485 |
| 7231 /** | 7486 /** |
| 7232 * Return the statement with which the labels are being associated. | 7487 * Return the statement with which the labels are being associated. |
| 7233 * | 7488 * |
| 7234 * @return the statement with which the labels are being associated | 7489 * @return the statement with which the labels are being associated |
| 7235 */ | 7490 */ |
| 7236 Statement get statement => _statement; | 7491 Statement get statement => _statement; |
| 7237 | 7492 |
| 7238 /** | 7493 /** |
| 7239 * Set the statement with which the labels are being associated to the given s
tatement. | 7494 * Set the statement with which the labels are being associated to the given s
tatement. |
| 7240 * | 7495 * |
| 7241 * @param statement the statement with which the labels are being associated | 7496 * @param statement the statement with which the labels are being associated |
| 7242 */ | 7497 */ |
| 7243 void set statement(Statement statement) { | 7498 void set statement(Statement statement) { |
| 7244 this._statement = becomeParentOf(statement); | 7499 this._statement = becomeParentOf(statement); |
| 7245 } | 7500 } |
| 7246 | 7501 |
| 7502 @override |
| 7247 void visitChildren(AstVisitor visitor) { | 7503 void visitChildren(AstVisitor visitor) { |
| 7248 _labels.accept(visitor); | 7504 _labels.accept(visitor); |
| 7249 safelyVisitChild(_statement, visitor); | 7505 safelyVisitChild(_statement, visitor); |
| 7250 } | 7506 } |
| 7251 } | 7507 } |
| 7252 | 7508 |
| 7253 /** | 7509 /** |
| 7254 * Instances of the class `LibraryDirective` represent a library directive. | 7510 * Instances of the class `LibraryDirective` represent a library directive. |
| 7255 * | 7511 * |
| 7256 * <pre> | 7512 * <pre> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 7280 * @param comment the documentation comment associated with this directive | 7536 * @param comment the documentation comment associated with this directive |
| 7281 * @param metadata the annotations associated with the directive | 7537 * @param metadata the annotations associated with the directive |
| 7282 * @param libraryToken the token representing the 'library' token | 7538 * @param libraryToken the token representing the 'library' token |
| 7283 * @param name the name of the library being defined | 7539 * @param name the name of the library being defined |
| 7284 * @param semicolon the semicolon terminating the directive | 7540 * @param semicolon the semicolon terminating the directive |
| 7285 */ | 7541 */ |
| 7286 LibraryDirective(Comment comment, List<Annotation> metadata, this.libraryToken
, LibraryIdentifier name, this.semicolon) : super(comment, metadata) { | 7542 LibraryDirective(Comment comment, List<Annotation> metadata, this.libraryToken
, LibraryIdentifier name, this.semicolon) : super(comment, metadata) { |
| 7287 this._name = becomeParentOf(name); | 7543 this._name = becomeParentOf(name); |
| 7288 } | 7544 } |
| 7289 | 7545 |
| 7546 @override |
| 7290 accept(AstVisitor visitor) => visitor.visitLibraryDirective(this); | 7547 accept(AstVisitor visitor) => visitor.visitLibraryDirective(this); |
| 7291 | 7548 |
| 7549 @override |
| 7292 Token get endToken => semicolon; | 7550 Token get endToken => semicolon; |
| 7293 | 7551 |
| 7552 @override |
| 7294 Token get keyword => libraryToken; | 7553 Token get keyword => libraryToken; |
| 7295 | 7554 |
| 7296 /** | 7555 /** |
| 7297 * Return the name of the library being defined. | 7556 * Return the name of the library being defined. |
| 7298 * | 7557 * |
| 7299 * @return the name of the library being defined | 7558 * @return the name of the library being defined |
| 7300 */ | 7559 */ |
| 7301 LibraryIdentifier get name => _name; | 7560 LibraryIdentifier get name => _name; |
| 7302 | 7561 |
| 7303 /** | 7562 /** |
| 7304 * Set the name of the library being defined to the given name. | 7563 * Set the name of the library being defined to the given name. |
| 7305 * | 7564 * |
| 7306 * @param name the name of the library being defined | 7565 * @param name the name of the library being defined |
| 7307 */ | 7566 */ |
| 7308 void set name(LibraryIdentifier name) { | 7567 void set name(LibraryIdentifier name) { |
| 7309 this._name = becomeParentOf(name); | 7568 this._name = becomeParentOf(name); |
| 7310 } | 7569 } |
| 7311 | 7570 |
| 7571 @override |
| 7312 void visitChildren(AstVisitor visitor) { | 7572 void visitChildren(AstVisitor visitor) { |
| 7313 super.visitChildren(visitor); | 7573 super.visitChildren(visitor); |
| 7314 safelyVisitChild(_name, visitor); | 7574 safelyVisitChild(_name, visitor); |
| 7315 } | 7575 } |
| 7316 | 7576 |
| 7577 @override |
| 7317 Token get firstTokenAfterCommentAndMetadata => libraryToken; | 7578 Token get firstTokenAfterCommentAndMetadata => libraryToken; |
| 7318 } | 7579 } |
| 7319 | 7580 |
| 7320 /** | 7581 /** |
| 7321 * Instances of the class `LibraryIdentifier` represent the identifier for a lib
rary. | 7582 * Instances of the class `LibraryIdentifier` represent the identifier for a lib
rary. |
| 7322 * | 7583 * |
| 7323 * <pre> | 7584 * <pre> |
| 7324 * libraryIdentifier ::= | 7585 * libraryIdentifier ::= |
| 7325 * [SimpleIdentifier] ('.' [SimpleIdentifier])* | 7586 * [SimpleIdentifier] ('.' [SimpleIdentifier])* |
| 7326 * </pre> | 7587 * </pre> |
| 7327 */ | 7588 */ |
| 7328 class LibraryIdentifier extends Identifier { | 7589 class LibraryIdentifier extends Identifier { |
| 7329 /** | 7590 /** |
| 7330 * The components of the identifier. | 7591 * The components of the identifier. |
| 7331 */ | 7592 */ |
| 7332 NodeList<SimpleIdentifier> _components; | 7593 NodeList<SimpleIdentifier> _components; |
| 7333 | 7594 |
| 7334 /** | 7595 /** |
| 7335 * Initialize a newly created prefixed identifier. | 7596 * Initialize a newly created prefixed identifier. |
| 7336 * | 7597 * |
| 7337 * @param components the components of the identifier | 7598 * @param components the components of the identifier |
| 7338 */ | 7599 */ |
| 7339 LibraryIdentifier(List<SimpleIdentifier> components) { | 7600 LibraryIdentifier(List<SimpleIdentifier> components) { |
| 7340 this._components = new NodeList<SimpleIdentifier>(this); | 7601 this._components = new NodeList<SimpleIdentifier>(this); |
| 7341 this._components.addAll(components); | 7602 this._components.addAll(components); |
| 7342 } | 7603 } |
| 7343 | 7604 |
| 7605 @override |
| 7344 accept(AstVisitor visitor) => visitor.visitLibraryIdentifier(this); | 7606 accept(AstVisitor visitor) => visitor.visitLibraryIdentifier(this); |
| 7345 | 7607 |
| 7608 @override |
| 7346 Token get beginToken => _components.beginToken; | 7609 Token get beginToken => _components.beginToken; |
| 7347 | 7610 |
| 7611 @override |
| 7348 Element get bestElement => staticElement; | 7612 Element get bestElement => staticElement; |
| 7349 | 7613 |
| 7350 /** | 7614 /** |
| 7351 * Return the components of the identifier. | 7615 * Return the components of the identifier. |
| 7352 * | 7616 * |
| 7353 * @return the components of the identifier | 7617 * @return the components of the identifier |
| 7354 */ | 7618 */ |
| 7355 NodeList<SimpleIdentifier> get components => _components; | 7619 NodeList<SimpleIdentifier> get components => _components; |
| 7356 | 7620 |
| 7621 @override |
| 7357 Token get endToken => _components.endToken; | 7622 Token get endToken => _components.endToken; |
| 7358 | 7623 |
| 7624 @override |
| 7359 String get name { | 7625 String get name { |
| 7360 JavaStringBuilder builder = new JavaStringBuilder(); | 7626 JavaStringBuilder builder = new JavaStringBuilder(); |
| 7361 bool needsPeriod = false; | 7627 bool needsPeriod = false; |
| 7362 for (SimpleIdentifier identifier in _components) { | 7628 for (SimpleIdentifier identifier in _components) { |
| 7363 if (needsPeriod) { | 7629 if (needsPeriod) { |
| 7364 builder.append("."); | 7630 builder.append("."); |
| 7365 } else { | 7631 } else { |
| 7366 needsPeriod = true; | 7632 needsPeriod = true; |
| 7367 } | 7633 } |
| 7368 builder.append(identifier.name); | 7634 builder.append(identifier.name); |
| 7369 } | 7635 } |
| 7370 return builder.toString(); | 7636 return builder.toString(); |
| 7371 } | 7637 } |
| 7372 | 7638 |
| 7639 @override |
| 7373 int get precedence => 15; | 7640 int get precedence => 15; |
| 7374 | 7641 |
| 7642 @override |
| 7375 Element get propagatedElement => null; | 7643 Element get propagatedElement => null; |
| 7376 | 7644 |
| 7645 @override |
| 7377 Element get staticElement => null; | 7646 Element get staticElement => null; |
| 7378 | 7647 |
| 7648 @override |
| 7379 void visitChildren(AstVisitor visitor) { | 7649 void visitChildren(AstVisitor visitor) { |
| 7380 _components.accept(visitor); | 7650 _components.accept(visitor); |
| 7381 } | 7651 } |
| 7382 } | 7652 } |
| 7383 | 7653 |
| 7384 /** | 7654 /** |
| 7385 * Instances of the class `ListLiteral` represent a list literal. | 7655 * Instances of the class `ListLiteral` represent a list literal. |
| 7386 * | 7656 * |
| 7387 * <pre> | 7657 * <pre> |
| 7388 * listLiteral ::= | 7658 * listLiteral ::= |
| (...skipping 26 matching lines...) Expand all Loading... |
| 7415 * @param elements the expressions used to compute the elements of the list | 7685 * @param elements the expressions used to compute the elements of the list |
| 7416 * @param rightBracket the right square bracket | 7686 * @param rightBracket the right square bracket |
| 7417 */ | 7687 */ |
| 7418 ListLiteral(Token constKeyword, TypeArgumentList typeArguments, Token leftBrac
ket, List<Expression> elements, Token rightBracket) : super(constKeyword, typeAr
guments) { | 7688 ListLiteral(Token constKeyword, TypeArgumentList typeArguments, Token leftBrac
ket, List<Expression> elements, Token rightBracket) : super(constKeyword, typeAr
guments) { |
| 7419 this._elements = new NodeList<Expression>(this); | 7689 this._elements = new NodeList<Expression>(this); |
| 7420 this._leftBracket = leftBracket; | 7690 this._leftBracket = leftBracket; |
| 7421 this._elements.addAll(elements); | 7691 this._elements.addAll(elements); |
| 7422 this._rightBracket = rightBracket; | 7692 this._rightBracket = rightBracket; |
| 7423 } | 7693 } |
| 7424 | 7694 |
| 7695 @override |
| 7425 accept(AstVisitor visitor) => visitor.visitListLiteral(this); | 7696 accept(AstVisitor visitor) => visitor.visitListLiteral(this); |
| 7426 | 7697 |
| 7698 @override |
| 7427 Token get beginToken { | 7699 Token get beginToken { |
| 7428 Token token = constKeyword; | 7700 Token token = constKeyword; |
| 7429 if (token != null) { | 7701 if (token != null) { |
| 7430 return token; | 7702 return token; |
| 7431 } | 7703 } |
| 7432 TypeArgumentList typeArguments = this.typeArguments; | 7704 TypeArgumentList typeArguments = this.typeArguments; |
| 7433 if (typeArguments != null) { | 7705 if (typeArguments != null) { |
| 7434 return typeArguments.beginToken; | 7706 return typeArguments.beginToken; |
| 7435 } | 7707 } |
| 7436 return _leftBracket; | 7708 return _leftBracket; |
| 7437 } | 7709 } |
| 7438 | 7710 |
| 7439 /** | 7711 /** |
| 7440 * Return the expressions used to compute the elements of the list. | 7712 * Return the expressions used to compute the elements of the list. |
| 7441 * | 7713 * |
| 7442 * @return the expressions used to compute the elements of the list | 7714 * @return the expressions used to compute the elements of the list |
| 7443 */ | 7715 */ |
| 7444 NodeList<Expression> get elements => _elements; | 7716 NodeList<Expression> get elements => _elements; |
| 7445 | 7717 |
| 7718 @override |
| 7446 Token get endToken => _rightBracket; | 7719 Token get endToken => _rightBracket; |
| 7447 | 7720 |
| 7448 /** | 7721 /** |
| 7449 * Return the left square bracket. | 7722 * Return the left square bracket. |
| 7450 * | 7723 * |
| 7451 * @return the left square bracket | 7724 * @return the left square bracket |
| 7452 */ | 7725 */ |
| 7453 Token get leftBracket => _leftBracket; | 7726 Token get leftBracket => _leftBracket; |
| 7454 | 7727 |
| 7455 /** | 7728 /** |
| (...skipping 14 matching lines...) Expand all Loading... |
| 7470 | 7743 |
| 7471 /** | 7744 /** |
| 7472 * Set the right square bracket to the given token. | 7745 * Set the right square bracket to the given token. |
| 7473 * | 7746 * |
| 7474 * @param bracket the right square bracket | 7747 * @param bracket the right square bracket |
| 7475 */ | 7748 */ |
| 7476 void set rightBracket(Token bracket) { | 7749 void set rightBracket(Token bracket) { |
| 7477 _rightBracket = bracket; | 7750 _rightBracket = bracket; |
| 7478 } | 7751 } |
| 7479 | 7752 |
| 7753 @override |
| 7480 void visitChildren(AstVisitor visitor) { | 7754 void visitChildren(AstVisitor visitor) { |
| 7481 super.visitChildren(visitor); | 7755 super.visitChildren(visitor); |
| 7482 _elements.accept(visitor); | 7756 _elements.accept(visitor); |
| 7483 } | 7757 } |
| 7484 } | 7758 } |
| 7485 | 7759 |
| 7486 /** | 7760 /** |
| 7487 * The abstract class `Literal` defines the behavior common to nodes that repres
ent a literal | 7761 * The abstract class `Literal` defines the behavior common to nodes that repres
ent a literal |
| 7488 * expression. | 7762 * expression. |
| 7489 * | 7763 * |
| 7490 * <pre> | 7764 * <pre> |
| 7491 * literal ::= | 7765 * literal ::= |
| 7492 * [BooleanLiteral] | 7766 * [BooleanLiteral] |
| 7493 * | [DoubleLiteral] | 7767 * | [DoubleLiteral] |
| 7494 * | [IntegerLiteral] | 7768 * | [IntegerLiteral] |
| 7495 * | [ListLiteral] | 7769 * | [ListLiteral] |
| 7496 * | [MapLiteral] | 7770 * | [MapLiteral] |
| 7497 * | [NullLiteral] | 7771 * | [NullLiteral] |
| 7498 * | [StringLiteral] | 7772 * | [StringLiteral] |
| 7499 * </pre> | 7773 * </pre> |
| 7500 */ | 7774 */ |
| 7501 abstract class Literal extends Expression { | 7775 abstract class Literal extends Expression { |
| 7776 @override |
| 7502 int get precedence => 16; | 7777 int get precedence => 16; |
| 7503 } | 7778 } |
| 7504 | 7779 |
| 7505 /** | 7780 /** |
| 7506 * Instances of the class `MapLiteral` represent a literal map. | 7781 * Instances of the class `MapLiteral` represent a literal map. |
| 7507 * | 7782 * |
| 7508 * <pre> | 7783 * <pre> |
| 7509 * mapLiteral ::= | 7784 * mapLiteral ::= |
| 7510 * 'const'? ('<' [TypeName] (',' [TypeName])* '>')? '{' ([MapLiteralEntry] (
',' [MapLiteralEntry])* ','?)? '}' | 7785 * 'const'? ('<' [TypeName] (',' [TypeName])* '>')? '{' ([MapLiteralEntry] (
',' [MapLiteralEntry])* ','?)? '}' |
| 7511 * </pre> | 7786 * </pre> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 7536 * @param entries the entries in the map | 7811 * @param entries the entries in the map |
| 7537 * @param rightBracket the right curly bracket | 7812 * @param rightBracket the right curly bracket |
| 7538 */ | 7813 */ |
| 7539 MapLiteral(Token constKeyword, TypeArgumentList typeArguments, Token leftBrack
et, List<MapLiteralEntry> entries, Token rightBracket) : super(constKeyword, typ
eArguments) { | 7814 MapLiteral(Token constKeyword, TypeArgumentList typeArguments, Token leftBrack
et, List<MapLiteralEntry> entries, Token rightBracket) : super(constKeyword, typ
eArguments) { |
| 7540 this._entries = new NodeList<MapLiteralEntry>(this); | 7815 this._entries = new NodeList<MapLiteralEntry>(this); |
| 7541 this._leftBracket = leftBracket; | 7816 this._leftBracket = leftBracket; |
| 7542 this._entries.addAll(entries); | 7817 this._entries.addAll(entries); |
| 7543 this._rightBracket = rightBracket; | 7818 this._rightBracket = rightBracket; |
| 7544 } | 7819 } |
| 7545 | 7820 |
| 7821 @override |
| 7546 accept(AstVisitor visitor) => visitor.visitMapLiteral(this); | 7822 accept(AstVisitor visitor) => visitor.visitMapLiteral(this); |
| 7547 | 7823 |
| 7824 @override |
| 7548 Token get beginToken { | 7825 Token get beginToken { |
| 7549 Token token = constKeyword; | 7826 Token token = constKeyword; |
| 7550 if (token != null) { | 7827 if (token != null) { |
| 7551 return token; | 7828 return token; |
| 7552 } | 7829 } |
| 7553 TypeArgumentList typeArguments = this.typeArguments; | 7830 TypeArgumentList typeArguments = this.typeArguments; |
| 7554 if (typeArguments != null) { | 7831 if (typeArguments != null) { |
| 7555 return typeArguments.beginToken; | 7832 return typeArguments.beginToken; |
| 7556 } | 7833 } |
| 7557 return _leftBracket; | 7834 return _leftBracket; |
| 7558 } | 7835 } |
| 7559 | 7836 |
| 7837 @override |
| 7560 Token get endToken => _rightBracket; | 7838 Token get endToken => _rightBracket; |
| 7561 | 7839 |
| 7562 /** | 7840 /** |
| 7563 * Return the entries in the map. | 7841 * Return the entries in the map. |
| 7564 * | 7842 * |
| 7565 * @return the entries in the map | 7843 * @return the entries in the map |
| 7566 */ | 7844 */ |
| 7567 NodeList<MapLiteralEntry> get entries => _entries; | 7845 NodeList<MapLiteralEntry> get entries => _entries; |
| 7568 | 7846 |
| 7569 /** | 7847 /** |
| (...skipping 21 matching lines...) Expand all Loading... |
| 7591 | 7869 |
| 7592 /** | 7870 /** |
| 7593 * Set the right curly bracket to the given token. | 7871 * Set the right curly bracket to the given token. |
| 7594 * | 7872 * |
| 7595 * @param bracket the right curly bracket | 7873 * @param bracket the right curly bracket |
| 7596 */ | 7874 */ |
| 7597 void set rightBracket(Token bracket) { | 7875 void set rightBracket(Token bracket) { |
| 7598 _rightBracket = bracket; | 7876 _rightBracket = bracket; |
| 7599 } | 7877 } |
| 7600 | 7878 |
| 7879 @override |
| 7601 void visitChildren(AstVisitor visitor) { | 7880 void visitChildren(AstVisitor visitor) { |
| 7602 super.visitChildren(visitor); | 7881 super.visitChildren(visitor); |
| 7603 _entries.accept(visitor); | 7882 _entries.accept(visitor); |
| 7604 } | 7883 } |
| 7605 } | 7884 } |
| 7606 | 7885 |
| 7607 /** | 7886 /** |
| 7608 * Instances of the class `MapLiteralEntry` represent a single key/value pair in
a map | 7887 * Instances of the class `MapLiteralEntry` represent a single key/value pair in
a map |
| 7609 * literal. | 7888 * literal. |
| 7610 * | 7889 * |
| (...skipping 23 matching lines...) Expand all Loading... |
| 7634 * | 7913 * |
| 7635 * @param key the expression computing the key with which the value will be as
sociated | 7914 * @param key the expression computing the key with which the value will be as
sociated |
| 7636 * @param separator the colon that separates the key from the value | 7915 * @param separator the colon that separates the key from the value |
| 7637 * @param value the expression computing the value that will be associated wit
h the key | 7916 * @param value the expression computing the value that will be associated wit
h the key |
| 7638 */ | 7917 */ |
| 7639 MapLiteralEntry(Expression key, this.separator, Expression value) { | 7918 MapLiteralEntry(Expression key, this.separator, Expression value) { |
| 7640 this._key = becomeParentOf(key); | 7919 this._key = becomeParentOf(key); |
| 7641 this._value = becomeParentOf(value); | 7920 this._value = becomeParentOf(value); |
| 7642 } | 7921 } |
| 7643 | 7922 |
| 7923 @override |
| 7644 accept(AstVisitor visitor) => visitor.visitMapLiteralEntry(this); | 7924 accept(AstVisitor visitor) => visitor.visitMapLiteralEntry(this); |
| 7645 | 7925 |
| 7926 @override |
| 7646 Token get beginToken => _key.beginToken; | 7927 Token get beginToken => _key.beginToken; |
| 7647 | 7928 |
| 7929 @override |
| 7648 Token get endToken => _value.endToken; | 7930 Token get endToken => _value.endToken; |
| 7649 | 7931 |
| 7650 /** | 7932 /** |
| 7651 * Return the expression computing the key with which the value will be associ
ated. | 7933 * Return the expression computing the key with which the value will be associ
ated. |
| 7652 * | 7934 * |
| 7653 * @return the expression computing the key with which the value will be assoc
iated | 7935 * @return the expression computing the key with which the value will be assoc
iated |
| 7654 */ | 7936 */ |
| 7655 Expression get key => _key; | 7937 Expression get key => _key; |
| 7656 | 7938 |
| 7657 /** | 7939 /** |
| (...skipping 16 matching lines...) Expand all Loading... |
| 7674 /** | 7956 /** |
| 7675 * Set the expression computing the value that will be associated with the key
to the given | 7957 * Set the expression computing the value that will be associated with the key
to the given |
| 7676 * expression. | 7958 * expression. |
| 7677 * | 7959 * |
| 7678 * @param expression the expression computing the value that will be associate
d with the key | 7960 * @param expression the expression computing the value that will be associate
d with the key |
| 7679 */ | 7961 */ |
| 7680 void set value(Expression expression) { | 7962 void set value(Expression expression) { |
| 7681 _value = becomeParentOf(expression); | 7963 _value = becomeParentOf(expression); |
| 7682 } | 7964 } |
| 7683 | 7965 |
| 7966 @override |
| 7684 void visitChildren(AstVisitor visitor) { | 7967 void visitChildren(AstVisitor visitor) { |
| 7685 safelyVisitChild(_key, visitor); | 7968 safelyVisitChild(_key, visitor); |
| 7686 safelyVisitChild(_value, visitor); | 7969 safelyVisitChild(_value, visitor); |
| 7687 } | 7970 } |
| 7688 } | 7971 } |
| 7689 | 7972 |
| 7690 /** | 7973 /** |
| 7691 * Instances of the class `MethodDeclaration` represent a method declaration. | 7974 * Instances of the class `MethodDeclaration` represent a method declaration. |
| 7692 * | 7975 * |
| 7693 * <pre> | 7976 * <pre> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7762 * declares a getter | 8045 * declares a getter |
| 7763 * @param body the body of the method | 8046 * @param body the body of the method |
| 7764 */ | 8047 */ |
| 7765 MethodDeclaration(Comment comment, List<Annotation> metadata, this.externalKey
word, this.modifierKeyword, TypeName returnType, this.propertyKeyword, this.oper
atorKeyword, SimpleIdentifier name, FormalParameterList parameters, FunctionBody
body) : super(comment, metadata) { | 8048 MethodDeclaration(Comment comment, List<Annotation> metadata, this.externalKey
word, this.modifierKeyword, TypeName returnType, this.propertyKeyword, this.oper
atorKeyword, SimpleIdentifier name, FormalParameterList parameters, FunctionBody
body) : super(comment, metadata) { |
| 7766 this._returnType = becomeParentOf(returnType); | 8049 this._returnType = becomeParentOf(returnType); |
| 7767 this._name = becomeParentOf(name); | 8050 this._name = becomeParentOf(name); |
| 7768 this._parameters = becomeParentOf(parameters); | 8051 this._parameters = becomeParentOf(parameters); |
| 7769 this._body = becomeParentOf(body); | 8052 this._body = becomeParentOf(body); |
| 7770 } | 8053 } |
| 7771 | 8054 |
| 8055 @override |
| 7772 accept(AstVisitor visitor) => visitor.visitMethodDeclaration(this); | 8056 accept(AstVisitor visitor) => visitor.visitMethodDeclaration(this); |
| 7773 | 8057 |
| 7774 /** | 8058 /** |
| 7775 * Return the body of the method. | 8059 * Return the body of the method. |
| 7776 * | 8060 * |
| 7777 * @return the body of the method | 8061 * @return the body of the method |
| 7778 */ | 8062 */ |
| 7779 FunctionBody get body => _body; | 8063 FunctionBody get body => _body; |
| 7780 | 8064 |
| 7781 /** | 8065 /** |
| 7782 * Return the element associated with this method, or `null` if the AST struct
ure has not | 8066 * Return the element associated with this method, or `null` if the AST struct
ure has not |
| 7783 * been resolved. The element can either be a [MethodElement], if this represe
nts the | 8067 * been resolved. The element can either be a [MethodElement], if this represe
nts the |
| 7784 * declaration of a normal method, or a [PropertyAccessorElement] if this repr
esents the | 8068 * declaration of a normal method, or a [PropertyAccessorElement] if this repr
esents the |
| 7785 * declaration of either a getter or a setter. | 8069 * declaration of either a getter or a setter. |
| 7786 * | 8070 * |
| 7787 * @return the element associated with this method | 8071 * @return the element associated with this method |
| 7788 */ | 8072 */ |
| 8073 @override |
| 7789 ExecutableElement get element => _name != null ? (_name.staticElement as Execu
tableElement) : null; | 8074 ExecutableElement get element => _name != null ? (_name.staticElement as Execu
tableElement) : null; |
| 7790 | 8075 |
| 8076 @override |
| 7791 Token get endToken => _body.endToken; | 8077 Token get endToken => _body.endToken; |
| 7792 | 8078 |
| 7793 /** | 8079 /** |
| 7794 * Return the name of the method. | 8080 * Return the name of the method. |
| 7795 * | 8081 * |
| 7796 * @return the name of the method | 8082 * @return the name of the method |
| 7797 */ | 8083 */ |
| 7798 SimpleIdentifier get name => _name; | 8084 SimpleIdentifier get name => _name; |
| 7799 | 8085 |
| 7800 /** | 8086 /** |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7876 | 8162 |
| 7877 /** | 8163 /** |
| 7878 * Set the return type of the method to the given type name. | 8164 * Set the return type of the method to the given type name. |
| 7879 * | 8165 * |
| 7880 * @param typeName the return type of the method | 8166 * @param typeName the return type of the method |
| 7881 */ | 8167 */ |
| 7882 void set returnType(TypeName typeName) { | 8168 void set returnType(TypeName typeName) { |
| 7883 _returnType = becomeParentOf(typeName); | 8169 _returnType = becomeParentOf(typeName); |
| 7884 } | 8170 } |
| 7885 | 8171 |
| 8172 @override |
| 7886 void visitChildren(AstVisitor visitor) { | 8173 void visitChildren(AstVisitor visitor) { |
| 7887 super.visitChildren(visitor); | 8174 super.visitChildren(visitor); |
| 7888 safelyVisitChild(_returnType, visitor); | 8175 safelyVisitChild(_returnType, visitor); |
| 7889 safelyVisitChild(_name, visitor); | 8176 safelyVisitChild(_name, visitor); |
| 7890 safelyVisitChild(_parameters, visitor); | 8177 safelyVisitChild(_parameters, visitor); |
| 7891 safelyVisitChild(_body, visitor); | 8178 safelyVisitChild(_body, visitor); |
| 7892 } | 8179 } |
| 7893 | 8180 |
| 8181 @override |
| 7894 Token get firstTokenAfterCommentAndMetadata { | 8182 Token get firstTokenAfterCommentAndMetadata { |
| 7895 if (modifierKeyword != null) { | 8183 if (modifierKeyword != null) { |
| 7896 return modifierKeyword; | 8184 return modifierKeyword; |
| 7897 } else if (_returnType != null) { | 8185 } else if (_returnType != null) { |
| 7898 return _returnType.beginToken; | 8186 return _returnType.beginToken; |
| 7899 } else if (propertyKeyword != null) { | 8187 } else if (propertyKeyword != null) { |
| 7900 return propertyKeyword; | 8188 return propertyKeyword; |
| 7901 } else if (operatorKeyword != null) { | 8189 } else if (operatorKeyword != null) { |
| 7902 return operatorKeyword; | 8190 return operatorKeyword; |
| 7903 } | 8191 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7947 * @param period the period that separates the target from the method name | 8235 * @param period the period that separates the target from the method name |
| 7948 * @param methodName the name of the method being invoked | 8236 * @param methodName the name of the method being invoked |
| 7949 * @param argumentList the list of arguments to the method | 8237 * @param argumentList the list of arguments to the method |
| 7950 */ | 8238 */ |
| 7951 MethodInvocation(Expression target, this.period, SimpleIdentifier methodName,
ArgumentList argumentList) { | 8239 MethodInvocation(Expression target, this.period, SimpleIdentifier methodName,
ArgumentList argumentList) { |
| 7952 this._target = becomeParentOf(target); | 8240 this._target = becomeParentOf(target); |
| 7953 this._methodName = becomeParentOf(methodName); | 8241 this._methodName = becomeParentOf(methodName); |
| 7954 this._argumentList = becomeParentOf(argumentList); | 8242 this._argumentList = becomeParentOf(argumentList); |
| 7955 } | 8243 } |
| 7956 | 8244 |
| 8245 @override |
| 7957 accept(AstVisitor visitor) => visitor.visitMethodInvocation(this); | 8246 accept(AstVisitor visitor) => visitor.visitMethodInvocation(this); |
| 7958 | 8247 |
| 7959 /** | 8248 /** |
| 7960 * Return the list of arguments to the method. | 8249 * Return the list of arguments to the method. |
| 7961 * | 8250 * |
| 7962 * @return the list of arguments to the method | 8251 * @return the list of arguments to the method |
| 7963 */ | 8252 */ |
| 7964 ArgumentList get argumentList => _argumentList; | 8253 ArgumentList get argumentList => _argumentList; |
| 7965 | 8254 |
| 8255 @override |
| 7966 Token get beginToken { | 8256 Token get beginToken { |
| 7967 if (_target != null) { | 8257 if (_target != null) { |
| 7968 return _target.beginToken; | 8258 return _target.beginToken; |
| 7969 } else if (period != null) { | 8259 } else if (period != null) { |
| 7970 return period; | 8260 return period; |
| 7971 } | 8261 } |
| 7972 return _methodName.beginToken; | 8262 return _methodName.beginToken; |
| 7973 } | 8263 } |
| 7974 | 8264 |
| 8265 @override |
| 7975 Token get endToken => _argumentList.endToken; | 8266 Token get endToken => _argumentList.endToken; |
| 7976 | 8267 |
| 7977 /** | 8268 /** |
| 7978 * Return the name of the method being invoked. | 8269 * Return the name of the method being invoked. |
| 7979 * | 8270 * |
| 7980 * @return the name of the method being invoked | 8271 * @return the name of the method being invoked |
| 7981 */ | 8272 */ |
| 7982 SimpleIdentifier get methodName => _methodName; | 8273 SimpleIdentifier get methodName => _methodName; |
| 7983 | 8274 |
| 8275 @override |
| 7984 int get precedence => 15; | 8276 int get precedence => 15; |
| 7985 | 8277 |
| 7986 /** | 8278 /** |
| 7987 * Return the expression used to compute the receiver of the invocation. If th
is invocation is not | 8279 * Return the expression used to compute the receiver of the invocation. If th
is invocation is not |
| 7988 * part of a cascade expression, then this is the same as [getTarget]. If this
invocation | 8280 * part of a cascade expression, then this is the same as [getTarget]. If this
invocation |
| 7989 * is part of a cascade expression, then the target stored with the cascade ex
pression is | 8281 * is part of a cascade expression, then the target stored with the cascade ex
pression is |
| 7990 * returned. | 8282 * returned. |
| 7991 * | 8283 * |
| 7992 * @return the expression used to compute the receiver of the invocation | 8284 * @return the expression used to compute the receiver of the invocation |
| 7993 * @see #getTarget() | 8285 * @see #getTarget() |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8045 | 8337 |
| 8046 /** | 8338 /** |
| 8047 * Set the expression producing the object on which the method is defined to t
he given expression. | 8339 * Set the expression producing the object on which the method is defined to t
he given expression. |
| 8048 * | 8340 * |
| 8049 * @param expression the expression producing the object on which the method i
s defined | 8341 * @param expression the expression producing the object on which the method i
s defined |
| 8050 */ | 8342 */ |
| 8051 void set target(Expression expression) { | 8343 void set target(Expression expression) { |
| 8052 _target = becomeParentOf(expression); | 8344 _target = becomeParentOf(expression); |
| 8053 } | 8345 } |
| 8054 | 8346 |
| 8347 @override |
| 8055 void visitChildren(AstVisitor visitor) { | 8348 void visitChildren(AstVisitor visitor) { |
| 8056 safelyVisitChild(_target, visitor); | 8349 safelyVisitChild(_target, visitor); |
| 8057 safelyVisitChild(_methodName, visitor); | 8350 safelyVisitChild(_methodName, visitor); |
| 8058 safelyVisitChild(_argumentList, visitor); | 8351 safelyVisitChild(_argumentList, visitor); |
| 8059 } | 8352 } |
| 8060 } | 8353 } |
| 8061 | 8354 |
| 8062 /** | 8355 /** |
| 8063 * Instances of the class `NamedExpression` represent an expression that has a n
ame associated | 8356 * Instances of the class `NamedExpression` represent an expression that has a n
ame associated |
| 8064 * with it. They are used in method invocations when there are named parameters. | 8357 * with it. They are used in method invocations when there are named parameters. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 8083 * Initialize a newly created named expression. | 8376 * Initialize a newly created named expression. |
| 8084 * | 8377 * |
| 8085 * @param name the name associated with the expression | 8378 * @param name the name associated with the expression |
| 8086 * @param expression the expression with which the name is associated | 8379 * @param expression the expression with which the name is associated |
| 8087 */ | 8380 */ |
| 8088 NamedExpression(Label name, Expression expression) { | 8381 NamedExpression(Label name, Expression expression) { |
| 8089 this._name = becomeParentOf(name); | 8382 this._name = becomeParentOf(name); |
| 8090 this._expression = becomeParentOf(expression); | 8383 this._expression = becomeParentOf(expression); |
| 8091 } | 8384 } |
| 8092 | 8385 |
| 8386 @override |
| 8093 accept(AstVisitor visitor) => visitor.visitNamedExpression(this); | 8387 accept(AstVisitor visitor) => visitor.visitNamedExpression(this); |
| 8094 | 8388 |
| 8389 @override |
| 8095 Token get beginToken => _name.beginToken; | 8390 Token get beginToken => _name.beginToken; |
| 8096 | 8391 |
| 8097 /** | 8392 /** |
| 8098 * Return the element representing the parameter being named by this expressio
n, or `null` | 8393 * Return the element representing the parameter being named by this expressio
n, or `null` |
| 8099 * if the AST structure has not been resolved or if there is no parameter with
the same name as | 8394 * if the AST structure has not been resolved or if there is no parameter with
the same name as |
| 8100 * this expression. | 8395 * this expression. |
| 8101 * | 8396 * |
| 8102 * @return the element representing the parameter being named by this expressi
on | 8397 * @return the element representing the parameter being named by this expressi
on |
| 8103 */ | 8398 */ |
| 8104 ParameterElement get element { | 8399 ParameterElement get element { |
| 8105 Element element = _name.label.staticElement; | 8400 Element element = _name.label.staticElement; |
| 8106 if (element is ParameterElement) { | 8401 if (element is ParameterElement) { |
| 8107 return element; | 8402 return element; |
| 8108 } | 8403 } |
| 8109 return null; | 8404 return null; |
| 8110 } | 8405 } |
| 8111 | 8406 |
| 8407 @override |
| 8112 Token get endToken => _expression.endToken; | 8408 Token get endToken => _expression.endToken; |
| 8113 | 8409 |
| 8114 /** | 8410 /** |
| 8115 * Return the expression with which the name is associated. | 8411 * Return the expression with which the name is associated. |
| 8116 * | 8412 * |
| 8117 * @return the expression with which the name is associated | 8413 * @return the expression with which the name is associated |
| 8118 */ | 8414 */ |
| 8119 Expression get expression => _expression; | 8415 Expression get expression => _expression; |
| 8120 | 8416 |
| 8121 /** | 8417 /** |
| 8122 * Return the name associated with the expression. | 8418 * Return the name associated with the expression. |
| 8123 * | 8419 * |
| 8124 * @return the name associated with the expression | 8420 * @return the name associated with the expression |
| 8125 */ | 8421 */ |
| 8126 Label get name => _name; | 8422 Label get name => _name; |
| 8127 | 8423 |
| 8424 @override |
| 8128 int get precedence => 0; | 8425 int get precedence => 0; |
| 8129 | 8426 |
| 8130 /** | 8427 /** |
| 8131 * Set the expression with which the name is associated to the given expressio
n. | 8428 * Set the expression with which the name is associated to the given expressio
n. |
| 8132 * | 8429 * |
| 8133 * @param expression the expression with which the name is associated | 8430 * @param expression the expression with which the name is associated |
| 8134 */ | 8431 */ |
| 8135 void set expression(Expression expression) { | 8432 void set expression(Expression expression) { |
| 8136 this._expression = becomeParentOf(expression); | 8433 this._expression = becomeParentOf(expression); |
| 8137 } | 8434 } |
| 8138 | 8435 |
| 8139 /** | 8436 /** |
| 8140 * Set the name associated with the expression to the given identifier. | 8437 * Set the name associated with the expression to the given identifier. |
| 8141 * | 8438 * |
| 8142 * @param identifier the name associated with the expression | 8439 * @param identifier the name associated with the expression |
| 8143 */ | 8440 */ |
| 8144 void set name(Label identifier) { | 8441 void set name(Label identifier) { |
| 8145 _name = becomeParentOf(identifier); | 8442 _name = becomeParentOf(identifier); |
| 8146 } | 8443 } |
| 8147 | 8444 |
| 8445 @override |
| 8148 void visitChildren(AstVisitor visitor) { | 8446 void visitChildren(AstVisitor visitor) { |
| 8149 safelyVisitChild(_name, visitor); | 8447 safelyVisitChild(_name, visitor); |
| 8150 safelyVisitChild(_expression, visitor); | 8448 safelyVisitChild(_expression, visitor); |
| 8151 } | 8449 } |
| 8152 } | 8450 } |
| 8153 | 8451 |
| 8154 /** | 8452 /** |
| 8155 * The abstract class `NamespaceDirective` defines the behavior common to nodes
that represent | 8453 * The abstract class `NamespaceDirective` defines the behavior common to nodes
that represent |
| 8156 * a directive that impacts the namespace of a library. | 8454 * a directive that impacts the namespace of a library. |
| 8157 * | 8455 * |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8192 this._combinators.addAll(combinators); | 8490 this._combinators.addAll(combinators); |
| 8193 } | 8491 } |
| 8194 | 8492 |
| 8195 /** | 8493 /** |
| 8196 * Return the combinators used to control how names are imported or exported. | 8494 * Return the combinators used to control how names are imported or exported. |
| 8197 * | 8495 * |
| 8198 * @return the combinators used to control how names are imported or exported | 8496 * @return the combinators used to control how names are imported or exported |
| 8199 */ | 8497 */ |
| 8200 NodeList<Combinator> get combinators => _combinators; | 8498 NodeList<Combinator> get combinators => _combinators; |
| 8201 | 8499 |
| 8500 @override |
| 8202 Token get endToken => semicolon; | 8501 Token get endToken => semicolon; |
| 8203 | 8502 |
| 8503 @override |
| 8204 LibraryElement get uriElement; | 8504 LibraryElement get uriElement; |
| 8205 | 8505 |
| 8506 @override |
| 8206 Token get firstTokenAfterCommentAndMetadata => keyword; | 8507 Token get firstTokenAfterCommentAndMetadata => keyword; |
| 8207 } | 8508 } |
| 8208 | 8509 |
| 8209 /** | 8510 /** |
| 8210 * Instances of the class `NativeClause` represent the "native" clause in an cla
ss | 8511 * Instances of the class `NativeClause` represent the "native" clause in an cla
ss |
| 8211 * declaration. | 8512 * declaration. |
| 8212 * | 8513 * |
| 8213 * <pre> | 8514 * <pre> |
| 8214 * nativeClause ::= | 8515 * nativeClause ::= |
| 8215 * 'native' [StringLiteral] | 8516 * 'native' [StringLiteral] |
| (...skipping 11 matching lines...) Expand all Loading... |
| 8227 StringLiteral name; | 8528 StringLiteral name; |
| 8228 | 8529 |
| 8229 /** | 8530 /** |
| 8230 * Initialize a newly created native clause. | 8531 * Initialize a newly created native clause. |
| 8231 * | 8532 * |
| 8232 * @param keyword the token representing the 'native' keyword | 8533 * @param keyword the token representing the 'native' keyword |
| 8233 * @param name the name of the native object that implements the class. | 8534 * @param name the name of the native object that implements the class. |
| 8234 */ | 8535 */ |
| 8235 NativeClause(this.keyword, this.name); | 8536 NativeClause(this.keyword, this.name); |
| 8236 | 8537 |
| 8538 @override |
| 8237 accept(AstVisitor visitor) => visitor.visitNativeClause(this); | 8539 accept(AstVisitor visitor) => visitor.visitNativeClause(this); |
| 8238 | 8540 |
| 8541 @override |
| 8239 Token get beginToken => keyword; | 8542 Token get beginToken => keyword; |
| 8240 | 8543 |
| 8544 @override |
| 8241 Token get endToken => name.endToken; | 8545 Token get endToken => name.endToken; |
| 8242 | 8546 |
| 8547 @override |
| 8243 void visitChildren(AstVisitor visitor) { | 8548 void visitChildren(AstVisitor visitor) { |
| 8244 safelyVisitChild(name, visitor); | 8549 safelyVisitChild(name, visitor); |
| 8245 } | 8550 } |
| 8246 } | 8551 } |
| 8247 | 8552 |
| 8248 /** | 8553 /** |
| 8249 * Instances of the class `NativeFunctionBody` represent a function body that co
nsists of a | 8554 * Instances of the class `NativeFunctionBody` represent a function body that co
nsists of a |
| 8250 * native keyword followed by a string literal. | 8555 * native keyword followed by a string literal. |
| 8251 * | 8556 * |
| 8252 * <pre> | 8557 * <pre> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 8275 * and a semicolon. | 8580 * and a semicolon. |
| 8276 * | 8581 * |
| 8277 * @param nativeToken the token representing 'native' that marks the start of
the function body | 8582 * @param nativeToken the token representing 'native' that marks the start of
the function body |
| 8278 * @param stringLiteral the string literal | 8583 * @param stringLiteral the string literal |
| 8279 * @param semicolon the token representing the semicolon that marks the end of
the function body | 8584 * @param semicolon the token representing the semicolon that marks the end of
the function body |
| 8280 */ | 8585 */ |
| 8281 NativeFunctionBody(this.nativeToken, StringLiteral stringLiteral, this.semicol
on) { | 8586 NativeFunctionBody(this.nativeToken, StringLiteral stringLiteral, this.semicol
on) { |
| 8282 this._stringLiteral = becomeParentOf(stringLiteral); | 8587 this._stringLiteral = becomeParentOf(stringLiteral); |
| 8283 } | 8588 } |
| 8284 | 8589 |
| 8590 @override |
| 8285 accept(AstVisitor visitor) => visitor.visitNativeFunctionBody(this); | 8591 accept(AstVisitor visitor) => visitor.visitNativeFunctionBody(this); |
| 8286 | 8592 |
| 8593 @override |
| 8287 Token get beginToken => nativeToken; | 8594 Token get beginToken => nativeToken; |
| 8288 | 8595 |
| 8596 @override |
| 8289 Token get endToken => semicolon; | 8597 Token get endToken => semicolon; |
| 8290 | 8598 |
| 8291 /** | 8599 /** |
| 8292 * Return the string literal representing the string after the 'native' token. | 8600 * Return the string literal representing the string after the 'native' token. |
| 8293 * | 8601 * |
| 8294 * @return the string literal representing the string after the 'native' token | 8602 * @return the string literal representing the string after the 'native' token |
| 8295 */ | 8603 */ |
| 8296 StringLiteral get stringLiteral => _stringLiteral; | 8604 StringLiteral get stringLiteral => _stringLiteral; |
| 8297 | 8605 |
| 8606 @override |
| 8298 void visitChildren(AstVisitor visitor) { | 8607 void visitChildren(AstVisitor visitor) { |
| 8299 safelyVisitChild(_stringLiteral, visitor); | 8608 safelyVisitChild(_stringLiteral, visitor); |
| 8300 } | 8609 } |
| 8301 } | 8610 } |
| 8302 | 8611 |
| 8303 /** | 8612 /** |
| 8304 * The abstract class `NormalFormalParameter` defines the behavior common to for
mal parameters | 8613 * The abstract class `NormalFormalParameter` defines the behavior common to for
mal parameters |
| 8305 * that are required (are not optional). | 8614 * that are required (are not optional). |
| 8306 * | 8615 * |
| 8307 * <pre> | 8616 * <pre> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8343 } | 8652 } |
| 8344 | 8653 |
| 8345 /** | 8654 /** |
| 8346 * Return the documentation comment associated with this parameter, or `null`
if this | 8655 * Return the documentation comment associated with this parameter, or `null`
if this |
| 8347 * parameter does not have a documentation comment associated with it. | 8656 * parameter does not have a documentation comment associated with it. |
| 8348 * | 8657 * |
| 8349 * @return the documentation comment associated with this parameter | 8658 * @return the documentation comment associated with this parameter |
| 8350 */ | 8659 */ |
| 8351 Comment get documentationComment => _comment; | 8660 Comment get documentationComment => _comment; |
| 8352 | 8661 |
| 8662 @override |
| 8353 SimpleIdentifier get identifier => _identifier; | 8663 SimpleIdentifier get identifier => _identifier; |
| 8354 | 8664 |
| 8665 @override |
| 8355 ParameterKind get kind { | 8666 ParameterKind get kind { |
| 8356 AstNode parent = this.parent; | 8667 AstNode parent = this.parent; |
| 8357 if (parent is DefaultFormalParameter) { | 8668 if (parent is DefaultFormalParameter) { |
| 8358 return parent.kind; | 8669 return parent.kind; |
| 8359 } | 8670 } |
| 8360 return ParameterKind.REQUIRED; | 8671 return ParameterKind.REQUIRED; |
| 8361 } | 8672 } |
| 8362 | 8673 |
| 8363 /** | 8674 /** |
| 8364 * Return the annotations associated with this parameter. | 8675 * Return the annotations associated with this parameter. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 8378 | 8689 |
| 8379 /** | 8690 /** |
| 8380 * Set the name of the parameter being declared to the given identifier. | 8691 * Set the name of the parameter being declared to the given identifier. |
| 8381 * | 8692 * |
| 8382 * @param identifier the name of the parameter being declared | 8693 * @param identifier the name of the parameter being declared |
| 8383 */ | 8694 */ |
| 8384 void set identifier(SimpleIdentifier identifier) { | 8695 void set identifier(SimpleIdentifier identifier) { |
| 8385 this._identifier = becomeParentOf(identifier); | 8696 this._identifier = becomeParentOf(identifier); |
| 8386 } | 8697 } |
| 8387 | 8698 |
| 8699 @override |
| 8388 void visitChildren(AstVisitor visitor) { | 8700 void visitChildren(AstVisitor visitor) { |
| 8389 // | 8701 // |
| 8390 // Note that subclasses are responsible for visiting the identifier because
they often need to | 8702 // Note that subclasses are responsible for visiting the identifier because
they often need to |
| 8391 // visit other nodes before visiting the identifier. | 8703 // visit other nodes before visiting the identifier. |
| 8392 // | 8704 // |
| 8393 if (_commentIsBeforeAnnotations()) { | 8705 if (_commentIsBeforeAnnotations()) { |
| 8394 safelyVisitChild(_comment, visitor); | 8706 safelyVisitChild(_comment, visitor); |
| 8395 _metadata.accept(visitor); | 8707 _metadata.accept(visitor); |
| 8396 } else { | 8708 } else { |
| 8397 for (AstNode child in sortedCommentAndAnnotations) { | 8709 for (AstNode child in sortedCommentAndAnnotations) { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8446 | 8758 |
| 8447 /** | 8759 /** |
| 8448 * Initialize a newly created null literal. | 8760 * Initialize a newly created null literal. |
| 8449 * | 8761 * |
| 8450 * @param token the token representing the literal | 8762 * @param token the token representing the literal |
| 8451 */ | 8763 */ |
| 8452 NullLiteral(Token token) { | 8764 NullLiteral(Token token) { |
| 8453 this.literal = token; | 8765 this.literal = token; |
| 8454 } | 8766 } |
| 8455 | 8767 |
| 8768 @override |
| 8456 accept(AstVisitor visitor) => visitor.visitNullLiteral(this); | 8769 accept(AstVisitor visitor) => visitor.visitNullLiteral(this); |
| 8457 | 8770 |
| 8771 @override |
| 8458 Token get beginToken => literal; | 8772 Token get beginToken => literal; |
| 8459 | 8773 |
| 8774 @override |
| 8460 Token get endToken => literal; | 8775 Token get endToken => literal; |
| 8461 | 8776 |
| 8777 @override |
| 8462 void visitChildren(AstVisitor visitor) { | 8778 void visitChildren(AstVisitor visitor) { |
| 8463 } | 8779 } |
| 8464 } | 8780 } |
| 8465 | 8781 |
| 8466 /** | 8782 /** |
| 8467 * Instances of the class `ParenthesizedExpression` represent a parenthesized ex
pression. | 8783 * Instances of the class `ParenthesizedExpression` represent a parenthesized ex
pression. |
| 8468 * | 8784 * |
| 8469 * <pre> | 8785 * <pre> |
| 8470 * parenthesizedExpression ::= | 8786 * parenthesizedExpression ::= |
| 8471 * '(' [Expression] ')' | 8787 * '(' [Expression] ')' |
| (...skipping 21 matching lines...) Expand all Loading... |
| 8493 * @param leftParenthesis the left parenthesis | 8809 * @param leftParenthesis the left parenthesis |
| 8494 * @param expression the expression within the parentheses | 8810 * @param expression the expression within the parentheses |
| 8495 * @param rightParenthesis the right parenthesis | 8811 * @param rightParenthesis the right parenthesis |
| 8496 */ | 8812 */ |
| 8497 ParenthesizedExpression(Token leftParenthesis, Expression expression, Token ri
ghtParenthesis) { | 8813 ParenthesizedExpression(Token leftParenthesis, Expression expression, Token ri
ghtParenthesis) { |
| 8498 this._leftParenthesis = leftParenthesis; | 8814 this._leftParenthesis = leftParenthesis; |
| 8499 this._expression = becomeParentOf(expression); | 8815 this._expression = becomeParentOf(expression); |
| 8500 this._rightParenthesis = rightParenthesis; | 8816 this._rightParenthesis = rightParenthesis; |
| 8501 } | 8817 } |
| 8502 | 8818 |
| 8819 @override |
| 8503 accept(AstVisitor visitor) => visitor.visitParenthesizedExpression(this); | 8820 accept(AstVisitor visitor) => visitor.visitParenthesizedExpression(this); |
| 8504 | 8821 |
| 8822 @override |
| 8505 Token get beginToken => _leftParenthesis; | 8823 Token get beginToken => _leftParenthesis; |
| 8506 | 8824 |
| 8825 @override |
| 8507 Token get endToken => _rightParenthesis; | 8826 Token get endToken => _rightParenthesis; |
| 8508 | 8827 |
| 8509 /** | 8828 /** |
| 8510 * Return the expression within the parentheses. | 8829 * Return the expression within the parentheses. |
| 8511 * | 8830 * |
| 8512 * @return the expression within the parentheses | 8831 * @return the expression within the parentheses |
| 8513 */ | 8832 */ |
| 8514 Expression get expression => _expression; | 8833 Expression get expression => _expression; |
| 8515 | 8834 |
| 8516 /** | 8835 /** |
| 8517 * Return the left parenthesis. | 8836 * Return the left parenthesis. |
| 8518 * | 8837 * |
| 8519 * @return the left parenthesis | 8838 * @return the left parenthesis |
| 8520 */ | 8839 */ |
| 8521 Token get leftParenthesis => _leftParenthesis; | 8840 Token get leftParenthesis => _leftParenthesis; |
| 8522 | 8841 |
| 8842 @override |
| 8523 int get precedence => 15; | 8843 int get precedence => 15; |
| 8524 | 8844 |
| 8525 /** | 8845 /** |
| 8526 * Return the right parenthesis. | 8846 * Return the right parenthesis. |
| 8527 * | 8847 * |
| 8528 * @return the right parenthesis | 8848 * @return the right parenthesis |
| 8529 */ | 8849 */ |
| 8530 Token get rightParenthesis => _rightParenthesis; | 8850 Token get rightParenthesis => _rightParenthesis; |
| 8531 | 8851 |
| 8532 /** | 8852 /** |
| (...skipping 16 matching lines...) Expand all Loading... |
| 8549 | 8869 |
| 8550 /** | 8870 /** |
| 8551 * Set the right parenthesis to the given token. | 8871 * Set the right parenthesis to the given token. |
| 8552 * | 8872 * |
| 8553 * @param parenthesis the right parenthesis | 8873 * @param parenthesis the right parenthesis |
| 8554 */ | 8874 */ |
| 8555 void set rightParenthesis(Token parenthesis) { | 8875 void set rightParenthesis(Token parenthesis) { |
| 8556 _rightParenthesis = parenthesis; | 8876 _rightParenthesis = parenthesis; |
| 8557 } | 8877 } |
| 8558 | 8878 |
| 8879 @override |
| 8559 void visitChildren(AstVisitor visitor) { | 8880 void visitChildren(AstVisitor visitor) { |
| 8560 safelyVisitChild(_expression, visitor); | 8881 safelyVisitChild(_expression, visitor); |
| 8561 } | 8882 } |
| 8562 } | 8883 } |
| 8563 | 8884 |
| 8564 /** | 8885 /** |
| 8565 * Instances of the class `PartDirective` represent a part directive. | 8886 * Instances of the class `PartDirective` represent a part directive. |
| 8566 * | 8887 * |
| 8567 * <pre> | 8888 * <pre> |
| 8568 * partDirective ::= | 8889 * partDirective ::= |
| (...skipping 15 matching lines...) Expand all Loading... |
| 8584 * Initialize a newly created part directive. | 8905 * Initialize a newly created part directive. |
| 8585 * | 8906 * |
| 8586 * @param comment the documentation comment associated with this directive | 8907 * @param comment the documentation comment associated with this directive |
| 8587 * @param metadata the annotations associated with the directive | 8908 * @param metadata the annotations associated with the directive |
| 8588 * @param partToken the token representing the 'part' token | 8909 * @param partToken the token representing the 'part' token |
| 8589 * @param partUri the URI of the part being included | 8910 * @param partUri the URI of the part being included |
| 8590 * @param semicolon the semicolon terminating the directive | 8911 * @param semicolon the semicolon terminating the directive |
| 8591 */ | 8912 */ |
| 8592 PartDirective(Comment comment, List<Annotation> metadata, this.partToken, Stri
ngLiteral partUri, this.semicolon) : super(comment, metadata, partUri); | 8913 PartDirective(Comment comment, List<Annotation> metadata, this.partToken, Stri
ngLiteral partUri, this.semicolon) : super(comment, metadata, partUri); |
| 8593 | 8914 |
| 8915 @override |
| 8594 accept(AstVisitor visitor) => visitor.visitPartDirective(this); | 8916 accept(AstVisitor visitor) => visitor.visitPartDirective(this); |
| 8595 | 8917 |
| 8918 @override |
| 8596 Token get endToken => semicolon; | 8919 Token get endToken => semicolon; |
| 8597 | 8920 |
| 8921 @override |
| 8598 Token get keyword => partToken; | 8922 Token get keyword => partToken; |
| 8599 | 8923 |
| 8924 @override |
| 8600 CompilationUnitElement get uriElement => element as CompilationUnitElement; | 8925 CompilationUnitElement get uriElement => element as CompilationUnitElement; |
| 8601 | 8926 |
| 8927 @override |
| 8602 Token get firstTokenAfterCommentAndMetadata => partToken; | 8928 Token get firstTokenAfterCommentAndMetadata => partToken; |
| 8603 } | 8929 } |
| 8604 | 8930 |
| 8605 /** | 8931 /** |
| 8606 * Instances of the class `PartOfDirective` represent a part-of directive. | 8932 * Instances of the class `PartOfDirective` represent a part-of directive. |
| 8607 * | 8933 * |
| 8608 * <pre> | 8934 * <pre> |
| 8609 * partOfDirective ::= | 8935 * partOfDirective ::= |
| 8610 * [Annotation] 'part' 'of' [Identifier] ';' | 8936 * [Annotation] 'part' 'of' [Identifier] ';' |
| 8611 * </pre> | 8937 * </pre> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 8638 * @param metadata the annotations associated with the directive | 8964 * @param metadata the annotations associated with the directive |
| 8639 * @param partToken the token representing the 'part' token | 8965 * @param partToken the token representing the 'part' token |
| 8640 * @param ofToken the token representing the 'of' token | 8966 * @param ofToken the token representing the 'of' token |
| 8641 * @param libraryName the name of the library that the containing compilation
unit is part of | 8967 * @param libraryName the name of the library that the containing compilation
unit is part of |
| 8642 * @param semicolon the semicolon terminating the directive | 8968 * @param semicolon the semicolon terminating the directive |
| 8643 */ | 8969 */ |
| 8644 PartOfDirective(Comment comment, List<Annotation> metadata, this.partToken, th
is.ofToken, LibraryIdentifier libraryName, this.semicolon) : super(comment, meta
data) { | 8970 PartOfDirective(Comment comment, List<Annotation> metadata, this.partToken, th
is.ofToken, LibraryIdentifier libraryName, this.semicolon) : super(comment, meta
data) { |
| 8645 this._libraryName = becomeParentOf(libraryName); | 8971 this._libraryName = becomeParentOf(libraryName); |
| 8646 } | 8972 } |
| 8647 | 8973 |
| 8974 @override |
| 8648 accept(AstVisitor visitor) => visitor.visitPartOfDirective(this); | 8975 accept(AstVisitor visitor) => visitor.visitPartOfDirective(this); |
| 8649 | 8976 |
| 8977 @override |
| 8650 Token get endToken => semicolon; | 8978 Token get endToken => semicolon; |
| 8651 | 8979 |
| 8980 @override |
| 8652 Token get keyword => partToken; | 8981 Token get keyword => partToken; |
| 8653 | 8982 |
| 8654 /** | 8983 /** |
| 8655 * Return the name of the library that the containing compilation unit is part
of. | 8984 * Return the name of the library that the containing compilation unit is part
of. |
| 8656 * | 8985 * |
| 8657 * @return the name of the library that the containing compilation unit is par
t of | 8986 * @return the name of the library that the containing compilation unit is par
t of |
| 8658 */ | 8987 */ |
| 8659 LibraryIdentifier get libraryName => _libraryName; | 8988 LibraryIdentifier get libraryName => _libraryName; |
| 8660 | 8989 |
| 8661 /** | 8990 /** |
| 8662 * Set the name of the library that the containing compilation unit is part of
to the given name. | 8991 * Set the name of the library that the containing compilation unit is part of
to the given name. |
| 8663 * | 8992 * |
| 8664 * @param libraryName the name of the library that the containing compilation
unit is part of | 8993 * @param libraryName the name of the library that the containing compilation
unit is part of |
| 8665 */ | 8994 */ |
| 8666 void set libraryName(LibraryIdentifier libraryName) { | 8995 void set libraryName(LibraryIdentifier libraryName) { |
| 8667 this._libraryName = becomeParentOf(libraryName); | 8996 this._libraryName = becomeParentOf(libraryName); |
| 8668 } | 8997 } |
| 8669 | 8998 |
| 8999 @override |
| 8670 void visitChildren(AstVisitor visitor) { | 9000 void visitChildren(AstVisitor visitor) { |
| 8671 super.visitChildren(visitor); | 9001 super.visitChildren(visitor); |
| 8672 safelyVisitChild(_libraryName, visitor); | 9002 safelyVisitChild(_libraryName, visitor); |
| 8673 } | 9003 } |
| 8674 | 9004 |
| 9005 @override |
| 8675 Token get firstTokenAfterCommentAndMetadata => partToken; | 9006 Token get firstTokenAfterCommentAndMetadata => partToken; |
| 8676 } | 9007 } |
| 8677 | 9008 |
| 8678 /** | 9009 /** |
| 8679 * Instances of the class `PostfixExpression` represent a postfix unary expressi
on. | 9010 * Instances of the class `PostfixExpression` represent a postfix unary expressi
on. |
| 8680 * | 9011 * |
| 8681 * <pre> | 9012 * <pre> |
| 8682 * postfixExpression ::= | 9013 * postfixExpression ::= |
| 8683 * [Expression] [Token] | 9014 * [Expression] [Token] |
| 8684 * </pre> | 9015 * </pre> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 8711 /** | 9042 /** |
| 8712 * Initialize a newly created postfix expression. | 9043 * Initialize a newly created postfix expression. |
| 8713 * | 9044 * |
| 8714 * @param operand the expression computing the operand for the operator | 9045 * @param operand the expression computing the operand for the operator |
| 8715 * @param operator the postfix operator being applied to the operand | 9046 * @param operator the postfix operator being applied to the operand |
| 8716 */ | 9047 */ |
| 8717 PostfixExpression(Expression operand, this.operator) { | 9048 PostfixExpression(Expression operand, this.operator) { |
| 8718 this._operand = becomeParentOf(operand); | 9049 this._operand = becomeParentOf(operand); |
| 8719 } | 9050 } |
| 8720 | 9051 |
| 9052 @override |
| 8721 accept(AstVisitor visitor) => visitor.visitPostfixExpression(this); | 9053 accept(AstVisitor visitor) => visitor.visitPostfixExpression(this); |
| 8722 | 9054 |
| 9055 @override |
| 8723 Token get beginToken => _operand.beginToken; | 9056 Token get beginToken => _operand.beginToken; |
| 8724 | 9057 |
| 8725 /** | 9058 /** |
| 8726 * Return the best element available for this operator. If resolution was able
to find a better | 9059 * Return the best element available for this operator. If resolution was able
to find a better |
| 8727 * element based on type propagation, that element will be returned. Otherwise
, the element found | 9060 * element based on type propagation, that element will be returned. Otherwise
, the element found |
| 8728 * using the result of static analysis will be returned. If resolution has not
been performed, | 9061 * using the result of static analysis will be returned. If resolution has not
been performed, |
| 8729 * then `null` will be returned. | 9062 * then `null` will be returned. |
| 8730 * | 9063 * |
| 8731 * @return the best element available for this operator | 9064 * @return the best element available for this operator |
| 8732 */ | 9065 */ |
| 8733 MethodElement get bestElement { | 9066 MethodElement get bestElement { |
| 8734 MethodElement element = propagatedElement; | 9067 MethodElement element = propagatedElement; |
| 8735 if (element == null) { | 9068 if (element == null) { |
| 8736 element = staticElement; | 9069 element = staticElement; |
| 8737 } | 9070 } |
| 8738 return element; | 9071 return element; |
| 8739 } | 9072 } |
| 8740 | 9073 |
| 9074 @override |
| 8741 Token get endToken => operator; | 9075 Token get endToken => operator; |
| 8742 | 9076 |
| 8743 /** | 9077 /** |
| 8744 * Return the expression computing the operand for the operator. | 9078 * Return the expression computing the operand for the operator. |
| 8745 * | 9079 * |
| 8746 * @return the expression computing the operand for the operator | 9080 * @return the expression computing the operand for the operator |
| 8747 */ | 9081 */ |
| 8748 Expression get operand => _operand; | 9082 Expression get operand => _operand; |
| 8749 | 9083 |
| 9084 @override |
| 8750 int get precedence => 15; | 9085 int get precedence => 15; |
| 8751 | 9086 |
| 8752 /** | 9087 /** |
| 8753 * Return the element associated with the operator based on the propagated typ
e of the operand, or | 9088 * Return the element associated with the operator based on the propagated typ
e of the operand, or |
| 8754 * `null` if the AST structure has not been resolved, if the operator is not u
ser definable, | 9089 * `null` if the AST structure has not been resolved, if the operator is not u
ser definable, |
| 8755 * or if the operator could not be resolved. One example of the latter case is
an operator that is | 9090 * or if the operator could not be resolved. One example of the latter case is
an operator that is |
| 8756 * not defined for the type of the operand. | 9091 * not defined for the type of the operand. |
| 8757 * | 9092 * |
| 8758 * @return the element associated with the operator | 9093 * @return the element associated with the operator |
| 8759 */ | 9094 */ |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8791 /** | 9126 /** |
| 8792 * Set the element associated with the operator based on the static type of th
e operand to the | 9127 * Set the element associated with the operator based on the static type of th
e operand to the |
| 8793 * given element. | 9128 * given element. |
| 8794 * | 9129 * |
| 8795 * @param element the element to be associated with the operator | 9130 * @param element the element to be associated with the operator |
| 8796 */ | 9131 */ |
| 8797 void set staticElement(MethodElement element) { | 9132 void set staticElement(MethodElement element) { |
| 8798 _staticElement = element; | 9133 _staticElement = element; |
| 8799 } | 9134 } |
| 8800 | 9135 |
| 9136 @override |
| 8801 void visitChildren(AstVisitor visitor) { | 9137 void visitChildren(AstVisitor visitor) { |
| 8802 safelyVisitChild(_operand, visitor); | 9138 safelyVisitChild(_operand, visitor); |
| 8803 } | 9139 } |
| 8804 | 9140 |
| 8805 /** | 9141 /** |
| 8806 * If the AST structure has been resolved, and the function being invoked is k
nown based on | 9142 * If the AST structure has been resolved, and the function being invoked is k
nown based on |
| 8807 * propagated type information, then return the parameter element representing
the parameter to | 9143 * propagated type information, then return the parameter element representing
the parameter to |
| 8808 * which the value of the operand will be bound. Otherwise, return `null`. | 9144 * which the value of the operand will be bound. Otherwise, return `null`. |
| 8809 * | 9145 * |
| 8810 * This method is only intended to be used by [Expression#getPropagatedParamet
erElement]. | 9146 * This method is only intended to be used by [Expression#getPropagatedParamet
erElement]. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8881 /** | 9217 /** |
| 8882 * Initialize a newly created prefix expression. | 9218 * Initialize a newly created prefix expression. |
| 8883 * | 9219 * |
| 8884 * @param operator the prefix operator being applied to the operand | 9220 * @param operator the prefix operator being applied to the operand |
| 8885 * @param operand the expression computing the operand for the operator | 9221 * @param operand the expression computing the operand for the operator |
| 8886 */ | 9222 */ |
| 8887 PrefixExpression(this.operator, Expression operand) { | 9223 PrefixExpression(this.operator, Expression operand) { |
| 8888 this._operand = becomeParentOf(operand); | 9224 this._operand = becomeParentOf(operand); |
| 8889 } | 9225 } |
| 8890 | 9226 |
| 9227 @override |
| 8891 accept(AstVisitor visitor) => visitor.visitPrefixExpression(this); | 9228 accept(AstVisitor visitor) => visitor.visitPrefixExpression(this); |
| 8892 | 9229 |
| 9230 @override |
| 8893 Token get beginToken => operator; | 9231 Token get beginToken => operator; |
| 8894 | 9232 |
| 8895 /** | 9233 /** |
| 8896 * Return the best element available for this operator. If resolution was able
to find a better | 9234 * Return the best element available for this operator. If resolution was able
to find a better |
| 8897 * element based on type propagation, that element will be returned. Otherwise
, the element found | 9235 * element based on type propagation, that element will be returned. Otherwise
, the element found |
| 8898 * using the result of static analysis will be returned. If resolution has not
been performed, | 9236 * using the result of static analysis will be returned. If resolution has not
been performed, |
| 8899 * then `null` will be returned. | 9237 * then `null` will be returned. |
| 8900 * | 9238 * |
| 8901 * @return the best element available for this operator | 9239 * @return the best element available for this operator |
| 8902 */ | 9240 */ |
| 8903 MethodElement get bestElement { | 9241 MethodElement get bestElement { |
| 8904 MethodElement element = propagatedElement; | 9242 MethodElement element = propagatedElement; |
| 8905 if (element == null) { | 9243 if (element == null) { |
| 8906 element = staticElement; | 9244 element = staticElement; |
| 8907 } | 9245 } |
| 8908 return element; | 9246 return element; |
| 8909 } | 9247 } |
| 8910 | 9248 |
| 9249 @override |
| 8911 Token get endToken => _operand.endToken; | 9250 Token get endToken => _operand.endToken; |
| 8912 | 9251 |
| 8913 /** | 9252 /** |
| 8914 * Return the expression computing the operand for the operator. | 9253 * Return the expression computing the operand for the operator. |
| 8915 * | 9254 * |
| 8916 * @return the expression computing the operand for the operator | 9255 * @return the expression computing the operand for the operator |
| 8917 */ | 9256 */ |
| 8918 Expression get operand => _operand; | 9257 Expression get operand => _operand; |
| 8919 | 9258 |
| 9259 @override |
| 8920 int get precedence => 14; | 9260 int get precedence => 14; |
| 8921 | 9261 |
| 8922 /** | 9262 /** |
| 8923 * Return the element associated with the operator based on the propagated typ
e of the operand, or | 9263 * Return the element associated with the operator based on the propagated typ
e of the operand, or |
| 8924 * `null` if the AST structure has not been resolved, if the operator is not u
ser definable, | 9264 * `null` if the AST structure has not been resolved, if the operator is not u
ser definable, |
| 8925 * or if the operator could not be resolved. One example of the latter case is
an operator that is | 9265 * or if the operator could not be resolved. One example of the latter case is
an operator that is |
| 8926 * not defined for the type of the operand. | 9266 * not defined for the type of the operand. |
| 8927 * | 9267 * |
| 8928 * @return the element associated with the operator | 9268 * @return the element associated with the operator |
| 8929 */ | 9269 */ |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8961 /** | 9301 /** |
| 8962 * Set the element associated with the operator based on the static type of th
e operand to the | 9302 * Set the element associated with the operator based on the static type of th
e operand to the |
| 8963 * given element. | 9303 * given element. |
| 8964 * | 9304 * |
| 8965 * @param element the static element to be associated with the operator | 9305 * @param element the static element to be associated with the operator |
| 8966 */ | 9306 */ |
| 8967 void set staticElement(MethodElement element) { | 9307 void set staticElement(MethodElement element) { |
| 8968 _staticElement = element; | 9308 _staticElement = element; |
| 8969 } | 9309 } |
| 8970 | 9310 |
| 9311 @override |
| 8971 void visitChildren(AstVisitor visitor) { | 9312 void visitChildren(AstVisitor visitor) { |
| 8972 safelyVisitChild(_operand, visitor); | 9313 safelyVisitChild(_operand, visitor); |
| 8973 } | 9314 } |
| 8974 | 9315 |
| 8975 /** | 9316 /** |
| 8976 * If the AST structure has been resolved, and the function being invoked is k
nown based on | 9317 * If the AST structure has been resolved, and the function being invoked is k
nown based on |
| 8977 * propagated type information, then return the parameter element representing
the parameter to | 9318 * propagated type information, then return the parameter element representing
the parameter to |
| 8978 * which the value of the operand will be bound. Otherwise, return `null`. | 9319 * which the value of the operand will be bound. Otherwise, return `null`. |
| 8979 * | 9320 * |
| 8980 * This method is only intended to be used by [Expression#getPropagatedParamet
erElement]. | 9321 * This method is only intended to be used by [Expression#getPropagatedParamet
erElement]. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9046 * | 9387 * |
| 9047 * @param prefix the identifier being prefixed | 9388 * @param prefix the identifier being prefixed |
| 9048 * @param period the period used to separate the prefix from the identifier | 9389 * @param period the period used to separate the prefix from the identifier |
| 9049 * @param identifier the prefix associated with the library in which the ident
ifier is defined | 9390 * @param identifier the prefix associated with the library in which the ident
ifier is defined |
| 9050 */ | 9391 */ |
| 9051 PrefixedIdentifier(SimpleIdentifier prefix, this.period, SimpleIdentifier iden
tifier) { | 9392 PrefixedIdentifier(SimpleIdentifier prefix, this.period, SimpleIdentifier iden
tifier) { |
| 9052 this._prefix = becomeParentOf(prefix); | 9393 this._prefix = becomeParentOf(prefix); |
| 9053 this._identifier = becomeParentOf(identifier); | 9394 this._identifier = becomeParentOf(identifier); |
| 9054 } | 9395 } |
| 9055 | 9396 |
| 9397 @override |
| 9056 accept(AstVisitor visitor) => visitor.visitPrefixedIdentifier(this); | 9398 accept(AstVisitor visitor) => visitor.visitPrefixedIdentifier(this); |
| 9057 | 9399 |
| 9400 @override |
| 9058 Token get beginToken => _prefix.beginToken; | 9401 Token get beginToken => _prefix.beginToken; |
| 9059 | 9402 |
| 9403 @override |
| 9060 Element get bestElement { | 9404 Element get bestElement { |
| 9061 if (_identifier == null) { | 9405 if (_identifier == null) { |
| 9062 return null; | 9406 return null; |
| 9063 } | 9407 } |
| 9064 return _identifier.bestElement; | 9408 return _identifier.bestElement; |
| 9065 } | 9409 } |
| 9066 | 9410 |
| 9411 @override |
| 9067 Token get endToken => _identifier.endToken; | 9412 Token get endToken => _identifier.endToken; |
| 9068 | 9413 |
| 9069 /** | 9414 /** |
| 9070 * Return the identifier being prefixed. | 9415 * Return the identifier being prefixed. |
| 9071 * | 9416 * |
| 9072 * @return the identifier being prefixed | 9417 * @return the identifier being prefixed |
| 9073 */ | 9418 */ |
| 9074 SimpleIdentifier get identifier => _identifier; | 9419 SimpleIdentifier get identifier => _identifier; |
| 9075 | 9420 |
| 9421 @override |
| 9076 String get name => "${_prefix.name}.${_identifier.name}"; | 9422 String get name => "${_prefix.name}.${_identifier.name}"; |
| 9077 | 9423 |
| 9424 @override |
| 9078 int get precedence => 15; | 9425 int get precedence => 15; |
| 9079 | 9426 |
| 9080 /** | 9427 /** |
| 9081 * Return the prefix associated with the library in which the identifier is de
fined. | 9428 * Return the prefix associated with the library in which the identifier is de
fined. |
| 9082 * | 9429 * |
| 9083 * @return the prefix associated with the library in which the identifier is d
efined | 9430 * @return the prefix associated with the library in which the identifier is d
efined |
| 9084 */ | 9431 */ |
| 9085 SimpleIdentifier get prefix => _prefix; | 9432 SimpleIdentifier get prefix => _prefix; |
| 9086 | 9433 |
| 9434 @override |
| 9087 Element get propagatedElement { | 9435 Element get propagatedElement { |
| 9088 if (_identifier == null) { | 9436 if (_identifier == null) { |
| 9089 return null; | 9437 return null; |
| 9090 } | 9438 } |
| 9091 return _identifier.propagatedElement; | 9439 return _identifier.propagatedElement; |
| 9092 } | 9440 } |
| 9093 | 9441 |
| 9442 @override |
| 9094 Element get staticElement { | 9443 Element get staticElement { |
| 9095 if (_identifier == null) { | 9444 if (_identifier == null) { |
| 9096 return null; | 9445 return null; |
| 9097 } | 9446 } |
| 9098 return _identifier.staticElement; | 9447 return _identifier.staticElement; |
| 9099 } | 9448 } |
| 9100 | 9449 |
| 9101 /** | 9450 /** |
| 9102 * Set the identifier being prefixed to the given identifier. | 9451 * Set the identifier being prefixed to the given identifier. |
| 9103 * | 9452 * |
| 9104 * @param identifier the identifier being prefixed | 9453 * @param identifier the identifier being prefixed |
| 9105 */ | 9454 */ |
| 9106 void set identifier(SimpleIdentifier identifier) { | 9455 void set identifier(SimpleIdentifier identifier) { |
| 9107 this._identifier = becomeParentOf(identifier); | 9456 this._identifier = becomeParentOf(identifier); |
| 9108 } | 9457 } |
| 9109 | 9458 |
| 9110 /** | 9459 /** |
| 9111 * Set the prefix associated with the library in which the identifier is defin
ed to the given | 9460 * Set the prefix associated with the library in which the identifier is defin
ed to the given |
| 9112 * identifier. | 9461 * identifier. |
| 9113 * | 9462 * |
| 9114 * @param identifier the prefix associated with the library in which the ident
ifier is defined | 9463 * @param identifier the prefix associated with the library in which the ident
ifier is defined |
| 9115 */ | 9464 */ |
| 9116 void set prefix(SimpleIdentifier identifier) { | 9465 void set prefix(SimpleIdentifier identifier) { |
| 9117 _prefix = becomeParentOf(identifier); | 9466 _prefix = becomeParentOf(identifier); |
| 9118 } | 9467 } |
| 9119 | 9468 |
| 9469 @override |
| 9120 void visitChildren(AstVisitor visitor) { | 9470 void visitChildren(AstVisitor visitor) { |
| 9121 safelyVisitChild(_prefix, visitor); | 9471 safelyVisitChild(_prefix, visitor); |
| 9122 safelyVisitChild(_identifier, visitor); | 9472 safelyVisitChild(_identifier, visitor); |
| 9123 } | 9473 } |
| 9124 } | 9474 } |
| 9125 | 9475 |
| 9126 /** | 9476 /** |
| 9127 * Instances of the class `PropertyAccess` represent the access of a property of
an object. | 9477 * Instances of the class `PropertyAccess` represent the access of a property of
an object. |
| 9128 * | 9478 * |
| 9129 * Note, however, that accesses to properties of objects can also be represented
as | 9479 * Note, however, that accesses to properties of objects can also be represented
as |
| (...skipping 26 matching lines...) Expand all Loading... |
| 9156 * | 9506 * |
| 9157 * @param target the expression computing the object defining the property bei
ng accessed | 9507 * @param target the expression computing the object defining the property bei
ng accessed |
| 9158 * @param operator the property access operator | 9508 * @param operator the property access operator |
| 9159 * @param propertyName the name of the property being accessed | 9509 * @param propertyName the name of the property being accessed |
| 9160 */ | 9510 */ |
| 9161 PropertyAccess(Expression target, this.operator, SimpleIdentifier propertyName
) { | 9511 PropertyAccess(Expression target, this.operator, SimpleIdentifier propertyName
) { |
| 9162 this._target = becomeParentOf(target); | 9512 this._target = becomeParentOf(target); |
| 9163 this._propertyName = becomeParentOf(propertyName); | 9513 this._propertyName = becomeParentOf(propertyName); |
| 9164 } | 9514 } |
| 9165 | 9515 |
| 9516 @override |
| 9166 accept(AstVisitor visitor) => visitor.visitPropertyAccess(this); | 9517 accept(AstVisitor visitor) => visitor.visitPropertyAccess(this); |
| 9167 | 9518 |
| 9519 @override |
| 9168 Token get beginToken { | 9520 Token get beginToken { |
| 9169 if (_target != null) { | 9521 if (_target != null) { |
| 9170 return _target.beginToken; | 9522 return _target.beginToken; |
| 9171 } | 9523 } |
| 9172 return operator; | 9524 return operator; |
| 9173 } | 9525 } |
| 9174 | 9526 |
| 9527 @override |
| 9175 Token get endToken => _propertyName.endToken; | 9528 Token get endToken => _propertyName.endToken; |
| 9176 | 9529 |
| 9530 @override |
| 9177 int get precedence => 15; | 9531 int get precedence => 15; |
| 9178 | 9532 |
| 9179 /** | 9533 /** |
| 9180 * Return the name of the property being accessed. | 9534 * Return the name of the property being accessed. |
| 9181 * | 9535 * |
| 9182 * @return the name of the property being accessed | 9536 * @return the name of the property being accessed |
| 9183 */ | 9537 */ |
| 9184 SimpleIdentifier get propertyName => _propertyName; | 9538 SimpleIdentifier get propertyName => _propertyName; |
| 9185 | 9539 |
| 9186 /** | 9540 /** |
| (...skipping 21 matching lines...) Expand all Loading... |
| 9208 | 9562 |
| 9209 /** | 9563 /** |
| 9210 * Return the expression computing the object defining the property being acce
ssed, or | 9564 * Return the expression computing the object defining the property being acce
ssed, or |
| 9211 * `null` if this property access is part of a cascade expression. | 9565 * `null` if this property access is part of a cascade expression. |
| 9212 * | 9566 * |
| 9213 * @return the expression computing the object defining the property being acc
essed | 9567 * @return the expression computing the object defining the property being acc
essed |
| 9214 * @see #getRealTarget() | 9568 * @see #getRealTarget() |
| 9215 */ | 9569 */ |
| 9216 Expression get target => _target; | 9570 Expression get target => _target; |
| 9217 | 9571 |
| 9572 @override |
| 9218 bool get isAssignable => true; | 9573 bool get isAssignable => true; |
| 9219 | 9574 |
| 9220 /** | 9575 /** |
| 9221 * Return `true` if this expression is cascaded. If it is, then the target of
this | 9576 * Return `true` if this expression is cascaded. If it is, then the target of
this |
| 9222 * expression is not stored locally but is stored in the nearest ancestor that
is a | 9577 * expression is not stored locally but is stored in the nearest ancestor that
is a |
| 9223 * [CascadeExpression]. | 9578 * [CascadeExpression]. |
| 9224 * | 9579 * |
| 9225 * @return `true` if this expression is cascaded | 9580 * @return `true` if this expression is cascaded |
| 9226 */ | 9581 */ |
| 9227 bool get isCascaded => operator != null && identical(operator.type, TokenType.
PERIOD_PERIOD); | 9582 bool get isCascaded => operator != null && identical(operator.type, TokenType.
PERIOD_PERIOD); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 9238 /** | 9593 /** |
| 9239 * Set the expression computing the object defining the property being accesse
d to the given | 9594 * Set the expression computing the object defining the property being accesse
d to the given |
| 9240 * expression. | 9595 * expression. |
| 9241 * | 9596 * |
| 9242 * @param expression the expression computing the object defining the property
being accessed | 9597 * @param expression the expression computing the object defining the property
being accessed |
| 9243 */ | 9598 */ |
| 9244 void set target(Expression expression) { | 9599 void set target(Expression expression) { |
| 9245 _target = becomeParentOf(expression); | 9600 _target = becomeParentOf(expression); |
| 9246 } | 9601 } |
| 9247 | 9602 |
| 9603 @override |
| 9248 void visitChildren(AstVisitor visitor) { | 9604 void visitChildren(AstVisitor visitor) { |
| 9249 safelyVisitChild(_target, visitor); | 9605 safelyVisitChild(_target, visitor); |
| 9250 safelyVisitChild(_propertyName, visitor); | 9606 safelyVisitChild(_propertyName, visitor); |
| 9251 } | 9607 } |
| 9252 } | 9608 } |
| 9253 | 9609 |
| 9254 /** | 9610 /** |
| 9255 * Instances of the class `RedirectingConstructorInvocation` represent the invoc
ation of a | 9611 * Instances of the class `RedirectingConstructorInvocation` represent the invoc
ation of a |
| 9256 * another constructor in the same class from within a constructor's initializat
ion list. | 9612 * another constructor in the same class from within a constructor's initializat
ion list. |
| 9257 * | 9613 * |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9296 * @param keyword the token for the 'this' keyword | 9652 * @param keyword the token for the 'this' keyword |
| 9297 * @param period the token for the period before the name of the constructor t
hat is being invoked | 9653 * @param period the token for the period before the name of the constructor t
hat is being invoked |
| 9298 * @param constructorName the name of the constructor that is being invoked | 9654 * @param constructorName the name of the constructor that is being invoked |
| 9299 * @param argumentList the list of arguments to the constructor | 9655 * @param argumentList the list of arguments to the constructor |
| 9300 */ | 9656 */ |
| 9301 RedirectingConstructorInvocation(this.keyword, this.period, SimpleIdentifier c
onstructorName, ArgumentList argumentList) { | 9657 RedirectingConstructorInvocation(this.keyword, this.period, SimpleIdentifier c
onstructorName, ArgumentList argumentList) { |
| 9302 this._constructorName = becomeParentOf(constructorName); | 9658 this._constructorName = becomeParentOf(constructorName); |
| 9303 this._argumentList = becomeParentOf(argumentList); | 9659 this._argumentList = becomeParentOf(argumentList); |
| 9304 } | 9660 } |
| 9305 | 9661 |
| 9662 @override |
| 9306 accept(AstVisitor visitor) => visitor.visitRedirectingConstructorInvocation(th
is); | 9663 accept(AstVisitor visitor) => visitor.visitRedirectingConstructorInvocation(th
is); |
| 9307 | 9664 |
| 9308 /** | 9665 /** |
| 9309 * Return the list of arguments to the constructor. | 9666 * Return the list of arguments to the constructor. |
| 9310 * | 9667 * |
| 9311 * @return the list of arguments to the constructor | 9668 * @return the list of arguments to the constructor |
| 9312 */ | 9669 */ |
| 9313 ArgumentList get argumentList => _argumentList; | 9670 ArgumentList get argumentList => _argumentList; |
| 9314 | 9671 |
| 9672 @override |
| 9315 Token get beginToken => keyword; | 9673 Token get beginToken => keyword; |
| 9316 | 9674 |
| 9317 /** | 9675 /** |
| 9318 * Return the name of the constructor that is being invoked, or `null` if the
unnamed | 9676 * Return the name of the constructor that is being invoked, or `null` if the
unnamed |
| 9319 * constructor is being invoked. | 9677 * constructor is being invoked. |
| 9320 * | 9678 * |
| 9321 * @return the name of the constructor that is being invoked | 9679 * @return the name of the constructor that is being invoked |
| 9322 */ | 9680 */ |
| 9323 SimpleIdentifier get constructorName => _constructorName; | 9681 SimpleIdentifier get constructorName => _constructorName; |
| 9324 | 9682 |
| 9683 @override |
| 9325 Token get endToken => _argumentList.endToken; | 9684 Token get endToken => _argumentList.endToken; |
| 9326 | 9685 |
| 9327 /** | 9686 /** |
| 9328 * Set the list of arguments to the constructor to the given list. | 9687 * Set the list of arguments to the constructor to the given list. |
| 9329 * | 9688 * |
| 9330 * @param argumentList the list of arguments to the constructor | 9689 * @param argumentList the list of arguments to the constructor |
| 9331 */ | 9690 */ |
| 9332 void set argumentList(ArgumentList argumentList) { | 9691 void set argumentList(ArgumentList argumentList) { |
| 9333 this._argumentList = becomeParentOf(argumentList); | 9692 this._argumentList = becomeParentOf(argumentList); |
| 9334 } | 9693 } |
| 9335 | 9694 |
| 9336 /** | 9695 /** |
| 9337 * Set the name of the constructor that is being invoked to the given identifi
er. | 9696 * Set the name of the constructor that is being invoked to the given identifi
er. |
| 9338 * | 9697 * |
| 9339 * @param identifier the name of the constructor that is being invoked | 9698 * @param identifier the name of the constructor that is being invoked |
| 9340 */ | 9699 */ |
| 9341 void set constructorName(SimpleIdentifier identifier) { | 9700 void set constructorName(SimpleIdentifier identifier) { |
| 9342 _constructorName = becomeParentOf(identifier); | 9701 _constructorName = becomeParentOf(identifier); |
| 9343 } | 9702 } |
| 9344 | 9703 |
| 9704 @override |
| 9345 void visitChildren(AstVisitor visitor) { | 9705 void visitChildren(AstVisitor visitor) { |
| 9346 safelyVisitChild(_constructorName, visitor); | 9706 safelyVisitChild(_constructorName, visitor); |
| 9347 safelyVisitChild(_argumentList, visitor); | 9707 safelyVisitChild(_argumentList, visitor); |
| 9348 } | 9708 } |
| 9349 } | 9709 } |
| 9350 | 9710 |
| 9351 /** | 9711 /** |
| 9352 * Instances of the class `RethrowExpression` represent a rethrow expression. | 9712 * Instances of the class `RethrowExpression` represent a rethrow expression. |
| 9353 * | 9713 * |
| 9354 * <pre> | 9714 * <pre> |
| 9355 * rethrowExpression ::= | 9715 * rethrowExpression ::= |
| 9356 * 'rethrow' | 9716 * 'rethrow' |
| 9357 * </pre> | 9717 * </pre> |
| 9358 */ | 9718 */ |
| 9359 class RethrowExpression extends Expression { | 9719 class RethrowExpression extends Expression { |
| 9360 /** | 9720 /** |
| 9361 * The token representing the 'rethrow' keyword. | 9721 * The token representing the 'rethrow' keyword. |
| 9362 */ | 9722 */ |
| 9363 Token keyword; | 9723 Token keyword; |
| 9364 | 9724 |
| 9365 /** | 9725 /** |
| 9366 * Initialize a newly created rethrow expression. | 9726 * Initialize a newly created rethrow expression. |
| 9367 * | 9727 * |
| 9368 * @param keyword the token representing the 'rethrow' keyword | 9728 * @param keyword the token representing the 'rethrow' keyword |
| 9369 */ | 9729 */ |
| 9370 RethrowExpression(this.keyword); | 9730 RethrowExpression(this.keyword); |
| 9371 | 9731 |
| 9732 @override |
| 9372 accept(AstVisitor visitor) => visitor.visitRethrowExpression(this); | 9733 accept(AstVisitor visitor) => visitor.visitRethrowExpression(this); |
| 9373 | 9734 |
| 9735 @override |
| 9374 Token get beginToken => keyword; | 9736 Token get beginToken => keyword; |
| 9375 | 9737 |
| 9738 @override |
| 9376 Token get endToken => keyword; | 9739 Token get endToken => keyword; |
| 9377 | 9740 |
| 9741 @override |
| 9378 int get precedence => 0; | 9742 int get precedence => 0; |
| 9379 | 9743 |
| 9744 @override |
| 9380 void visitChildren(AstVisitor visitor) { | 9745 void visitChildren(AstVisitor visitor) { |
| 9381 } | 9746 } |
| 9382 } | 9747 } |
| 9383 | 9748 |
| 9384 /** | 9749 /** |
| 9385 * Instances of the class `ReturnStatement` represent a return statement. | 9750 * Instances of the class `ReturnStatement` represent a return statement. |
| 9386 * | 9751 * |
| 9387 * <pre> | 9752 * <pre> |
| 9388 * returnStatement ::= | 9753 * returnStatement ::= |
| 9389 * 'return' [Expression]? ';' | 9754 * 'return' [Expression]? ';' |
| (...skipping 20 matching lines...) Expand all Loading... |
| 9410 * Initialize a newly created return statement. | 9775 * Initialize a newly created return statement. |
| 9411 * | 9776 * |
| 9412 * @param keyword the token representing the 'return' keyword | 9777 * @param keyword the token representing the 'return' keyword |
| 9413 * @param expression the expression computing the value to be returned | 9778 * @param expression the expression computing the value to be returned |
| 9414 * @param semicolon the semicolon terminating the statement | 9779 * @param semicolon the semicolon terminating the statement |
| 9415 */ | 9780 */ |
| 9416 ReturnStatement(this.keyword, Expression expression, this.semicolon) { | 9781 ReturnStatement(this.keyword, Expression expression, this.semicolon) { |
| 9417 this._expression = becomeParentOf(expression); | 9782 this._expression = becomeParentOf(expression); |
| 9418 } | 9783 } |
| 9419 | 9784 |
| 9785 @override |
| 9420 accept(AstVisitor visitor) => visitor.visitReturnStatement(this); | 9786 accept(AstVisitor visitor) => visitor.visitReturnStatement(this); |
| 9421 | 9787 |
| 9788 @override |
| 9422 Token get beginToken => keyword; | 9789 Token get beginToken => keyword; |
| 9423 | 9790 |
| 9791 @override |
| 9424 Token get endToken => semicolon; | 9792 Token get endToken => semicolon; |
| 9425 | 9793 |
| 9426 /** | 9794 /** |
| 9427 * Return the expression computing the value to be returned, or `null` if no e
xplicit value | 9795 * Return the expression computing the value to be returned, or `null` if no e
xplicit value |
| 9428 * was provided. | 9796 * was provided. |
| 9429 * | 9797 * |
| 9430 * @return the expression computing the value to be returned | 9798 * @return the expression computing the value to be returned |
| 9431 */ | 9799 */ |
| 9432 Expression get expression => _expression; | 9800 Expression get expression => _expression; |
| 9433 | 9801 |
| 9434 /** | 9802 /** |
| 9435 * Set the expression computing the value to be returned to the given expressi
on. | 9803 * Set the expression computing the value to be returned to the given expressi
on. |
| 9436 * | 9804 * |
| 9437 * @param expression the expression computing the value to be returned | 9805 * @param expression the expression computing the value to be returned |
| 9438 */ | 9806 */ |
| 9439 void set expression(Expression expression) { | 9807 void set expression(Expression expression) { |
| 9440 this._expression = becomeParentOf(expression); | 9808 this._expression = becomeParentOf(expression); |
| 9441 } | 9809 } |
| 9442 | 9810 |
| 9811 @override |
| 9443 void visitChildren(AstVisitor visitor) { | 9812 void visitChildren(AstVisitor visitor) { |
| 9444 safelyVisitChild(_expression, visitor); | 9813 safelyVisitChild(_expression, visitor); |
| 9445 } | 9814 } |
| 9446 } | 9815 } |
| 9447 | 9816 |
| 9448 /** | 9817 /** |
| 9449 * Instances of the class `ScriptTag` represent the script tag that can optional
ly occur at | 9818 * Instances of the class `ScriptTag` represent the script tag that can optional
ly occur at |
| 9450 * the beginning of a compilation unit. | 9819 * the beginning of a compilation unit. |
| 9451 * | 9820 * |
| 9452 * <pre> | 9821 * <pre> |
| 9453 * scriptTag ::= | 9822 * scriptTag ::= |
| 9454 * '#!' (~NEWLINE)* NEWLINE | 9823 * '#!' (~NEWLINE)* NEWLINE |
| 9455 * </pre> | 9824 * </pre> |
| 9456 */ | 9825 */ |
| 9457 class ScriptTag extends AstNode { | 9826 class ScriptTag extends AstNode { |
| 9458 /** | 9827 /** |
| 9459 * The token representing this script tag. | 9828 * The token representing this script tag. |
| 9460 */ | 9829 */ |
| 9461 Token scriptTag; | 9830 Token scriptTag; |
| 9462 | 9831 |
| 9463 /** | 9832 /** |
| 9464 * Initialize a newly created script tag. | 9833 * Initialize a newly created script tag. |
| 9465 * | 9834 * |
| 9466 * @param scriptTag the token representing this script tag | 9835 * @param scriptTag the token representing this script tag |
| 9467 */ | 9836 */ |
| 9468 ScriptTag(this.scriptTag); | 9837 ScriptTag(this.scriptTag); |
| 9469 | 9838 |
| 9839 @override |
| 9470 accept(AstVisitor visitor) => visitor.visitScriptTag(this); | 9840 accept(AstVisitor visitor) => visitor.visitScriptTag(this); |
| 9471 | 9841 |
| 9842 @override |
| 9472 Token get beginToken => scriptTag; | 9843 Token get beginToken => scriptTag; |
| 9473 | 9844 |
| 9845 @override |
| 9474 Token get endToken => scriptTag; | 9846 Token get endToken => scriptTag; |
| 9475 | 9847 |
| 9848 @override |
| 9476 void visitChildren(AstVisitor visitor) { | 9849 void visitChildren(AstVisitor visitor) { |
| 9477 } | 9850 } |
| 9478 } | 9851 } |
| 9479 | 9852 |
| 9480 /** | 9853 /** |
| 9481 * Instances of the class `ShowCombinator` represent a combinator that restricts
the names | 9854 * Instances of the class `ShowCombinator` represent a combinator that restricts
the names |
| 9482 * being imported to those in a given list. | 9855 * being imported to those in a given list. |
| 9483 * | 9856 * |
| 9484 * <pre> | 9857 * <pre> |
| 9485 * showCombinator ::= | 9858 * showCombinator ::= |
| (...skipping 10 matching lines...) Expand all Loading... |
| 9496 * Initialize a newly created import show combinator. | 9869 * Initialize a newly created import show combinator. |
| 9497 * | 9870 * |
| 9498 * @param keyword the comma introducing the combinator | 9871 * @param keyword the comma introducing the combinator |
| 9499 * @param shownNames the list of names from the library that are made visible
by this combinator | 9872 * @param shownNames the list of names from the library that are made visible
by this combinator |
| 9500 */ | 9873 */ |
| 9501 ShowCombinator(Token keyword, List<SimpleIdentifier> shownNames) : super(keywo
rd) { | 9874 ShowCombinator(Token keyword, List<SimpleIdentifier> shownNames) : super(keywo
rd) { |
| 9502 this._shownNames = new NodeList<SimpleIdentifier>(this); | 9875 this._shownNames = new NodeList<SimpleIdentifier>(this); |
| 9503 this._shownNames.addAll(shownNames); | 9876 this._shownNames.addAll(shownNames); |
| 9504 } | 9877 } |
| 9505 | 9878 |
| 9879 @override |
| 9506 accept(AstVisitor visitor) => visitor.visitShowCombinator(this); | 9880 accept(AstVisitor visitor) => visitor.visitShowCombinator(this); |
| 9507 | 9881 |
| 9882 @override |
| 9508 Token get endToken => _shownNames.endToken; | 9883 Token get endToken => _shownNames.endToken; |
| 9509 | 9884 |
| 9510 /** | 9885 /** |
| 9511 * Return the list of names from the library that are made visible by this com
binator. | 9886 * Return the list of names from the library that are made visible by this com
binator. |
| 9512 * | 9887 * |
| 9513 * @return the list of names from the library that are made visible by this co
mbinator | 9888 * @return the list of names from the library that are made visible by this co
mbinator |
| 9514 */ | 9889 */ |
| 9515 NodeList<SimpleIdentifier> get shownNames => _shownNames; | 9890 NodeList<SimpleIdentifier> get shownNames => _shownNames; |
| 9516 | 9891 |
| 9892 @override |
| 9517 void visitChildren(AstVisitor visitor) { | 9893 void visitChildren(AstVisitor visitor) { |
| 9518 _shownNames.accept(visitor); | 9894 _shownNames.accept(visitor); |
| 9519 } | 9895 } |
| 9520 } | 9896 } |
| 9521 | 9897 |
| 9522 /** | 9898 /** |
| 9523 * Instances of the class `SimpleFormalParameter` represent a simple formal para
meter. | 9899 * Instances of the class `SimpleFormalParameter` represent a simple formal para
meter. |
| 9524 * | 9900 * |
| 9525 * <pre> | 9901 * <pre> |
| 9526 * simpleFormalParameter ::= | 9902 * simpleFormalParameter ::= |
| (...skipping 19 matching lines...) Expand all Loading... |
| 9546 * @param comment the documentation comment associated with this parameter | 9922 * @param comment the documentation comment associated with this parameter |
| 9547 * @param metadata the annotations associated with this parameter | 9923 * @param metadata the annotations associated with this parameter |
| 9548 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword | 9924 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword |
| 9549 * @param type the name of the declared type of the parameter | 9925 * @param type the name of the declared type of the parameter |
| 9550 * @param identifier the name of the parameter being declared | 9926 * @param identifier the name of the parameter being declared |
| 9551 */ | 9927 */ |
| 9552 SimpleFormalParameter(Comment comment, List<Annotation> metadata, this.keyword
, TypeName type, SimpleIdentifier identifier) : super(comment, metadata, identif
ier) { | 9928 SimpleFormalParameter(Comment comment, List<Annotation> metadata, this.keyword
, TypeName type, SimpleIdentifier identifier) : super(comment, metadata, identif
ier) { |
| 9553 this._type = becomeParentOf(type); | 9929 this._type = becomeParentOf(type); |
| 9554 } | 9930 } |
| 9555 | 9931 |
| 9932 @override |
| 9556 accept(AstVisitor visitor) => visitor.visitSimpleFormalParameter(this); | 9933 accept(AstVisitor visitor) => visitor.visitSimpleFormalParameter(this); |
| 9557 | 9934 |
| 9935 @override |
| 9558 Token get beginToken { | 9936 Token get beginToken { |
| 9559 if (keyword != null) { | 9937 if (keyword != null) { |
| 9560 return keyword; | 9938 return keyword; |
| 9561 } else if (_type != null) { | 9939 } else if (_type != null) { |
| 9562 return _type.beginToken; | 9940 return _type.beginToken; |
| 9563 } | 9941 } |
| 9564 return identifier.beginToken; | 9942 return identifier.beginToken; |
| 9565 } | 9943 } |
| 9566 | 9944 |
| 9945 @override |
| 9567 Token get endToken => identifier.endToken; | 9946 Token get endToken => identifier.endToken; |
| 9568 | 9947 |
| 9569 /** | 9948 /** |
| 9570 * Return the name of the declared type of the parameter, or `null` if the par
ameter does | 9949 * Return the name of the declared type of the parameter, or `null` if the par
ameter does |
| 9571 * not have a declared type. | 9950 * not have a declared type. |
| 9572 * | 9951 * |
| 9573 * @return the name of the declared type of the parameter | 9952 * @return the name of the declared type of the parameter |
| 9574 */ | 9953 */ |
| 9575 TypeName get type => _type; | 9954 TypeName get type => _type; |
| 9576 | 9955 |
| 9956 @override |
| 9577 bool get isConst => (keyword is KeywordToken) && identical((keyword as Keyword
Token).keyword, Keyword.CONST); | 9957 bool get isConst => (keyword is KeywordToken) && identical((keyword as Keyword
Token).keyword, Keyword.CONST); |
| 9578 | 9958 |
| 9959 @override |
| 9579 bool get isFinal => (keyword is KeywordToken) && identical((keyword as Keyword
Token).keyword, Keyword.FINAL); | 9960 bool get isFinal => (keyword is KeywordToken) && identical((keyword as Keyword
Token).keyword, Keyword.FINAL); |
| 9580 | 9961 |
| 9581 /** | 9962 /** |
| 9582 * Set the name of the declared type of the parameter to the given type name. | 9963 * Set the name of the declared type of the parameter to the given type name. |
| 9583 * | 9964 * |
| 9584 * @param typeName the name of the declared type of the parameter | 9965 * @param typeName the name of the declared type of the parameter |
| 9585 */ | 9966 */ |
| 9586 void set type(TypeName typeName) { | 9967 void set type(TypeName typeName) { |
| 9587 _type = becomeParentOf(typeName); | 9968 _type = becomeParentOf(typeName); |
| 9588 } | 9969 } |
| 9589 | 9970 |
| 9971 @override |
| 9590 void visitChildren(AstVisitor visitor) { | 9972 void visitChildren(AstVisitor visitor) { |
| 9591 super.visitChildren(visitor); | 9973 super.visitChildren(visitor); |
| 9592 safelyVisitChild(_type, visitor); | 9974 safelyVisitChild(_type, visitor); |
| 9593 safelyVisitChild(identifier, visitor); | 9975 safelyVisitChild(identifier, visitor); |
| 9594 } | 9976 } |
| 9595 } | 9977 } |
| 9596 | 9978 |
| 9597 /** | 9979 /** |
| 9598 * Instances of the class `SimpleIdentifier` represent a simple identifier. | 9980 * Instances of the class `SimpleIdentifier` represent a simple identifier. |
| 9599 * | 9981 * |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9632 */ | 10014 */ |
| 9633 AuxiliaryElements auxiliaryElements = null; | 10015 AuxiliaryElements auxiliaryElements = null; |
| 9634 | 10016 |
| 9635 /** | 10017 /** |
| 9636 * Initialize a newly created identifier. | 10018 * Initialize a newly created identifier. |
| 9637 * | 10019 * |
| 9638 * @param token the token representing the identifier | 10020 * @param token the token representing the identifier |
| 9639 */ | 10021 */ |
| 9640 SimpleIdentifier(this.token); | 10022 SimpleIdentifier(this.token); |
| 9641 | 10023 |
| 10024 @override |
| 9642 accept(AstVisitor visitor) => visitor.visitSimpleIdentifier(this); | 10025 accept(AstVisitor visitor) => visitor.visitSimpleIdentifier(this); |
| 9643 | 10026 |
| 10027 @override |
| 9644 Token get beginToken => token; | 10028 Token get beginToken => token; |
| 9645 | 10029 |
| 10030 @override |
| 9646 Element get bestElement { | 10031 Element get bestElement { |
| 9647 if (_propagatedElement == null) { | 10032 if (_propagatedElement == null) { |
| 9648 return _staticElement; | 10033 return _staticElement; |
| 9649 } | 10034 } |
| 9650 return _propagatedElement; | 10035 return _propagatedElement; |
| 9651 } | 10036 } |
| 9652 | 10037 |
| 10038 @override |
| 9653 Token get endToken => token; | 10039 Token get endToken => token; |
| 9654 | 10040 |
| 10041 @override |
| 9655 String get name => token.lexeme; | 10042 String get name => token.lexeme; |
| 9656 | 10043 |
| 10044 @override |
| 9657 int get precedence => 16; | 10045 int get precedence => 16; |
| 9658 | 10046 |
| 10047 @override |
| 9659 Element get propagatedElement => _propagatedElement; | 10048 Element get propagatedElement => _propagatedElement; |
| 9660 | 10049 |
| 10050 @override |
| 9661 Element get staticElement => _staticElement; | 10051 Element get staticElement => _staticElement; |
| 9662 | 10052 |
| 9663 /** | 10053 /** |
| 9664 * Return `true` if this identifier is the name being declared in a declaratio
n. | 10054 * Return `true` if this identifier is the name being declared in a declaratio
n. |
| 9665 * | 10055 * |
| 9666 * @return `true` if this identifier is the name being declared in a declarati
on | 10056 * @return `true` if this identifier is the name being declared in a declarati
on |
| 9667 */ | 10057 */ |
| 9668 bool inDeclarationContext() { | 10058 bool inDeclarationContext() { |
| 9669 AstNode parent = this.parent; | 10059 AstNode parent = this.parent; |
| 9670 if (parent is CatchClause) { | 10060 if (parent is CatchClause) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9771 if (parent is PrefixExpression) { | 10161 if (parent is PrefixExpression) { |
| 9772 return (parent as PrefixExpression).operator.type.isIncrementOperator; | 10162 return (parent as PrefixExpression).operator.type.isIncrementOperator; |
| 9773 } else if (parent is PostfixExpression) { | 10163 } else if (parent is PostfixExpression) { |
| 9774 return true; | 10164 return true; |
| 9775 } else if (parent is AssignmentExpression) { | 10165 } else if (parent is AssignmentExpression) { |
| 9776 return identical((parent as AssignmentExpression).leftHandSide, target); | 10166 return identical((parent as AssignmentExpression).leftHandSide, target); |
| 9777 } | 10167 } |
| 9778 return false; | 10168 return false; |
| 9779 } | 10169 } |
| 9780 | 10170 |
| 10171 @override |
| 9781 bool get isSynthetic => token.isSynthetic; | 10172 bool get isSynthetic => token.isSynthetic; |
| 9782 | 10173 |
| 9783 /** | 10174 /** |
| 9784 * Set the element associated with this identifier based on propagated type in
formation to the | 10175 * Set the element associated with this identifier based on propagated type in
formation to the |
| 9785 * given element. | 10176 * given element. |
| 9786 * | 10177 * |
| 9787 * @param element the element to be associated with this identifier | 10178 * @param element the element to be associated with this identifier |
| 9788 */ | 10179 */ |
| 9789 void set propagatedElement(Element element) { | 10180 void set propagatedElement(Element element) { |
| 9790 _propagatedElement = _validateElement(element); | 10181 _propagatedElement = _validateElement(element); |
| 9791 } | 10182 } |
| 9792 | 10183 |
| 9793 /** | 10184 /** |
| 9794 * Set the element associated with this identifier based on static type inform
ation to the given | 10185 * Set the element associated with this identifier based on static type inform
ation to the given |
| 9795 * element. | 10186 * element. |
| 9796 * | 10187 * |
| 9797 * @param element the element to be associated with this identifier | 10188 * @param element the element to be associated with this identifier |
| 9798 */ | 10189 */ |
| 9799 void set staticElement(Element element) { | 10190 void set staticElement(Element element) { |
| 9800 _staticElement = _validateElement(element); | 10191 _staticElement = _validateElement(element); |
| 9801 } | 10192 } |
| 9802 | 10193 |
| 10194 @override |
| 9803 void visitChildren(AstVisitor visitor) { | 10195 void visitChildren(AstVisitor visitor) { |
| 9804 } | 10196 } |
| 9805 | 10197 |
| 9806 /** | 10198 /** |
| 9807 * Return the given element if it is valid, or report the problem and return `
null` if it is | 10199 * Return the given element if it is valid, or report the problem and return `
null` if it is |
| 9808 * not appropriate. | 10200 * not appropriate. |
| 9809 * | 10201 * |
| 9810 * @param parent the parent of the element, used for reporting when there is a
problem | 10202 * @param parent the parent of the element, used for reporting when there is a
problem |
| 9811 * @param isValid `true` if the element is appropriate | 10203 * @param isValid `true` if the element is appropriate |
| 9812 * @param element the element to be associated with this identifier | 10204 * @param element the element to be associated with this identifier |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9899 /** | 10291 /** |
| 9900 * Initialize a newly created simple string literal. | 10292 * Initialize a newly created simple string literal. |
| 9901 * | 10293 * |
| 9902 * @param literal the token representing the literal | 10294 * @param literal the token representing the literal |
| 9903 * @param value the value of the literal | 10295 * @param value the value of the literal |
| 9904 */ | 10296 */ |
| 9905 SimpleStringLiteral(this.literal, String value) { | 10297 SimpleStringLiteral(this.literal, String value) { |
| 9906 this._value = StringUtilities.intern(value); | 10298 this._value = StringUtilities.intern(value); |
| 9907 } | 10299 } |
| 9908 | 10300 |
| 10301 @override |
| 9909 accept(AstVisitor visitor) => visitor.visitSimpleStringLiteral(this); | 10302 accept(AstVisitor visitor) => visitor.visitSimpleStringLiteral(this); |
| 9910 | 10303 |
| 10304 @override |
| 9911 Token get beginToken => literal; | 10305 Token get beginToken => literal; |
| 9912 | 10306 |
| 10307 @override |
| 9913 Token get endToken => literal; | 10308 Token get endToken => literal; |
| 9914 | 10309 |
| 9915 /** | 10310 /** |
| 9916 * Return the toolkit specific, non-Dart, element associated with this literal
, or `null`. | 10311 * Return the toolkit specific, non-Dart, element associated with this literal
, or `null`. |
| 9917 * | 10312 * |
| 9918 * @return the element associated with this literal | 10313 * @return the element associated with this literal |
| 9919 */ | 10314 */ |
| 9920 Element get toolkitElement => _toolkitElement; | 10315 Element get toolkitElement => _toolkitElement; |
| 9921 | 10316 |
| 9922 /** | 10317 /** |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9957 return StringUtilities.endsWith3(lexeme, 0x22, 0x22, 0x22) || StringUtilitie
s.endsWith3(lexeme, 0x27, 0x27, 0x27); | 10352 return StringUtilities.endsWith3(lexeme, 0x22, 0x22, 0x22) || StringUtilitie
s.endsWith3(lexeme, 0x27, 0x27, 0x27); |
| 9958 } | 10353 } |
| 9959 | 10354 |
| 9960 /** | 10355 /** |
| 9961 * Return `true` if this string literal is a raw string. | 10356 * Return `true` if this string literal is a raw string. |
| 9962 * | 10357 * |
| 9963 * @return `true` if this string literal is a raw string | 10358 * @return `true` if this string literal is a raw string |
| 9964 */ | 10359 */ |
| 9965 bool get isRaw => literal.lexeme.codeUnitAt(0) == 0x72; | 10360 bool get isRaw => literal.lexeme.codeUnitAt(0) == 0x72; |
| 9966 | 10361 |
| 10362 @override |
| 9967 bool get isSynthetic => literal.isSynthetic; | 10363 bool get isSynthetic => literal.isSynthetic; |
| 9968 | 10364 |
| 9969 /** | 10365 /** |
| 9970 * Set the toolkit specific, non-Dart, element associated with this literal. | 10366 * Set the toolkit specific, non-Dart, element associated with this literal. |
| 9971 * | 10367 * |
| 9972 * @param element the toolkit specific element to be associated with this lite
ral | 10368 * @param element the toolkit specific element to be associated with this lite
ral |
| 9973 */ | 10369 */ |
| 9974 void set toolkitElement(Element element) { | 10370 void set toolkitElement(Element element) { |
| 9975 _toolkitElement = element; | 10371 _toolkitElement = element; |
| 9976 } | 10372 } |
| 9977 | 10373 |
| 9978 /** | 10374 /** |
| 9979 * Set the value of the literal to the given string. | 10375 * Set the value of the literal to the given string. |
| 9980 * | 10376 * |
| 9981 * @param string the value of the literal | 10377 * @param string the value of the literal |
| 9982 */ | 10378 */ |
| 9983 void set value(String string) { | 10379 void set value(String string) { |
| 9984 _value = StringUtilities.intern(_value); | 10380 _value = StringUtilities.intern(_value); |
| 9985 } | 10381 } |
| 9986 | 10382 |
| 10383 @override |
| 9987 void visitChildren(AstVisitor visitor) { | 10384 void visitChildren(AstVisitor visitor) { |
| 9988 } | 10385 } |
| 9989 | 10386 |
| 10387 @override |
| 9990 void appendStringValue(JavaStringBuilder builder) { | 10388 void appendStringValue(JavaStringBuilder builder) { |
| 9991 builder.append(value); | 10389 builder.append(value); |
| 9992 } | 10390 } |
| 9993 } | 10391 } |
| 9994 | 10392 |
| 9995 /** | 10393 /** |
| 9996 * Instances of the class `Statement` defines the behavior common to nodes that
represent a | 10394 * Instances of the class `Statement` defines the behavior common to nodes that
represent a |
| 9997 * statement. | 10395 * statement. |
| 9998 * | 10396 * |
| 9999 * <pre> | 10397 * <pre> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10035 /** | 10433 /** |
| 10036 * Initialize a newly created string interpolation expression. | 10434 * Initialize a newly created string interpolation expression. |
| 10037 * | 10435 * |
| 10038 * @param elements the elements that will be composed to produce the resulting
string | 10436 * @param elements the elements that will be composed to produce the resulting
string |
| 10039 */ | 10437 */ |
| 10040 StringInterpolation(List<InterpolationElement> elements) { | 10438 StringInterpolation(List<InterpolationElement> elements) { |
| 10041 this._elements = new NodeList<InterpolationElement>(this); | 10439 this._elements = new NodeList<InterpolationElement>(this); |
| 10042 this._elements.addAll(elements); | 10440 this._elements.addAll(elements); |
| 10043 } | 10441 } |
| 10044 | 10442 |
| 10443 @override |
| 10045 accept(AstVisitor visitor) => visitor.visitStringInterpolation(this); | 10444 accept(AstVisitor visitor) => visitor.visitStringInterpolation(this); |
| 10046 | 10445 |
| 10446 @override |
| 10047 Token get beginToken => _elements.beginToken; | 10447 Token get beginToken => _elements.beginToken; |
| 10048 | 10448 |
| 10049 /** | 10449 /** |
| 10050 * Return the elements that will be composed to produce the resulting string. | 10450 * Return the elements that will be composed to produce the resulting string. |
| 10051 * | 10451 * |
| 10052 * @return the elements that will be composed to produce the resulting string | 10452 * @return the elements that will be composed to produce the resulting string |
| 10053 */ | 10453 */ |
| 10054 NodeList<InterpolationElement> get elements => _elements; | 10454 NodeList<InterpolationElement> get elements => _elements; |
| 10055 | 10455 |
| 10456 @override |
| 10056 Token get endToken => _elements.endToken; | 10457 Token get endToken => _elements.endToken; |
| 10057 | 10458 |
| 10459 @override |
| 10058 void visitChildren(AstVisitor visitor) { | 10460 void visitChildren(AstVisitor visitor) { |
| 10059 _elements.accept(visitor); | 10461 _elements.accept(visitor); |
| 10060 } | 10462 } |
| 10061 | 10463 |
| 10464 @override |
| 10062 void appendStringValue(JavaStringBuilder builder) { | 10465 void appendStringValue(JavaStringBuilder builder) { |
| 10063 throw new IllegalArgumentException(); | 10466 throw new IllegalArgumentException(); |
| 10064 } | 10467 } |
| 10065 } | 10468 } |
| 10066 | 10469 |
| 10067 /** | 10470 /** |
| 10068 * Instances of the class `StringLiteral` represent a string literal expression. | 10471 * Instances of the class `StringLiteral` represent a string literal expression. |
| 10069 * | 10472 * |
| 10070 * <pre> | 10473 * <pre> |
| 10071 * stringLiteral ::= | 10474 * stringLiteral ::= |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10146 * @param keyword the token for the 'super' keyword | 10549 * @param keyword the token for the 'super' keyword |
| 10147 * @param period the token for the period before the name of the constructor t
hat is being invoked | 10550 * @param period the token for the period before the name of the constructor t
hat is being invoked |
| 10148 * @param constructorName the name of the constructor that is being invoked | 10551 * @param constructorName the name of the constructor that is being invoked |
| 10149 * @param argumentList the list of arguments to the constructor | 10552 * @param argumentList the list of arguments to the constructor |
| 10150 */ | 10553 */ |
| 10151 SuperConstructorInvocation(this.keyword, this.period, SimpleIdentifier constru
ctorName, ArgumentList argumentList) { | 10554 SuperConstructorInvocation(this.keyword, this.period, SimpleIdentifier constru
ctorName, ArgumentList argumentList) { |
| 10152 this._constructorName = becomeParentOf(constructorName); | 10555 this._constructorName = becomeParentOf(constructorName); |
| 10153 this._argumentList = becomeParentOf(argumentList); | 10556 this._argumentList = becomeParentOf(argumentList); |
| 10154 } | 10557 } |
| 10155 | 10558 |
| 10559 @override |
| 10156 accept(AstVisitor visitor) => visitor.visitSuperConstructorInvocation(this); | 10560 accept(AstVisitor visitor) => visitor.visitSuperConstructorInvocation(this); |
| 10157 | 10561 |
| 10158 /** | 10562 /** |
| 10159 * Return the list of arguments to the constructor. | 10563 * Return the list of arguments to the constructor. |
| 10160 * | 10564 * |
| 10161 * @return the list of arguments to the constructor | 10565 * @return the list of arguments to the constructor |
| 10162 */ | 10566 */ |
| 10163 ArgumentList get argumentList => _argumentList; | 10567 ArgumentList get argumentList => _argumentList; |
| 10164 | 10568 |
| 10569 @override |
| 10165 Token get beginToken => keyword; | 10570 Token get beginToken => keyword; |
| 10166 | 10571 |
| 10167 /** | 10572 /** |
| 10168 * Return the name of the constructor that is being invoked, or `null` if the
unnamed | 10573 * Return the name of the constructor that is being invoked, or `null` if the
unnamed |
| 10169 * constructor is being invoked. | 10574 * constructor is being invoked. |
| 10170 * | 10575 * |
| 10171 * @return the name of the constructor that is being invoked | 10576 * @return the name of the constructor that is being invoked |
| 10172 */ | 10577 */ |
| 10173 SimpleIdentifier get constructorName => _constructorName; | 10578 SimpleIdentifier get constructorName => _constructorName; |
| 10174 | 10579 |
| 10580 @override |
| 10175 Token get endToken => _argumentList.endToken; | 10581 Token get endToken => _argumentList.endToken; |
| 10176 | 10582 |
| 10177 /** | 10583 /** |
| 10178 * Set the list of arguments to the constructor to the given list. | 10584 * Set the list of arguments to the constructor to the given list. |
| 10179 * | 10585 * |
| 10180 * @param argumentList the list of arguments to the constructor | 10586 * @param argumentList the list of arguments to the constructor |
| 10181 */ | 10587 */ |
| 10182 void set argumentList(ArgumentList argumentList) { | 10588 void set argumentList(ArgumentList argumentList) { |
| 10183 this._argumentList = becomeParentOf(argumentList); | 10589 this._argumentList = becomeParentOf(argumentList); |
| 10184 } | 10590 } |
| 10185 | 10591 |
| 10186 /** | 10592 /** |
| 10187 * Set the name of the constructor that is being invoked to the given identifi
er. | 10593 * Set the name of the constructor that is being invoked to the given identifi
er. |
| 10188 * | 10594 * |
| 10189 * @param identifier the name of the constructor that is being invoked | 10595 * @param identifier the name of the constructor that is being invoked |
| 10190 */ | 10596 */ |
| 10191 void set constructorName(SimpleIdentifier identifier) { | 10597 void set constructorName(SimpleIdentifier identifier) { |
| 10192 _constructorName = becomeParentOf(identifier); | 10598 _constructorName = becomeParentOf(identifier); |
| 10193 } | 10599 } |
| 10194 | 10600 |
| 10601 @override |
| 10195 void visitChildren(AstVisitor visitor) { | 10602 void visitChildren(AstVisitor visitor) { |
| 10196 safelyVisitChild(_constructorName, visitor); | 10603 safelyVisitChild(_constructorName, visitor); |
| 10197 safelyVisitChild(_argumentList, visitor); | 10604 safelyVisitChild(_argumentList, visitor); |
| 10198 } | 10605 } |
| 10199 } | 10606 } |
| 10200 | 10607 |
| 10201 /** | 10608 /** |
| 10202 * Instances of the class `SuperExpression` represent a super expression. | 10609 * Instances of the class `SuperExpression` represent a super expression. |
| 10203 * | 10610 * |
| 10204 * <pre> | 10611 * <pre> |
| 10205 * superExpression ::= | 10612 * superExpression ::= |
| 10206 * 'super' | 10613 * 'super' |
| 10207 * </pre> | 10614 * </pre> |
| 10208 */ | 10615 */ |
| 10209 class SuperExpression extends Expression { | 10616 class SuperExpression extends Expression { |
| 10210 /** | 10617 /** |
| 10211 * The token representing the keyword. | 10618 * The token representing the keyword. |
| 10212 */ | 10619 */ |
| 10213 Token keyword; | 10620 Token keyword; |
| 10214 | 10621 |
| 10215 /** | 10622 /** |
| 10216 * Initialize a newly created super expression. | 10623 * Initialize a newly created super expression. |
| 10217 * | 10624 * |
| 10218 * @param keyword the token representing the keyword | 10625 * @param keyword the token representing the keyword |
| 10219 */ | 10626 */ |
| 10220 SuperExpression(this.keyword); | 10627 SuperExpression(this.keyword); |
| 10221 | 10628 |
| 10629 @override |
| 10222 accept(AstVisitor visitor) => visitor.visitSuperExpression(this); | 10630 accept(AstVisitor visitor) => visitor.visitSuperExpression(this); |
| 10223 | 10631 |
| 10632 @override |
| 10224 Token get beginToken => keyword; | 10633 Token get beginToken => keyword; |
| 10225 | 10634 |
| 10635 @override |
| 10226 Token get endToken => keyword; | 10636 Token get endToken => keyword; |
| 10227 | 10637 |
| 10638 @override |
| 10228 int get precedence => 16; | 10639 int get precedence => 16; |
| 10229 | 10640 |
| 10641 @override |
| 10230 void visitChildren(AstVisitor visitor) { | 10642 void visitChildren(AstVisitor visitor) { |
| 10231 } | 10643 } |
| 10232 } | 10644 } |
| 10233 | 10645 |
| 10234 /** | 10646 /** |
| 10235 * Instances of the class `SwitchCase` represent the case in a switch statement. | 10647 * Instances of the class `SwitchCase` represent the case in a switch statement. |
| 10236 * | 10648 * |
| 10237 * <pre> | 10649 * <pre> |
| 10238 * switchCase ::= | 10650 * switchCase ::= |
| 10239 * [SimpleIdentifier]* 'case' [Expression] ':' [Statement]* | 10651 * [SimpleIdentifier]* 'case' [Expression] ':' [Statement]* |
| (...skipping 11 matching lines...) Expand all Loading... |
| 10251 * @param labels the labels associated with the switch member | 10663 * @param labels the labels associated with the switch member |
| 10252 * @param keyword the token representing the 'case' or 'default' keyword | 10664 * @param keyword the token representing the 'case' or 'default' keyword |
| 10253 * @param expression the expression controlling whether the statements will be
executed | 10665 * @param expression the expression controlling whether the statements will be
executed |
| 10254 * @param colon the colon separating the keyword or the expression from the st
atements | 10666 * @param colon the colon separating the keyword or the expression from the st
atements |
| 10255 * @param statements the statements that will be executed if this switch membe
r is selected | 10667 * @param statements the statements that will be executed if this switch membe
r is selected |
| 10256 */ | 10668 */ |
| 10257 SwitchCase(List<Label> labels, Token keyword, Expression expression, Token col
on, List<Statement> statements) : super(labels, keyword, colon, statements) { | 10669 SwitchCase(List<Label> labels, Token keyword, Expression expression, Token col
on, List<Statement> statements) : super(labels, keyword, colon, statements) { |
| 10258 this._expression = becomeParentOf(expression); | 10670 this._expression = becomeParentOf(expression); |
| 10259 } | 10671 } |
| 10260 | 10672 |
| 10673 @override |
| 10261 accept(AstVisitor visitor) => visitor.visitSwitchCase(this); | 10674 accept(AstVisitor visitor) => visitor.visitSwitchCase(this); |
| 10262 | 10675 |
| 10263 /** | 10676 /** |
| 10264 * Return the expression controlling whether the statements will be executed. | 10677 * Return the expression controlling whether the statements will be executed. |
| 10265 * | 10678 * |
| 10266 * @return the expression controlling whether the statements will be executed | 10679 * @return the expression controlling whether the statements will be executed |
| 10267 */ | 10680 */ |
| 10268 Expression get expression => _expression; | 10681 Expression get expression => _expression; |
| 10269 | 10682 |
| 10270 /** | 10683 /** |
| 10271 * Set the expression controlling whether the statements will be executed to t
he given expression. | 10684 * Set the expression controlling whether the statements will be executed to t
he given expression. |
| 10272 * | 10685 * |
| 10273 * @param expression the expression controlling whether the statements will be
executed | 10686 * @param expression the expression controlling whether the statements will be
executed |
| 10274 */ | 10687 */ |
| 10275 void set expression(Expression expression) { | 10688 void set expression(Expression expression) { |
| 10276 this._expression = becomeParentOf(expression); | 10689 this._expression = becomeParentOf(expression); |
| 10277 } | 10690 } |
| 10278 | 10691 |
| 10692 @override |
| 10279 void visitChildren(AstVisitor visitor) { | 10693 void visitChildren(AstVisitor visitor) { |
| 10280 labels.accept(visitor); | 10694 labels.accept(visitor); |
| 10281 safelyVisitChild(_expression, visitor); | 10695 safelyVisitChild(_expression, visitor); |
| 10282 statements.accept(visitor); | 10696 statements.accept(visitor); |
| 10283 } | 10697 } |
| 10284 } | 10698 } |
| 10285 | 10699 |
| 10286 /** | 10700 /** |
| 10287 * Instances of the class `SwitchDefault` represent the default case in a switch
statement. | 10701 * Instances of the class `SwitchDefault` represent the default case in a switch
statement. |
| 10288 * | 10702 * |
| 10289 * <pre> | 10703 * <pre> |
| 10290 * switchDefault ::= | 10704 * switchDefault ::= |
| 10291 * [SimpleIdentifier]* 'default' ':' [Statement]* | 10705 * [SimpleIdentifier]* 'default' ':' [Statement]* |
| 10292 * </pre> | 10706 * </pre> |
| 10293 */ | 10707 */ |
| 10294 class SwitchDefault extends SwitchMember { | 10708 class SwitchDefault extends SwitchMember { |
| 10295 /** | 10709 /** |
| 10296 * Initialize a newly created switch default. | 10710 * Initialize a newly created switch default. |
| 10297 * | 10711 * |
| 10298 * @param labels the labels associated with the switch member | 10712 * @param labels the labels associated with the switch member |
| 10299 * @param keyword the token representing the 'case' or 'default' keyword | 10713 * @param keyword the token representing the 'case' or 'default' keyword |
| 10300 * @param colon the colon separating the keyword or the expression from the st
atements | 10714 * @param colon the colon separating the keyword or the expression from the st
atements |
| 10301 * @param statements the statements that will be executed if this switch membe
r is selected | 10715 * @param statements the statements that will be executed if this switch membe
r is selected |
| 10302 */ | 10716 */ |
| 10303 SwitchDefault(List<Label> labels, Token keyword, Token colon, List<Statement>
statements) : super(labels, keyword, colon, statements); | 10717 SwitchDefault(List<Label> labels, Token keyword, Token colon, List<Statement>
statements) : super(labels, keyword, colon, statements); |
| 10304 | 10718 |
| 10719 @override |
| 10305 accept(AstVisitor visitor) => visitor.visitSwitchDefault(this); | 10720 accept(AstVisitor visitor) => visitor.visitSwitchDefault(this); |
| 10306 | 10721 |
| 10722 @override |
| 10307 void visitChildren(AstVisitor visitor) { | 10723 void visitChildren(AstVisitor visitor) { |
| 10308 labels.accept(visitor); | 10724 labels.accept(visitor); |
| 10309 statements.accept(visitor); | 10725 statements.accept(visitor); |
| 10310 } | 10726 } |
| 10311 } | 10727 } |
| 10312 | 10728 |
| 10313 /** | 10729 /** |
| 10314 * The abstract class `SwitchMember` defines the behavior common to objects repr
esenting | 10730 * The abstract class `SwitchMember` defines the behavior common to objects repr
esenting |
| 10315 * elements within a switch statement. | 10731 * elements within a switch statement. |
| 10316 * | 10732 * |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10349 * @param colon the colon separating the keyword or the expression from the st
atements | 10765 * @param colon the colon separating the keyword or the expression from the st
atements |
| 10350 * @param statements the statements that will be executed if this switch membe
r is selected | 10766 * @param statements the statements that will be executed if this switch membe
r is selected |
| 10351 */ | 10767 */ |
| 10352 SwitchMember(List<Label> labels, this.keyword, this.colon, List<Statement> sta
tements) { | 10768 SwitchMember(List<Label> labels, this.keyword, this.colon, List<Statement> sta
tements) { |
| 10353 this._labels = new NodeList<Label>(this); | 10769 this._labels = new NodeList<Label>(this); |
| 10354 this._statements = new NodeList<Statement>(this); | 10770 this._statements = new NodeList<Statement>(this); |
| 10355 this._labels.addAll(labels); | 10771 this._labels.addAll(labels); |
| 10356 this._statements.addAll(statements); | 10772 this._statements.addAll(statements); |
| 10357 } | 10773 } |
| 10358 | 10774 |
| 10775 @override |
| 10359 Token get beginToken { | 10776 Token get beginToken { |
| 10360 if (!_labels.isEmpty) { | 10777 if (!_labels.isEmpty) { |
| 10361 return _labels.beginToken; | 10778 return _labels.beginToken; |
| 10362 } | 10779 } |
| 10363 return keyword; | 10780 return keyword; |
| 10364 } | 10781 } |
| 10365 | 10782 |
| 10783 @override |
| 10366 Token get endToken { | 10784 Token get endToken { |
| 10367 if (!_statements.isEmpty) { | 10785 if (!_statements.isEmpty) { |
| 10368 return _statements.endToken; | 10786 return _statements.endToken; |
| 10369 } | 10787 } |
| 10370 return colon; | 10788 return colon; |
| 10371 } | 10789 } |
| 10372 | 10790 |
| 10373 /** | 10791 /** |
| 10374 * Return the labels associated with the switch member. | 10792 * Return the labels associated with the switch member. |
| 10375 * | 10793 * |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10439 * @param leftBracket the left curly bracket | 10857 * @param leftBracket the left curly bracket |
| 10440 * @param members the switch members that can be selected by the expression | 10858 * @param members the switch members that can be selected by the expression |
| 10441 * @param rightBracket the right curly bracket | 10859 * @param rightBracket the right curly bracket |
| 10442 */ | 10860 */ |
| 10443 SwitchStatement(this.keyword, this.leftParenthesis, Expression expression, thi
s.rightParenthesis, this.leftBracket, List<SwitchMember> members, this.rightBrac
ket) { | 10861 SwitchStatement(this.keyword, this.leftParenthesis, Expression expression, thi
s.rightParenthesis, this.leftBracket, List<SwitchMember> members, this.rightBrac
ket) { |
| 10444 this._members = new NodeList<SwitchMember>(this); | 10862 this._members = new NodeList<SwitchMember>(this); |
| 10445 this._expression = becomeParentOf(expression); | 10863 this._expression = becomeParentOf(expression); |
| 10446 this._members.addAll(members); | 10864 this._members.addAll(members); |
| 10447 } | 10865 } |
| 10448 | 10866 |
| 10867 @override |
| 10449 accept(AstVisitor visitor) => visitor.visitSwitchStatement(this); | 10868 accept(AstVisitor visitor) => visitor.visitSwitchStatement(this); |
| 10450 | 10869 |
| 10870 @override |
| 10451 Token get beginToken => keyword; | 10871 Token get beginToken => keyword; |
| 10452 | 10872 |
| 10873 @override |
| 10453 Token get endToken => rightBracket; | 10874 Token get endToken => rightBracket; |
| 10454 | 10875 |
| 10455 /** | 10876 /** |
| 10456 * Return the expression used to determine which of the switch members will be
selected. | 10877 * Return the expression used to determine which of the switch members will be
selected. |
| 10457 * | 10878 * |
| 10458 * @return the expression used to determine which of the switch members will b
e selected | 10879 * @return the expression used to determine which of the switch members will b
e selected |
| 10459 */ | 10880 */ |
| 10460 Expression get expression => _expression; | 10881 Expression get expression => _expression; |
| 10461 | 10882 |
| 10462 /** | 10883 /** |
| 10463 * Return the switch members that can be selected by the expression. | 10884 * Return the switch members that can be selected by the expression. |
| 10464 * | 10885 * |
| 10465 * @return the switch members that can be selected by the expression | 10886 * @return the switch members that can be selected by the expression |
| 10466 */ | 10887 */ |
| 10467 NodeList<SwitchMember> get members => _members; | 10888 NodeList<SwitchMember> get members => _members; |
| 10468 | 10889 |
| 10469 /** | 10890 /** |
| 10470 * Set the expression used to determine which of the switch members will be se
lected to the given | 10891 * Set the expression used to determine which of the switch members will be se
lected to the given |
| 10471 * expression. | 10892 * expression. |
| 10472 * | 10893 * |
| 10473 * @param expression the expression used to determine which of the switch memb
ers will be selected | 10894 * @param expression the expression used to determine which of the switch memb
ers will be selected |
| 10474 */ | 10895 */ |
| 10475 void set expression(Expression expression) { | 10896 void set expression(Expression expression) { |
| 10476 this._expression = becomeParentOf(expression); | 10897 this._expression = becomeParentOf(expression); |
| 10477 } | 10898 } |
| 10478 | 10899 |
| 10900 @override |
| 10479 void visitChildren(AstVisitor visitor) { | 10901 void visitChildren(AstVisitor visitor) { |
| 10480 safelyVisitChild(_expression, visitor); | 10902 safelyVisitChild(_expression, visitor); |
| 10481 _members.accept(visitor); | 10903 _members.accept(visitor); |
| 10482 } | 10904 } |
| 10483 } | 10905 } |
| 10484 | 10906 |
| 10485 /** | 10907 /** |
| 10486 * Instances of the class `SymbolLiteral` represent a symbol literal expression. | 10908 * Instances of the class `SymbolLiteral` represent a symbol literal expression. |
| 10487 * | 10909 * |
| 10488 * <pre> | 10910 * <pre> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 10502 final List<Token> components; | 10924 final List<Token> components; |
| 10503 | 10925 |
| 10504 /** | 10926 /** |
| 10505 * Initialize a newly created symbol literal. | 10927 * Initialize a newly created symbol literal. |
| 10506 * | 10928 * |
| 10507 * @param poundSign the token introducing the literal | 10929 * @param poundSign the token introducing the literal |
| 10508 * @param components the components of the literal | 10930 * @param components the components of the literal |
| 10509 */ | 10931 */ |
| 10510 SymbolLiteral(this.poundSign, this.components); | 10932 SymbolLiteral(this.poundSign, this.components); |
| 10511 | 10933 |
| 10934 @override |
| 10512 accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this); | 10935 accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this); |
| 10513 | 10936 |
| 10937 @override |
| 10514 Token get beginToken => poundSign; | 10938 Token get beginToken => poundSign; |
| 10515 | 10939 |
| 10940 @override |
| 10516 Token get endToken => components[components.length - 1]; | 10941 Token get endToken => components[components.length - 1]; |
| 10517 | 10942 |
| 10943 @override |
| 10518 void visitChildren(AstVisitor visitor) { | 10944 void visitChildren(AstVisitor visitor) { |
| 10519 } | 10945 } |
| 10520 } | 10946 } |
| 10521 | 10947 |
| 10522 /** | 10948 /** |
| 10523 * Instances of the class `ThisExpression` represent a this expression. | 10949 * Instances of the class `ThisExpression` represent a this expression. |
| 10524 * | 10950 * |
| 10525 * <pre> | 10951 * <pre> |
| 10526 * thisExpression ::= | 10952 * thisExpression ::= |
| 10527 * 'this' | 10953 * 'this' |
| 10528 * </pre> | 10954 * </pre> |
| 10529 */ | 10955 */ |
| 10530 class ThisExpression extends Expression { | 10956 class ThisExpression extends Expression { |
| 10531 /** | 10957 /** |
| 10532 * The token representing the keyword. | 10958 * The token representing the keyword. |
| 10533 */ | 10959 */ |
| 10534 Token keyword; | 10960 Token keyword; |
| 10535 | 10961 |
| 10536 /** | 10962 /** |
| 10537 * Initialize a newly created this expression. | 10963 * Initialize a newly created this expression. |
| 10538 * | 10964 * |
| 10539 * @param keyword the token representing the keyword | 10965 * @param keyword the token representing the keyword |
| 10540 */ | 10966 */ |
| 10541 ThisExpression(this.keyword); | 10967 ThisExpression(this.keyword); |
| 10542 | 10968 |
| 10969 @override |
| 10543 accept(AstVisitor visitor) => visitor.visitThisExpression(this); | 10970 accept(AstVisitor visitor) => visitor.visitThisExpression(this); |
| 10544 | 10971 |
| 10972 @override |
| 10545 Token get beginToken => keyword; | 10973 Token get beginToken => keyword; |
| 10546 | 10974 |
| 10975 @override |
| 10547 Token get endToken => keyword; | 10976 Token get endToken => keyword; |
| 10548 | 10977 |
| 10978 @override |
| 10549 int get precedence => 16; | 10979 int get precedence => 16; |
| 10550 | 10980 |
| 10981 @override |
| 10551 void visitChildren(AstVisitor visitor) { | 10982 void visitChildren(AstVisitor visitor) { |
| 10552 } | 10983 } |
| 10553 } | 10984 } |
| 10554 | 10985 |
| 10555 /** | 10986 /** |
| 10556 * Instances of the class `ThrowExpression` represent a throw expression. | 10987 * Instances of the class `ThrowExpression` represent a throw expression. |
| 10557 * | 10988 * |
| 10558 * <pre> | 10989 * <pre> |
| 10559 * throwExpression ::= | 10990 * throwExpression ::= |
| 10560 * 'throw' [Expression] | 10991 * 'throw' [Expression] |
| (...skipping 13 matching lines...) Expand all Loading... |
| 10574 /** | 11005 /** |
| 10575 * Initialize a newly created throw expression. | 11006 * Initialize a newly created throw expression. |
| 10576 * | 11007 * |
| 10577 * @param keyword the token representing the 'throw' keyword | 11008 * @param keyword the token representing the 'throw' keyword |
| 10578 * @param expression the expression computing the exception to be thrown | 11009 * @param expression the expression computing the exception to be thrown |
| 10579 */ | 11010 */ |
| 10580 ThrowExpression(this.keyword, Expression expression) { | 11011 ThrowExpression(this.keyword, Expression expression) { |
| 10581 this._expression = becomeParentOf(expression); | 11012 this._expression = becomeParentOf(expression); |
| 10582 } | 11013 } |
| 10583 | 11014 |
| 11015 @override |
| 10584 accept(AstVisitor visitor) => visitor.visitThrowExpression(this); | 11016 accept(AstVisitor visitor) => visitor.visitThrowExpression(this); |
| 10585 | 11017 |
| 11018 @override |
| 10586 Token get beginToken => keyword; | 11019 Token get beginToken => keyword; |
| 10587 | 11020 |
| 11021 @override |
| 10588 Token get endToken { | 11022 Token get endToken { |
| 10589 if (_expression != null) { | 11023 if (_expression != null) { |
| 10590 return _expression.endToken; | 11024 return _expression.endToken; |
| 10591 } | 11025 } |
| 10592 return keyword; | 11026 return keyword; |
| 10593 } | 11027 } |
| 10594 | 11028 |
| 10595 /** | 11029 /** |
| 10596 * Return the expression computing the exception to be thrown. | 11030 * Return the expression computing the exception to be thrown. |
| 10597 * | 11031 * |
| 10598 * @return the expression computing the exception to be thrown | 11032 * @return the expression computing the exception to be thrown |
| 10599 */ | 11033 */ |
| 10600 Expression get expression => _expression; | 11034 Expression get expression => _expression; |
| 10601 | 11035 |
| 11036 @override |
| 10602 int get precedence => 0; | 11037 int get precedence => 0; |
| 10603 | 11038 |
| 10604 /** | 11039 /** |
| 10605 * Set the expression computing the exception to be thrown to the given expres
sion. | 11040 * Set the expression computing the exception to be thrown to the given expres
sion. |
| 10606 * | 11041 * |
| 10607 * @param expression the expression computing the exception to be thrown | 11042 * @param expression the expression computing the exception to be thrown |
| 10608 */ | 11043 */ |
| 10609 void set expression(Expression expression) { | 11044 void set expression(Expression expression) { |
| 10610 this._expression = becomeParentOf(expression); | 11045 this._expression = becomeParentOf(expression); |
| 10611 } | 11046 } |
| 10612 | 11047 |
| 11048 @override |
| 10613 void visitChildren(AstVisitor visitor) { | 11049 void visitChildren(AstVisitor visitor) { |
| 10614 safelyVisitChild(_expression, visitor); | 11050 safelyVisitChild(_expression, visitor); |
| 10615 } | 11051 } |
| 10616 } | 11052 } |
| 10617 | 11053 |
| 10618 /** | 11054 /** |
| 10619 * Instances of the class `TopLevelVariableDeclaration` represent the declaratio
n of one or | 11055 * Instances of the class `TopLevelVariableDeclaration` represent the declaratio
n of one or |
| 10620 * more top-level variables of the same type. | 11056 * more top-level variables of the same type. |
| 10621 * | 11057 * |
| 10622 * <pre> | 11058 * <pre> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 10641 * | 11077 * |
| 10642 * @param comment the documentation comment associated with this variable | 11078 * @param comment the documentation comment associated with this variable |
| 10643 * @param metadata the annotations associated with this variable | 11079 * @param metadata the annotations associated with this variable |
| 10644 * @param variableList the top-level variables being declared | 11080 * @param variableList the top-level variables being declared |
| 10645 * @param semicolon the semicolon terminating the declaration | 11081 * @param semicolon the semicolon terminating the declaration |
| 10646 */ | 11082 */ |
| 10647 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata, Variab
leDeclarationList variableList, this.semicolon) : super(comment, metadata) { | 11083 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata, Variab
leDeclarationList variableList, this.semicolon) : super(comment, metadata) { |
| 10648 this._variableList = becomeParentOf(variableList); | 11084 this._variableList = becomeParentOf(variableList); |
| 10649 } | 11085 } |
| 10650 | 11086 |
| 11087 @override |
| 10651 accept(AstVisitor visitor) => visitor.visitTopLevelVariableDeclaration(this); | 11088 accept(AstVisitor visitor) => visitor.visitTopLevelVariableDeclaration(this); |
| 10652 | 11089 |
| 11090 @override |
| 10653 Element get element => null; | 11091 Element get element => null; |
| 10654 | 11092 |
| 11093 @override |
| 10655 Token get endToken => semicolon; | 11094 Token get endToken => semicolon; |
| 10656 | 11095 |
| 10657 /** | 11096 /** |
| 10658 * Return the top-level variables being declared. | 11097 * Return the top-level variables being declared. |
| 10659 * | 11098 * |
| 10660 * @return the top-level variables being declared | 11099 * @return the top-level variables being declared |
| 10661 */ | 11100 */ |
| 10662 VariableDeclarationList get variables => _variableList; | 11101 VariableDeclarationList get variables => _variableList; |
| 10663 | 11102 |
| 10664 /** | 11103 /** |
| 10665 * Set the top-level variables being declared to the given list of variables. | 11104 * Set the top-level variables being declared to the given list of variables. |
| 10666 * | 11105 * |
| 10667 * @param variableList the top-level variables being declared | 11106 * @param variableList the top-level variables being declared |
| 10668 */ | 11107 */ |
| 10669 void set variables(VariableDeclarationList variableList) { | 11108 void set variables(VariableDeclarationList variableList) { |
| 10670 variableList = becomeParentOf(variableList); | 11109 variableList = becomeParentOf(variableList); |
| 10671 } | 11110 } |
| 10672 | 11111 |
| 11112 @override |
| 10673 void visitChildren(AstVisitor visitor) { | 11113 void visitChildren(AstVisitor visitor) { |
| 10674 super.visitChildren(visitor); | 11114 super.visitChildren(visitor); |
| 10675 safelyVisitChild(_variableList, visitor); | 11115 safelyVisitChild(_variableList, visitor); |
| 10676 } | 11116 } |
| 10677 | 11117 |
| 11118 @override |
| 10678 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; | 11119 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; |
| 10679 } | 11120 } |
| 10680 | 11121 |
| 10681 /** | 11122 /** |
| 10682 * Instances of the class `TryStatement` represent a try statement. | 11123 * Instances of the class `TryStatement` represent a try statement. |
| 10683 * | 11124 * |
| 10684 * <pre> | 11125 * <pre> |
| 10685 * tryStatement ::= | 11126 * tryStatement ::= |
| 10686 * 'try' [Block] ([CatchClause]+ finallyClause? | finallyClause) | 11127 * 'try' [Block] ([CatchClause]+ finallyClause? | finallyClause) |
| 10687 * | 11128 * |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10726 * @param finallyKeyword the token representing the 'finally' keyword | 11167 * @param finallyKeyword the token representing the 'finally' keyword |
| 10727 * @param finallyBlock the finally block contained in the try statement | 11168 * @param finallyBlock the finally block contained in the try statement |
| 10728 */ | 11169 */ |
| 10729 TryStatement(this.tryKeyword, Block body, List<CatchClause> catchClauses, this
.finallyKeyword, Block finallyBlock) { | 11170 TryStatement(this.tryKeyword, Block body, List<CatchClause> catchClauses, this
.finallyKeyword, Block finallyBlock) { |
| 10730 this._catchClauses = new NodeList<CatchClause>(this); | 11171 this._catchClauses = new NodeList<CatchClause>(this); |
| 10731 this._body = becomeParentOf(body); | 11172 this._body = becomeParentOf(body); |
| 10732 this._catchClauses.addAll(catchClauses); | 11173 this._catchClauses.addAll(catchClauses); |
| 10733 this._finallyBlock = becomeParentOf(finallyBlock); | 11174 this._finallyBlock = becomeParentOf(finallyBlock); |
| 10734 } | 11175 } |
| 10735 | 11176 |
| 11177 @override |
| 10736 accept(AstVisitor visitor) => visitor.visitTryStatement(this); | 11178 accept(AstVisitor visitor) => visitor.visitTryStatement(this); |
| 10737 | 11179 |
| 11180 @override |
| 10738 Token get beginToken => tryKeyword; | 11181 Token get beginToken => tryKeyword; |
| 10739 | 11182 |
| 10740 /** | 11183 /** |
| 10741 * Return the body of the statement. | 11184 * Return the body of the statement. |
| 10742 * | 11185 * |
| 10743 * @return the body of the statement | 11186 * @return the body of the statement |
| 10744 */ | 11187 */ |
| 10745 Block get body => _body; | 11188 Block get body => _body; |
| 10746 | 11189 |
| 10747 /** | 11190 /** |
| 10748 * Return the catch clauses contained in the try statement. | 11191 * Return the catch clauses contained in the try statement. |
| 10749 * | 11192 * |
| 10750 * @return the catch clauses contained in the try statement | 11193 * @return the catch clauses contained in the try statement |
| 10751 */ | 11194 */ |
| 10752 NodeList<CatchClause> get catchClauses => _catchClauses; | 11195 NodeList<CatchClause> get catchClauses => _catchClauses; |
| 10753 | 11196 |
| 11197 @override |
| 10754 Token get endToken { | 11198 Token get endToken { |
| 10755 if (_finallyBlock != null) { | 11199 if (_finallyBlock != null) { |
| 10756 return _finallyBlock.endToken; | 11200 return _finallyBlock.endToken; |
| 10757 } else if (finallyKeyword != null) { | 11201 } else if (finallyKeyword != null) { |
| 10758 return finallyKeyword; | 11202 return finallyKeyword; |
| 10759 } else if (!_catchClauses.isEmpty) { | 11203 } else if (!_catchClauses.isEmpty) { |
| 10760 return _catchClauses.endToken; | 11204 return _catchClauses.endToken; |
| 10761 } | 11205 } |
| 10762 return _body.endToken; | 11206 return _body.endToken; |
| 10763 } | 11207 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 10781 | 11225 |
| 10782 /** | 11226 /** |
| 10783 * Set the finally block contained in the try statement to the given block. | 11227 * Set the finally block contained in the try statement to the given block. |
| 10784 * | 11228 * |
| 10785 * @param block the finally block contained in the try statement | 11229 * @param block the finally block contained in the try statement |
| 10786 */ | 11230 */ |
| 10787 void set finallyBlock(Block block) { | 11231 void set finallyBlock(Block block) { |
| 10788 _finallyBlock = becomeParentOf(block); | 11232 _finallyBlock = becomeParentOf(block); |
| 10789 } | 11233 } |
| 10790 | 11234 |
| 11235 @override |
| 10791 void visitChildren(AstVisitor visitor) { | 11236 void visitChildren(AstVisitor visitor) { |
| 10792 safelyVisitChild(_body, visitor); | 11237 safelyVisitChild(_body, visitor); |
| 10793 _catchClauses.accept(visitor); | 11238 _catchClauses.accept(visitor); |
| 10794 safelyVisitChild(_finallyBlock, visitor); | 11239 safelyVisitChild(_finallyBlock, visitor); |
| 10795 } | 11240 } |
| 10796 } | 11241 } |
| 10797 | 11242 |
| 10798 /** | 11243 /** |
| 10799 * The abstract class `TypeAlias` defines the behavior common to declarations of
type aliases. | 11244 * The abstract class `TypeAlias` defines the behavior common to declarations of
type aliases. |
| 10800 * | 11245 * |
| (...skipping 20 matching lines...) Expand all Loading... |
| 10821 /** | 11266 /** |
| 10822 * Initialize a newly created type alias. | 11267 * Initialize a newly created type alias. |
| 10823 * | 11268 * |
| 10824 * @param comment the documentation comment associated with this type alias | 11269 * @param comment the documentation comment associated with this type alias |
| 10825 * @param metadata the annotations associated with this type alias | 11270 * @param metadata the annotations associated with this type alias |
| 10826 * @param keyword the token representing the 'typedef' keyword | 11271 * @param keyword the token representing the 'typedef' keyword |
| 10827 * @param semicolon the semicolon terminating the declaration | 11272 * @param semicolon the semicolon terminating the declaration |
| 10828 */ | 11273 */ |
| 10829 TypeAlias(Comment comment, List<Annotation> metadata, this.keyword, this.semic
olon) : super(comment, metadata); | 11274 TypeAlias(Comment comment, List<Annotation> metadata, this.keyword, this.semic
olon) : super(comment, metadata); |
| 10830 | 11275 |
| 11276 @override |
| 10831 Token get endToken => semicolon; | 11277 Token get endToken => semicolon; |
| 10832 | 11278 |
| 11279 @override |
| 10833 Token get firstTokenAfterCommentAndMetadata => keyword; | 11280 Token get firstTokenAfterCommentAndMetadata => keyword; |
| 10834 } | 11281 } |
| 10835 | 11282 |
| 10836 /** | 11283 /** |
| 10837 * Instances of the class `TypeArgumentList` represent a list of type arguments. | 11284 * Instances of the class `TypeArgumentList` represent a list of type arguments. |
| 10838 * | 11285 * |
| 10839 * <pre> | 11286 * <pre> |
| 10840 * typeArguments ::= | 11287 * typeArguments ::= |
| 10841 * '<' typeName (',' typeName)* '>' | 11288 * '<' typeName (',' typeName)* '>' |
| 10842 * </pre> | 11289 * </pre> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 10862 * | 11309 * |
| 10863 * @param leftBracket the left bracket | 11310 * @param leftBracket the left bracket |
| 10864 * @param arguments the type arguments associated with the type | 11311 * @param arguments the type arguments associated with the type |
| 10865 * @param rightBracket the right bracket | 11312 * @param rightBracket the right bracket |
| 10866 */ | 11313 */ |
| 10867 TypeArgumentList(this.leftBracket, List<TypeName> arguments, this.rightBracket
) { | 11314 TypeArgumentList(this.leftBracket, List<TypeName> arguments, this.rightBracket
) { |
| 10868 this._arguments = new NodeList<TypeName>(this); | 11315 this._arguments = new NodeList<TypeName>(this); |
| 10869 this._arguments.addAll(arguments); | 11316 this._arguments.addAll(arguments); |
| 10870 } | 11317 } |
| 10871 | 11318 |
| 11319 @override |
| 10872 accept(AstVisitor visitor) => visitor.visitTypeArgumentList(this); | 11320 accept(AstVisitor visitor) => visitor.visitTypeArgumentList(this); |
| 10873 | 11321 |
| 10874 /** | 11322 /** |
| 10875 * Return the type arguments associated with the type. | 11323 * Return the type arguments associated with the type. |
| 10876 * | 11324 * |
| 10877 * @return the type arguments associated with the type | 11325 * @return the type arguments associated with the type |
| 10878 */ | 11326 */ |
| 10879 NodeList<TypeName> get arguments => _arguments; | 11327 NodeList<TypeName> get arguments => _arguments; |
| 10880 | 11328 |
| 11329 @override |
| 10881 Token get beginToken => leftBracket; | 11330 Token get beginToken => leftBracket; |
| 10882 | 11331 |
| 11332 @override |
| 10883 Token get endToken => rightBracket; | 11333 Token get endToken => rightBracket; |
| 10884 | 11334 |
| 11335 @override |
| 10885 void visitChildren(AstVisitor visitor) { | 11336 void visitChildren(AstVisitor visitor) { |
| 10886 _arguments.accept(visitor); | 11337 _arguments.accept(visitor); |
| 10887 } | 11338 } |
| 10888 } | 11339 } |
| 10889 | 11340 |
| 10890 /** | 11341 /** |
| 10891 * Instances of the class `TypeName` represent the name of a type, which can opt
ionally | 11342 * Instances of the class `TypeName` represent the name of a type, which can opt
ionally |
| 10892 * include type arguments. | 11343 * include type arguments. |
| 10893 * | 11344 * |
| 10894 * <pre> | 11345 * <pre> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 10917 * | 11368 * |
| 10918 * @param name the name of the type | 11369 * @param name the name of the type |
| 10919 * @param typeArguments the type arguments associated with the type, or `null`
if there are | 11370 * @param typeArguments the type arguments associated with the type, or `null`
if there are |
| 10920 * no type arguments | 11371 * no type arguments |
| 10921 */ | 11372 */ |
| 10922 TypeName(Identifier name, TypeArgumentList typeArguments) { | 11373 TypeName(Identifier name, TypeArgumentList typeArguments) { |
| 10923 this._name = becomeParentOf(name); | 11374 this._name = becomeParentOf(name); |
| 10924 this._typeArguments = becomeParentOf(typeArguments); | 11375 this._typeArguments = becomeParentOf(typeArguments); |
| 10925 } | 11376 } |
| 10926 | 11377 |
| 11378 @override |
| 10927 accept(AstVisitor visitor) => visitor.visitTypeName(this); | 11379 accept(AstVisitor visitor) => visitor.visitTypeName(this); |
| 10928 | 11380 |
| 11381 @override |
| 10929 Token get beginToken => _name.beginToken; | 11382 Token get beginToken => _name.beginToken; |
| 10930 | 11383 |
| 11384 @override |
| 10931 Token get endToken { | 11385 Token get endToken { |
| 10932 if (_typeArguments != null) { | 11386 if (_typeArguments != null) { |
| 10933 return _typeArguments.endToken; | 11387 return _typeArguments.endToken; |
| 10934 } | 11388 } |
| 10935 return _name.endToken; | 11389 return _name.endToken; |
| 10936 } | 11390 } |
| 10937 | 11391 |
| 10938 /** | 11392 /** |
| 10939 * Return the name of the type. | 11393 * Return the name of the type. |
| 10940 * | 11394 * |
| 10941 * @return the name of the type | 11395 * @return the name of the type |
| 10942 */ | 11396 */ |
| 10943 Identifier get name => _name; | 11397 Identifier get name => _name; |
| 10944 | 11398 |
| 10945 /** | 11399 /** |
| 10946 * Return the type arguments associated with the type, or `null` if there are
no type | 11400 * Return the type arguments associated with the type, or `null` if there are
no type |
| 10947 * arguments. | 11401 * arguments. |
| 10948 * | 11402 * |
| 10949 * @return the type arguments associated with the type | 11403 * @return the type arguments associated with the type |
| 10950 */ | 11404 */ |
| 10951 TypeArgumentList get typeArguments => _typeArguments; | 11405 TypeArgumentList get typeArguments => _typeArguments; |
| 10952 | 11406 |
| 11407 @override |
| 10953 bool get isSynthetic => _name.isSynthetic && _typeArguments == null; | 11408 bool get isSynthetic => _name.isSynthetic && _typeArguments == null; |
| 10954 | 11409 |
| 10955 /** | 11410 /** |
| 10956 * Set the name of the type to the given identifier. | 11411 * Set the name of the type to the given identifier. |
| 10957 * | 11412 * |
| 10958 * @param identifier the name of the type | 11413 * @param identifier the name of the type |
| 10959 */ | 11414 */ |
| 10960 void set name(Identifier identifier) { | 11415 void set name(Identifier identifier) { |
| 10961 _name = becomeParentOf(identifier); | 11416 _name = becomeParentOf(identifier); |
| 10962 } | 11417 } |
| 10963 | 11418 |
| 10964 /** | 11419 /** |
| 10965 * Set the type arguments associated with the type to the given type arguments
. | 11420 * Set the type arguments associated with the type to the given type arguments
. |
| 10966 * | 11421 * |
| 10967 * @param typeArguments the type arguments associated with the type | 11422 * @param typeArguments the type arguments associated with the type |
| 10968 */ | 11423 */ |
| 10969 void set typeArguments(TypeArgumentList typeArguments) { | 11424 void set typeArguments(TypeArgumentList typeArguments) { |
| 10970 this._typeArguments = becomeParentOf(typeArguments); | 11425 this._typeArguments = becomeParentOf(typeArguments); |
| 10971 } | 11426 } |
| 10972 | 11427 |
| 11428 @override |
| 10973 void visitChildren(AstVisitor visitor) { | 11429 void visitChildren(AstVisitor visitor) { |
| 10974 safelyVisitChild(_name, visitor); | 11430 safelyVisitChild(_name, visitor); |
| 10975 safelyVisitChild(_typeArguments, visitor); | 11431 safelyVisitChild(_typeArguments, visitor); |
| 10976 } | 11432 } |
| 10977 } | 11433 } |
| 10978 | 11434 |
| 10979 /** | 11435 /** |
| 10980 * Instances of the class `TypeParameter` represent a type parameter. | 11436 * Instances of the class `TypeParameter` represent a type parameter. |
| 10981 * | 11437 * |
| 10982 * <pre> | 11438 * <pre> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 11009 * @param metadata the annotations associated with the type parameter | 11465 * @param metadata the annotations associated with the type parameter |
| 11010 * @param name the name of the type parameter | 11466 * @param name the name of the type parameter |
| 11011 * @param keyword the token representing the 'extends' keyword | 11467 * @param keyword the token representing the 'extends' keyword |
| 11012 * @param bound the name of the upper bound for legal arguments | 11468 * @param bound the name of the upper bound for legal arguments |
| 11013 */ | 11469 */ |
| 11014 TypeParameter(Comment comment, List<Annotation> metadata, SimpleIdentifier nam
e, this.keyword, TypeName bound) : super(comment, metadata) { | 11470 TypeParameter(Comment comment, List<Annotation> metadata, SimpleIdentifier nam
e, this.keyword, TypeName bound) : super(comment, metadata) { |
| 11015 this._name = becomeParentOf(name); | 11471 this._name = becomeParentOf(name); |
| 11016 this._bound = becomeParentOf(bound); | 11472 this._bound = becomeParentOf(bound); |
| 11017 } | 11473 } |
| 11018 | 11474 |
| 11475 @override |
| 11019 accept(AstVisitor visitor) => visitor.visitTypeParameter(this); | 11476 accept(AstVisitor visitor) => visitor.visitTypeParameter(this); |
| 11020 | 11477 |
| 11021 /** | 11478 /** |
| 11022 * Return the name of the upper bound for legal arguments, or `null` if there
was no | 11479 * Return the name of the upper bound for legal arguments, or `null` if there
was no |
| 11023 * explicit upper bound. | 11480 * explicit upper bound. |
| 11024 * | 11481 * |
| 11025 * @return the name of the upper bound for legal arguments | 11482 * @return the name of the upper bound for legal arguments |
| 11026 */ | 11483 */ |
| 11027 TypeName get bound => _bound; | 11484 TypeName get bound => _bound; |
| 11028 | 11485 |
| 11486 @override |
| 11029 TypeParameterElement get element => _name != null ? (_name.staticElement as Ty
peParameterElement) : null; | 11487 TypeParameterElement get element => _name != null ? (_name.staticElement as Ty
peParameterElement) : null; |
| 11030 | 11488 |
| 11489 @override |
| 11031 Token get endToken { | 11490 Token get endToken { |
| 11032 if (_bound == null) { | 11491 if (_bound == null) { |
| 11033 return _name.endToken; | 11492 return _name.endToken; |
| 11034 } | 11493 } |
| 11035 return _bound.endToken; | 11494 return _bound.endToken; |
| 11036 } | 11495 } |
| 11037 | 11496 |
| 11038 /** | 11497 /** |
| 11039 * Return the name of the type parameter. | 11498 * Return the name of the type parameter. |
| 11040 * | 11499 * |
| (...skipping 12 matching lines...) Expand all Loading... |
| 11053 | 11512 |
| 11054 /** | 11513 /** |
| 11055 * Set the name of the type parameter to the given identifier. | 11514 * Set the name of the type parameter to the given identifier. |
| 11056 * | 11515 * |
| 11057 * @param identifier the name of the type parameter | 11516 * @param identifier the name of the type parameter |
| 11058 */ | 11517 */ |
| 11059 void set name(SimpleIdentifier identifier) { | 11518 void set name(SimpleIdentifier identifier) { |
| 11060 _name = becomeParentOf(identifier); | 11519 _name = becomeParentOf(identifier); |
| 11061 } | 11520 } |
| 11062 | 11521 |
| 11522 @override |
| 11063 void visitChildren(AstVisitor visitor) { | 11523 void visitChildren(AstVisitor visitor) { |
| 11064 super.visitChildren(visitor); | 11524 super.visitChildren(visitor); |
| 11065 safelyVisitChild(_name, visitor); | 11525 safelyVisitChild(_name, visitor); |
| 11066 safelyVisitChild(_bound, visitor); | 11526 safelyVisitChild(_bound, visitor); |
| 11067 } | 11527 } |
| 11068 | 11528 |
| 11529 @override |
| 11069 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; | 11530 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; |
| 11070 } | 11531 } |
| 11071 | 11532 |
| 11072 /** | 11533 /** |
| 11073 * Instances of the class `TypeParameterList` represent type parameters within a
declaration. | 11534 * Instances of the class `TypeParameterList` represent type parameters within a
declaration. |
| 11074 * | 11535 * |
| 11075 * <pre> | 11536 * <pre> |
| 11076 * typeParameterList ::= | 11537 * typeParameterList ::= |
| 11077 * '<' [TypeParameter] (',' [TypeParameter])* '>' | 11538 * '<' [TypeParameter] (',' [TypeParameter])* '>' |
| 11078 * </pre> | 11539 * </pre> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 11098 * | 11559 * |
| 11099 * @param leftBracket the left angle bracket | 11560 * @param leftBracket the left angle bracket |
| 11100 * @param typeParameters the type parameters in the list | 11561 * @param typeParameters the type parameters in the list |
| 11101 * @param rightBracket the right angle bracket | 11562 * @param rightBracket the right angle bracket |
| 11102 */ | 11563 */ |
| 11103 TypeParameterList(this.leftBracket, List<TypeParameter> typeParameters, this.r
ightBracket) { | 11564 TypeParameterList(this.leftBracket, List<TypeParameter> typeParameters, this.r
ightBracket) { |
| 11104 this._typeParameters = new NodeList<TypeParameter>(this); | 11565 this._typeParameters = new NodeList<TypeParameter>(this); |
| 11105 this._typeParameters.addAll(typeParameters); | 11566 this._typeParameters.addAll(typeParameters); |
| 11106 } | 11567 } |
| 11107 | 11568 |
| 11569 @override |
| 11108 accept(AstVisitor visitor) => visitor.visitTypeParameterList(this); | 11570 accept(AstVisitor visitor) => visitor.visitTypeParameterList(this); |
| 11109 | 11571 |
| 11572 @override |
| 11110 Token get beginToken => leftBracket; | 11573 Token get beginToken => leftBracket; |
| 11111 | 11574 |
| 11575 @override |
| 11112 Token get endToken => rightBracket; | 11576 Token get endToken => rightBracket; |
| 11113 | 11577 |
| 11114 /** | 11578 /** |
| 11115 * Return the type parameters for the type. | 11579 * Return the type parameters for the type. |
| 11116 * | 11580 * |
| 11117 * @return the type parameters for the type | 11581 * @return the type parameters for the type |
| 11118 */ | 11582 */ |
| 11119 NodeList<TypeParameter> get typeParameters => _typeParameters; | 11583 NodeList<TypeParameter> get typeParameters => _typeParameters; |
| 11120 | 11584 |
| 11585 @override |
| 11121 void visitChildren(AstVisitor visitor) { | 11586 void visitChildren(AstVisitor visitor) { |
| 11122 _typeParameters.accept(visitor); | 11587 _typeParameters.accept(visitor); |
| 11123 } | 11588 } |
| 11124 } | 11589 } |
| 11125 | 11590 |
| 11126 /** | 11591 /** |
| 11127 * The abstract class `TypedLiteral` defines the behavior common to literals tha
t have a type | 11592 * The abstract class `TypedLiteral` defines the behavior common to literals tha
t have a type |
| 11128 * associated with them. | 11593 * associated with them. |
| 11129 * | 11594 * |
| 11130 * <pre> | 11595 * <pre> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 11149 * Initialize a newly created typed literal. | 11614 * Initialize a newly created typed literal. |
| 11150 * | 11615 * |
| 11151 * @param constKeyword the token representing the 'const' keyword | 11616 * @param constKeyword the token representing the 'const' keyword |
| 11152 * @param typeArguments the type argument associated with this literal, or `nu
ll` if no type | 11617 * @param typeArguments the type argument associated with this literal, or `nu
ll` if no type |
| 11153 * arguments were declared | 11618 * arguments were declared |
| 11154 */ | 11619 */ |
| 11155 TypedLiteral(this.constKeyword, TypeArgumentList typeArguments) { | 11620 TypedLiteral(this.constKeyword, TypeArgumentList typeArguments) { |
| 11156 this.typeArguments = becomeParentOf(typeArguments); | 11621 this.typeArguments = becomeParentOf(typeArguments); |
| 11157 } | 11622 } |
| 11158 | 11623 |
| 11624 @override |
| 11159 void visitChildren(AstVisitor visitor) { | 11625 void visitChildren(AstVisitor visitor) { |
| 11160 safelyVisitChild(typeArguments, visitor); | 11626 safelyVisitChild(typeArguments, visitor); |
| 11161 } | 11627 } |
| 11162 } | 11628 } |
| 11163 | 11629 |
| 11164 /** | 11630 /** |
| 11165 * The abstract class `UriBasedDirective` defines the behavior common to nodes t
hat represent | 11631 * The abstract class `UriBasedDirective` defines the behavior common to nodes t
hat represent |
| 11166 * a directive that references a URI. | 11632 * a directive that references a URI. |
| 11167 * | 11633 * |
| 11168 * <pre> | 11634 * <pre> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11207 | 11673 |
| 11208 /** | 11674 /** |
| 11209 * Set the URI referenced by this directive to the given URI. | 11675 * Set the URI referenced by this directive to the given URI. |
| 11210 * | 11676 * |
| 11211 * @param uri the URI referenced by this directive | 11677 * @param uri the URI referenced by this directive |
| 11212 */ | 11678 */ |
| 11213 void set uri(StringLiteral uri) { | 11679 void set uri(StringLiteral uri) { |
| 11214 this._uri = becomeParentOf(uri); | 11680 this._uri = becomeParentOf(uri); |
| 11215 } | 11681 } |
| 11216 | 11682 |
| 11683 @override |
| 11217 void visitChildren(AstVisitor visitor) { | 11684 void visitChildren(AstVisitor visitor) { |
| 11218 super.visitChildren(visitor); | 11685 super.visitChildren(visitor); |
| 11219 safelyVisitChild(_uri, visitor); | 11686 safelyVisitChild(_uri, visitor); |
| 11220 } | 11687 } |
| 11221 } | 11688 } |
| 11222 | 11689 |
| 11223 /** | 11690 /** |
| 11224 * Instances of the class `VariableDeclaration` represent an identifier that has
an initial | 11691 * Instances of the class `VariableDeclaration` represent an identifier that has
an initial |
| 11225 * value associated with it. Instances of this class are always children of the
class | 11692 * value associated with it. Instances of this class are always children of the
class |
| 11226 * [VariableDeclarationList]. | 11693 * [VariableDeclarationList]. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 11255 * @param metadata the annotations associated with this member | 11722 * @param metadata the annotations associated with this member |
| 11256 * @param name the name of the variable being declared | 11723 * @param name the name of the variable being declared |
| 11257 * @param equals the equal sign separating the variable name from the initial
value | 11724 * @param equals the equal sign separating the variable name from the initial
value |
| 11258 * @param initializer the expression used to compute the initial value for the
variable | 11725 * @param initializer the expression used to compute the initial value for the
variable |
| 11259 */ | 11726 */ |
| 11260 VariableDeclaration(Comment comment, List<Annotation> metadata, SimpleIdentifi
er name, this.equals, Expression initializer) : super(comment, metadata) { | 11727 VariableDeclaration(Comment comment, List<Annotation> metadata, SimpleIdentifi
er name, this.equals, Expression initializer) : super(comment, metadata) { |
| 11261 this._name = becomeParentOf(name); | 11728 this._name = becomeParentOf(name); |
| 11262 this._initializer = becomeParentOf(initializer); | 11729 this._initializer = becomeParentOf(initializer); |
| 11263 } | 11730 } |
| 11264 | 11731 |
| 11732 @override |
| 11265 accept(AstVisitor visitor) => visitor.visitVariableDeclaration(this); | 11733 accept(AstVisitor visitor) => visitor.visitVariableDeclaration(this); |
| 11266 | 11734 |
| 11267 /** | 11735 /** |
| 11268 * This overridden implementation of getDocumentationComment() looks in the gr
andparent node for | 11736 * This overridden implementation of getDocumentationComment() looks in the gr
andparent node for |
| 11269 * dartdoc comments if no documentation is specifically available on the node. | 11737 * dartdoc comments if no documentation is specifically available on the node. |
| 11270 */ | 11738 */ |
| 11739 @override |
| 11271 Comment get documentationComment { | 11740 Comment get documentationComment { |
| 11272 Comment comment = super.documentationComment; | 11741 Comment comment = super.documentationComment; |
| 11273 if (comment == null) { | 11742 if (comment == null) { |
| 11274 if (parent != null && parent.parent != null) { | 11743 if (parent != null && parent.parent != null) { |
| 11275 AstNode node = parent.parent; | 11744 AstNode node = parent.parent; |
| 11276 if (node is AnnotatedNode) { | 11745 if (node is AnnotatedNode) { |
| 11277 return node.documentationComment; | 11746 return node.documentationComment; |
| 11278 } | 11747 } |
| 11279 } | 11748 } |
| 11280 } | 11749 } |
| 11281 return comment; | 11750 return comment; |
| 11282 } | 11751 } |
| 11283 | 11752 |
| 11753 @override |
| 11284 VariableElement get element => _name != null ? (_name.staticElement as Variabl
eElement) : null; | 11754 VariableElement get element => _name != null ? (_name.staticElement as Variabl
eElement) : null; |
| 11285 | 11755 |
| 11756 @override |
| 11286 Token get endToken { | 11757 Token get endToken { |
| 11287 if (_initializer != null) { | 11758 if (_initializer != null) { |
| 11288 return _initializer.endToken; | 11759 return _initializer.endToken; |
| 11289 } | 11760 } |
| 11290 return _name.endToken; | 11761 return _name.endToken; |
| 11291 } | 11762 } |
| 11292 | 11763 |
| 11293 /** | 11764 /** |
| 11294 * Return the expression used to compute the initial value for the variable, o
r `null` if | 11765 * Return the expression used to compute the initial value for the variable, o
r `null` if |
| 11295 * the initial value was not specified. | 11766 * the initial value was not specified. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11338 | 11809 |
| 11339 /** | 11810 /** |
| 11340 * Set the name of the variable being declared to the given identifier. | 11811 * Set the name of the variable being declared to the given identifier. |
| 11341 * | 11812 * |
| 11342 * @param name the name of the variable being declared | 11813 * @param name the name of the variable being declared |
| 11343 */ | 11814 */ |
| 11344 void set name(SimpleIdentifier name) { | 11815 void set name(SimpleIdentifier name) { |
| 11345 this._name = becomeParentOf(name); | 11816 this._name = becomeParentOf(name); |
| 11346 } | 11817 } |
| 11347 | 11818 |
| 11819 @override |
| 11348 void visitChildren(AstVisitor visitor) { | 11820 void visitChildren(AstVisitor visitor) { |
| 11349 super.visitChildren(visitor); | 11821 super.visitChildren(visitor); |
| 11350 safelyVisitChild(_name, visitor); | 11822 safelyVisitChild(_name, visitor); |
| 11351 safelyVisitChild(_initializer, visitor); | 11823 safelyVisitChild(_initializer, visitor); |
| 11352 } | 11824 } |
| 11353 | 11825 |
| 11826 @override |
| 11354 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; | 11827 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; |
| 11355 } | 11828 } |
| 11356 | 11829 |
| 11357 /** | 11830 /** |
| 11358 * Instances of the class `VariableDeclarationList` represent the declaration of
one or more | 11831 * Instances of the class `VariableDeclarationList` represent the declaration of
one or more |
| 11359 * variables of the same type. | 11832 * variables of the same type. |
| 11360 * | 11833 * |
| 11361 * <pre> | 11834 * <pre> |
| 11362 * variableDeclarationList ::= | 11835 * variableDeclarationList ::= |
| 11363 * finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])* | 11836 * finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])* |
| (...skipping 30 matching lines...) Expand all Loading... |
| 11394 * @param keyword the token representing the 'final', 'const' or 'var' keyword | 11867 * @param keyword the token representing the 'final', 'const' or 'var' keyword |
| 11395 * @param type the type of the variables being declared | 11868 * @param type the type of the variables being declared |
| 11396 * @param variables a list containing the individual variables being declared | 11869 * @param variables a list containing the individual variables being declared |
| 11397 */ | 11870 */ |
| 11398 VariableDeclarationList(Comment comment, List<Annotation> metadata, this.keywo
rd, TypeName type, List<VariableDeclaration> variables) : super(comment, metadat
a) { | 11871 VariableDeclarationList(Comment comment, List<Annotation> metadata, this.keywo
rd, TypeName type, List<VariableDeclaration> variables) : super(comment, metadat
a) { |
| 11399 this._variables = new NodeList<VariableDeclaration>(this); | 11872 this._variables = new NodeList<VariableDeclaration>(this); |
| 11400 this._type = becomeParentOf(type); | 11873 this._type = becomeParentOf(type); |
| 11401 this._variables.addAll(variables); | 11874 this._variables.addAll(variables); |
| 11402 } | 11875 } |
| 11403 | 11876 |
| 11877 @override |
| 11404 accept(AstVisitor visitor) => visitor.visitVariableDeclarationList(this); | 11878 accept(AstVisitor visitor) => visitor.visitVariableDeclarationList(this); |
| 11405 | 11879 |
| 11880 @override |
| 11406 Token get endToken => _variables.endToken; | 11881 Token get endToken => _variables.endToken; |
| 11407 | 11882 |
| 11408 /** | 11883 /** |
| 11409 * Return the type of the variables being declared, or `null` if no type was p
rovided. | 11884 * Return the type of the variables being declared, or `null` if no type was p
rovided. |
| 11410 * | 11885 * |
| 11411 * @return the type of the variables being declared | 11886 * @return the type of the variables being declared |
| 11412 */ | 11887 */ |
| 11413 TypeName get type => _type; | 11888 TypeName get type => _type; |
| 11414 | 11889 |
| 11415 /** | 11890 /** |
| (...skipping 21 matching lines...) Expand all Loading... |
| 11437 | 11912 |
| 11438 /** | 11913 /** |
| 11439 * Set the type of the variables being declared to the given type name. | 11914 * Set the type of the variables being declared to the given type name. |
| 11440 * | 11915 * |
| 11441 * @param typeName the type of the variables being declared | 11916 * @param typeName the type of the variables being declared |
| 11442 */ | 11917 */ |
| 11443 void set type(TypeName typeName) { | 11918 void set type(TypeName typeName) { |
| 11444 _type = becomeParentOf(typeName); | 11919 _type = becomeParentOf(typeName); |
| 11445 } | 11920 } |
| 11446 | 11921 |
| 11922 @override |
| 11447 void visitChildren(AstVisitor visitor) { | 11923 void visitChildren(AstVisitor visitor) { |
| 11448 safelyVisitChild(_type, visitor); | 11924 safelyVisitChild(_type, visitor); |
| 11449 _variables.accept(visitor); | 11925 _variables.accept(visitor); |
| 11450 } | 11926 } |
| 11451 | 11927 |
| 11928 @override |
| 11452 Token get firstTokenAfterCommentAndMetadata { | 11929 Token get firstTokenAfterCommentAndMetadata { |
| 11453 if (keyword != null) { | 11930 if (keyword != null) { |
| 11454 return keyword; | 11931 return keyword; |
| 11455 } else if (_type != null) { | 11932 } else if (_type != null) { |
| 11456 return _type.beginToken; | 11933 return _type.beginToken; |
| 11457 } | 11934 } |
| 11458 return _variables.beginToken; | 11935 return _variables.beginToken; |
| 11459 } | 11936 } |
| 11460 } | 11937 } |
| 11461 | 11938 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 11482 /** | 11959 /** |
| 11483 * Initialize a newly created variable declaration statement. | 11960 * Initialize a newly created variable declaration statement. |
| 11484 * | 11961 * |
| 11485 * @param variableList the fields being declared | 11962 * @param variableList the fields being declared |
| 11486 * @param semicolon the semicolon terminating the statement | 11963 * @param semicolon the semicolon terminating the statement |
| 11487 */ | 11964 */ |
| 11488 VariableDeclarationStatement(VariableDeclarationList variableList, this.semico
lon) { | 11965 VariableDeclarationStatement(VariableDeclarationList variableList, this.semico
lon) { |
| 11489 this._variableList = becomeParentOf(variableList); | 11966 this._variableList = becomeParentOf(variableList); |
| 11490 } | 11967 } |
| 11491 | 11968 |
| 11969 @override |
| 11492 accept(AstVisitor visitor) => visitor.visitVariableDeclarationStatement(this); | 11970 accept(AstVisitor visitor) => visitor.visitVariableDeclarationStatement(this); |
| 11493 | 11971 |
| 11972 @override |
| 11494 Token get beginToken => _variableList.beginToken; | 11973 Token get beginToken => _variableList.beginToken; |
| 11495 | 11974 |
| 11975 @override |
| 11496 Token get endToken => semicolon; | 11976 Token get endToken => semicolon; |
| 11497 | 11977 |
| 11498 /** | 11978 /** |
| 11499 * Return the variables being declared. | 11979 * Return the variables being declared. |
| 11500 * | 11980 * |
| 11501 * @return the variables being declared | 11981 * @return the variables being declared |
| 11502 */ | 11982 */ |
| 11503 VariableDeclarationList get variables => _variableList; | 11983 VariableDeclarationList get variables => _variableList; |
| 11504 | 11984 |
| 11505 /** | 11985 /** |
| 11506 * Set the variables being declared to the given list of variables. | 11986 * Set the variables being declared to the given list of variables. |
| 11507 * | 11987 * |
| 11508 * @param variableList the variables being declared | 11988 * @param variableList the variables being declared |
| 11509 */ | 11989 */ |
| 11510 void set variables(VariableDeclarationList variableList) { | 11990 void set variables(VariableDeclarationList variableList) { |
| 11511 this._variableList = becomeParentOf(variableList); | 11991 this._variableList = becomeParentOf(variableList); |
| 11512 } | 11992 } |
| 11513 | 11993 |
| 11994 @override |
| 11514 void visitChildren(AstVisitor visitor) { | 11995 void visitChildren(AstVisitor visitor) { |
| 11515 safelyVisitChild(_variableList, visitor); | 11996 safelyVisitChild(_variableList, visitor); |
| 11516 } | 11997 } |
| 11517 } | 11998 } |
| 11518 | 11999 |
| 11519 /** | 12000 /** |
| 11520 * Instances of the class `WhileStatement` represent a while statement. | 12001 * Instances of the class `WhileStatement` represent a while statement. |
| 11521 * | 12002 * |
| 11522 * <pre> | 12003 * <pre> |
| 11523 * whileStatement ::= | 12004 * whileStatement ::= |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11557 * @param leftParenthesis the left parenthesis | 12038 * @param leftParenthesis the left parenthesis |
| 11558 * @param condition the expression used to determine whether to execute the bo
dy of the loop | 12039 * @param condition the expression used to determine whether to execute the bo
dy of the loop |
| 11559 * @param rightParenthesis the right parenthesis | 12040 * @param rightParenthesis the right parenthesis |
| 11560 * @param body the body of the loop | 12041 * @param body the body of the loop |
| 11561 */ | 12042 */ |
| 11562 WhileStatement(this.keyword, this.leftParenthesis, Expression condition, this.
rightParenthesis, Statement body) { | 12043 WhileStatement(this.keyword, this.leftParenthesis, Expression condition, this.
rightParenthesis, Statement body) { |
| 11563 this._condition = becomeParentOf(condition); | 12044 this._condition = becomeParentOf(condition); |
| 11564 this._body = becomeParentOf(body); | 12045 this._body = becomeParentOf(body); |
| 11565 } | 12046 } |
| 11566 | 12047 |
| 12048 @override |
| 11567 accept(AstVisitor visitor) => visitor.visitWhileStatement(this); | 12049 accept(AstVisitor visitor) => visitor.visitWhileStatement(this); |
| 11568 | 12050 |
| 12051 @override |
| 11569 Token get beginToken => keyword; | 12052 Token get beginToken => keyword; |
| 11570 | 12053 |
| 11571 /** | 12054 /** |
| 11572 * Return the body of the loop. | 12055 * Return the body of the loop. |
| 11573 * | 12056 * |
| 11574 * @return the body of the loop | 12057 * @return the body of the loop |
| 11575 */ | 12058 */ |
| 11576 Statement get body => _body; | 12059 Statement get body => _body; |
| 11577 | 12060 |
| 11578 /** | 12061 /** |
| 11579 * Return the expression used to determine whether to execute the body of the
loop. | 12062 * Return the expression used to determine whether to execute the body of the
loop. |
| 11580 * | 12063 * |
| 11581 * @return the expression used to determine whether to execute the body of the
loop | 12064 * @return the expression used to determine whether to execute the body of the
loop |
| 11582 */ | 12065 */ |
| 11583 Expression get condition => _condition; | 12066 Expression get condition => _condition; |
| 11584 | 12067 |
| 12068 @override |
| 11585 Token get endToken => _body.endToken; | 12069 Token get endToken => _body.endToken; |
| 11586 | 12070 |
| 11587 /** | 12071 /** |
| 11588 * Set the body of the loop to the given statement. | 12072 * Set the body of the loop to the given statement. |
| 11589 * | 12073 * |
| 11590 * @param statement the body of the loop | 12074 * @param statement the body of the loop |
| 11591 */ | 12075 */ |
| 11592 void set body(Statement statement) { | 12076 void set body(Statement statement) { |
| 11593 _body = becomeParentOf(statement); | 12077 _body = becomeParentOf(statement); |
| 11594 } | 12078 } |
| 11595 | 12079 |
| 11596 /** | 12080 /** |
| 11597 * Set the expression used to determine whether to execute the body of the loo
p to the given | 12081 * Set the expression used to determine whether to execute the body of the loo
p to the given |
| 11598 * expression. | 12082 * expression. |
| 11599 * | 12083 * |
| 11600 * @param expression the expression used to determine whether to execute the b
ody of the loop | 12084 * @param expression the expression used to determine whether to execute the b
ody of the loop |
| 11601 */ | 12085 */ |
| 11602 void set condition(Expression expression) { | 12086 void set condition(Expression expression) { |
| 11603 _condition = becomeParentOf(expression); | 12087 _condition = becomeParentOf(expression); |
| 11604 } | 12088 } |
| 11605 | 12089 |
| 12090 @override |
| 11606 void visitChildren(AstVisitor visitor) { | 12091 void visitChildren(AstVisitor visitor) { |
| 11607 safelyVisitChild(_condition, visitor); | 12092 safelyVisitChild(_condition, visitor); |
| 11608 safelyVisitChild(_body, visitor); | 12093 safelyVisitChild(_body, visitor); |
| 11609 } | 12094 } |
| 11610 } | 12095 } |
| 11611 | 12096 |
| 11612 /** | 12097 /** |
| 11613 * Instances of the class `WithClause` represent the with clause in a class decl
aration. | 12098 * Instances of the class `WithClause` represent the with clause in a class decl
aration. |
| 11614 * | 12099 * |
| 11615 * <pre> | 12100 * <pre> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 11633 * | 12118 * |
| 11634 * @param withKeyword the token representing the 'with' keyword | 12119 * @param withKeyword the token representing the 'with' keyword |
| 11635 * @param mixinTypes the names of the mixins that were specified | 12120 * @param mixinTypes the names of the mixins that were specified |
| 11636 */ | 12121 */ |
| 11637 WithClause(Token withKeyword, List<TypeName> mixinTypes) { | 12122 WithClause(Token withKeyword, List<TypeName> mixinTypes) { |
| 11638 this._mixinTypes = new NodeList<TypeName>(this); | 12123 this._mixinTypes = new NodeList<TypeName>(this); |
| 11639 this._withKeyword = withKeyword; | 12124 this._withKeyword = withKeyword; |
| 11640 this._mixinTypes.addAll(mixinTypes); | 12125 this._mixinTypes.addAll(mixinTypes); |
| 11641 } | 12126 } |
| 11642 | 12127 |
| 12128 @override |
| 11643 accept(AstVisitor visitor) => visitor.visitWithClause(this); | 12129 accept(AstVisitor visitor) => visitor.visitWithClause(this); |
| 11644 | 12130 |
| 12131 @override |
| 11645 Token get beginToken => _withKeyword; | 12132 Token get beginToken => _withKeyword; |
| 11646 | 12133 |
| 12134 @override |
| 11647 Token get endToken => _mixinTypes.endToken; | 12135 Token get endToken => _mixinTypes.endToken; |
| 11648 | 12136 |
| 11649 /** | 12137 /** |
| 11650 * Return the names of the mixins that were specified. | 12138 * Return the names of the mixins that were specified. |
| 11651 * | 12139 * |
| 11652 * @return the names of the mixins that were specified | 12140 * @return the names of the mixins that were specified |
| 11653 */ | 12141 */ |
| 11654 NodeList<TypeName> get mixinTypes => _mixinTypes; | 12142 NodeList<TypeName> get mixinTypes => _mixinTypes; |
| 11655 | 12143 |
| 11656 /** | 12144 /** |
| 11657 * Return the token representing the 'with' keyword. | 12145 * Return the token representing the 'with' keyword. |
| 11658 * | 12146 * |
| 11659 * @return the token representing the 'with' keyword | 12147 * @return the token representing the 'with' keyword |
| 11660 */ | 12148 */ |
| 11661 Token get withKeyword => _withKeyword; | 12149 Token get withKeyword => _withKeyword; |
| 11662 | 12150 |
| 11663 /** | 12151 /** |
| 11664 * Set the token representing the 'with' keyword to the given token. | 12152 * Set the token representing the 'with' keyword to the given token. |
| 11665 * | 12153 * |
| 11666 * @param withKeyword the token representing the 'with' keyword | 12154 * @param withKeyword the token representing the 'with' keyword |
| 11667 */ | 12155 */ |
| 11668 void set mixinKeyword(Token withKeyword) { | 12156 void set mixinKeyword(Token withKeyword) { |
| 11669 this._withKeyword = withKeyword; | 12157 this._withKeyword = withKeyword; |
| 11670 } | 12158 } |
| 11671 | 12159 |
| 12160 @override |
| 11672 void visitChildren(AstVisitor visitor) { | 12161 void visitChildren(AstVisitor visitor) { |
| 11673 _mixinTypes.accept(visitor); | 12162 _mixinTypes.accept(visitor); |
| 11674 } | 12163 } |
| 11675 } | 12164 } |
| 11676 | 12165 |
| 11677 /** | 12166 /** |
| 11678 * Instances of the class `BreadthFirstVisitor` implement an AST visitor that wi
ll recursively | 12167 * Instances of the class `BreadthFirstVisitor` implement an AST visitor that wi
ll recursively |
| 11679 * visit all of the nodes in an AST structure, similar to [GeneralizingAstVisito
r]. This | 12168 * visit all of the nodes in an AST structure, similar to [GeneralizingAstVisito
r]. This |
| 11680 * visitor uses a breadth-first ordering rather than the depth-first ordering of | 12169 * visitor uses a breadth-first ordering rather than the depth-first ordering of |
| 11681 * [GeneralizingAstVisitor]. | 12170 * [GeneralizingAstVisitor]. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 11708 * @param root the root of the AST structure to be visited | 12197 * @param root the root of the AST structure to be visited |
| 11709 */ | 12198 */ |
| 11710 void visitAllNodes(AstNode root) { | 12199 void visitAllNodes(AstNode root) { |
| 11711 _queue.add(root); | 12200 _queue.add(root); |
| 11712 while (!_queue.isEmpty) { | 12201 while (!_queue.isEmpty) { |
| 11713 AstNode next = _queue.removeFirst(); | 12202 AstNode next = _queue.removeFirst(); |
| 11714 next.accept(this); | 12203 next.accept(this); |
| 11715 } | 12204 } |
| 11716 } | 12205 } |
| 11717 | 12206 |
| 12207 @override |
| 11718 R visitNode(AstNode node) { | 12208 R visitNode(AstNode node) { |
| 11719 node.visitChildren(_childVisitor); | 12209 node.visitChildren(_childVisitor); |
| 11720 return null; | 12210 return null; |
| 11721 } | 12211 } |
| 11722 | 12212 |
| 11723 BreadthFirstVisitor() { | 12213 BreadthFirstVisitor() { |
| 11724 this._childVisitor = new GeneralizingAstVisitor_BreadthFirstVisitor(this); | 12214 this._childVisitor = new GeneralizingAstVisitor_BreadthFirstVisitor(this); |
| 11725 } | 12215 } |
| 11726 } | 12216 } |
| 11727 | 12217 |
| 11728 class GeneralizingAstVisitor_BreadthFirstVisitor extends GeneralizingAstVisitor<
Object> { | 12218 class GeneralizingAstVisitor_BreadthFirstVisitor extends GeneralizingAstVisitor<
Object> { |
| 11729 final BreadthFirstVisitor BreadthFirstVisitor_this; | 12219 final BreadthFirstVisitor BreadthFirstVisitor_this; |
| 11730 | 12220 |
| 11731 GeneralizingAstVisitor_BreadthFirstVisitor(this.BreadthFirstVisitor_this) : su
per(); | 12221 GeneralizingAstVisitor_BreadthFirstVisitor(this.BreadthFirstVisitor_this) : su
per(); |
| 11732 | 12222 |
| 12223 @override |
| 11733 Object visitNode(AstNode node) { | 12224 Object visitNode(AstNode node) { |
| 11734 BreadthFirstVisitor_this._queue.add(node); | 12225 BreadthFirstVisitor_this._queue.add(node); |
| 11735 return null; | 12226 return null; |
| 11736 } | 12227 } |
| 11737 } | 12228 } |
| 11738 | 12229 |
| 11739 /** | 12230 /** |
| 11740 * Instances of the class `ConstantEvaluator` evaluate constant expressions to p
roduce their | 12231 * Instances of the class `ConstantEvaluator` evaluate constant expressions to p
roduce their |
| 11741 * compile-time value. According to the Dart Language Specification: <blockquote
> A constant | 12232 * compile-time value. According to the Dart Language Specification: <blockquote
> A constant |
| 11742 * expression is one of the following: | 12233 * expression is one of the following: |
| (...skipping 30 matching lines...) Expand all Loading... |
| 11773 * conditions encountered during evaluation. These are documented with the stati
c field that define | 12264 * conditions encountered during evaluation. These are documented with the stati
c field that define |
| 11774 * those values. | 12265 * those values. |
| 11775 */ | 12266 */ |
| 11776 class ConstantEvaluator extends GeneralizingAstVisitor<Object> { | 12267 class ConstantEvaluator extends GeneralizingAstVisitor<Object> { |
| 11777 /** | 12268 /** |
| 11778 * The value returned for expressions (or non-expression nodes) that are not c
ompile-time constant | 12269 * The value returned for expressions (or non-expression nodes) that are not c
ompile-time constant |
| 11779 * expressions. | 12270 * expressions. |
| 11780 */ | 12271 */ |
| 11781 static Object NOT_A_CONSTANT = new Object(); | 12272 static Object NOT_A_CONSTANT = new Object(); |
| 11782 | 12273 |
| 12274 @override |
| 11783 Object visitAdjacentStrings(AdjacentStrings node) { | 12275 Object visitAdjacentStrings(AdjacentStrings node) { |
| 11784 JavaStringBuilder builder = new JavaStringBuilder(); | 12276 JavaStringBuilder builder = new JavaStringBuilder(); |
| 11785 for (StringLiteral string in node.strings) { | 12277 for (StringLiteral string in node.strings) { |
| 11786 Object value = string.accept(this); | 12278 Object value = string.accept(this); |
| 11787 if (identical(value, NOT_A_CONSTANT)) { | 12279 if (identical(value, NOT_A_CONSTANT)) { |
| 11788 return value; | 12280 return value; |
| 11789 } | 12281 } |
| 11790 builder.append(value); | 12282 builder.append(value); |
| 11791 } | 12283 } |
| 11792 return builder.toString(); | 12284 return builder.toString(); |
| 11793 } | 12285 } |
| 11794 | 12286 |
| 12287 @override |
| 11795 Object visitBinaryExpression(BinaryExpression node) { | 12288 Object visitBinaryExpression(BinaryExpression node) { |
| 11796 Object leftOperand = node.leftOperand.accept(this); | 12289 Object leftOperand = node.leftOperand.accept(this); |
| 11797 if (identical(leftOperand, NOT_A_CONSTANT)) { | 12290 if (identical(leftOperand, NOT_A_CONSTANT)) { |
| 11798 return leftOperand; | 12291 return leftOperand; |
| 11799 } | 12292 } |
| 11800 Object rightOperand = node.rightOperand.accept(this); | 12293 Object rightOperand = node.rightOperand.accept(this); |
| 11801 if (identical(rightOperand, NOT_A_CONSTANT)) { | 12294 if (identical(rightOperand, NOT_A_CONSTANT)) { |
| 11802 return rightOperand; | 12295 return rightOperand; |
| 11803 } | 12296 } |
| 11804 while (true) { | 12297 while (true) { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11938 return leftOperand ~/ rightOperand; | 12431 return leftOperand ~/ rightOperand; |
| 11939 } | 12432 } |
| 11940 } else { | 12433 } else { |
| 11941 } | 12434 } |
| 11942 break; | 12435 break; |
| 11943 } | 12436 } |
| 11944 // TODO(brianwilkerson) This doesn't handle numeric conversions. | 12437 // TODO(brianwilkerson) This doesn't handle numeric conversions. |
| 11945 return visitExpression(node); | 12438 return visitExpression(node); |
| 11946 } | 12439 } |
| 11947 | 12440 |
| 12441 @override |
| 11948 Object visitBooleanLiteral(BooleanLiteral node) => node.value ? true : false; | 12442 Object visitBooleanLiteral(BooleanLiteral node) => node.value ? true : false; |
| 11949 | 12443 |
| 12444 @override |
| 11950 Object visitDoubleLiteral(DoubleLiteral node) => node.value; | 12445 Object visitDoubleLiteral(DoubleLiteral node) => node.value; |
| 11951 | 12446 |
| 12447 @override |
| 11952 Object visitIntegerLiteral(IntegerLiteral node) => node.value; | 12448 Object visitIntegerLiteral(IntegerLiteral node) => node.value; |
| 11953 | 12449 |
| 12450 @override |
| 11954 Object visitInterpolationExpression(InterpolationExpression node) { | 12451 Object visitInterpolationExpression(InterpolationExpression node) { |
| 11955 Object value = node.expression.accept(this); | 12452 Object value = node.expression.accept(this); |
| 11956 if (value == null || value is bool || value is String || value is int || val
ue is double) { | 12453 if (value == null || value is bool || value is String || value is int || val
ue is double) { |
| 11957 return value; | 12454 return value; |
| 11958 } | 12455 } |
| 11959 return NOT_A_CONSTANT; | 12456 return NOT_A_CONSTANT; |
| 11960 } | 12457 } |
| 11961 | 12458 |
| 12459 @override |
| 11962 Object visitInterpolationString(InterpolationString node) => node.value; | 12460 Object visitInterpolationString(InterpolationString node) => node.value; |
| 11963 | 12461 |
| 12462 @override |
| 11964 Object visitListLiteral(ListLiteral node) { | 12463 Object visitListLiteral(ListLiteral node) { |
| 11965 List<Object> list = new List<Object>(); | 12464 List<Object> list = new List<Object>(); |
| 11966 for (Expression element in node.elements) { | 12465 for (Expression element in node.elements) { |
| 11967 Object value = element.accept(this); | 12466 Object value = element.accept(this); |
| 11968 if (identical(value, NOT_A_CONSTANT)) { | 12467 if (identical(value, NOT_A_CONSTANT)) { |
| 11969 return value; | 12468 return value; |
| 11970 } | 12469 } |
| 11971 list.add(value); | 12470 list.add(value); |
| 11972 } | 12471 } |
| 11973 return list; | 12472 return list; |
| 11974 } | 12473 } |
| 11975 | 12474 |
| 12475 @override |
| 11976 Object visitMapLiteral(MapLiteral node) { | 12476 Object visitMapLiteral(MapLiteral node) { |
| 11977 Map<String, Object> map = new Map<String, Object>(); | 12477 Map<String, Object> map = new Map<String, Object>(); |
| 11978 for (MapLiteralEntry entry in node.entries) { | 12478 for (MapLiteralEntry entry in node.entries) { |
| 11979 Object key = entry.key.accept(this); | 12479 Object key = entry.key.accept(this); |
| 11980 Object value = entry.value.accept(this); | 12480 Object value = entry.value.accept(this); |
| 11981 if (key is! String || identical(value, NOT_A_CONSTANT)) { | 12481 if (key is! String || identical(value, NOT_A_CONSTANT)) { |
| 11982 return NOT_A_CONSTANT; | 12482 return NOT_A_CONSTANT; |
| 11983 } | 12483 } |
| 11984 map[(key as String)] = value; | 12484 map[(key as String)] = value; |
| 11985 } | 12485 } |
| 11986 return map; | 12486 return map; |
| 11987 } | 12487 } |
| 11988 | 12488 |
| 12489 @override |
| 11989 Object visitMethodInvocation(MethodInvocation node) => visitNode(node); | 12490 Object visitMethodInvocation(MethodInvocation node) => visitNode(node); |
| 11990 | 12491 |
| 12492 @override |
| 11991 Object visitNode(AstNode node) => NOT_A_CONSTANT; | 12493 Object visitNode(AstNode node) => NOT_A_CONSTANT; |
| 11992 | 12494 |
| 12495 @override |
| 11993 Object visitNullLiteral(NullLiteral node) => null; | 12496 Object visitNullLiteral(NullLiteral node) => null; |
| 11994 | 12497 |
| 12498 @override |
| 11995 Object visitParenthesizedExpression(ParenthesizedExpression node) => node.expr
ession.accept(this); | 12499 Object visitParenthesizedExpression(ParenthesizedExpression node) => node.expr
ession.accept(this); |
| 11996 | 12500 |
| 12501 @override |
| 11997 Object visitPrefixedIdentifier(PrefixedIdentifier node) => _getConstantValue(n
ull); | 12502 Object visitPrefixedIdentifier(PrefixedIdentifier node) => _getConstantValue(n
ull); |
| 11998 | 12503 |
| 12504 @override |
| 11999 Object visitPrefixExpression(PrefixExpression node) { | 12505 Object visitPrefixExpression(PrefixExpression node) { |
| 12000 Object operand = node.operand.accept(this); | 12506 Object operand = node.operand.accept(this); |
| 12001 if (identical(operand, NOT_A_CONSTANT)) { | 12507 if (identical(operand, NOT_A_CONSTANT)) { |
| 12002 return operand; | 12508 return operand; |
| 12003 } | 12509 } |
| 12004 while (true) { | 12510 while (true) { |
| 12005 if (node.operator.type == TokenType.BANG) { | 12511 if (node.operator.type == TokenType.BANG) { |
| 12006 if (identical(operand, true)) { | 12512 if (identical(operand, true)) { |
| 12007 return false; | 12513 return false; |
| 12008 } else if (identical(operand, false)) { | 12514 } else if (identical(operand, false)) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 12020 } else if (operand is double) { | 12526 } else if (operand is double) { |
| 12021 return -operand; | 12527 return -operand; |
| 12022 } | 12528 } |
| 12023 } else { | 12529 } else { |
| 12024 } | 12530 } |
| 12025 break; | 12531 break; |
| 12026 } | 12532 } |
| 12027 return NOT_A_CONSTANT; | 12533 return NOT_A_CONSTANT; |
| 12028 } | 12534 } |
| 12029 | 12535 |
| 12536 @override |
| 12030 Object visitPropertyAccess(PropertyAccess node) => _getConstantValue(null); | 12537 Object visitPropertyAccess(PropertyAccess node) => _getConstantValue(null); |
| 12031 | 12538 |
| 12539 @override |
| 12032 Object visitSimpleIdentifier(SimpleIdentifier node) => _getConstantValue(null)
; | 12540 Object visitSimpleIdentifier(SimpleIdentifier node) => _getConstantValue(null)
; |
| 12033 | 12541 |
| 12542 @override |
| 12034 Object visitSimpleStringLiteral(SimpleStringLiteral node) => node.value; | 12543 Object visitSimpleStringLiteral(SimpleStringLiteral node) => node.value; |
| 12035 | 12544 |
| 12545 @override |
| 12036 Object visitStringInterpolation(StringInterpolation node) { | 12546 Object visitStringInterpolation(StringInterpolation node) { |
| 12037 JavaStringBuilder builder = new JavaStringBuilder(); | 12547 JavaStringBuilder builder = new JavaStringBuilder(); |
| 12038 for (InterpolationElement element in node.elements) { | 12548 for (InterpolationElement element in node.elements) { |
| 12039 Object value = element.accept(this); | 12549 Object value = element.accept(this); |
| 12040 if (identical(value, NOT_A_CONSTANT)) { | 12550 if (identical(value, NOT_A_CONSTANT)) { |
| 12041 return value; | 12551 return value; |
| 12042 } | 12552 } |
| 12043 builder.append(value); | 12553 builder.append(value); |
| 12044 } | 12554 } |
| 12045 return builder.toString(); | 12555 return builder.toString(); |
| 12046 } | 12556 } |
| 12047 | 12557 |
| 12558 @override |
| 12048 Object visitSymbolLiteral(SymbolLiteral node) { | 12559 Object visitSymbolLiteral(SymbolLiteral node) { |
| 12049 // TODO(brianwilkerson) This isn't optimal because a Symbol is not a String. | 12560 // TODO(brianwilkerson) This isn't optimal because a Symbol is not a String. |
| 12050 JavaStringBuilder builder = new JavaStringBuilder(); | 12561 JavaStringBuilder builder = new JavaStringBuilder(); |
| 12051 for (Token component in node.components) { | 12562 for (Token component in node.components) { |
| 12052 if (builder.length > 0) { | 12563 if (builder.length > 0) { |
| 12053 builder.appendChar(0x2E); | 12564 builder.appendChar(0x2E); |
| 12054 } | 12565 } |
| 12055 builder.append(component.lexeme); | 12566 builder.append(component.lexeme); |
| 12056 } | 12567 } |
| 12057 return builder.toString(); | 12568 return builder.toString(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12114 } | 12625 } |
| 12115 // no Element | 12626 // no Element |
| 12116 return null; | 12627 return null; |
| 12117 } | 12628 } |
| 12118 } | 12629 } |
| 12119 | 12630 |
| 12120 /** | 12631 /** |
| 12121 * Visitor that maps nodes to elements. | 12632 * Visitor that maps nodes to elements. |
| 12122 */ | 12633 */ |
| 12123 class ElementLocator_ElementMapper extends GeneralizingAstVisitor<Element> { | 12634 class ElementLocator_ElementMapper extends GeneralizingAstVisitor<Element> { |
| 12635 @override |
| 12124 Element visitAssignmentExpression(AssignmentExpression node) => node.bestEleme
nt; | 12636 Element visitAssignmentExpression(AssignmentExpression node) => node.bestEleme
nt; |
| 12125 | 12637 |
| 12638 @override |
| 12126 Element visitBinaryExpression(BinaryExpression node) => node.bestElement; | 12639 Element visitBinaryExpression(BinaryExpression node) => node.bestElement; |
| 12127 | 12640 |
| 12641 @override |
| 12128 Element visitClassDeclaration(ClassDeclaration node) => node.element; | 12642 Element visitClassDeclaration(ClassDeclaration node) => node.element; |
| 12129 | 12643 |
| 12644 @override |
| 12130 Element visitCompilationUnit(CompilationUnit node) => node.element; | 12645 Element visitCompilationUnit(CompilationUnit node) => node.element; |
| 12131 | 12646 |
| 12647 @override |
| 12132 Element visitConstructorDeclaration(ConstructorDeclaration node) => node.eleme
nt; | 12648 Element visitConstructorDeclaration(ConstructorDeclaration node) => node.eleme
nt; |
| 12133 | 12649 |
| 12650 @override |
| 12134 Element visitFunctionDeclaration(FunctionDeclaration node) => node.element; | 12651 Element visitFunctionDeclaration(FunctionDeclaration node) => node.element; |
| 12135 | 12652 |
| 12653 @override |
| 12136 Element visitIdentifier(Identifier node) { | 12654 Element visitIdentifier(Identifier node) { |
| 12137 AstNode parent = node.parent; | 12655 AstNode parent = node.parent; |
| 12138 // Type name in InstanceCreationExpression | 12656 // Type name in InstanceCreationExpression |
| 12139 { | 12657 { |
| 12140 AstNode typeNameCandidate = parent; | 12658 AstNode typeNameCandidate = parent; |
| 12141 // new prefix.node[.constructorName]() | 12659 // new prefix.node[.constructorName]() |
| 12142 if (typeNameCandidate is PrefixedIdentifier) { | 12660 if (typeNameCandidate is PrefixedIdentifier) { |
| 12143 PrefixedIdentifier prefixedIdentifier = typeNameCandidate as PrefixedIde
ntifier; | 12661 PrefixedIdentifier prefixedIdentifier = typeNameCandidate as PrefixedIde
ntifier; |
| 12144 if (identical(prefixedIdentifier.identifier, node)) { | 12662 if (identical(prefixedIdentifier.identifier, node)) { |
| 12145 typeNameCandidate = prefixedIdentifier.parent; | 12663 typeNameCandidate = prefixedIdentifier.parent; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12178 } | 12696 } |
| 12179 } | 12697 } |
| 12180 } | 12698 } |
| 12181 Element element = node.bestElement; | 12699 Element element = node.bestElement; |
| 12182 if (element == null) { | 12700 if (element == null) { |
| 12183 element = node.staticElement; | 12701 element = node.staticElement; |
| 12184 } | 12702 } |
| 12185 return element; | 12703 return element; |
| 12186 } | 12704 } |
| 12187 | 12705 |
| 12706 @override |
| 12188 Element visitImportDirective(ImportDirective node) => node.element; | 12707 Element visitImportDirective(ImportDirective node) => node.element; |
| 12189 | 12708 |
| 12709 @override |
| 12190 Element visitIndexExpression(IndexExpression node) => node.bestElement; | 12710 Element visitIndexExpression(IndexExpression node) => node.bestElement; |
| 12191 | 12711 |
| 12712 @override |
| 12192 Element visitInstanceCreationExpression(InstanceCreationExpression node) => no
de.staticElement; | 12713 Element visitInstanceCreationExpression(InstanceCreationExpression node) => no
de.staticElement; |
| 12193 | 12714 |
| 12715 @override |
| 12194 Element visitLibraryDirective(LibraryDirective node) => node.element; | 12716 Element visitLibraryDirective(LibraryDirective node) => node.element; |
| 12195 | 12717 |
| 12718 @override |
| 12196 Element visitMethodDeclaration(MethodDeclaration node) => node.element; | 12719 Element visitMethodDeclaration(MethodDeclaration node) => node.element; |
| 12197 | 12720 |
| 12721 @override |
| 12198 Element visitMethodInvocation(MethodInvocation node) => node.methodName.bestEl
ement; | 12722 Element visitMethodInvocation(MethodInvocation node) => node.methodName.bestEl
ement; |
| 12199 | 12723 |
| 12724 @override |
| 12200 Element visitPostfixExpression(PostfixExpression node) => node.bestElement; | 12725 Element visitPostfixExpression(PostfixExpression node) => node.bestElement; |
| 12201 | 12726 |
| 12727 @override |
| 12202 Element visitPrefixedIdentifier(PrefixedIdentifier node) => node.bestElement; | 12728 Element visitPrefixedIdentifier(PrefixedIdentifier node) => node.bestElement; |
| 12203 | 12729 |
| 12730 @override |
| 12204 Element visitPrefixExpression(PrefixExpression node) => node.bestElement; | 12731 Element visitPrefixExpression(PrefixExpression node) => node.bestElement; |
| 12205 | 12732 |
| 12733 @override |
| 12206 Element visitStringLiteral(StringLiteral node) { | 12734 Element visitStringLiteral(StringLiteral node) { |
| 12207 AstNode parent = node.parent; | 12735 AstNode parent = node.parent; |
| 12208 if (parent is UriBasedDirective) { | 12736 if (parent is UriBasedDirective) { |
| 12209 return parent.uriElement; | 12737 return parent.uriElement; |
| 12210 } | 12738 } |
| 12211 return null; | 12739 return null; |
| 12212 } | 12740 } |
| 12213 | 12741 |
| 12742 @override |
| 12214 Element visitVariableDeclaration(VariableDeclaration node) => node.element; | 12743 Element visitVariableDeclaration(VariableDeclaration node) => node.element; |
| 12215 } | 12744 } |
| 12216 | 12745 |
| 12217 /** | 12746 /** |
| 12218 * Instances of the class `GeneralizingAstVisitor` implement an AST visitor that
will | 12747 * Instances of the class `GeneralizingAstVisitor` implement an AST visitor that
will |
| 12219 * recursively visit all of the nodes in an AST structure (like instances of the
class | 12748 * recursively visit all of the nodes in an AST structure (like instances of the
class |
| 12220 * [RecursiveAstVisitor]). In addition, when a node of a specific type is visite
d not only | 12749 * [RecursiveAstVisitor]). In addition, when a node of a specific type is visite
d not only |
| 12221 * will the visit method for that specific type of node be invoked, but addition
al methods for the | 12750 * will the visit method for that specific type of node be invoked, but addition
al methods for the |
| 12222 * superclasses of that node will also be invoked. For example, using an instanc
e of this class to | 12751 * superclasses of that node will also be invoked. For example, using an instanc
e of this class to |
| 12223 * visit a [Block] will cause the method [visitBlock] to be invoked but will | 12752 * visit a [Block] will cause the method [visitBlock] to be invoked but will |
| 12224 * also cause the methods [visitStatement] and [visitNode] to be | 12753 * also cause the methods [visitStatement] and [visitNode] to be |
| 12225 * subsequently invoked. This allows visitors to be written that visit all state
ments without | 12754 * subsequently invoked. This allows visitors to be written that visit all state
ments without |
| 12226 * needing to override the visit method for each of the specific subclasses of [
Statement]. | 12755 * needing to override the visit method for each of the specific subclasses of [
Statement]. |
| 12227 * | 12756 * |
| 12228 * Subclasses that override a visit method must either invoke the overridden vis
it method or | 12757 * Subclasses that override a visit method must either invoke the overridden vis
it method or |
| 12229 * explicitly invoke the more general visit method. Failure to do so will cause
the visit methods | 12758 * explicitly invoke the more general visit method. Failure to do so will cause
the visit methods |
| 12230 * for superclasses of the node to not be invoked and will cause the children of
the visited node to | 12759 * for superclasses of the node to not be invoked and will cause the children of
the visited node to |
| 12231 * not be visited. | 12760 * not be visited. |
| 12232 */ | 12761 */ |
| 12233 class GeneralizingAstVisitor<R> implements AstVisitor<R> { | 12762 class GeneralizingAstVisitor<R> implements AstVisitor<R> { |
| 12763 @override |
| 12234 R visitAdjacentStrings(AdjacentStrings node) => visitStringLiteral(node); | 12764 R visitAdjacentStrings(AdjacentStrings node) => visitStringLiteral(node); |
| 12235 | 12765 |
| 12236 R visitAnnotatedNode(AnnotatedNode node) => visitNode(node); | 12766 R visitAnnotatedNode(AnnotatedNode node) => visitNode(node); |
| 12237 | 12767 |
| 12768 @override |
| 12238 R visitAnnotation(Annotation node) => visitNode(node); | 12769 R visitAnnotation(Annotation node) => visitNode(node); |
| 12239 | 12770 |
| 12771 @override |
| 12240 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => visitExpression(
node); | 12772 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => visitExpression(
node); |
| 12241 | 12773 |
| 12774 @override |
| 12242 R visitArgumentList(ArgumentList node) => visitNode(node); | 12775 R visitArgumentList(ArgumentList node) => visitNode(node); |
| 12243 | 12776 |
| 12777 @override |
| 12244 R visitAsExpression(AsExpression node) => visitExpression(node); | 12778 R visitAsExpression(AsExpression node) => visitExpression(node); |
| 12245 | 12779 |
| 12780 @override |
| 12246 R visitAssertStatement(AssertStatement node) => visitStatement(node); | 12781 R visitAssertStatement(AssertStatement node) => visitStatement(node); |
| 12247 | 12782 |
| 12783 @override |
| 12248 R visitAssignmentExpression(AssignmentExpression node) => visitExpression(node
); | 12784 R visitAssignmentExpression(AssignmentExpression node) => visitExpression(node
); |
| 12249 | 12785 |
| 12786 @override |
| 12250 R visitBinaryExpression(BinaryExpression node) => visitExpression(node); | 12787 R visitBinaryExpression(BinaryExpression node) => visitExpression(node); |
| 12251 | 12788 |
| 12789 @override |
| 12252 R visitBlock(Block node) => visitStatement(node); | 12790 R visitBlock(Block node) => visitStatement(node); |
| 12253 | 12791 |
| 12792 @override |
| 12254 R visitBlockFunctionBody(BlockFunctionBody node) => visitFunctionBody(node); | 12793 R visitBlockFunctionBody(BlockFunctionBody node) => visitFunctionBody(node); |
| 12255 | 12794 |
| 12795 @override |
| 12256 R visitBooleanLiteral(BooleanLiteral node) => visitLiteral(node); | 12796 R visitBooleanLiteral(BooleanLiteral node) => visitLiteral(node); |
| 12257 | 12797 |
| 12798 @override |
| 12258 R visitBreakStatement(BreakStatement node) => visitStatement(node); | 12799 R visitBreakStatement(BreakStatement node) => visitStatement(node); |
| 12259 | 12800 |
| 12801 @override |
| 12260 R visitCascadeExpression(CascadeExpression node) => visitExpression(node); | 12802 R visitCascadeExpression(CascadeExpression node) => visitExpression(node); |
| 12261 | 12803 |
| 12804 @override |
| 12262 R visitCatchClause(CatchClause node) => visitNode(node); | 12805 R visitCatchClause(CatchClause node) => visitNode(node); |
| 12263 | 12806 |
| 12807 @override |
| 12264 R visitClassDeclaration(ClassDeclaration node) => visitCompilationUnitMember(n
ode); | 12808 R visitClassDeclaration(ClassDeclaration node) => visitCompilationUnitMember(n
ode); |
| 12265 | 12809 |
| 12266 R visitClassMember(ClassMember node) => visitDeclaration(node); | 12810 R visitClassMember(ClassMember node) => visitDeclaration(node); |
| 12267 | 12811 |
| 12812 @override |
| 12268 R visitClassTypeAlias(ClassTypeAlias node) => visitTypeAlias(node); | 12813 R visitClassTypeAlias(ClassTypeAlias node) => visitTypeAlias(node); |
| 12269 | 12814 |
| 12270 R visitCombinator(Combinator node) => visitNode(node); | 12815 R visitCombinator(Combinator node) => visitNode(node); |
| 12271 | 12816 |
| 12817 @override |
| 12272 R visitComment(Comment node) => visitNode(node); | 12818 R visitComment(Comment node) => visitNode(node); |
| 12273 | 12819 |
| 12820 @override |
| 12274 R visitCommentReference(CommentReference node) => visitNode(node); | 12821 R visitCommentReference(CommentReference node) => visitNode(node); |
| 12275 | 12822 |
| 12823 @override |
| 12276 R visitCompilationUnit(CompilationUnit node) => visitNode(node); | 12824 R visitCompilationUnit(CompilationUnit node) => visitNode(node); |
| 12277 | 12825 |
| 12278 R visitCompilationUnitMember(CompilationUnitMember node) => visitDeclaration(n
ode); | 12826 R visitCompilationUnitMember(CompilationUnitMember node) => visitDeclaration(n
ode); |
| 12279 | 12827 |
| 12828 @override |
| 12280 R visitConditionalExpression(ConditionalExpression node) => visitExpression(no
de); | 12829 R visitConditionalExpression(ConditionalExpression node) => visitExpression(no
de); |
| 12281 | 12830 |
| 12831 @override |
| 12282 R visitConstructorDeclaration(ConstructorDeclaration node) => visitClassMember
(node); | 12832 R visitConstructorDeclaration(ConstructorDeclaration node) => visitClassMember
(node); |
| 12283 | 12833 |
| 12834 @override |
| 12284 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) => visitC
onstructorInitializer(node); | 12835 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) => visitC
onstructorInitializer(node); |
| 12285 | 12836 |
| 12286 R visitConstructorInitializer(ConstructorInitializer node) => visitNode(node); | 12837 R visitConstructorInitializer(ConstructorInitializer node) => visitNode(node); |
| 12287 | 12838 |
| 12839 @override |
| 12288 R visitConstructorName(ConstructorName node) => visitNode(node); | 12840 R visitConstructorName(ConstructorName node) => visitNode(node); |
| 12289 | 12841 |
| 12842 @override |
| 12290 R visitContinueStatement(ContinueStatement node) => visitStatement(node); | 12843 R visitContinueStatement(ContinueStatement node) => visitStatement(node); |
| 12291 | 12844 |
| 12292 R visitDeclaration(Declaration node) => visitAnnotatedNode(node); | 12845 R visitDeclaration(Declaration node) => visitAnnotatedNode(node); |
| 12293 | 12846 |
| 12847 @override |
| 12294 R visitDeclaredIdentifier(DeclaredIdentifier node) => visitDeclaration(node); | 12848 R visitDeclaredIdentifier(DeclaredIdentifier node) => visitDeclaration(node); |
| 12295 | 12849 |
| 12850 @override |
| 12296 R visitDefaultFormalParameter(DefaultFormalParameter node) => visitFormalParam
eter(node); | 12851 R visitDefaultFormalParameter(DefaultFormalParameter node) => visitFormalParam
eter(node); |
| 12297 | 12852 |
| 12298 R visitDirective(Directive node) => visitAnnotatedNode(node); | 12853 R visitDirective(Directive node) => visitAnnotatedNode(node); |
| 12299 | 12854 |
| 12855 @override |
| 12300 R visitDoStatement(DoStatement node) => visitStatement(node); | 12856 R visitDoStatement(DoStatement node) => visitStatement(node); |
| 12301 | 12857 |
| 12858 @override |
| 12302 R visitDoubleLiteral(DoubleLiteral node) => visitLiteral(node); | 12859 R visitDoubleLiteral(DoubleLiteral node) => visitLiteral(node); |
| 12303 | 12860 |
| 12861 @override |
| 12304 R visitEmptyFunctionBody(EmptyFunctionBody node) => visitFunctionBody(node); | 12862 R visitEmptyFunctionBody(EmptyFunctionBody node) => visitFunctionBody(node); |
| 12305 | 12863 |
| 12864 @override |
| 12306 R visitEmptyStatement(EmptyStatement node) => visitStatement(node); | 12865 R visitEmptyStatement(EmptyStatement node) => visitStatement(node); |
| 12307 | 12866 |
| 12867 @override |
| 12308 R visitExportDirective(ExportDirective node) => visitNamespaceDirective(node); | 12868 R visitExportDirective(ExportDirective node) => visitNamespaceDirective(node); |
| 12309 | 12869 |
| 12310 R visitExpression(Expression node) => visitNode(node); | 12870 R visitExpression(Expression node) => visitNode(node); |
| 12311 | 12871 |
| 12872 @override |
| 12312 R visitExpressionFunctionBody(ExpressionFunctionBody node) => visitFunctionBod
y(node); | 12873 R visitExpressionFunctionBody(ExpressionFunctionBody node) => visitFunctionBod
y(node); |
| 12313 | 12874 |
| 12875 @override |
| 12314 R visitExpressionStatement(ExpressionStatement node) => visitStatement(node); | 12876 R visitExpressionStatement(ExpressionStatement node) => visitStatement(node); |
| 12315 | 12877 |
| 12878 @override |
| 12316 R visitExtendsClause(ExtendsClause node) => visitNode(node); | 12879 R visitExtendsClause(ExtendsClause node) => visitNode(node); |
| 12317 | 12880 |
| 12881 @override |
| 12318 R visitFieldDeclaration(FieldDeclaration node) => visitClassMember(node); | 12882 R visitFieldDeclaration(FieldDeclaration node) => visitClassMember(node); |
| 12319 | 12883 |
| 12884 @override |
| 12320 R visitFieldFormalParameter(FieldFormalParameter node) => visitNormalFormalPar
ameter(node); | 12885 R visitFieldFormalParameter(FieldFormalParameter node) => visitNormalFormalPar
ameter(node); |
| 12321 | 12886 |
| 12887 @override |
| 12322 R visitForEachStatement(ForEachStatement node) => visitStatement(node); | 12888 R visitForEachStatement(ForEachStatement node) => visitStatement(node); |
| 12323 | 12889 |
| 12324 R visitFormalParameter(FormalParameter node) => visitNode(node); | 12890 R visitFormalParameter(FormalParameter node) => visitNode(node); |
| 12325 | 12891 |
| 12892 @override |
| 12326 R visitFormalParameterList(FormalParameterList node) => visitNode(node); | 12893 R visitFormalParameterList(FormalParameterList node) => visitNode(node); |
| 12327 | 12894 |
| 12895 @override |
| 12328 R visitForStatement(ForStatement node) => visitStatement(node); | 12896 R visitForStatement(ForStatement node) => visitStatement(node); |
| 12329 | 12897 |
| 12330 R visitFunctionBody(FunctionBody node) => visitNode(node); | 12898 R visitFunctionBody(FunctionBody node) => visitNode(node); |
| 12331 | 12899 |
| 12900 @override |
| 12332 R visitFunctionDeclaration(FunctionDeclaration node) => visitCompilationUnitMe
mber(node); | 12901 R visitFunctionDeclaration(FunctionDeclaration node) => visitCompilationUnitMe
mber(node); |
| 12333 | 12902 |
| 12903 @override |
| 12334 R visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => visi
tStatement(node); | 12904 R visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => visi
tStatement(node); |
| 12335 | 12905 |
| 12906 @override |
| 12336 R visitFunctionExpression(FunctionExpression node) => visitExpression(node); | 12907 R visitFunctionExpression(FunctionExpression node) => visitExpression(node); |
| 12337 | 12908 |
| 12909 @override |
| 12338 R visitFunctionExpressionInvocation(FunctionExpressionInvocation node) => visi
tExpression(node); | 12910 R visitFunctionExpressionInvocation(FunctionExpressionInvocation node) => visi
tExpression(node); |
| 12339 | 12911 |
| 12912 @override |
| 12340 R visitFunctionTypeAlias(FunctionTypeAlias node) => visitTypeAlias(node); | 12913 R visitFunctionTypeAlias(FunctionTypeAlias node) => visitTypeAlias(node); |
| 12341 | 12914 |
| 12915 @override |
| 12342 R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => visi
tNormalFormalParameter(node); | 12916 R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => visi
tNormalFormalParameter(node); |
| 12343 | 12917 |
| 12918 @override |
| 12344 R visitHideCombinator(HideCombinator node) => visitCombinator(node); | 12919 R visitHideCombinator(HideCombinator node) => visitCombinator(node); |
| 12345 | 12920 |
| 12346 R visitIdentifier(Identifier node) => visitExpression(node); | 12921 R visitIdentifier(Identifier node) => visitExpression(node); |
| 12347 | 12922 |
| 12923 @override |
| 12348 R visitIfStatement(IfStatement node) => visitStatement(node); | 12924 R visitIfStatement(IfStatement node) => visitStatement(node); |
| 12349 | 12925 |
| 12926 @override |
| 12350 R visitImplementsClause(ImplementsClause node) => visitNode(node); | 12927 R visitImplementsClause(ImplementsClause node) => visitNode(node); |
| 12351 | 12928 |
| 12929 @override |
| 12352 R visitImportDirective(ImportDirective node) => visitNamespaceDirective(node); | 12930 R visitImportDirective(ImportDirective node) => visitNamespaceDirective(node); |
| 12353 | 12931 |
| 12932 @override |
| 12354 R visitIndexExpression(IndexExpression node) => visitExpression(node); | 12933 R visitIndexExpression(IndexExpression node) => visitExpression(node); |
| 12355 | 12934 |
| 12935 @override |
| 12356 R visitInstanceCreationExpression(InstanceCreationExpression node) => visitExp
ression(node); | 12936 R visitInstanceCreationExpression(InstanceCreationExpression node) => visitExp
ression(node); |
| 12357 | 12937 |
| 12938 @override |
| 12358 R visitIntegerLiteral(IntegerLiteral node) => visitLiteral(node); | 12939 R visitIntegerLiteral(IntegerLiteral node) => visitLiteral(node); |
| 12359 | 12940 |
| 12360 R visitInterpolationElement(InterpolationElement node) => visitNode(node); | 12941 R visitInterpolationElement(InterpolationElement node) => visitNode(node); |
| 12361 | 12942 |
| 12943 @override |
| 12362 R visitInterpolationExpression(InterpolationExpression node) => visitInterpola
tionElement(node); | 12944 R visitInterpolationExpression(InterpolationExpression node) => visitInterpola
tionElement(node); |
| 12363 | 12945 |
| 12946 @override |
| 12364 R visitInterpolationString(InterpolationString node) => visitInterpolationElem
ent(node); | 12947 R visitInterpolationString(InterpolationString node) => visitInterpolationElem
ent(node); |
| 12365 | 12948 |
| 12949 @override |
| 12366 R visitIsExpression(IsExpression node) => visitExpression(node); | 12950 R visitIsExpression(IsExpression node) => visitExpression(node); |
| 12367 | 12951 |
| 12952 @override |
| 12368 R visitLabel(Label node) => visitNode(node); | 12953 R visitLabel(Label node) => visitNode(node); |
| 12369 | 12954 |
| 12955 @override |
| 12370 R visitLabeledStatement(LabeledStatement node) => visitStatement(node); | 12956 R visitLabeledStatement(LabeledStatement node) => visitStatement(node); |
| 12371 | 12957 |
| 12958 @override |
| 12372 R visitLibraryDirective(LibraryDirective node) => visitDirective(node); | 12959 R visitLibraryDirective(LibraryDirective node) => visitDirective(node); |
| 12373 | 12960 |
| 12961 @override |
| 12374 R visitLibraryIdentifier(LibraryIdentifier node) => visitIdentifier(node); | 12962 R visitLibraryIdentifier(LibraryIdentifier node) => visitIdentifier(node); |
| 12375 | 12963 |
| 12964 @override |
| 12376 R visitListLiteral(ListLiteral node) => visitTypedLiteral(node); | 12965 R visitListLiteral(ListLiteral node) => visitTypedLiteral(node); |
| 12377 | 12966 |
| 12378 R visitLiteral(Literal node) => visitExpression(node); | 12967 R visitLiteral(Literal node) => visitExpression(node); |
| 12379 | 12968 |
| 12969 @override |
| 12380 R visitMapLiteral(MapLiteral node) => visitTypedLiteral(node); | 12970 R visitMapLiteral(MapLiteral node) => visitTypedLiteral(node); |
| 12381 | 12971 |
| 12972 @override |
| 12382 R visitMapLiteralEntry(MapLiteralEntry node) => visitNode(node); | 12973 R visitMapLiteralEntry(MapLiteralEntry node) => visitNode(node); |
| 12383 | 12974 |
| 12975 @override |
| 12384 R visitMethodDeclaration(MethodDeclaration node) => visitClassMember(node); | 12976 R visitMethodDeclaration(MethodDeclaration node) => visitClassMember(node); |
| 12385 | 12977 |
| 12978 @override |
| 12386 R visitMethodInvocation(MethodInvocation node) => visitExpression(node); | 12979 R visitMethodInvocation(MethodInvocation node) => visitExpression(node); |
| 12387 | 12980 |
| 12981 @override |
| 12388 R visitNamedExpression(NamedExpression node) => visitExpression(node); | 12982 R visitNamedExpression(NamedExpression node) => visitExpression(node); |
| 12389 | 12983 |
| 12390 R visitNamespaceDirective(NamespaceDirective node) => visitUriBasedDirective(n
ode); | 12984 R visitNamespaceDirective(NamespaceDirective node) => visitUriBasedDirective(n
ode); |
| 12391 | 12985 |
| 12986 @override |
| 12392 R visitNativeClause(NativeClause node) => visitNode(node); | 12987 R visitNativeClause(NativeClause node) => visitNode(node); |
| 12393 | 12988 |
| 12989 @override |
| 12394 R visitNativeFunctionBody(NativeFunctionBody node) => visitFunctionBody(node); | 12990 R visitNativeFunctionBody(NativeFunctionBody node) => visitFunctionBody(node); |
| 12395 | 12991 |
| 12396 R visitNode(AstNode node) { | 12992 R visitNode(AstNode node) { |
| 12397 node.visitChildren(this); | 12993 node.visitChildren(this); |
| 12398 return null; | 12994 return null; |
| 12399 } | 12995 } |
| 12400 | 12996 |
| 12401 R visitNormalFormalParameter(NormalFormalParameter node) => visitFormalParamet
er(node); | 12997 R visitNormalFormalParameter(NormalFormalParameter node) => visitFormalParamet
er(node); |
| 12402 | 12998 |
| 12999 @override |
| 12403 R visitNullLiteral(NullLiteral node) => visitLiteral(node); | 13000 R visitNullLiteral(NullLiteral node) => visitLiteral(node); |
| 12404 | 13001 |
| 13002 @override |
| 12405 R visitParenthesizedExpression(ParenthesizedExpression node) => visitExpressio
n(node); | 13003 R visitParenthesizedExpression(ParenthesizedExpression node) => visitExpressio
n(node); |
| 12406 | 13004 |
| 13005 @override |
| 12407 R visitPartDirective(PartDirective node) => visitUriBasedDirective(node); | 13006 R visitPartDirective(PartDirective node) => visitUriBasedDirective(node); |
| 12408 | 13007 |
| 13008 @override |
| 12409 R visitPartOfDirective(PartOfDirective node) => visitDirective(node); | 13009 R visitPartOfDirective(PartOfDirective node) => visitDirective(node); |
| 12410 | 13010 |
| 13011 @override |
| 12411 R visitPostfixExpression(PostfixExpression node) => visitExpression(node); | 13012 R visitPostfixExpression(PostfixExpression node) => visitExpression(node); |
| 12412 | 13013 |
| 13014 @override |
| 12413 R visitPrefixedIdentifier(PrefixedIdentifier node) => visitIdentifier(node); | 13015 R visitPrefixedIdentifier(PrefixedIdentifier node) => visitIdentifier(node); |
| 12414 | 13016 |
| 13017 @override |
| 12415 R visitPrefixExpression(PrefixExpression node) => visitExpression(node); | 13018 R visitPrefixExpression(PrefixExpression node) => visitExpression(node); |
| 12416 | 13019 |
| 13020 @override |
| 12417 R visitPropertyAccess(PropertyAccess node) => visitExpression(node); | 13021 R visitPropertyAccess(PropertyAccess node) => visitExpression(node); |
| 12418 | 13022 |
| 13023 @override |
| 12419 R visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node)
=> visitConstructorInitializer(node); | 13024 R visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node)
=> visitConstructorInitializer(node); |
| 12420 | 13025 |
| 13026 @override |
| 12421 R visitRethrowExpression(RethrowExpression node) => visitExpression(node); | 13027 R visitRethrowExpression(RethrowExpression node) => visitExpression(node); |
| 12422 | 13028 |
| 13029 @override |
| 12423 R visitReturnStatement(ReturnStatement node) => visitStatement(node); | 13030 R visitReturnStatement(ReturnStatement node) => visitStatement(node); |
| 12424 | 13031 |
| 13032 @override |
| 12425 R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag); | 13033 R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag); |
| 12426 | 13034 |
| 13035 @override |
| 12427 R visitShowCombinator(ShowCombinator node) => visitCombinator(node); | 13036 R visitShowCombinator(ShowCombinator node) => visitCombinator(node); |
| 12428 | 13037 |
| 13038 @override |
| 12429 R visitSimpleFormalParameter(SimpleFormalParameter node) => visitNormalFormalP
arameter(node); | 13039 R visitSimpleFormalParameter(SimpleFormalParameter node) => visitNormalFormalP
arameter(node); |
| 12430 | 13040 |
| 13041 @override |
| 12431 R visitSimpleIdentifier(SimpleIdentifier node) => visitIdentifier(node); | 13042 R visitSimpleIdentifier(SimpleIdentifier node) => visitIdentifier(node); |
| 12432 | 13043 |
| 13044 @override |
| 12433 R visitSimpleStringLiteral(SimpleStringLiteral node) => visitStringLiteral(nod
e); | 13045 R visitSimpleStringLiteral(SimpleStringLiteral node) => visitStringLiteral(nod
e); |
| 12434 | 13046 |
| 12435 R visitStatement(Statement node) => visitNode(node); | 13047 R visitStatement(Statement node) => visitNode(node); |
| 12436 | 13048 |
| 13049 @override |
| 12437 R visitStringInterpolation(StringInterpolation node) => visitStringLiteral(nod
e); | 13050 R visitStringInterpolation(StringInterpolation node) => visitStringLiteral(nod
e); |
| 12438 | 13051 |
| 12439 R visitStringLiteral(StringLiteral node) => visitLiteral(node); | 13052 R visitStringLiteral(StringLiteral node) => visitLiteral(node); |
| 12440 | 13053 |
| 13054 @override |
| 12441 R visitSuperConstructorInvocation(SuperConstructorInvocation node) => visitCon
structorInitializer(node); | 13055 R visitSuperConstructorInvocation(SuperConstructorInvocation node) => visitCon
structorInitializer(node); |
| 12442 | 13056 |
| 13057 @override |
| 12443 R visitSuperExpression(SuperExpression node) => visitExpression(node); | 13058 R visitSuperExpression(SuperExpression node) => visitExpression(node); |
| 12444 | 13059 |
| 13060 @override |
| 12445 R visitSwitchCase(SwitchCase node) => visitSwitchMember(node); | 13061 R visitSwitchCase(SwitchCase node) => visitSwitchMember(node); |
| 12446 | 13062 |
| 13063 @override |
| 12447 R visitSwitchDefault(SwitchDefault node) => visitSwitchMember(node); | 13064 R visitSwitchDefault(SwitchDefault node) => visitSwitchMember(node); |
| 12448 | 13065 |
| 12449 R visitSwitchMember(SwitchMember node) => visitNode(node); | 13066 R visitSwitchMember(SwitchMember node) => visitNode(node); |
| 12450 | 13067 |
| 13068 @override |
| 12451 R visitSwitchStatement(SwitchStatement node) => visitStatement(node); | 13069 R visitSwitchStatement(SwitchStatement node) => visitStatement(node); |
| 12452 | 13070 |
| 13071 @override |
| 12453 R visitSymbolLiteral(SymbolLiteral node) => visitLiteral(node); | 13072 R visitSymbolLiteral(SymbolLiteral node) => visitLiteral(node); |
| 12454 | 13073 |
| 13074 @override |
| 12455 R visitThisExpression(ThisExpression node) => visitExpression(node); | 13075 R visitThisExpression(ThisExpression node) => visitExpression(node); |
| 12456 | 13076 |
| 13077 @override |
| 12457 R visitThrowExpression(ThrowExpression node) => visitExpression(node); | 13078 R visitThrowExpression(ThrowExpression node) => visitExpression(node); |
| 12458 | 13079 |
| 13080 @override |
| 12459 R visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => visitC
ompilationUnitMember(node); | 13081 R visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => visitC
ompilationUnitMember(node); |
| 12460 | 13082 |
| 13083 @override |
| 12461 R visitTryStatement(TryStatement node) => visitStatement(node); | 13084 R visitTryStatement(TryStatement node) => visitStatement(node); |
| 12462 | 13085 |
| 12463 R visitTypeAlias(TypeAlias node) => visitCompilationUnitMember(node); | 13086 R visitTypeAlias(TypeAlias node) => visitCompilationUnitMember(node); |
| 12464 | 13087 |
| 13088 @override |
| 12465 R visitTypeArgumentList(TypeArgumentList node) => visitNode(node); | 13089 R visitTypeArgumentList(TypeArgumentList node) => visitNode(node); |
| 12466 | 13090 |
| 12467 R visitTypedLiteral(TypedLiteral node) => visitLiteral(node); | 13091 R visitTypedLiteral(TypedLiteral node) => visitLiteral(node); |
| 12468 | 13092 |
| 13093 @override |
| 12469 R visitTypeName(TypeName node) => visitNode(node); | 13094 R visitTypeName(TypeName node) => visitNode(node); |
| 12470 | 13095 |
| 13096 @override |
| 12471 R visitTypeParameter(TypeParameter node) => visitNode(node); | 13097 R visitTypeParameter(TypeParameter node) => visitNode(node); |
| 12472 | 13098 |
| 13099 @override |
| 12473 R visitTypeParameterList(TypeParameterList node) => visitNode(node); | 13100 R visitTypeParameterList(TypeParameterList node) => visitNode(node); |
| 12474 | 13101 |
| 12475 R visitUriBasedDirective(UriBasedDirective node) => visitDirective(node); | 13102 R visitUriBasedDirective(UriBasedDirective node) => visitDirective(node); |
| 12476 | 13103 |
| 13104 @override |
| 12477 R visitVariableDeclaration(VariableDeclaration node) => visitDeclaration(node)
; | 13105 R visitVariableDeclaration(VariableDeclaration node) => visitDeclaration(node)
; |
| 12478 | 13106 |
| 13107 @override |
| 12479 R visitVariableDeclarationList(VariableDeclarationList node) => visitNode(node
); | 13108 R visitVariableDeclarationList(VariableDeclarationList node) => visitNode(node
); |
| 12480 | 13109 |
| 13110 @override |
| 12481 R visitVariableDeclarationStatement(VariableDeclarationStatement node) => visi
tStatement(node); | 13111 R visitVariableDeclarationStatement(VariableDeclarationStatement node) => visi
tStatement(node); |
| 12482 | 13112 |
| 13113 @override |
| 12483 R visitWhileStatement(WhileStatement node) => visitStatement(node); | 13114 R visitWhileStatement(WhileStatement node) => visitStatement(node); |
| 12484 | 13115 |
| 13116 @override |
| 12485 R visitWithClause(WithClause node) => visitNode(node); | 13117 R visitWithClause(WithClause node) => visitNode(node); |
| 12486 } | 13118 } |
| 12487 | 13119 |
| 12488 /** | 13120 /** |
| 12489 * Instances of the class `NodeLocator` locate the [AstNode] associated with a | 13121 * Instances of the class `NodeLocator` locate the [AstNode] associated with a |
| 12490 * source range, given the AST structure built from the source. More specificall
y, they will return | 13122 * source range, given the AST structure built from the source. More specificall
y, they will return |
| 12491 * the [AstNode] with the shortest length whose source range completely encompas
ses | 13123 * the [AstNode] with the shortest length whose source range completely encompas
ses |
| 12492 * the specified range. | 13124 * the specified range. |
| 12493 */ | 13125 */ |
| 12494 class NodeLocator extends UnifyingAstVisitor<Object> { | 13126 class NodeLocator extends UnifyingAstVisitor<Object> { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12551 try { | 13183 try { |
| 12552 node.accept(this); | 13184 node.accept(this); |
| 12553 } on NodeLocator_NodeFoundException catch (exception) { | 13185 } on NodeLocator_NodeFoundException catch (exception) { |
| 12554 } on JavaException catch (exception) { | 13186 } on JavaException catch (exception) { |
| 12555 AnalysisEngine.instance.logger.logInformation2("Unable to locate element a
t offset (${_startOffset} - ${_endOffset})", exception); | 13187 AnalysisEngine.instance.logger.logInformation2("Unable to locate element a
t offset (${_startOffset} - ${_endOffset})", exception); |
| 12556 return null; | 13188 return null; |
| 12557 } | 13189 } |
| 12558 return _foundNode; | 13190 return _foundNode; |
| 12559 } | 13191 } |
| 12560 | 13192 |
| 13193 @override |
| 12561 Object visitNode(AstNode node) { | 13194 Object visitNode(AstNode node) { |
| 12562 int start = node.offset; | 13195 int start = node.offset; |
| 12563 int end = start + node.length; | 13196 int end = start + node.length; |
| 12564 if (end < _startOffset) { | 13197 if (end < _startOffset) { |
| 12565 return null; | 13198 return null; |
| 12566 } | 13199 } |
| 12567 if (start > _endOffset) { | 13200 if (start > _endOffset) { |
| 12568 return null; | 13201 return null; |
| 12569 } | 13202 } |
| 12570 try { | 13203 try { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 12594 /** | 13227 /** |
| 12595 * Instances of the class `RecursiveAstVisitor` implement an AST visitor that wi
ll recursively | 13228 * Instances of the class `RecursiveAstVisitor` implement an AST visitor that wi
ll recursively |
| 12596 * visit all of the nodes in an AST structure. For example, using an instance of
this class to visit | 13229 * visit all of the nodes in an AST structure. For example, using an instance of
this class to visit |
| 12597 * a [Block] will also cause all of the statements in the block to be visited. | 13230 * a [Block] will also cause all of the statements in the block to be visited. |
| 12598 * | 13231 * |
| 12599 * Subclasses that override a visit method must either invoke the overridden vis
it method or must | 13232 * Subclasses that override a visit method must either invoke the overridden vis
it method or must |
| 12600 * explicitly ask the visited node to visit its children. Failure to do so will
cause the children | 13233 * explicitly ask the visited node to visit its children. Failure to do so will
cause the children |
| 12601 * of the visited node to not be visited. | 13234 * of the visited node to not be visited. |
| 12602 */ | 13235 */ |
| 12603 class RecursiveAstVisitor<R> implements AstVisitor<R> { | 13236 class RecursiveAstVisitor<R> implements AstVisitor<R> { |
| 13237 @override |
| 12604 R visitAdjacentStrings(AdjacentStrings node) { | 13238 R visitAdjacentStrings(AdjacentStrings node) { |
| 12605 node.visitChildren(this); | 13239 node.visitChildren(this); |
| 12606 return null; | 13240 return null; |
| 12607 } | 13241 } |
| 12608 | 13242 |
| 13243 @override |
| 12609 R visitAnnotation(Annotation node) { | 13244 R visitAnnotation(Annotation node) { |
| 12610 node.visitChildren(this); | 13245 node.visitChildren(this); |
| 12611 return null; | 13246 return null; |
| 12612 } | 13247 } |
| 12613 | 13248 |
| 13249 @override |
| 12614 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) { | 13250 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) { |
| 12615 node.visitChildren(this); | 13251 node.visitChildren(this); |
| 12616 return null; | 13252 return null; |
| 12617 } | 13253 } |
| 12618 | 13254 |
| 13255 @override |
| 12619 R visitArgumentList(ArgumentList node) { | 13256 R visitArgumentList(ArgumentList node) { |
| 12620 node.visitChildren(this); | 13257 node.visitChildren(this); |
| 12621 return null; | 13258 return null; |
| 12622 } | 13259 } |
| 12623 | 13260 |
| 13261 @override |
| 12624 R visitAsExpression(AsExpression node) { | 13262 R visitAsExpression(AsExpression node) { |
| 12625 node.visitChildren(this); | 13263 node.visitChildren(this); |
| 12626 return null; | 13264 return null; |
| 12627 } | 13265 } |
| 12628 | 13266 |
| 13267 @override |
| 12629 R visitAssertStatement(AssertStatement node) { | 13268 R visitAssertStatement(AssertStatement node) { |
| 12630 node.visitChildren(this); | 13269 node.visitChildren(this); |
| 12631 return null; | 13270 return null; |
| 12632 } | 13271 } |
| 12633 | 13272 |
| 13273 @override |
| 12634 R visitAssignmentExpression(AssignmentExpression node) { | 13274 R visitAssignmentExpression(AssignmentExpression node) { |
| 12635 node.visitChildren(this); | 13275 node.visitChildren(this); |
| 12636 return null; | 13276 return null; |
| 12637 } | 13277 } |
| 12638 | 13278 |
| 13279 @override |
| 12639 R visitBinaryExpression(BinaryExpression node) { | 13280 R visitBinaryExpression(BinaryExpression node) { |
| 12640 node.visitChildren(this); | 13281 node.visitChildren(this); |
| 12641 return null; | 13282 return null; |
| 12642 } | 13283 } |
| 12643 | 13284 |
| 13285 @override |
| 12644 R visitBlock(Block node) { | 13286 R visitBlock(Block node) { |
| 12645 node.visitChildren(this); | 13287 node.visitChildren(this); |
| 12646 return null; | 13288 return null; |
| 12647 } | 13289 } |
| 12648 | 13290 |
| 13291 @override |
| 12649 R visitBlockFunctionBody(BlockFunctionBody node) { | 13292 R visitBlockFunctionBody(BlockFunctionBody node) { |
| 12650 node.visitChildren(this); | 13293 node.visitChildren(this); |
| 12651 return null; | 13294 return null; |
| 12652 } | 13295 } |
| 12653 | 13296 |
| 13297 @override |
| 12654 R visitBooleanLiteral(BooleanLiteral node) { | 13298 R visitBooleanLiteral(BooleanLiteral node) { |
| 12655 node.visitChildren(this); | 13299 node.visitChildren(this); |
| 12656 return null; | 13300 return null; |
| 12657 } | 13301 } |
| 12658 | 13302 |
| 13303 @override |
| 12659 R visitBreakStatement(BreakStatement node) { | 13304 R visitBreakStatement(BreakStatement node) { |
| 12660 node.visitChildren(this); | 13305 node.visitChildren(this); |
| 12661 return null; | 13306 return null; |
| 12662 } | 13307 } |
| 12663 | 13308 |
| 13309 @override |
| 12664 R visitCascadeExpression(CascadeExpression node) { | 13310 R visitCascadeExpression(CascadeExpression node) { |
| 12665 node.visitChildren(this); | 13311 node.visitChildren(this); |
| 12666 return null; | 13312 return null; |
| 12667 } | 13313 } |
| 12668 | 13314 |
| 13315 @override |
| 12669 R visitCatchClause(CatchClause node) { | 13316 R visitCatchClause(CatchClause node) { |
| 12670 node.visitChildren(this); | 13317 node.visitChildren(this); |
| 12671 return null; | 13318 return null; |
| 12672 } | 13319 } |
| 12673 | 13320 |
| 13321 @override |
| 12674 R visitClassDeclaration(ClassDeclaration node) { | 13322 R visitClassDeclaration(ClassDeclaration node) { |
| 12675 node.visitChildren(this); | 13323 node.visitChildren(this); |
| 12676 return null; | 13324 return null; |
| 12677 } | 13325 } |
| 12678 | 13326 |
| 13327 @override |
| 12679 R visitClassTypeAlias(ClassTypeAlias node) { | 13328 R visitClassTypeAlias(ClassTypeAlias node) { |
| 12680 node.visitChildren(this); | 13329 node.visitChildren(this); |
| 12681 return null; | 13330 return null; |
| 12682 } | 13331 } |
| 12683 | 13332 |
| 13333 @override |
| 12684 R visitComment(Comment node) { | 13334 R visitComment(Comment node) { |
| 12685 node.visitChildren(this); | 13335 node.visitChildren(this); |
| 12686 return null; | 13336 return null; |
| 12687 } | 13337 } |
| 12688 | 13338 |
| 13339 @override |
| 12689 R visitCommentReference(CommentReference node) { | 13340 R visitCommentReference(CommentReference node) { |
| 12690 node.visitChildren(this); | 13341 node.visitChildren(this); |
| 12691 return null; | 13342 return null; |
| 12692 } | 13343 } |
| 12693 | 13344 |
| 13345 @override |
| 12694 R visitCompilationUnit(CompilationUnit node) { | 13346 R visitCompilationUnit(CompilationUnit node) { |
| 12695 node.visitChildren(this); | 13347 node.visitChildren(this); |
| 12696 return null; | 13348 return null; |
| 12697 } | 13349 } |
| 12698 | 13350 |
| 13351 @override |
| 12699 R visitConditionalExpression(ConditionalExpression node) { | 13352 R visitConditionalExpression(ConditionalExpression node) { |
| 12700 node.visitChildren(this); | 13353 node.visitChildren(this); |
| 12701 return null; | 13354 return null; |
| 12702 } | 13355 } |
| 12703 | 13356 |
| 13357 @override |
| 12704 R visitConstructorDeclaration(ConstructorDeclaration node) { | 13358 R visitConstructorDeclaration(ConstructorDeclaration node) { |
| 12705 node.visitChildren(this); | 13359 node.visitChildren(this); |
| 12706 return null; | 13360 return null; |
| 12707 } | 13361 } |
| 12708 | 13362 |
| 13363 @override |
| 12709 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) { | 13364 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) { |
| 12710 node.visitChildren(this); | 13365 node.visitChildren(this); |
| 12711 return null; | 13366 return null; |
| 12712 } | 13367 } |
| 12713 | 13368 |
| 13369 @override |
| 12714 R visitConstructorName(ConstructorName node) { | 13370 R visitConstructorName(ConstructorName node) { |
| 12715 node.visitChildren(this); | 13371 node.visitChildren(this); |
| 12716 return null; | 13372 return null; |
| 12717 } | 13373 } |
| 12718 | 13374 |
| 13375 @override |
| 12719 R visitContinueStatement(ContinueStatement node) { | 13376 R visitContinueStatement(ContinueStatement node) { |
| 12720 node.visitChildren(this); | 13377 node.visitChildren(this); |
| 12721 return null; | 13378 return null; |
| 12722 } | 13379 } |
| 12723 | 13380 |
| 13381 @override |
| 12724 R visitDeclaredIdentifier(DeclaredIdentifier node) { | 13382 R visitDeclaredIdentifier(DeclaredIdentifier node) { |
| 12725 node.visitChildren(this); | 13383 node.visitChildren(this); |
| 12726 return null; | 13384 return null; |
| 12727 } | 13385 } |
| 12728 | 13386 |
| 13387 @override |
| 12729 R visitDefaultFormalParameter(DefaultFormalParameter node) { | 13388 R visitDefaultFormalParameter(DefaultFormalParameter node) { |
| 12730 node.visitChildren(this); | 13389 node.visitChildren(this); |
| 12731 return null; | 13390 return null; |
| 12732 } | 13391 } |
| 12733 | 13392 |
| 13393 @override |
| 12734 R visitDoStatement(DoStatement node) { | 13394 R visitDoStatement(DoStatement node) { |
| 12735 node.visitChildren(this); | 13395 node.visitChildren(this); |
| 12736 return null; | 13396 return null; |
| 12737 } | 13397 } |
| 12738 | 13398 |
| 13399 @override |
| 12739 R visitDoubleLiteral(DoubleLiteral node) { | 13400 R visitDoubleLiteral(DoubleLiteral node) { |
| 12740 node.visitChildren(this); | 13401 node.visitChildren(this); |
| 12741 return null; | 13402 return null; |
| 12742 } | 13403 } |
| 12743 | 13404 |
| 13405 @override |
| 12744 R visitEmptyFunctionBody(EmptyFunctionBody node) { | 13406 R visitEmptyFunctionBody(EmptyFunctionBody node) { |
| 12745 node.visitChildren(this); | 13407 node.visitChildren(this); |
| 12746 return null; | 13408 return null; |
| 12747 } | 13409 } |
| 12748 | 13410 |
| 13411 @override |
| 12749 R visitEmptyStatement(EmptyStatement node) { | 13412 R visitEmptyStatement(EmptyStatement node) { |
| 12750 node.visitChildren(this); | 13413 node.visitChildren(this); |
| 12751 return null; | 13414 return null; |
| 12752 } | 13415 } |
| 12753 | 13416 |
| 13417 @override |
| 12754 R visitExportDirective(ExportDirective node) { | 13418 R visitExportDirective(ExportDirective node) { |
| 12755 node.visitChildren(this); | 13419 node.visitChildren(this); |
| 12756 return null; | 13420 return null; |
| 12757 } | 13421 } |
| 12758 | 13422 |
| 13423 @override |
| 12759 R visitExpressionFunctionBody(ExpressionFunctionBody node) { | 13424 R visitExpressionFunctionBody(ExpressionFunctionBody node) { |
| 12760 node.visitChildren(this); | 13425 node.visitChildren(this); |
| 12761 return null; | 13426 return null; |
| 12762 } | 13427 } |
| 12763 | 13428 |
| 13429 @override |
| 12764 R visitExpressionStatement(ExpressionStatement node) { | 13430 R visitExpressionStatement(ExpressionStatement node) { |
| 12765 node.visitChildren(this); | 13431 node.visitChildren(this); |
| 12766 return null; | 13432 return null; |
| 12767 } | 13433 } |
| 12768 | 13434 |
| 13435 @override |
| 12769 R visitExtendsClause(ExtendsClause node) { | 13436 R visitExtendsClause(ExtendsClause node) { |
| 12770 node.visitChildren(this); | 13437 node.visitChildren(this); |
| 12771 return null; | 13438 return null; |
| 12772 } | 13439 } |
| 12773 | 13440 |
| 13441 @override |
| 12774 R visitFieldDeclaration(FieldDeclaration node) { | 13442 R visitFieldDeclaration(FieldDeclaration node) { |
| 12775 node.visitChildren(this); | 13443 node.visitChildren(this); |
| 12776 return null; | 13444 return null; |
| 12777 } | 13445 } |
| 12778 | 13446 |
| 13447 @override |
| 12779 R visitFieldFormalParameter(FieldFormalParameter node) { | 13448 R visitFieldFormalParameter(FieldFormalParameter node) { |
| 12780 node.visitChildren(this); | 13449 node.visitChildren(this); |
| 12781 return null; | 13450 return null; |
| 12782 } | 13451 } |
| 12783 | 13452 |
| 13453 @override |
| 12784 R visitForEachStatement(ForEachStatement node) { | 13454 R visitForEachStatement(ForEachStatement node) { |
| 12785 node.visitChildren(this); | 13455 node.visitChildren(this); |
| 12786 return null; | 13456 return null; |
| 12787 } | 13457 } |
| 12788 | 13458 |
| 13459 @override |
| 12789 R visitFormalParameterList(FormalParameterList node) { | 13460 R visitFormalParameterList(FormalParameterList node) { |
| 12790 node.visitChildren(this); | 13461 node.visitChildren(this); |
| 12791 return null; | 13462 return null; |
| 12792 } | 13463 } |
| 12793 | 13464 |
| 13465 @override |
| 12794 R visitForStatement(ForStatement node) { | 13466 R visitForStatement(ForStatement node) { |
| 12795 node.visitChildren(this); | 13467 node.visitChildren(this); |
| 12796 return null; | 13468 return null; |
| 12797 } | 13469 } |
| 12798 | 13470 |
| 13471 @override |
| 12799 R visitFunctionDeclaration(FunctionDeclaration node) { | 13472 R visitFunctionDeclaration(FunctionDeclaration node) { |
| 12800 node.visitChildren(this); | 13473 node.visitChildren(this); |
| 12801 return null; | 13474 return null; |
| 12802 } | 13475 } |
| 12803 | 13476 |
| 13477 @override |
| 12804 R visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { | 13478 R visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { |
| 12805 node.visitChildren(this); | 13479 node.visitChildren(this); |
| 12806 return null; | 13480 return null; |
| 12807 } | 13481 } |
| 12808 | 13482 |
| 13483 @override |
| 12809 R visitFunctionExpression(FunctionExpression node) { | 13484 R visitFunctionExpression(FunctionExpression node) { |
| 12810 node.visitChildren(this); | 13485 node.visitChildren(this); |
| 12811 return null; | 13486 return null; |
| 12812 } | 13487 } |
| 12813 | 13488 |
| 13489 @override |
| 12814 R visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { | 13490 R visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { |
| 12815 node.visitChildren(this); | 13491 node.visitChildren(this); |
| 12816 return null; | 13492 return null; |
| 12817 } | 13493 } |
| 12818 | 13494 |
| 13495 @override |
| 12819 R visitFunctionTypeAlias(FunctionTypeAlias node) { | 13496 R visitFunctionTypeAlias(FunctionTypeAlias node) { |
| 12820 node.visitChildren(this); | 13497 node.visitChildren(this); |
| 12821 return null; | 13498 return null; |
| 12822 } | 13499 } |
| 12823 | 13500 |
| 13501 @override |
| 12824 R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { | 13502 R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { |
| 12825 node.visitChildren(this); | 13503 node.visitChildren(this); |
| 12826 return null; | 13504 return null; |
| 12827 } | 13505 } |
| 12828 | 13506 |
| 13507 @override |
| 12829 R visitHideCombinator(HideCombinator node) { | 13508 R visitHideCombinator(HideCombinator node) { |
| 12830 node.visitChildren(this); | 13509 node.visitChildren(this); |
| 12831 return null; | 13510 return null; |
| 12832 } | 13511 } |
| 12833 | 13512 |
| 13513 @override |
| 12834 R visitIfStatement(IfStatement node) { | 13514 R visitIfStatement(IfStatement node) { |
| 12835 node.visitChildren(this); | 13515 node.visitChildren(this); |
| 12836 return null; | 13516 return null; |
| 12837 } | 13517 } |
| 12838 | 13518 |
| 13519 @override |
| 12839 R visitImplementsClause(ImplementsClause node) { | 13520 R visitImplementsClause(ImplementsClause node) { |
| 12840 node.visitChildren(this); | 13521 node.visitChildren(this); |
| 12841 return null; | 13522 return null; |
| 12842 } | 13523 } |
| 12843 | 13524 |
| 13525 @override |
| 12844 R visitImportDirective(ImportDirective node) { | 13526 R visitImportDirective(ImportDirective node) { |
| 12845 node.visitChildren(this); | 13527 node.visitChildren(this); |
| 12846 return null; | 13528 return null; |
| 12847 } | 13529 } |
| 12848 | 13530 |
| 13531 @override |
| 12849 R visitIndexExpression(IndexExpression node) { | 13532 R visitIndexExpression(IndexExpression node) { |
| 12850 node.visitChildren(this); | 13533 node.visitChildren(this); |
| 12851 return null; | 13534 return null; |
| 12852 } | 13535 } |
| 12853 | 13536 |
| 13537 @override |
| 12854 R visitInstanceCreationExpression(InstanceCreationExpression node) { | 13538 R visitInstanceCreationExpression(InstanceCreationExpression node) { |
| 12855 node.visitChildren(this); | 13539 node.visitChildren(this); |
| 12856 return null; | 13540 return null; |
| 12857 } | 13541 } |
| 12858 | 13542 |
| 13543 @override |
| 12859 R visitIntegerLiteral(IntegerLiteral node) { | 13544 R visitIntegerLiteral(IntegerLiteral node) { |
| 12860 node.visitChildren(this); | 13545 node.visitChildren(this); |
| 12861 return null; | 13546 return null; |
| 12862 } | 13547 } |
| 12863 | 13548 |
| 13549 @override |
| 12864 R visitInterpolationExpression(InterpolationExpression node) { | 13550 R visitInterpolationExpression(InterpolationExpression node) { |
| 12865 node.visitChildren(this); | 13551 node.visitChildren(this); |
| 12866 return null; | 13552 return null; |
| 12867 } | 13553 } |
| 12868 | 13554 |
| 13555 @override |
| 12869 R visitInterpolationString(InterpolationString node) { | 13556 R visitInterpolationString(InterpolationString node) { |
| 12870 node.visitChildren(this); | 13557 node.visitChildren(this); |
| 12871 return null; | 13558 return null; |
| 12872 } | 13559 } |
| 12873 | 13560 |
| 13561 @override |
| 12874 R visitIsExpression(IsExpression node) { | 13562 R visitIsExpression(IsExpression node) { |
| 12875 node.visitChildren(this); | 13563 node.visitChildren(this); |
| 12876 return null; | 13564 return null; |
| 12877 } | 13565 } |
| 12878 | 13566 |
| 13567 @override |
| 12879 R visitLabel(Label node) { | 13568 R visitLabel(Label node) { |
| 12880 node.visitChildren(this); | 13569 node.visitChildren(this); |
| 12881 return null; | 13570 return null; |
| 12882 } | 13571 } |
| 12883 | 13572 |
| 13573 @override |
| 12884 R visitLabeledStatement(LabeledStatement node) { | 13574 R visitLabeledStatement(LabeledStatement node) { |
| 12885 node.visitChildren(this); | 13575 node.visitChildren(this); |
| 12886 return null; | 13576 return null; |
| 12887 } | 13577 } |
| 12888 | 13578 |
| 13579 @override |
| 12889 R visitLibraryDirective(LibraryDirective node) { | 13580 R visitLibraryDirective(LibraryDirective node) { |
| 12890 node.visitChildren(this); | 13581 node.visitChildren(this); |
| 12891 return null; | 13582 return null; |
| 12892 } | 13583 } |
| 12893 | 13584 |
| 13585 @override |
| 12894 R visitLibraryIdentifier(LibraryIdentifier node) { | 13586 R visitLibraryIdentifier(LibraryIdentifier node) { |
| 12895 node.visitChildren(this); | 13587 node.visitChildren(this); |
| 12896 return null; | 13588 return null; |
| 12897 } | 13589 } |
| 12898 | 13590 |
| 13591 @override |
| 12899 R visitListLiteral(ListLiteral node) { | 13592 R visitListLiteral(ListLiteral node) { |
| 12900 node.visitChildren(this); | 13593 node.visitChildren(this); |
| 12901 return null; | 13594 return null; |
| 12902 } | 13595 } |
| 12903 | 13596 |
| 13597 @override |
| 12904 R visitMapLiteral(MapLiteral node) { | 13598 R visitMapLiteral(MapLiteral node) { |
| 12905 node.visitChildren(this); | 13599 node.visitChildren(this); |
| 12906 return null; | 13600 return null; |
| 12907 } | 13601 } |
| 12908 | 13602 |
| 13603 @override |
| 12909 R visitMapLiteralEntry(MapLiteralEntry node) { | 13604 R visitMapLiteralEntry(MapLiteralEntry node) { |
| 12910 node.visitChildren(this); | 13605 node.visitChildren(this); |
| 12911 return null; | 13606 return null; |
| 12912 } | 13607 } |
| 12913 | 13608 |
| 13609 @override |
| 12914 R visitMethodDeclaration(MethodDeclaration node) { | 13610 R visitMethodDeclaration(MethodDeclaration node) { |
| 12915 node.visitChildren(this); | 13611 node.visitChildren(this); |
| 12916 return null; | 13612 return null; |
| 12917 } | 13613 } |
| 12918 | 13614 |
| 13615 @override |
| 12919 R visitMethodInvocation(MethodInvocation node) { | 13616 R visitMethodInvocation(MethodInvocation node) { |
| 12920 node.visitChildren(this); | 13617 node.visitChildren(this); |
| 12921 return null; | 13618 return null; |
| 12922 } | 13619 } |
| 12923 | 13620 |
| 13621 @override |
| 12924 R visitNamedExpression(NamedExpression node) { | 13622 R visitNamedExpression(NamedExpression node) { |
| 12925 node.visitChildren(this); | 13623 node.visitChildren(this); |
| 12926 return null; | 13624 return null; |
| 12927 } | 13625 } |
| 12928 | 13626 |
| 13627 @override |
| 12929 R visitNativeClause(NativeClause node) { | 13628 R visitNativeClause(NativeClause node) { |
| 12930 node.visitChildren(this); | 13629 node.visitChildren(this); |
| 12931 return null; | 13630 return null; |
| 12932 } | 13631 } |
| 12933 | 13632 |
| 13633 @override |
| 12934 R visitNativeFunctionBody(NativeFunctionBody node) { | 13634 R visitNativeFunctionBody(NativeFunctionBody node) { |
| 12935 node.visitChildren(this); | 13635 node.visitChildren(this); |
| 12936 return null; | 13636 return null; |
| 12937 } | 13637 } |
| 12938 | 13638 |
| 13639 @override |
| 12939 R visitNullLiteral(NullLiteral node) { | 13640 R visitNullLiteral(NullLiteral node) { |
| 12940 node.visitChildren(this); | 13641 node.visitChildren(this); |
| 12941 return null; | 13642 return null; |
| 12942 } | 13643 } |
| 12943 | 13644 |
| 13645 @override |
| 12944 R visitParenthesizedExpression(ParenthesizedExpression node) { | 13646 R visitParenthesizedExpression(ParenthesizedExpression node) { |
| 12945 node.visitChildren(this); | 13647 node.visitChildren(this); |
| 12946 return null; | 13648 return null; |
| 12947 } | 13649 } |
| 12948 | 13650 |
| 13651 @override |
| 12949 R visitPartDirective(PartDirective node) { | 13652 R visitPartDirective(PartDirective node) { |
| 12950 node.visitChildren(this); | 13653 node.visitChildren(this); |
| 12951 return null; | 13654 return null; |
| 12952 } | 13655 } |
| 12953 | 13656 |
| 13657 @override |
| 12954 R visitPartOfDirective(PartOfDirective node) { | 13658 R visitPartOfDirective(PartOfDirective node) { |
| 12955 node.visitChildren(this); | 13659 node.visitChildren(this); |
| 12956 return null; | 13660 return null; |
| 12957 } | 13661 } |
| 12958 | 13662 |
| 13663 @override |
| 12959 R visitPostfixExpression(PostfixExpression node) { | 13664 R visitPostfixExpression(PostfixExpression node) { |
| 12960 node.visitChildren(this); | 13665 node.visitChildren(this); |
| 12961 return null; | 13666 return null; |
| 12962 } | 13667 } |
| 12963 | 13668 |
| 13669 @override |
| 12964 R visitPrefixedIdentifier(PrefixedIdentifier node) { | 13670 R visitPrefixedIdentifier(PrefixedIdentifier node) { |
| 12965 node.visitChildren(this); | 13671 node.visitChildren(this); |
| 12966 return null; | 13672 return null; |
| 12967 } | 13673 } |
| 12968 | 13674 |
| 13675 @override |
| 12969 R visitPrefixExpression(PrefixExpression node) { | 13676 R visitPrefixExpression(PrefixExpression node) { |
| 12970 node.visitChildren(this); | 13677 node.visitChildren(this); |
| 12971 return null; | 13678 return null; |
| 12972 } | 13679 } |
| 12973 | 13680 |
| 13681 @override |
| 12974 R visitPropertyAccess(PropertyAccess node) { | 13682 R visitPropertyAccess(PropertyAccess node) { |
| 12975 node.visitChildren(this); | 13683 node.visitChildren(this); |
| 12976 return null; | 13684 return null; |
| 12977 } | 13685 } |
| 12978 | 13686 |
| 13687 @override |
| 12979 R visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node)
{ | 13688 R visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node)
{ |
| 12980 node.visitChildren(this); | 13689 node.visitChildren(this); |
| 12981 return null; | 13690 return null; |
| 12982 } | 13691 } |
| 12983 | 13692 |
| 13693 @override |
| 12984 R visitRethrowExpression(RethrowExpression node) { | 13694 R visitRethrowExpression(RethrowExpression node) { |
| 12985 node.visitChildren(this); | 13695 node.visitChildren(this); |
| 12986 return null; | 13696 return null; |
| 12987 } | 13697 } |
| 12988 | 13698 |
| 13699 @override |
| 12989 R visitReturnStatement(ReturnStatement node) { | 13700 R visitReturnStatement(ReturnStatement node) { |
| 12990 node.visitChildren(this); | 13701 node.visitChildren(this); |
| 12991 return null; | 13702 return null; |
| 12992 } | 13703 } |
| 12993 | 13704 |
| 13705 @override |
| 12994 R visitScriptTag(ScriptTag node) { | 13706 R visitScriptTag(ScriptTag node) { |
| 12995 node.visitChildren(this); | 13707 node.visitChildren(this); |
| 12996 return null; | 13708 return null; |
| 12997 } | 13709 } |
| 12998 | 13710 |
| 13711 @override |
| 12999 R visitShowCombinator(ShowCombinator node) { | 13712 R visitShowCombinator(ShowCombinator node) { |
| 13000 node.visitChildren(this); | 13713 node.visitChildren(this); |
| 13001 return null; | 13714 return null; |
| 13002 } | 13715 } |
| 13003 | 13716 |
| 13717 @override |
| 13004 R visitSimpleFormalParameter(SimpleFormalParameter node) { | 13718 R visitSimpleFormalParameter(SimpleFormalParameter node) { |
| 13005 node.visitChildren(this); | 13719 node.visitChildren(this); |
| 13006 return null; | 13720 return null; |
| 13007 } | 13721 } |
| 13008 | 13722 |
| 13723 @override |
| 13009 R visitSimpleIdentifier(SimpleIdentifier node) { | 13724 R visitSimpleIdentifier(SimpleIdentifier node) { |
| 13010 node.visitChildren(this); | 13725 node.visitChildren(this); |
| 13011 return null; | 13726 return null; |
| 13012 } | 13727 } |
| 13013 | 13728 |
| 13729 @override |
| 13014 R visitSimpleStringLiteral(SimpleStringLiteral node) { | 13730 R visitSimpleStringLiteral(SimpleStringLiteral node) { |
| 13015 node.visitChildren(this); | 13731 node.visitChildren(this); |
| 13016 return null; | 13732 return null; |
| 13017 } | 13733 } |
| 13018 | 13734 |
| 13735 @override |
| 13019 R visitStringInterpolation(StringInterpolation node) { | 13736 R visitStringInterpolation(StringInterpolation node) { |
| 13020 node.visitChildren(this); | 13737 node.visitChildren(this); |
| 13021 return null; | 13738 return null; |
| 13022 } | 13739 } |
| 13023 | 13740 |
| 13741 @override |
| 13024 R visitSuperConstructorInvocation(SuperConstructorInvocation node) { | 13742 R visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
| 13025 node.visitChildren(this); | 13743 node.visitChildren(this); |
| 13026 return null; | 13744 return null; |
| 13027 } | 13745 } |
| 13028 | 13746 |
| 13747 @override |
| 13029 R visitSuperExpression(SuperExpression node) { | 13748 R visitSuperExpression(SuperExpression node) { |
| 13030 node.visitChildren(this); | 13749 node.visitChildren(this); |
| 13031 return null; | 13750 return null; |
| 13032 } | 13751 } |
| 13033 | 13752 |
| 13753 @override |
| 13034 R visitSwitchCase(SwitchCase node) { | 13754 R visitSwitchCase(SwitchCase node) { |
| 13035 node.visitChildren(this); | 13755 node.visitChildren(this); |
| 13036 return null; | 13756 return null; |
| 13037 } | 13757 } |
| 13038 | 13758 |
| 13759 @override |
| 13039 R visitSwitchDefault(SwitchDefault node) { | 13760 R visitSwitchDefault(SwitchDefault node) { |
| 13040 node.visitChildren(this); | 13761 node.visitChildren(this); |
| 13041 return null; | 13762 return null; |
| 13042 } | 13763 } |
| 13043 | 13764 |
| 13765 @override |
| 13044 R visitSwitchStatement(SwitchStatement node) { | 13766 R visitSwitchStatement(SwitchStatement node) { |
| 13045 node.visitChildren(this); | 13767 node.visitChildren(this); |
| 13046 return null; | 13768 return null; |
| 13047 } | 13769 } |
| 13048 | 13770 |
| 13771 @override |
| 13049 R visitSymbolLiteral(SymbolLiteral node) { | 13772 R visitSymbolLiteral(SymbolLiteral node) { |
| 13050 node.visitChildren(this); | 13773 node.visitChildren(this); |
| 13051 return null; | 13774 return null; |
| 13052 } | 13775 } |
| 13053 | 13776 |
| 13777 @override |
| 13054 R visitThisExpression(ThisExpression node) { | 13778 R visitThisExpression(ThisExpression node) { |
| 13055 node.visitChildren(this); | 13779 node.visitChildren(this); |
| 13056 return null; | 13780 return null; |
| 13057 } | 13781 } |
| 13058 | 13782 |
| 13783 @override |
| 13059 R visitThrowExpression(ThrowExpression node) { | 13784 R visitThrowExpression(ThrowExpression node) { |
| 13060 node.visitChildren(this); | 13785 node.visitChildren(this); |
| 13061 return null; | 13786 return null; |
| 13062 } | 13787 } |
| 13063 | 13788 |
| 13789 @override |
| 13064 R visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { | 13790 R visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { |
| 13065 node.visitChildren(this); | 13791 node.visitChildren(this); |
| 13066 return null; | 13792 return null; |
| 13067 } | 13793 } |
| 13068 | 13794 |
| 13795 @override |
| 13069 R visitTryStatement(TryStatement node) { | 13796 R visitTryStatement(TryStatement node) { |
| 13070 node.visitChildren(this); | 13797 node.visitChildren(this); |
| 13071 return null; | 13798 return null; |
| 13072 } | 13799 } |
| 13073 | 13800 |
| 13801 @override |
| 13074 R visitTypeArgumentList(TypeArgumentList node) { | 13802 R visitTypeArgumentList(TypeArgumentList node) { |
| 13075 node.visitChildren(this); | 13803 node.visitChildren(this); |
| 13076 return null; | 13804 return null; |
| 13077 } | 13805 } |
| 13078 | 13806 |
| 13807 @override |
| 13079 R visitTypeName(TypeName node) { | 13808 R visitTypeName(TypeName node) { |
| 13080 node.visitChildren(this); | 13809 node.visitChildren(this); |
| 13081 return null; | 13810 return null; |
| 13082 } | 13811 } |
| 13083 | 13812 |
| 13813 @override |
| 13084 R visitTypeParameter(TypeParameter node) { | 13814 R visitTypeParameter(TypeParameter node) { |
| 13085 node.visitChildren(this); | 13815 node.visitChildren(this); |
| 13086 return null; | 13816 return null; |
| 13087 } | 13817 } |
| 13088 | 13818 |
| 13819 @override |
| 13089 R visitTypeParameterList(TypeParameterList node) { | 13820 R visitTypeParameterList(TypeParameterList node) { |
| 13090 node.visitChildren(this); | 13821 node.visitChildren(this); |
| 13091 return null; | 13822 return null; |
| 13092 } | 13823 } |
| 13093 | 13824 |
| 13825 @override |
| 13094 R visitVariableDeclaration(VariableDeclaration node) { | 13826 R visitVariableDeclaration(VariableDeclaration node) { |
| 13095 node.visitChildren(this); | 13827 node.visitChildren(this); |
| 13096 return null; | 13828 return null; |
| 13097 } | 13829 } |
| 13098 | 13830 |
| 13831 @override |
| 13099 R visitVariableDeclarationList(VariableDeclarationList node) { | 13832 R visitVariableDeclarationList(VariableDeclarationList node) { |
| 13100 node.visitChildren(this); | 13833 node.visitChildren(this); |
| 13101 return null; | 13834 return null; |
| 13102 } | 13835 } |
| 13103 | 13836 |
| 13837 @override |
| 13104 R visitVariableDeclarationStatement(VariableDeclarationStatement node) { | 13838 R visitVariableDeclarationStatement(VariableDeclarationStatement node) { |
| 13105 node.visitChildren(this); | 13839 node.visitChildren(this); |
| 13106 return null; | 13840 return null; |
| 13107 } | 13841 } |
| 13108 | 13842 |
| 13843 @override |
| 13109 R visitWhileStatement(WhileStatement node) { | 13844 R visitWhileStatement(WhileStatement node) { |
| 13110 node.visitChildren(this); | 13845 node.visitChildren(this); |
| 13111 return null; | 13846 return null; |
| 13112 } | 13847 } |
| 13113 | 13848 |
| 13849 @override |
| 13114 R visitWithClause(WithClause node) { | 13850 R visitWithClause(WithClause node) { |
| 13115 node.visitChildren(this); | 13851 node.visitChildren(this); |
| 13116 return null; | 13852 return null; |
| 13117 } | 13853 } |
| 13118 } | 13854 } |
| 13119 | 13855 |
| 13120 /** | 13856 /** |
| 13121 * Instances of the class `SimpleAstVisitor` implement an AST visitor that will
do nothing | 13857 * Instances of the class `SimpleAstVisitor` implement an AST visitor that will
do nothing |
| 13122 * when visiting an AST node. It is intended to be a superclass for classes that
use the visitor | 13858 * when visiting an AST node. It is intended to be a superclass for classes that
use the visitor |
| 13123 * pattern primarily as a dispatch mechanism (and hence don't need to recursivel
y visit a whole | 13859 * pattern primarily as a dispatch mechanism (and hence don't need to recursivel
y visit a whole |
| 13124 * structure) and that only need to visit a small number of node types. | 13860 * structure) and that only need to visit a small number of node types. |
| 13125 */ | 13861 */ |
| 13126 class SimpleAstVisitor<R> implements AstVisitor<R> { | 13862 class SimpleAstVisitor<R> implements AstVisitor<R> { |
| 13863 @override |
| 13127 R visitAdjacentStrings(AdjacentStrings node) => null; | 13864 R visitAdjacentStrings(AdjacentStrings node) => null; |
| 13128 | 13865 |
| 13866 @override |
| 13129 R visitAnnotation(Annotation node) => null; | 13867 R visitAnnotation(Annotation node) => null; |
| 13130 | 13868 |
| 13869 @override |
| 13131 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => null; | 13870 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => null; |
| 13132 | 13871 |
| 13872 @override |
| 13133 R visitArgumentList(ArgumentList node) => null; | 13873 R visitArgumentList(ArgumentList node) => null; |
| 13134 | 13874 |
| 13875 @override |
| 13135 R visitAsExpression(AsExpression node) => null; | 13876 R visitAsExpression(AsExpression node) => null; |
| 13136 | 13877 |
| 13878 @override |
| 13137 R visitAssertStatement(AssertStatement node) => null; | 13879 R visitAssertStatement(AssertStatement node) => null; |
| 13138 | 13880 |
| 13881 @override |
| 13139 R visitAssignmentExpression(AssignmentExpression node) => null; | 13882 R visitAssignmentExpression(AssignmentExpression node) => null; |
| 13140 | 13883 |
| 13884 @override |
| 13141 R visitBinaryExpression(BinaryExpression node) => null; | 13885 R visitBinaryExpression(BinaryExpression node) => null; |
| 13142 | 13886 |
| 13887 @override |
| 13143 R visitBlock(Block node) => null; | 13888 R visitBlock(Block node) => null; |
| 13144 | 13889 |
| 13890 @override |
| 13145 R visitBlockFunctionBody(BlockFunctionBody node) => null; | 13891 R visitBlockFunctionBody(BlockFunctionBody node) => null; |
| 13146 | 13892 |
| 13893 @override |
| 13147 R visitBooleanLiteral(BooleanLiteral node) => null; | 13894 R visitBooleanLiteral(BooleanLiteral node) => null; |
| 13148 | 13895 |
| 13896 @override |
| 13149 R visitBreakStatement(BreakStatement node) => null; | 13897 R visitBreakStatement(BreakStatement node) => null; |
| 13150 | 13898 |
| 13899 @override |
| 13151 R visitCascadeExpression(CascadeExpression node) => null; | 13900 R visitCascadeExpression(CascadeExpression node) => null; |
| 13152 | 13901 |
| 13902 @override |
| 13153 R visitCatchClause(CatchClause node) => null; | 13903 R visitCatchClause(CatchClause node) => null; |
| 13154 | 13904 |
| 13905 @override |
| 13155 R visitClassDeclaration(ClassDeclaration node) => null; | 13906 R visitClassDeclaration(ClassDeclaration node) => null; |
| 13156 | 13907 |
| 13908 @override |
| 13157 R visitClassTypeAlias(ClassTypeAlias node) => null; | 13909 R visitClassTypeAlias(ClassTypeAlias node) => null; |
| 13158 | 13910 |
| 13911 @override |
| 13159 R visitComment(Comment node) => null; | 13912 R visitComment(Comment node) => null; |
| 13160 | 13913 |
| 13914 @override |
| 13161 R visitCommentReference(CommentReference node) => null; | 13915 R visitCommentReference(CommentReference node) => null; |
| 13162 | 13916 |
| 13917 @override |
| 13163 R visitCompilationUnit(CompilationUnit node) => null; | 13918 R visitCompilationUnit(CompilationUnit node) => null; |
| 13164 | 13919 |
| 13920 @override |
| 13165 R visitConditionalExpression(ConditionalExpression node) => null; | 13921 R visitConditionalExpression(ConditionalExpression node) => null; |
| 13166 | 13922 |
| 13923 @override |
| 13167 R visitConstructorDeclaration(ConstructorDeclaration node) => null; | 13924 R visitConstructorDeclaration(ConstructorDeclaration node) => null; |
| 13168 | 13925 |
| 13926 @override |
| 13169 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) => null; | 13927 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) => null; |
| 13170 | 13928 |
| 13929 @override |
| 13171 R visitConstructorName(ConstructorName node) => null; | 13930 R visitConstructorName(ConstructorName node) => null; |
| 13172 | 13931 |
| 13932 @override |
| 13173 R visitContinueStatement(ContinueStatement node) => null; | 13933 R visitContinueStatement(ContinueStatement node) => null; |
| 13174 | 13934 |
| 13935 @override |
| 13175 R visitDeclaredIdentifier(DeclaredIdentifier node) => null; | 13936 R visitDeclaredIdentifier(DeclaredIdentifier node) => null; |
| 13176 | 13937 |
| 13938 @override |
| 13177 R visitDefaultFormalParameter(DefaultFormalParameter node) => null; | 13939 R visitDefaultFormalParameter(DefaultFormalParameter node) => null; |
| 13178 | 13940 |
| 13941 @override |
| 13179 R visitDoStatement(DoStatement node) => null; | 13942 R visitDoStatement(DoStatement node) => null; |
| 13180 | 13943 |
| 13944 @override |
| 13181 R visitDoubleLiteral(DoubleLiteral node) => null; | 13945 R visitDoubleLiteral(DoubleLiteral node) => null; |
| 13182 | 13946 |
| 13947 @override |
| 13183 R visitEmptyFunctionBody(EmptyFunctionBody node) => null; | 13948 R visitEmptyFunctionBody(EmptyFunctionBody node) => null; |
| 13184 | 13949 |
| 13950 @override |
| 13185 R visitEmptyStatement(EmptyStatement node) => null; | 13951 R visitEmptyStatement(EmptyStatement node) => null; |
| 13186 | 13952 |
| 13953 @override |
| 13187 R visitExportDirective(ExportDirective node) => null; | 13954 R visitExportDirective(ExportDirective node) => null; |
| 13188 | 13955 |
| 13956 @override |
| 13189 R visitExpressionFunctionBody(ExpressionFunctionBody node) => null; | 13957 R visitExpressionFunctionBody(ExpressionFunctionBody node) => null; |
| 13190 | 13958 |
| 13959 @override |
| 13191 R visitExpressionStatement(ExpressionStatement node) => null; | 13960 R visitExpressionStatement(ExpressionStatement node) => null; |
| 13192 | 13961 |
| 13962 @override |
| 13193 R visitExtendsClause(ExtendsClause node) => null; | 13963 R visitExtendsClause(ExtendsClause node) => null; |
| 13194 | 13964 |
| 13965 @override |
| 13195 R visitFieldDeclaration(FieldDeclaration node) => null; | 13966 R visitFieldDeclaration(FieldDeclaration node) => null; |
| 13196 | 13967 |
| 13968 @override |
| 13197 R visitFieldFormalParameter(FieldFormalParameter node) => null; | 13969 R visitFieldFormalParameter(FieldFormalParameter node) => null; |
| 13198 | 13970 |
| 13971 @override |
| 13199 R visitForEachStatement(ForEachStatement node) => null; | 13972 R visitForEachStatement(ForEachStatement node) => null; |
| 13200 | 13973 |
| 13974 @override |
| 13201 R visitFormalParameterList(FormalParameterList node) => null; | 13975 R visitFormalParameterList(FormalParameterList node) => null; |
| 13202 | 13976 |
| 13977 @override |
| 13203 R visitForStatement(ForStatement node) => null; | 13978 R visitForStatement(ForStatement node) => null; |
| 13204 | 13979 |
| 13980 @override |
| 13205 R visitFunctionDeclaration(FunctionDeclaration node) => null; | 13981 R visitFunctionDeclaration(FunctionDeclaration node) => null; |
| 13206 | 13982 |
| 13983 @override |
| 13207 R visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => null
; | 13984 R visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => null
; |
| 13208 | 13985 |
| 13986 @override |
| 13209 R visitFunctionExpression(FunctionExpression node) => null; | 13987 R visitFunctionExpression(FunctionExpression node) => null; |
| 13210 | 13988 |
| 13989 @override |
| 13211 R visitFunctionExpressionInvocation(FunctionExpressionInvocation node) => null
; | 13990 R visitFunctionExpressionInvocation(FunctionExpressionInvocation node) => null
; |
| 13212 | 13991 |
| 13992 @override |
| 13213 R visitFunctionTypeAlias(FunctionTypeAlias node) => null; | 13993 R visitFunctionTypeAlias(FunctionTypeAlias node) => null; |
| 13214 | 13994 |
| 13995 @override |
| 13215 R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => null
; | 13996 R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => null
; |
| 13216 | 13997 |
| 13998 @override |
| 13217 R visitHideCombinator(HideCombinator node) => null; | 13999 R visitHideCombinator(HideCombinator node) => null; |
| 13218 | 14000 |
| 14001 @override |
| 13219 R visitIfStatement(IfStatement node) => null; | 14002 R visitIfStatement(IfStatement node) => null; |
| 13220 | 14003 |
| 14004 @override |
| 13221 R visitImplementsClause(ImplementsClause node) => null; | 14005 R visitImplementsClause(ImplementsClause node) => null; |
| 13222 | 14006 |
| 14007 @override |
| 13223 R visitImportDirective(ImportDirective node) => null; | 14008 R visitImportDirective(ImportDirective node) => null; |
| 13224 | 14009 |
| 14010 @override |
| 13225 R visitIndexExpression(IndexExpression node) => null; | 14011 R visitIndexExpression(IndexExpression node) => null; |
| 13226 | 14012 |
| 14013 @override |
| 13227 R visitInstanceCreationExpression(InstanceCreationExpression node) => null; | 14014 R visitInstanceCreationExpression(InstanceCreationExpression node) => null; |
| 13228 | 14015 |
| 14016 @override |
| 13229 R visitIntegerLiteral(IntegerLiteral node) => null; | 14017 R visitIntegerLiteral(IntegerLiteral node) => null; |
| 13230 | 14018 |
| 14019 @override |
| 13231 R visitInterpolationExpression(InterpolationExpression node) => null; | 14020 R visitInterpolationExpression(InterpolationExpression node) => null; |
| 13232 | 14021 |
| 14022 @override |
| 13233 R visitInterpolationString(InterpolationString node) => null; | 14023 R visitInterpolationString(InterpolationString node) => null; |
| 13234 | 14024 |
| 14025 @override |
| 13235 R visitIsExpression(IsExpression node) => null; | 14026 R visitIsExpression(IsExpression node) => null; |
| 13236 | 14027 |
| 14028 @override |
| 13237 R visitLabel(Label node) => null; | 14029 R visitLabel(Label node) => null; |
| 13238 | 14030 |
| 14031 @override |
| 13239 R visitLabeledStatement(LabeledStatement node) => null; | 14032 R visitLabeledStatement(LabeledStatement node) => null; |
| 13240 | 14033 |
| 14034 @override |
| 13241 R visitLibraryDirective(LibraryDirective node) => null; | 14035 R visitLibraryDirective(LibraryDirective node) => null; |
| 13242 | 14036 |
| 14037 @override |
| 13243 R visitLibraryIdentifier(LibraryIdentifier node) => null; | 14038 R visitLibraryIdentifier(LibraryIdentifier node) => null; |
| 13244 | 14039 |
| 14040 @override |
| 13245 R visitListLiteral(ListLiteral node) => null; | 14041 R visitListLiteral(ListLiteral node) => null; |
| 13246 | 14042 |
| 14043 @override |
| 13247 R visitMapLiteral(MapLiteral node) => null; | 14044 R visitMapLiteral(MapLiteral node) => null; |
| 13248 | 14045 |
| 14046 @override |
| 13249 R visitMapLiteralEntry(MapLiteralEntry node) => null; | 14047 R visitMapLiteralEntry(MapLiteralEntry node) => null; |
| 13250 | 14048 |
| 14049 @override |
| 13251 R visitMethodDeclaration(MethodDeclaration node) => null; | 14050 R visitMethodDeclaration(MethodDeclaration node) => null; |
| 13252 | 14051 |
| 14052 @override |
| 13253 R visitMethodInvocation(MethodInvocation node) => null; | 14053 R visitMethodInvocation(MethodInvocation node) => null; |
| 13254 | 14054 |
| 14055 @override |
| 13255 R visitNamedExpression(NamedExpression node) => null; | 14056 R visitNamedExpression(NamedExpression node) => null; |
| 13256 | 14057 |
| 14058 @override |
| 13257 R visitNativeClause(NativeClause node) => null; | 14059 R visitNativeClause(NativeClause node) => null; |
| 13258 | 14060 |
| 14061 @override |
| 13259 R visitNativeFunctionBody(NativeFunctionBody node) => null; | 14062 R visitNativeFunctionBody(NativeFunctionBody node) => null; |
| 13260 | 14063 |
| 14064 @override |
| 13261 R visitNullLiteral(NullLiteral node) => null; | 14065 R visitNullLiteral(NullLiteral node) => null; |
| 13262 | 14066 |
| 14067 @override |
| 13263 R visitParenthesizedExpression(ParenthesizedExpression node) => null; | 14068 R visitParenthesizedExpression(ParenthesizedExpression node) => null; |
| 13264 | 14069 |
| 14070 @override |
| 13265 R visitPartDirective(PartDirective node) => null; | 14071 R visitPartDirective(PartDirective node) => null; |
| 13266 | 14072 |
| 14073 @override |
| 13267 R visitPartOfDirective(PartOfDirective node) => null; | 14074 R visitPartOfDirective(PartOfDirective node) => null; |
| 13268 | 14075 |
| 14076 @override |
| 13269 R visitPostfixExpression(PostfixExpression node) => null; | 14077 R visitPostfixExpression(PostfixExpression node) => null; |
| 13270 | 14078 |
| 14079 @override |
| 13271 R visitPrefixedIdentifier(PrefixedIdentifier node) => null; | 14080 R visitPrefixedIdentifier(PrefixedIdentifier node) => null; |
| 13272 | 14081 |
| 14082 @override |
| 13273 R visitPrefixExpression(PrefixExpression node) => null; | 14083 R visitPrefixExpression(PrefixExpression node) => null; |
| 13274 | 14084 |
| 14085 @override |
| 13275 R visitPropertyAccess(PropertyAccess node) => null; | 14086 R visitPropertyAccess(PropertyAccess node) => null; |
| 13276 | 14087 |
| 14088 @override |
| 13277 R visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node)
=> null; | 14089 R visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node)
=> null; |
| 13278 | 14090 |
| 14091 @override |
| 13279 R visitRethrowExpression(RethrowExpression node) => null; | 14092 R visitRethrowExpression(RethrowExpression node) => null; |
| 13280 | 14093 |
| 14094 @override |
| 13281 R visitReturnStatement(ReturnStatement node) => null; | 14095 R visitReturnStatement(ReturnStatement node) => null; |
| 13282 | 14096 |
| 14097 @override |
| 13283 R visitScriptTag(ScriptTag node) => null; | 14098 R visitScriptTag(ScriptTag node) => null; |
| 13284 | 14099 |
| 14100 @override |
| 13285 R visitShowCombinator(ShowCombinator node) => null; | 14101 R visitShowCombinator(ShowCombinator node) => null; |
| 13286 | 14102 |
| 14103 @override |
| 13287 R visitSimpleFormalParameter(SimpleFormalParameter node) => null; | 14104 R visitSimpleFormalParameter(SimpleFormalParameter node) => null; |
| 13288 | 14105 |
| 14106 @override |
| 13289 R visitSimpleIdentifier(SimpleIdentifier node) => null; | 14107 R visitSimpleIdentifier(SimpleIdentifier node) => null; |
| 13290 | 14108 |
| 14109 @override |
| 13291 R visitSimpleStringLiteral(SimpleStringLiteral node) => null; | 14110 R visitSimpleStringLiteral(SimpleStringLiteral node) => null; |
| 13292 | 14111 |
| 14112 @override |
| 13293 R visitStringInterpolation(StringInterpolation node) => null; | 14113 R visitStringInterpolation(StringInterpolation node) => null; |
| 13294 | 14114 |
| 14115 @override |
| 13295 R visitSuperConstructorInvocation(SuperConstructorInvocation node) => null; | 14116 R visitSuperConstructorInvocation(SuperConstructorInvocation node) => null; |
| 13296 | 14117 |
| 14118 @override |
| 13297 R visitSuperExpression(SuperExpression node) => null; | 14119 R visitSuperExpression(SuperExpression node) => null; |
| 13298 | 14120 |
| 14121 @override |
| 13299 R visitSwitchCase(SwitchCase node) => null; | 14122 R visitSwitchCase(SwitchCase node) => null; |
| 13300 | 14123 |
| 14124 @override |
| 13301 R visitSwitchDefault(SwitchDefault node) => null; | 14125 R visitSwitchDefault(SwitchDefault node) => null; |
| 13302 | 14126 |
| 14127 @override |
| 13303 R visitSwitchStatement(SwitchStatement node) => null; | 14128 R visitSwitchStatement(SwitchStatement node) => null; |
| 13304 | 14129 |
| 14130 @override |
| 13305 R visitSymbolLiteral(SymbolLiteral node) => null; | 14131 R visitSymbolLiteral(SymbolLiteral node) => null; |
| 13306 | 14132 |
| 14133 @override |
| 13307 R visitThisExpression(ThisExpression node) => null; | 14134 R visitThisExpression(ThisExpression node) => null; |
| 13308 | 14135 |
| 14136 @override |
| 13309 R visitThrowExpression(ThrowExpression node) => null; | 14137 R visitThrowExpression(ThrowExpression node) => null; |
| 13310 | 14138 |
| 14139 @override |
| 13311 R visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => null; | 14140 R visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => null; |
| 13312 | 14141 |
| 14142 @override |
| 13313 R visitTryStatement(TryStatement node) => null; | 14143 R visitTryStatement(TryStatement node) => null; |
| 13314 | 14144 |
| 14145 @override |
| 13315 R visitTypeArgumentList(TypeArgumentList node) => null; | 14146 R visitTypeArgumentList(TypeArgumentList node) => null; |
| 13316 | 14147 |
| 14148 @override |
| 13317 R visitTypeName(TypeName node) => null; | 14149 R visitTypeName(TypeName node) => null; |
| 13318 | 14150 |
| 14151 @override |
| 13319 R visitTypeParameter(TypeParameter node) => null; | 14152 R visitTypeParameter(TypeParameter node) => null; |
| 13320 | 14153 |
| 14154 @override |
| 13321 R visitTypeParameterList(TypeParameterList node) => null; | 14155 R visitTypeParameterList(TypeParameterList node) => null; |
| 13322 | 14156 |
| 14157 @override |
| 13323 R visitVariableDeclaration(VariableDeclaration node) => null; | 14158 R visitVariableDeclaration(VariableDeclaration node) => null; |
| 13324 | 14159 |
| 14160 @override |
| 13325 R visitVariableDeclarationList(VariableDeclarationList node) => null; | 14161 R visitVariableDeclarationList(VariableDeclarationList node) => null; |
| 13326 | 14162 |
| 14163 @override |
| 13327 R visitVariableDeclarationStatement(VariableDeclarationStatement node) => null
; | 14164 R visitVariableDeclarationStatement(VariableDeclarationStatement node) => null
; |
| 13328 | 14165 |
| 14166 @override |
| 13329 R visitWhileStatement(WhileStatement node) => null; | 14167 R visitWhileStatement(WhileStatement node) => null; |
| 13330 | 14168 |
| 14169 @override |
| 13331 R visitWithClause(WithClause node) => null; | 14170 R visitWithClause(WithClause node) => null; |
| 13332 } | 14171 } |
| 13333 | 14172 |
| 13334 /** | 14173 /** |
| 13335 * Instances of the class `ToSourceVisitor` write a source representation of a v
isited AST | 14174 * Instances of the class `ToSourceVisitor` write a source representation of a v
isited AST |
| 13336 * node (and all of it's children) to a writer. | 14175 * node (and all of it's children) to a writer. |
| 13337 */ | 14176 */ |
| 13338 class ToSourceVisitor implements AstVisitor<Object> { | 14177 class ToSourceVisitor implements AstVisitor<Object> { |
| 13339 /** | 14178 /** |
| 13340 * The writer to which the source is to be written. | 14179 * The writer to which the source is to be written. |
| 13341 */ | 14180 */ |
| 13342 PrintWriter _writer; | 14181 PrintWriter _writer; |
| 13343 | 14182 |
| 13344 /** | 14183 /** |
| 13345 * Initialize a newly created visitor to write source code representing the vi
sited nodes to the | 14184 * Initialize a newly created visitor to write source code representing the vi
sited nodes to the |
| 13346 * given writer. | 14185 * given writer. |
| 13347 * | 14186 * |
| 13348 * @param writer the writer to which the source is to be written | 14187 * @param writer the writer to which the source is to be written |
| 13349 */ | 14188 */ |
| 13350 ToSourceVisitor(PrintWriter writer) { | 14189 ToSourceVisitor(PrintWriter writer) { |
| 13351 this._writer = writer; | 14190 this._writer = writer; |
| 13352 } | 14191 } |
| 13353 | 14192 |
| 14193 @override |
| 13354 Object visitAdjacentStrings(AdjacentStrings node) { | 14194 Object visitAdjacentStrings(AdjacentStrings node) { |
| 13355 _visitNodeListWithSeparator(node.strings, " "); | 14195 _visitNodeListWithSeparator(node.strings, " "); |
| 13356 return null; | 14196 return null; |
| 13357 } | 14197 } |
| 13358 | 14198 |
| 14199 @override |
| 13359 Object visitAnnotation(Annotation node) { | 14200 Object visitAnnotation(Annotation node) { |
| 13360 _writer.print('@'); | 14201 _writer.print('@'); |
| 13361 _visitNode(node.name); | 14202 _visitNode(node.name); |
| 13362 _visitNodeWithPrefix(".", node.constructorName); | 14203 _visitNodeWithPrefix(".", node.constructorName); |
| 13363 _visitNode(node.arguments); | 14204 _visitNode(node.arguments); |
| 13364 return null; | 14205 return null; |
| 13365 } | 14206 } |
| 13366 | 14207 |
| 14208 @override |
| 13367 Object visitArgumentDefinitionTest(ArgumentDefinitionTest node) { | 14209 Object visitArgumentDefinitionTest(ArgumentDefinitionTest node) { |
| 13368 _writer.print('?'); | 14210 _writer.print('?'); |
| 13369 _visitNode(node.identifier); | 14211 _visitNode(node.identifier); |
| 13370 return null; | 14212 return null; |
| 13371 } | 14213 } |
| 13372 | 14214 |
| 14215 @override |
| 13373 Object visitArgumentList(ArgumentList node) { | 14216 Object visitArgumentList(ArgumentList node) { |
| 13374 _writer.print('('); | 14217 _writer.print('('); |
| 13375 _visitNodeListWithSeparator(node.arguments, ", "); | 14218 _visitNodeListWithSeparator(node.arguments, ", "); |
| 13376 _writer.print(')'); | 14219 _writer.print(')'); |
| 13377 return null; | 14220 return null; |
| 13378 } | 14221 } |
| 13379 | 14222 |
| 14223 @override |
| 13380 Object visitAsExpression(AsExpression node) { | 14224 Object visitAsExpression(AsExpression node) { |
| 13381 _visitNode(node.expression); | 14225 _visitNode(node.expression); |
| 13382 _writer.print(" as "); | 14226 _writer.print(" as "); |
| 13383 _visitNode(node.type); | 14227 _visitNode(node.type); |
| 13384 return null; | 14228 return null; |
| 13385 } | 14229 } |
| 13386 | 14230 |
| 14231 @override |
| 13387 Object visitAssertStatement(AssertStatement node) { | 14232 Object visitAssertStatement(AssertStatement node) { |
| 13388 _writer.print("assert ("); | 14233 _writer.print("assert ("); |
| 13389 _visitNode(node.condition); | 14234 _visitNode(node.condition); |
| 13390 _writer.print(");"); | 14235 _writer.print(");"); |
| 13391 return null; | 14236 return null; |
| 13392 } | 14237 } |
| 13393 | 14238 |
| 14239 @override |
| 13394 Object visitAssignmentExpression(AssignmentExpression node) { | 14240 Object visitAssignmentExpression(AssignmentExpression node) { |
| 13395 _visitNode(node.leftHandSide); | 14241 _visitNode(node.leftHandSide); |
| 13396 _writer.print(' '); | 14242 _writer.print(' '); |
| 13397 _writer.print(node.operator.lexeme); | 14243 _writer.print(node.operator.lexeme); |
| 13398 _writer.print(' '); | 14244 _writer.print(' '); |
| 13399 _visitNode(node.rightHandSide); | 14245 _visitNode(node.rightHandSide); |
| 13400 return null; | 14246 return null; |
| 13401 } | 14247 } |
| 13402 | 14248 |
| 14249 @override |
| 13403 Object visitBinaryExpression(BinaryExpression node) { | 14250 Object visitBinaryExpression(BinaryExpression node) { |
| 13404 _visitNode(node.leftOperand); | 14251 _visitNode(node.leftOperand); |
| 13405 _writer.print(' '); | 14252 _writer.print(' '); |
| 13406 _writer.print(node.operator.lexeme); | 14253 _writer.print(node.operator.lexeme); |
| 13407 _writer.print(' '); | 14254 _writer.print(' '); |
| 13408 _visitNode(node.rightOperand); | 14255 _visitNode(node.rightOperand); |
| 13409 return null; | 14256 return null; |
| 13410 } | 14257 } |
| 13411 | 14258 |
| 14259 @override |
| 13412 Object visitBlock(Block node) { | 14260 Object visitBlock(Block node) { |
| 13413 _writer.print('{'); | 14261 _writer.print('{'); |
| 13414 _visitNodeListWithSeparator(node.statements, " "); | 14262 _visitNodeListWithSeparator(node.statements, " "); |
| 13415 _writer.print('}'); | 14263 _writer.print('}'); |
| 13416 return null; | 14264 return null; |
| 13417 } | 14265 } |
| 13418 | 14266 |
| 14267 @override |
| 13419 Object visitBlockFunctionBody(BlockFunctionBody node) { | 14268 Object visitBlockFunctionBody(BlockFunctionBody node) { |
| 13420 _visitNode(node.block); | 14269 _visitNode(node.block); |
| 13421 return null; | 14270 return null; |
| 13422 } | 14271 } |
| 13423 | 14272 |
| 14273 @override |
| 13424 Object visitBooleanLiteral(BooleanLiteral node) { | 14274 Object visitBooleanLiteral(BooleanLiteral node) { |
| 13425 _writer.print(node.literal.lexeme); | 14275 _writer.print(node.literal.lexeme); |
| 13426 return null; | 14276 return null; |
| 13427 } | 14277 } |
| 13428 | 14278 |
| 14279 @override |
| 13429 Object visitBreakStatement(BreakStatement node) { | 14280 Object visitBreakStatement(BreakStatement node) { |
| 13430 _writer.print("break"); | 14281 _writer.print("break"); |
| 13431 _visitNodeWithPrefix(" ", node.label); | 14282 _visitNodeWithPrefix(" ", node.label); |
| 13432 _writer.print(";"); | 14283 _writer.print(";"); |
| 13433 return null; | 14284 return null; |
| 13434 } | 14285 } |
| 13435 | 14286 |
| 14287 @override |
| 13436 Object visitCascadeExpression(CascadeExpression node) { | 14288 Object visitCascadeExpression(CascadeExpression node) { |
| 13437 _visitNode(node.target); | 14289 _visitNode(node.target); |
| 13438 _visitNodeList(node.cascadeSections); | 14290 _visitNodeList(node.cascadeSections); |
| 13439 return null; | 14291 return null; |
| 13440 } | 14292 } |
| 13441 | 14293 |
| 14294 @override |
| 13442 Object visitCatchClause(CatchClause node) { | 14295 Object visitCatchClause(CatchClause node) { |
| 13443 _visitNodeWithPrefix("on ", node.exceptionType); | 14296 _visitNodeWithPrefix("on ", node.exceptionType); |
| 13444 if (node.catchKeyword != null) { | 14297 if (node.catchKeyword != null) { |
| 13445 if (node.exceptionType != null) { | 14298 if (node.exceptionType != null) { |
| 13446 _writer.print(' '); | 14299 _writer.print(' '); |
| 13447 } | 14300 } |
| 13448 _writer.print("catch ("); | 14301 _writer.print("catch ("); |
| 13449 _visitNode(node.exceptionParameter); | 14302 _visitNode(node.exceptionParameter); |
| 13450 _visitNodeWithPrefix(", ", node.stackTraceParameter); | 14303 _visitNodeWithPrefix(", ", node.stackTraceParameter); |
| 13451 _writer.print(") "); | 14304 _writer.print(") "); |
| 13452 } else { | 14305 } else { |
| 13453 _writer.print(" "); | 14306 _writer.print(" "); |
| 13454 } | 14307 } |
| 13455 _visitNode(node.body); | 14308 _visitNode(node.body); |
| 13456 return null; | 14309 return null; |
| 13457 } | 14310 } |
| 13458 | 14311 |
| 14312 @override |
| 13459 Object visitClassDeclaration(ClassDeclaration node) { | 14313 Object visitClassDeclaration(ClassDeclaration node) { |
| 13460 _visitTokenWithSuffix(node.abstractKeyword, " "); | 14314 _visitTokenWithSuffix(node.abstractKeyword, " "); |
| 13461 _writer.print("class "); | 14315 _writer.print("class "); |
| 13462 _visitNode(node.name); | 14316 _visitNode(node.name); |
| 13463 _visitNode(node.typeParameters); | 14317 _visitNode(node.typeParameters); |
| 13464 _visitNodeWithPrefix(" ", node.extendsClause); | 14318 _visitNodeWithPrefix(" ", node.extendsClause); |
| 13465 _visitNodeWithPrefix(" ", node.withClause); | 14319 _visitNodeWithPrefix(" ", node.withClause); |
| 13466 _visitNodeWithPrefix(" ", node.implementsClause); | 14320 _visitNodeWithPrefix(" ", node.implementsClause); |
| 13467 _writer.print(" {"); | 14321 _writer.print(" {"); |
| 13468 _visitNodeListWithSeparator(node.members, " "); | 14322 _visitNodeListWithSeparator(node.members, " "); |
| 13469 _writer.print("}"); | 14323 _writer.print("}"); |
| 13470 return null; | 14324 return null; |
| 13471 } | 14325 } |
| 13472 | 14326 |
| 14327 @override |
| 13473 Object visitClassTypeAlias(ClassTypeAlias node) { | 14328 Object visitClassTypeAlias(ClassTypeAlias node) { |
| 13474 if (node.abstractKeyword != null) { | 14329 if (node.abstractKeyword != null) { |
| 13475 _writer.print("abstract "); | 14330 _writer.print("abstract "); |
| 13476 } | 14331 } |
| 13477 _writer.print("class "); | 14332 _writer.print("class "); |
| 13478 _visitNode(node.name); | 14333 _visitNode(node.name); |
| 13479 _visitNode(node.typeParameters); | 14334 _visitNode(node.typeParameters); |
| 13480 _writer.print(" = "); | 14335 _writer.print(" = "); |
| 13481 _visitNode(node.superclass); | 14336 _visitNode(node.superclass); |
| 13482 _visitNodeWithPrefix(" ", node.withClause); | 14337 _visitNodeWithPrefix(" ", node.withClause); |
| 13483 _visitNodeWithPrefix(" ", node.implementsClause); | 14338 _visitNodeWithPrefix(" ", node.implementsClause); |
| 13484 _writer.print(";"); | 14339 _writer.print(";"); |
| 13485 return null; | 14340 return null; |
| 13486 } | 14341 } |
| 13487 | 14342 |
| 14343 @override |
| 13488 Object visitComment(Comment node) => null; | 14344 Object visitComment(Comment node) => null; |
| 13489 | 14345 |
| 14346 @override |
| 13490 Object visitCommentReference(CommentReference node) => null; | 14347 Object visitCommentReference(CommentReference node) => null; |
| 13491 | 14348 |
| 14349 @override |
| 13492 Object visitCompilationUnit(CompilationUnit node) { | 14350 Object visitCompilationUnit(CompilationUnit node) { |
| 13493 ScriptTag scriptTag = node.scriptTag; | 14351 ScriptTag scriptTag = node.scriptTag; |
| 13494 NodeList<Directive> directives = node.directives; | 14352 NodeList<Directive> directives = node.directives; |
| 13495 _visitNode(scriptTag); | 14353 _visitNode(scriptTag); |
| 13496 String prefix = scriptTag == null ? "" : " "; | 14354 String prefix = scriptTag == null ? "" : " "; |
| 13497 _visitNodeListWithSeparatorAndPrefix(prefix, directives, " "); | 14355 _visitNodeListWithSeparatorAndPrefix(prefix, directives, " "); |
| 13498 prefix = scriptTag == null && directives.isEmpty ? "" : " "; | 14356 prefix = scriptTag == null && directives.isEmpty ? "" : " "; |
| 13499 _visitNodeListWithSeparatorAndPrefix(prefix, node.declarations, " "); | 14357 _visitNodeListWithSeparatorAndPrefix(prefix, node.declarations, " "); |
| 13500 return null; | 14358 return null; |
| 13501 } | 14359 } |
| 13502 | 14360 |
| 14361 @override |
| 13503 Object visitConditionalExpression(ConditionalExpression node) { | 14362 Object visitConditionalExpression(ConditionalExpression node) { |
| 13504 _visitNode(node.condition); | 14363 _visitNode(node.condition); |
| 13505 _writer.print(" ? "); | 14364 _writer.print(" ? "); |
| 13506 _visitNode(node.thenExpression); | 14365 _visitNode(node.thenExpression); |
| 13507 _writer.print(" : "); | 14366 _writer.print(" : "); |
| 13508 _visitNode(node.elseExpression); | 14367 _visitNode(node.elseExpression); |
| 13509 return null; | 14368 return null; |
| 13510 } | 14369 } |
| 13511 | 14370 |
| 14371 @override |
| 13512 Object visitConstructorDeclaration(ConstructorDeclaration node) { | 14372 Object visitConstructorDeclaration(ConstructorDeclaration node) { |
| 13513 _visitTokenWithSuffix(node.externalKeyword, " "); | 14373 _visitTokenWithSuffix(node.externalKeyword, " "); |
| 13514 _visitTokenWithSuffix(node.constKeyword, " "); | 14374 _visitTokenWithSuffix(node.constKeyword, " "); |
| 13515 _visitTokenWithSuffix(node.factoryKeyword, " "); | 14375 _visitTokenWithSuffix(node.factoryKeyword, " "); |
| 13516 _visitNode(node.returnType); | 14376 _visitNode(node.returnType); |
| 13517 _visitNodeWithPrefix(".", node.name); | 14377 _visitNodeWithPrefix(".", node.name); |
| 13518 _visitNode(node.parameters); | 14378 _visitNode(node.parameters); |
| 13519 _visitNodeListWithSeparatorAndPrefix(" : ", node.initializers, ", "); | 14379 _visitNodeListWithSeparatorAndPrefix(" : ", node.initializers, ", "); |
| 13520 _visitNodeWithPrefix(" = ", node.redirectedConstructor); | 14380 _visitNodeWithPrefix(" = ", node.redirectedConstructor); |
| 13521 _visitFunctionWithPrefix(" ", node.body); | 14381 _visitFunctionWithPrefix(" ", node.body); |
| 13522 return null; | 14382 return null; |
| 13523 } | 14383 } |
| 13524 | 14384 |
| 14385 @override |
| 13525 Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) { | 14386 Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) { |
| 13526 _visitTokenWithSuffix(node.keyword, "."); | 14387 _visitTokenWithSuffix(node.keyword, "."); |
| 13527 _visitNode(node.fieldName); | 14388 _visitNode(node.fieldName); |
| 13528 _writer.print(" = "); | 14389 _writer.print(" = "); |
| 13529 _visitNode(node.expression); | 14390 _visitNode(node.expression); |
| 13530 return null; | 14391 return null; |
| 13531 } | 14392 } |
| 13532 | 14393 |
| 14394 @override |
| 13533 Object visitConstructorName(ConstructorName node) { | 14395 Object visitConstructorName(ConstructorName node) { |
| 13534 _visitNode(node.type); | 14396 _visitNode(node.type); |
| 13535 _visitNodeWithPrefix(".", node.name); | 14397 _visitNodeWithPrefix(".", node.name); |
| 13536 return null; | 14398 return null; |
| 13537 } | 14399 } |
| 13538 | 14400 |
| 14401 @override |
| 13539 Object visitContinueStatement(ContinueStatement node) { | 14402 Object visitContinueStatement(ContinueStatement node) { |
| 13540 _writer.print("continue"); | 14403 _writer.print("continue"); |
| 13541 _visitNodeWithPrefix(" ", node.label); | 14404 _visitNodeWithPrefix(" ", node.label); |
| 13542 _writer.print(";"); | 14405 _writer.print(";"); |
| 13543 return null; | 14406 return null; |
| 13544 } | 14407 } |
| 13545 | 14408 |
| 14409 @override |
| 13546 Object visitDeclaredIdentifier(DeclaredIdentifier node) { | 14410 Object visitDeclaredIdentifier(DeclaredIdentifier node) { |
| 13547 _visitTokenWithSuffix(node.keyword, " "); | 14411 _visitTokenWithSuffix(node.keyword, " "); |
| 13548 _visitNodeWithSuffix(node.type, " "); | 14412 _visitNodeWithSuffix(node.type, " "); |
| 13549 _visitNode(node.identifier); | 14413 _visitNode(node.identifier); |
| 13550 return null; | 14414 return null; |
| 13551 } | 14415 } |
| 13552 | 14416 |
| 14417 @override |
| 13553 Object visitDefaultFormalParameter(DefaultFormalParameter node) { | 14418 Object visitDefaultFormalParameter(DefaultFormalParameter node) { |
| 13554 _visitNode(node.parameter); | 14419 _visitNode(node.parameter); |
| 13555 if (node.separator != null) { | 14420 if (node.separator != null) { |
| 13556 _writer.print(" "); | 14421 _writer.print(" "); |
| 13557 _writer.print(node.separator.lexeme); | 14422 _writer.print(node.separator.lexeme); |
| 13558 _visitNodeWithPrefix(" ", node.defaultValue); | 14423 _visitNodeWithPrefix(" ", node.defaultValue); |
| 13559 } | 14424 } |
| 13560 return null; | 14425 return null; |
| 13561 } | 14426 } |
| 13562 | 14427 |
| 14428 @override |
| 13563 Object visitDoStatement(DoStatement node) { | 14429 Object visitDoStatement(DoStatement node) { |
| 13564 _writer.print("do "); | 14430 _writer.print("do "); |
| 13565 _visitNode(node.body); | 14431 _visitNode(node.body); |
| 13566 _writer.print(" while ("); | 14432 _writer.print(" while ("); |
| 13567 _visitNode(node.condition); | 14433 _visitNode(node.condition); |
| 13568 _writer.print(");"); | 14434 _writer.print(");"); |
| 13569 return null; | 14435 return null; |
| 13570 } | 14436 } |
| 13571 | 14437 |
| 14438 @override |
| 13572 Object visitDoubleLiteral(DoubleLiteral node) { | 14439 Object visitDoubleLiteral(DoubleLiteral node) { |
| 13573 _writer.print(node.literal.lexeme); | 14440 _writer.print(node.literal.lexeme); |
| 13574 return null; | 14441 return null; |
| 13575 } | 14442 } |
| 13576 | 14443 |
| 14444 @override |
| 13577 Object visitEmptyFunctionBody(EmptyFunctionBody node) { | 14445 Object visitEmptyFunctionBody(EmptyFunctionBody node) { |
| 13578 _writer.print(';'); | 14446 _writer.print(';'); |
| 13579 return null; | 14447 return null; |
| 13580 } | 14448 } |
| 13581 | 14449 |
| 14450 @override |
| 13582 Object visitEmptyStatement(EmptyStatement node) { | 14451 Object visitEmptyStatement(EmptyStatement node) { |
| 13583 _writer.print(';'); | 14452 _writer.print(';'); |
| 13584 return null; | 14453 return null; |
| 13585 } | 14454 } |
| 13586 | 14455 |
| 14456 @override |
| 13587 Object visitExportDirective(ExportDirective node) { | 14457 Object visitExportDirective(ExportDirective node) { |
| 13588 _writer.print("export "); | 14458 _writer.print("export "); |
| 13589 _visitNode(node.uri); | 14459 _visitNode(node.uri); |
| 13590 _visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " "); | 14460 _visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " "); |
| 13591 _writer.print(';'); | 14461 _writer.print(';'); |
| 13592 return null; | 14462 return null; |
| 13593 } | 14463 } |
| 13594 | 14464 |
| 14465 @override |
| 13595 Object visitExpressionFunctionBody(ExpressionFunctionBody node) { | 14466 Object visitExpressionFunctionBody(ExpressionFunctionBody node) { |
| 13596 _writer.print("=> "); | 14467 _writer.print("=> "); |
| 13597 _visitNode(node.expression); | 14468 _visitNode(node.expression); |
| 13598 if (node.semicolon != null) { | 14469 if (node.semicolon != null) { |
| 13599 _writer.print(';'); | 14470 _writer.print(';'); |
| 13600 } | 14471 } |
| 13601 return null; | 14472 return null; |
| 13602 } | 14473 } |
| 13603 | 14474 |
| 14475 @override |
| 13604 Object visitExpressionStatement(ExpressionStatement node) { | 14476 Object visitExpressionStatement(ExpressionStatement node) { |
| 13605 _visitNode(node.expression); | 14477 _visitNode(node.expression); |
| 13606 _writer.print(';'); | 14478 _writer.print(';'); |
| 13607 return null; | 14479 return null; |
| 13608 } | 14480 } |
| 13609 | 14481 |
| 14482 @override |
| 13610 Object visitExtendsClause(ExtendsClause node) { | 14483 Object visitExtendsClause(ExtendsClause node) { |
| 13611 _writer.print("extends "); | 14484 _writer.print("extends "); |
| 13612 _visitNode(node.superclass); | 14485 _visitNode(node.superclass); |
| 13613 return null; | 14486 return null; |
| 13614 } | 14487 } |
| 13615 | 14488 |
| 14489 @override |
| 13616 Object visitFieldDeclaration(FieldDeclaration node) { | 14490 Object visitFieldDeclaration(FieldDeclaration node) { |
| 13617 _visitTokenWithSuffix(node.staticKeyword, " "); | 14491 _visitTokenWithSuffix(node.staticKeyword, " "); |
| 13618 _visitNode(node.fields); | 14492 _visitNode(node.fields); |
| 13619 _writer.print(";"); | 14493 _writer.print(";"); |
| 13620 return null; | 14494 return null; |
| 13621 } | 14495 } |
| 13622 | 14496 |
| 14497 @override |
| 13623 Object visitFieldFormalParameter(FieldFormalParameter node) { | 14498 Object visitFieldFormalParameter(FieldFormalParameter node) { |
| 13624 _visitTokenWithSuffix(node.keyword, " "); | 14499 _visitTokenWithSuffix(node.keyword, " "); |
| 13625 _visitNodeWithSuffix(node.type, " "); | 14500 _visitNodeWithSuffix(node.type, " "); |
| 13626 _writer.print("this."); | 14501 _writer.print("this."); |
| 13627 _visitNode(node.identifier); | 14502 _visitNode(node.identifier); |
| 13628 _visitNode(node.parameters); | 14503 _visitNode(node.parameters); |
| 13629 return null; | 14504 return null; |
| 13630 } | 14505 } |
| 13631 | 14506 |
| 14507 @override |
| 13632 Object visitForEachStatement(ForEachStatement node) { | 14508 Object visitForEachStatement(ForEachStatement node) { |
| 13633 DeclaredIdentifier loopVariable = node.loopVariable; | 14509 DeclaredIdentifier loopVariable = node.loopVariable; |
| 13634 _writer.print("for ("); | 14510 _writer.print("for ("); |
| 13635 if (loopVariable == null) { | 14511 if (loopVariable == null) { |
| 13636 _visitNode(node.identifier); | 14512 _visitNode(node.identifier); |
| 13637 } else { | 14513 } else { |
| 13638 _visitNode(loopVariable); | 14514 _visitNode(loopVariable); |
| 13639 } | 14515 } |
| 13640 _writer.print(" in "); | 14516 _writer.print(" in "); |
| 13641 _visitNode(node.iterator); | 14517 _visitNode(node.iterator); |
| 13642 _writer.print(") "); | 14518 _writer.print(") "); |
| 13643 _visitNode(node.body); | 14519 _visitNode(node.body); |
| 13644 return null; | 14520 return null; |
| 13645 } | 14521 } |
| 13646 | 14522 |
| 14523 @override |
| 13647 Object visitFormalParameterList(FormalParameterList node) { | 14524 Object visitFormalParameterList(FormalParameterList node) { |
| 13648 String groupEnd = null; | 14525 String groupEnd = null; |
| 13649 _writer.print('('); | 14526 _writer.print('('); |
| 13650 NodeList<FormalParameter> parameters = node.parameters; | 14527 NodeList<FormalParameter> parameters = node.parameters; |
| 13651 int size = parameters.length; | 14528 int size = parameters.length; |
| 13652 for (int i = 0; i < size; i++) { | 14529 for (int i = 0; i < size; i++) { |
| 13653 FormalParameter parameter = parameters[i]; | 14530 FormalParameter parameter = parameters[i]; |
| 13654 if (i > 0) { | 14531 if (i > 0) { |
| 13655 _writer.print(", "); | 14532 _writer.print(", "); |
| 13656 } | 14533 } |
| 13657 if (groupEnd == null && parameter is DefaultFormalParameter) { | 14534 if (groupEnd == null && parameter is DefaultFormalParameter) { |
| 13658 if (identical(parameter.kind, ParameterKind.NAMED)) { | 14535 if (identical(parameter.kind, ParameterKind.NAMED)) { |
| 13659 groupEnd = "}"; | 14536 groupEnd = "}"; |
| 13660 _writer.print('{'); | 14537 _writer.print('{'); |
| 13661 } else { | 14538 } else { |
| 13662 groupEnd = "]"; | 14539 groupEnd = "]"; |
| 13663 _writer.print('['); | 14540 _writer.print('['); |
| 13664 } | 14541 } |
| 13665 } | 14542 } |
| 13666 parameter.accept(this); | 14543 parameter.accept(this); |
| 13667 } | 14544 } |
| 13668 if (groupEnd != null) { | 14545 if (groupEnd != null) { |
| 13669 _writer.print(groupEnd); | 14546 _writer.print(groupEnd); |
| 13670 } | 14547 } |
| 13671 _writer.print(')'); | 14548 _writer.print(')'); |
| 13672 return null; | 14549 return null; |
| 13673 } | 14550 } |
| 13674 | 14551 |
| 14552 @override |
| 13675 Object visitForStatement(ForStatement node) { | 14553 Object visitForStatement(ForStatement node) { |
| 13676 Expression initialization = node.initialization; | 14554 Expression initialization = node.initialization; |
| 13677 _writer.print("for ("); | 14555 _writer.print("for ("); |
| 13678 if (initialization != null) { | 14556 if (initialization != null) { |
| 13679 _visitNode(initialization); | 14557 _visitNode(initialization); |
| 13680 } else { | 14558 } else { |
| 13681 _visitNode(node.variables); | 14559 _visitNode(node.variables); |
| 13682 } | 14560 } |
| 13683 _writer.print(";"); | 14561 _writer.print(";"); |
| 13684 _visitNodeWithPrefix(" ", node.condition); | 14562 _visitNodeWithPrefix(" ", node.condition); |
| 13685 _writer.print(";"); | 14563 _writer.print(";"); |
| 13686 _visitNodeListWithSeparatorAndPrefix(" ", node.updaters, ", "); | 14564 _visitNodeListWithSeparatorAndPrefix(" ", node.updaters, ", "); |
| 13687 _writer.print(") "); | 14565 _writer.print(") "); |
| 13688 _visitNode(node.body); | 14566 _visitNode(node.body); |
| 13689 return null; | 14567 return null; |
| 13690 } | 14568 } |
| 13691 | 14569 |
| 14570 @override |
| 13692 Object visitFunctionDeclaration(FunctionDeclaration node) { | 14571 Object visitFunctionDeclaration(FunctionDeclaration node) { |
| 13693 _visitNodeWithSuffix(node.returnType, " "); | 14572 _visitNodeWithSuffix(node.returnType, " "); |
| 13694 _visitTokenWithSuffix(node.propertyKeyword, " "); | 14573 _visitTokenWithSuffix(node.propertyKeyword, " "); |
| 13695 _visitNode(node.name); | 14574 _visitNode(node.name); |
| 13696 _visitNode(node.functionExpression); | 14575 _visitNode(node.functionExpression); |
| 13697 return null; | 14576 return null; |
| 13698 } | 14577 } |
| 13699 | 14578 |
| 14579 @override |
| 13700 Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { | 14580 Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { |
| 13701 _visitNode(node.functionDeclaration); | 14581 _visitNode(node.functionDeclaration); |
| 13702 _writer.print(';'); | 14582 _writer.print(';'); |
| 13703 return null; | 14583 return null; |
| 13704 } | 14584 } |
| 13705 | 14585 |
| 14586 @override |
| 13706 Object visitFunctionExpression(FunctionExpression node) { | 14587 Object visitFunctionExpression(FunctionExpression node) { |
| 13707 _visitNode(node.parameters); | 14588 _visitNode(node.parameters); |
| 13708 _writer.print(' '); | 14589 _writer.print(' '); |
| 13709 _visitNode(node.body); | 14590 _visitNode(node.body); |
| 13710 return null; | 14591 return null; |
| 13711 } | 14592 } |
| 13712 | 14593 |
| 14594 @override |
| 13713 Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { | 14595 Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { |
| 13714 _visitNode(node.function); | 14596 _visitNode(node.function); |
| 13715 _visitNode(node.argumentList); | 14597 _visitNode(node.argumentList); |
| 13716 return null; | 14598 return null; |
| 13717 } | 14599 } |
| 13718 | 14600 |
| 14601 @override |
| 13719 Object visitFunctionTypeAlias(FunctionTypeAlias node) { | 14602 Object visitFunctionTypeAlias(FunctionTypeAlias node) { |
| 13720 _writer.print("typedef "); | 14603 _writer.print("typedef "); |
| 13721 _visitNodeWithSuffix(node.returnType, " "); | 14604 _visitNodeWithSuffix(node.returnType, " "); |
| 13722 _visitNode(node.name); | 14605 _visitNode(node.name); |
| 13723 _visitNode(node.typeParameters); | 14606 _visitNode(node.typeParameters); |
| 13724 _visitNode(node.parameters); | 14607 _visitNode(node.parameters); |
| 13725 _writer.print(";"); | 14608 _writer.print(";"); |
| 13726 return null; | 14609 return null; |
| 13727 } | 14610 } |
| 13728 | 14611 |
| 14612 @override |
| 13729 Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { | 14613 Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { |
| 13730 _visitNodeWithSuffix(node.returnType, " "); | 14614 _visitNodeWithSuffix(node.returnType, " "); |
| 13731 _visitNode(node.identifier); | 14615 _visitNode(node.identifier); |
| 13732 _visitNode(node.parameters); | 14616 _visitNode(node.parameters); |
| 13733 return null; | 14617 return null; |
| 13734 } | 14618 } |
| 13735 | 14619 |
| 14620 @override |
| 13736 Object visitHideCombinator(HideCombinator node) { | 14621 Object visitHideCombinator(HideCombinator node) { |
| 13737 _writer.print("hide "); | 14622 _writer.print("hide "); |
| 13738 _visitNodeListWithSeparator(node.hiddenNames, ", "); | 14623 _visitNodeListWithSeparator(node.hiddenNames, ", "); |
| 13739 return null; | 14624 return null; |
| 13740 } | 14625 } |
| 13741 | 14626 |
| 14627 @override |
| 13742 Object visitIfStatement(IfStatement node) { | 14628 Object visitIfStatement(IfStatement node) { |
| 13743 _writer.print("if ("); | 14629 _writer.print("if ("); |
| 13744 _visitNode(node.condition); | 14630 _visitNode(node.condition); |
| 13745 _writer.print(") "); | 14631 _writer.print(") "); |
| 13746 _visitNode(node.thenStatement); | 14632 _visitNode(node.thenStatement); |
| 13747 _visitNodeWithPrefix(" else ", node.elseStatement); | 14633 _visitNodeWithPrefix(" else ", node.elseStatement); |
| 13748 return null; | 14634 return null; |
| 13749 } | 14635 } |
| 13750 | 14636 |
| 14637 @override |
| 13751 Object visitImplementsClause(ImplementsClause node) { | 14638 Object visitImplementsClause(ImplementsClause node) { |
| 13752 _writer.print("implements "); | 14639 _writer.print("implements "); |
| 13753 _visitNodeListWithSeparator(node.interfaces, ", "); | 14640 _visitNodeListWithSeparator(node.interfaces, ", "); |
| 13754 return null; | 14641 return null; |
| 13755 } | 14642 } |
| 13756 | 14643 |
| 14644 @override |
| 13757 Object visitImportDirective(ImportDirective node) { | 14645 Object visitImportDirective(ImportDirective node) { |
| 13758 _writer.print("import "); | 14646 _writer.print("import "); |
| 13759 _visitNode(node.uri); | 14647 _visitNode(node.uri); |
| 13760 _visitNodeWithPrefix(" as ", node.prefix); | 14648 _visitNodeWithPrefix(" as ", node.prefix); |
| 13761 _visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " "); | 14649 _visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " "); |
| 13762 _writer.print(';'); | 14650 _writer.print(';'); |
| 13763 return null; | 14651 return null; |
| 13764 } | 14652 } |
| 13765 | 14653 |
| 14654 @override |
| 13766 Object visitIndexExpression(IndexExpression node) { | 14655 Object visitIndexExpression(IndexExpression node) { |
| 13767 if (node.isCascaded) { | 14656 if (node.isCascaded) { |
| 13768 _writer.print(".."); | 14657 _writer.print(".."); |
| 13769 } else { | 14658 } else { |
| 13770 _visitNode(node.target); | 14659 _visitNode(node.target); |
| 13771 } | 14660 } |
| 13772 _writer.print('['); | 14661 _writer.print('['); |
| 13773 _visitNode(node.index); | 14662 _visitNode(node.index); |
| 13774 _writer.print(']'); | 14663 _writer.print(']'); |
| 13775 return null; | 14664 return null; |
| 13776 } | 14665 } |
| 13777 | 14666 |
| 14667 @override |
| 13778 Object visitInstanceCreationExpression(InstanceCreationExpression node) { | 14668 Object visitInstanceCreationExpression(InstanceCreationExpression node) { |
| 13779 _visitTokenWithSuffix(node.keyword, " "); | 14669 _visitTokenWithSuffix(node.keyword, " "); |
| 13780 _visitNode(node.constructorName); | 14670 _visitNode(node.constructorName); |
| 13781 _visitNode(node.argumentList); | 14671 _visitNode(node.argumentList); |
| 13782 return null; | 14672 return null; |
| 13783 } | 14673 } |
| 13784 | 14674 |
| 14675 @override |
| 13785 Object visitIntegerLiteral(IntegerLiteral node) { | 14676 Object visitIntegerLiteral(IntegerLiteral node) { |
| 13786 _writer.print(node.literal.lexeme); | 14677 _writer.print(node.literal.lexeme); |
| 13787 return null; | 14678 return null; |
| 13788 } | 14679 } |
| 13789 | 14680 |
| 14681 @override |
| 13790 Object visitInterpolationExpression(InterpolationExpression node) { | 14682 Object visitInterpolationExpression(InterpolationExpression node) { |
| 13791 if (node.rightBracket != null) { | 14683 if (node.rightBracket != null) { |
| 13792 _writer.print("\${"); | 14684 _writer.print("\${"); |
| 13793 _visitNode(node.expression); | 14685 _visitNode(node.expression); |
| 13794 _writer.print("}"); | 14686 _writer.print("}"); |
| 13795 } else { | 14687 } else { |
| 13796 _writer.print("\$"); | 14688 _writer.print("\$"); |
| 13797 _visitNode(node.expression); | 14689 _visitNode(node.expression); |
| 13798 } | 14690 } |
| 13799 return null; | 14691 return null; |
| 13800 } | 14692 } |
| 13801 | 14693 |
| 14694 @override |
| 13802 Object visitInterpolationString(InterpolationString node) { | 14695 Object visitInterpolationString(InterpolationString node) { |
| 13803 _writer.print(node.contents.lexeme); | 14696 _writer.print(node.contents.lexeme); |
| 13804 return null; | 14697 return null; |
| 13805 } | 14698 } |
| 13806 | 14699 |
| 14700 @override |
| 13807 Object visitIsExpression(IsExpression node) { | 14701 Object visitIsExpression(IsExpression node) { |
| 13808 _visitNode(node.expression); | 14702 _visitNode(node.expression); |
| 13809 if (node.notOperator == null) { | 14703 if (node.notOperator == null) { |
| 13810 _writer.print(" is "); | 14704 _writer.print(" is "); |
| 13811 } else { | 14705 } else { |
| 13812 _writer.print(" is! "); | 14706 _writer.print(" is! "); |
| 13813 } | 14707 } |
| 13814 _visitNode(node.type); | 14708 _visitNode(node.type); |
| 13815 return null; | 14709 return null; |
| 13816 } | 14710 } |
| 13817 | 14711 |
| 14712 @override |
| 13818 Object visitLabel(Label node) { | 14713 Object visitLabel(Label node) { |
| 13819 _visitNode(node.label); | 14714 _visitNode(node.label); |
| 13820 _writer.print(":"); | 14715 _writer.print(":"); |
| 13821 return null; | 14716 return null; |
| 13822 } | 14717 } |
| 13823 | 14718 |
| 14719 @override |
| 13824 Object visitLabeledStatement(LabeledStatement node) { | 14720 Object visitLabeledStatement(LabeledStatement node) { |
| 13825 _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); | 14721 _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); |
| 13826 _visitNode(node.statement); | 14722 _visitNode(node.statement); |
| 13827 return null; | 14723 return null; |
| 13828 } | 14724 } |
| 13829 | 14725 |
| 14726 @override |
| 13830 Object visitLibraryDirective(LibraryDirective node) { | 14727 Object visitLibraryDirective(LibraryDirective node) { |
| 13831 _writer.print("library "); | 14728 _writer.print("library "); |
| 13832 _visitNode(node.name); | 14729 _visitNode(node.name); |
| 13833 _writer.print(';'); | 14730 _writer.print(';'); |
| 13834 return null; | 14731 return null; |
| 13835 } | 14732 } |
| 13836 | 14733 |
| 14734 @override |
| 13837 Object visitLibraryIdentifier(LibraryIdentifier node) { | 14735 Object visitLibraryIdentifier(LibraryIdentifier node) { |
| 13838 _writer.print(node.name); | 14736 _writer.print(node.name); |
| 13839 return null; | 14737 return null; |
| 13840 } | 14738 } |
| 13841 | 14739 |
| 14740 @override |
| 13842 Object visitListLiteral(ListLiteral node) { | 14741 Object visitListLiteral(ListLiteral node) { |
| 13843 if (node.constKeyword != null) { | 14742 if (node.constKeyword != null) { |
| 13844 _writer.print(node.constKeyword.lexeme); | 14743 _writer.print(node.constKeyword.lexeme); |
| 13845 _writer.print(' '); | 14744 _writer.print(' '); |
| 13846 } | 14745 } |
| 13847 _visitNodeWithSuffix(node.typeArguments, " "); | 14746 _visitNodeWithSuffix(node.typeArguments, " "); |
| 13848 _writer.print("["); | 14747 _writer.print("["); |
| 13849 _visitNodeListWithSeparator(node.elements, ", "); | 14748 _visitNodeListWithSeparator(node.elements, ", "); |
| 13850 _writer.print("]"); | 14749 _writer.print("]"); |
| 13851 return null; | 14750 return null; |
| 13852 } | 14751 } |
| 13853 | 14752 |
| 14753 @override |
| 13854 Object visitMapLiteral(MapLiteral node) { | 14754 Object visitMapLiteral(MapLiteral node) { |
| 13855 if (node.constKeyword != null) { | 14755 if (node.constKeyword != null) { |
| 13856 _writer.print(node.constKeyword.lexeme); | 14756 _writer.print(node.constKeyword.lexeme); |
| 13857 _writer.print(' '); | 14757 _writer.print(' '); |
| 13858 } | 14758 } |
| 13859 _visitNodeWithSuffix(node.typeArguments, " "); | 14759 _visitNodeWithSuffix(node.typeArguments, " "); |
| 13860 _writer.print("{"); | 14760 _writer.print("{"); |
| 13861 _visitNodeListWithSeparator(node.entries, ", "); | 14761 _visitNodeListWithSeparator(node.entries, ", "); |
| 13862 _writer.print("}"); | 14762 _writer.print("}"); |
| 13863 return null; | 14763 return null; |
| 13864 } | 14764 } |
| 13865 | 14765 |
| 14766 @override |
| 13866 Object visitMapLiteralEntry(MapLiteralEntry node) { | 14767 Object visitMapLiteralEntry(MapLiteralEntry node) { |
| 13867 _visitNode(node.key); | 14768 _visitNode(node.key); |
| 13868 _writer.print(" : "); | 14769 _writer.print(" : "); |
| 13869 _visitNode(node.value); | 14770 _visitNode(node.value); |
| 13870 return null; | 14771 return null; |
| 13871 } | 14772 } |
| 13872 | 14773 |
| 14774 @override |
| 13873 Object visitMethodDeclaration(MethodDeclaration node) { | 14775 Object visitMethodDeclaration(MethodDeclaration node) { |
| 13874 _visitTokenWithSuffix(node.externalKeyword, " "); | 14776 _visitTokenWithSuffix(node.externalKeyword, " "); |
| 13875 _visitTokenWithSuffix(node.modifierKeyword, " "); | 14777 _visitTokenWithSuffix(node.modifierKeyword, " "); |
| 13876 _visitNodeWithSuffix(node.returnType, " "); | 14778 _visitNodeWithSuffix(node.returnType, " "); |
| 13877 _visitTokenWithSuffix(node.propertyKeyword, " "); | 14779 _visitTokenWithSuffix(node.propertyKeyword, " "); |
| 13878 _visitTokenWithSuffix(node.operatorKeyword, " "); | 14780 _visitTokenWithSuffix(node.operatorKeyword, " "); |
| 13879 _visitNode(node.name); | 14781 _visitNode(node.name); |
| 13880 if (!node.isGetter) { | 14782 if (!node.isGetter) { |
| 13881 _visitNode(node.parameters); | 14783 _visitNode(node.parameters); |
| 13882 } | 14784 } |
| 13883 _visitFunctionWithPrefix(" ", node.body); | 14785 _visitFunctionWithPrefix(" ", node.body); |
| 13884 return null; | 14786 return null; |
| 13885 } | 14787 } |
| 13886 | 14788 |
| 14789 @override |
| 13887 Object visitMethodInvocation(MethodInvocation node) { | 14790 Object visitMethodInvocation(MethodInvocation node) { |
| 13888 if (node.isCascaded) { | 14791 if (node.isCascaded) { |
| 13889 _writer.print(".."); | 14792 _writer.print(".."); |
| 13890 } else { | 14793 } else { |
| 13891 _visitNodeWithSuffix(node.target, "."); | 14794 _visitNodeWithSuffix(node.target, "."); |
| 13892 } | 14795 } |
| 13893 _visitNode(node.methodName); | 14796 _visitNode(node.methodName); |
| 13894 _visitNode(node.argumentList); | 14797 _visitNode(node.argumentList); |
| 13895 return null; | 14798 return null; |
| 13896 } | 14799 } |
| 13897 | 14800 |
| 14801 @override |
| 13898 Object visitNamedExpression(NamedExpression node) { | 14802 Object visitNamedExpression(NamedExpression node) { |
| 13899 _visitNode(node.name); | 14803 _visitNode(node.name); |
| 13900 _visitNodeWithPrefix(" ", node.expression); | 14804 _visitNodeWithPrefix(" ", node.expression); |
| 13901 return null; | 14805 return null; |
| 13902 } | 14806 } |
| 13903 | 14807 |
| 14808 @override |
| 13904 Object visitNativeClause(NativeClause node) { | 14809 Object visitNativeClause(NativeClause node) { |
| 13905 _writer.print("native "); | 14810 _writer.print("native "); |
| 13906 _visitNode(node.name); | 14811 _visitNode(node.name); |
| 13907 return null; | 14812 return null; |
| 13908 } | 14813 } |
| 13909 | 14814 |
| 14815 @override |
| 13910 Object visitNativeFunctionBody(NativeFunctionBody node) { | 14816 Object visitNativeFunctionBody(NativeFunctionBody node) { |
| 13911 _writer.print("native "); | 14817 _writer.print("native "); |
| 13912 _visitNode(node.stringLiteral); | 14818 _visitNode(node.stringLiteral); |
| 13913 _writer.print(';'); | 14819 _writer.print(';'); |
| 13914 return null; | 14820 return null; |
| 13915 } | 14821 } |
| 13916 | 14822 |
| 14823 @override |
| 13917 Object visitNullLiteral(NullLiteral node) { | 14824 Object visitNullLiteral(NullLiteral node) { |
| 13918 _writer.print("null"); | 14825 _writer.print("null"); |
| 13919 return null; | 14826 return null; |
| 13920 } | 14827 } |
| 13921 | 14828 |
| 14829 @override |
| 13922 Object visitParenthesizedExpression(ParenthesizedExpression node) { | 14830 Object visitParenthesizedExpression(ParenthesizedExpression node) { |
| 13923 _writer.print('('); | 14831 _writer.print('('); |
| 13924 _visitNode(node.expression); | 14832 _visitNode(node.expression); |
| 13925 _writer.print(')'); | 14833 _writer.print(')'); |
| 13926 return null; | 14834 return null; |
| 13927 } | 14835 } |
| 13928 | 14836 |
| 14837 @override |
| 13929 Object visitPartDirective(PartDirective node) { | 14838 Object visitPartDirective(PartDirective node) { |
| 13930 _writer.print("part "); | 14839 _writer.print("part "); |
| 13931 _visitNode(node.uri); | 14840 _visitNode(node.uri); |
| 13932 _writer.print(';'); | 14841 _writer.print(';'); |
| 13933 return null; | 14842 return null; |
| 13934 } | 14843 } |
| 13935 | 14844 |
| 14845 @override |
| 13936 Object visitPartOfDirective(PartOfDirective node) { | 14846 Object visitPartOfDirective(PartOfDirective node) { |
| 13937 _writer.print("part of "); | 14847 _writer.print("part of "); |
| 13938 _visitNode(node.libraryName); | 14848 _visitNode(node.libraryName); |
| 13939 _writer.print(';'); | 14849 _writer.print(';'); |
| 13940 return null; | 14850 return null; |
| 13941 } | 14851 } |
| 13942 | 14852 |
| 14853 @override |
| 13943 Object visitPostfixExpression(PostfixExpression node) { | 14854 Object visitPostfixExpression(PostfixExpression node) { |
| 13944 _visitNode(node.operand); | 14855 _visitNode(node.operand); |
| 13945 _writer.print(node.operator.lexeme); | 14856 _writer.print(node.operator.lexeme); |
| 13946 return null; | 14857 return null; |
| 13947 } | 14858 } |
| 13948 | 14859 |
| 14860 @override |
| 13949 Object visitPrefixedIdentifier(PrefixedIdentifier node) { | 14861 Object visitPrefixedIdentifier(PrefixedIdentifier node) { |
| 13950 _visitNode(node.prefix); | 14862 _visitNode(node.prefix); |
| 13951 _writer.print('.'); | 14863 _writer.print('.'); |
| 13952 _visitNode(node.identifier); | 14864 _visitNode(node.identifier); |
| 13953 return null; | 14865 return null; |
| 13954 } | 14866 } |
| 13955 | 14867 |
| 14868 @override |
| 13956 Object visitPrefixExpression(PrefixExpression node) { | 14869 Object visitPrefixExpression(PrefixExpression node) { |
| 13957 _writer.print(node.operator.lexeme); | 14870 _writer.print(node.operator.lexeme); |
| 13958 _visitNode(node.operand); | 14871 _visitNode(node.operand); |
| 13959 return null; | 14872 return null; |
| 13960 } | 14873 } |
| 13961 | 14874 |
| 14875 @override |
| 13962 Object visitPropertyAccess(PropertyAccess node) { | 14876 Object visitPropertyAccess(PropertyAccess node) { |
| 13963 if (node.isCascaded) { | 14877 if (node.isCascaded) { |
| 13964 _writer.print(".."); | 14878 _writer.print(".."); |
| 13965 } else { | 14879 } else { |
| 13966 _visitNode(node.target); | 14880 _visitNode(node.target); |
| 13967 _writer.print('.'); | 14881 _writer.print('.'); |
| 13968 } | 14882 } |
| 13969 _visitNode(node.propertyName); | 14883 _visitNode(node.propertyName); |
| 13970 return null; | 14884 return null; |
| 13971 } | 14885 } |
| 13972 | 14886 |
| 14887 @override |
| 13973 Object visitRedirectingConstructorInvocation(RedirectingConstructorInvocation
node) { | 14888 Object visitRedirectingConstructorInvocation(RedirectingConstructorInvocation
node) { |
| 13974 _writer.print("this"); | 14889 _writer.print("this"); |
| 13975 _visitNodeWithPrefix(".", node.constructorName); | 14890 _visitNodeWithPrefix(".", node.constructorName); |
| 13976 _visitNode(node.argumentList); | 14891 _visitNode(node.argumentList); |
| 13977 return null; | 14892 return null; |
| 13978 } | 14893 } |
| 13979 | 14894 |
| 14895 @override |
| 13980 Object visitRethrowExpression(RethrowExpression node) { | 14896 Object visitRethrowExpression(RethrowExpression node) { |
| 13981 _writer.print("rethrow"); | 14897 _writer.print("rethrow"); |
| 13982 return null; | 14898 return null; |
| 13983 } | 14899 } |
| 13984 | 14900 |
| 14901 @override |
| 13985 Object visitReturnStatement(ReturnStatement node) { | 14902 Object visitReturnStatement(ReturnStatement node) { |
| 13986 Expression expression = node.expression; | 14903 Expression expression = node.expression; |
| 13987 if (expression == null) { | 14904 if (expression == null) { |
| 13988 _writer.print("return;"); | 14905 _writer.print("return;"); |
| 13989 } else { | 14906 } else { |
| 13990 _writer.print("return "); | 14907 _writer.print("return "); |
| 13991 expression.accept(this); | 14908 expression.accept(this); |
| 13992 _writer.print(";"); | 14909 _writer.print(";"); |
| 13993 } | 14910 } |
| 13994 return null; | 14911 return null; |
| 13995 } | 14912 } |
| 13996 | 14913 |
| 14914 @override |
| 13997 Object visitScriptTag(ScriptTag node) { | 14915 Object visitScriptTag(ScriptTag node) { |
| 13998 _writer.print(node.scriptTag.lexeme); | 14916 _writer.print(node.scriptTag.lexeme); |
| 13999 return null; | 14917 return null; |
| 14000 } | 14918 } |
| 14001 | 14919 |
| 14920 @override |
| 14002 Object visitShowCombinator(ShowCombinator node) { | 14921 Object visitShowCombinator(ShowCombinator node) { |
| 14003 _writer.print("show "); | 14922 _writer.print("show "); |
| 14004 _visitNodeListWithSeparator(node.shownNames, ", "); | 14923 _visitNodeListWithSeparator(node.shownNames, ", "); |
| 14005 return null; | 14924 return null; |
| 14006 } | 14925 } |
| 14007 | 14926 |
| 14927 @override |
| 14008 Object visitSimpleFormalParameter(SimpleFormalParameter node) { | 14928 Object visitSimpleFormalParameter(SimpleFormalParameter node) { |
| 14009 _visitTokenWithSuffix(node.keyword, " "); | 14929 _visitTokenWithSuffix(node.keyword, " "); |
| 14010 _visitNodeWithSuffix(node.type, " "); | 14930 _visitNodeWithSuffix(node.type, " "); |
| 14011 _visitNode(node.identifier); | 14931 _visitNode(node.identifier); |
| 14012 return null; | 14932 return null; |
| 14013 } | 14933 } |
| 14014 | 14934 |
| 14935 @override |
| 14015 Object visitSimpleIdentifier(SimpleIdentifier node) { | 14936 Object visitSimpleIdentifier(SimpleIdentifier node) { |
| 14016 _writer.print(node.token.lexeme); | 14937 _writer.print(node.token.lexeme); |
| 14017 return null; | 14938 return null; |
| 14018 } | 14939 } |
| 14019 | 14940 |
| 14941 @override |
| 14020 Object visitSimpleStringLiteral(SimpleStringLiteral node) { | 14942 Object visitSimpleStringLiteral(SimpleStringLiteral node) { |
| 14021 _writer.print(node.literal.lexeme); | 14943 _writer.print(node.literal.lexeme); |
| 14022 return null; | 14944 return null; |
| 14023 } | 14945 } |
| 14024 | 14946 |
| 14947 @override |
| 14025 Object visitStringInterpolation(StringInterpolation node) { | 14948 Object visitStringInterpolation(StringInterpolation node) { |
| 14026 _visitNodeList(node.elements); | 14949 _visitNodeList(node.elements); |
| 14027 return null; | 14950 return null; |
| 14028 } | 14951 } |
| 14029 | 14952 |
| 14953 @override |
| 14030 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) { | 14954 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
| 14031 _writer.print("super"); | 14955 _writer.print("super"); |
| 14032 _visitNodeWithPrefix(".", node.constructorName); | 14956 _visitNodeWithPrefix(".", node.constructorName); |
| 14033 _visitNode(node.argumentList); | 14957 _visitNode(node.argumentList); |
| 14034 return null; | 14958 return null; |
| 14035 } | 14959 } |
| 14036 | 14960 |
| 14961 @override |
| 14037 Object visitSuperExpression(SuperExpression node) { | 14962 Object visitSuperExpression(SuperExpression node) { |
| 14038 _writer.print("super"); | 14963 _writer.print("super"); |
| 14039 return null; | 14964 return null; |
| 14040 } | 14965 } |
| 14041 | 14966 |
| 14967 @override |
| 14042 Object visitSwitchCase(SwitchCase node) { | 14968 Object visitSwitchCase(SwitchCase node) { |
| 14043 _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); | 14969 _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); |
| 14044 _writer.print("case "); | 14970 _writer.print("case "); |
| 14045 _visitNode(node.expression); | 14971 _visitNode(node.expression); |
| 14046 _writer.print(": "); | 14972 _writer.print(": "); |
| 14047 _visitNodeListWithSeparator(node.statements, " "); | 14973 _visitNodeListWithSeparator(node.statements, " "); |
| 14048 return null; | 14974 return null; |
| 14049 } | 14975 } |
| 14050 | 14976 |
| 14977 @override |
| 14051 Object visitSwitchDefault(SwitchDefault node) { | 14978 Object visitSwitchDefault(SwitchDefault node) { |
| 14052 _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); | 14979 _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " "); |
| 14053 _writer.print("default: "); | 14980 _writer.print("default: "); |
| 14054 _visitNodeListWithSeparator(node.statements, " "); | 14981 _visitNodeListWithSeparator(node.statements, " "); |
| 14055 return null; | 14982 return null; |
| 14056 } | 14983 } |
| 14057 | 14984 |
| 14985 @override |
| 14058 Object visitSwitchStatement(SwitchStatement node) { | 14986 Object visitSwitchStatement(SwitchStatement node) { |
| 14059 _writer.print("switch ("); | 14987 _writer.print("switch ("); |
| 14060 _visitNode(node.expression); | 14988 _visitNode(node.expression); |
| 14061 _writer.print(") {"); | 14989 _writer.print(") {"); |
| 14062 _visitNodeListWithSeparator(node.members, " "); | 14990 _visitNodeListWithSeparator(node.members, " "); |
| 14063 _writer.print("}"); | 14991 _writer.print("}"); |
| 14064 return null; | 14992 return null; |
| 14065 } | 14993 } |
| 14066 | 14994 |
| 14995 @override |
| 14067 Object visitSymbolLiteral(SymbolLiteral node) { | 14996 Object visitSymbolLiteral(SymbolLiteral node) { |
| 14068 _writer.print("#"); | 14997 _writer.print("#"); |
| 14069 List<Token> components = node.components; | 14998 List<Token> components = node.components; |
| 14070 for (int i = 0; i < components.length; i++) { | 14999 for (int i = 0; i < components.length; i++) { |
| 14071 if (i > 0) { | 15000 if (i > 0) { |
| 14072 _writer.print("."); | 15001 _writer.print("."); |
| 14073 } | 15002 } |
| 14074 _writer.print(components[i].lexeme); | 15003 _writer.print(components[i].lexeme); |
| 14075 } | 15004 } |
| 14076 return null; | 15005 return null; |
| 14077 } | 15006 } |
| 14078 | 15007 |
| 15008 @override |
| 14079 Object visitThisExpression(ThisExpression node) { | 15009 Object visitThisExpression(ThisExpression node) { |
| 14080 _writer.print("this"); | 15010 _writer.print("this"); |
| 14081 return null; | 15011 return null; |
| 14082 } | 15012 } |
| 14083 | 15013 |
| 15014 @override |
| 14084 Object visitThrowExpression(ThrowExpression node) { | 15015 Object visitThrowExpression(ThrowExpression node) { |
| 14085 _writer.print("throw "); | 15016 _writer.print("throw "); |
| 14086 _visitNode(node.expression); | 15017 _visitNode(node.expression); |
| 14087 return null; | 15018 return null; |
| 14088 } | 15019 } |
| 14089 | 15020 |
| 15021 @override |
| 14090 Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { | 15022 Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { |
| 14091 _visitNodeWithSuffix(node.variables, ";"); | 15023 _visitNodeWithSuffix(node.variables, ";"); |
| 14092 return null; | 15024 return null; |
| 14093 } | 15025 } |
| 14094 | 15026 |
| 15027 @override |
| 14095 Object visitTryStatement(TryStatement node) { | 15028 Object visitTryStatement(TryStatement node) { |
| 14096 _writer.print("try "); | 15029 _writer.print("try "); |
| 14097 _visitNode(node.body); | 15030 _visitNode(node.body); |
| 14098 _visitNodeListWithSeparatorAndPrefix(" ", node.catchClauses, " "); | 15031 _visitNodeListWithSeparatorAndPrefix(" ", node.catchClauses, " "); |
| 14099 _visitNodeWithPrefix(" finally ", node.finallyBlock); | 15032 _visitNodeWithPrefix(" finally ", node.finallyBlock); |
| 14100 return null; | 15033 return null; |
| 14101 } | 15034 } |
| 14102 | 15035 |
| 15036 @override |
| 14103 Object visitTypeArgumentList(TypeArgumentList node) { | 15037 Object visitTypeArgumentList(TypeArgumentList node) { |
| 14104 _writer.print('<'); | 15038 _writer.print('<'); |
| 14105 _visitNodeListWithSeparator(node.arguments, ", "); | 15039 _visitNodeListWithSeparator(node.arguments, ", "); |
| 14106 _writer.print('>'); | 15040 _writer.print('>'); |
| 14107 return null; | 15041 return null; |
| 14108 } | 15042 } |
| 14109 | 15043 |
| 15044 @override |
| 14110 Object visitTypeName(TypeName node) { | 15045 Object visitTypeName(TypeName node) { |
| 14111 _visitNode(node.name); | 15046 _visitNode(node.name); |
| 14112 _visitNode(node.typeArguments); | 15047 _visitNode(node.typeArguments); |
| 14113 return null; | 15048 return null; |
| 14114 } | 15049 } |
| 14115 | 15050 |
| 15051 @override |
| 14116 Object visitTypeParameter(TypeParameter node) { | 15052 Object visitTypeParameter(TypeParameter node) { |
| 14117 _visitNode(node.name); | 15053 _visitNode(node.name); |
| 14118 _visitNodeWithPrefix(" extends ", node.bound); | 15054 _visitNodeWithPrefix(" extends ", node.bound); |
| 14119 return null; | 15055 return null; |
| 14120 } | 15056 } |
| 14121 | 15057 |
| 15058 @override |
| 14122 Object visitTypeParameterList(TypeParameterList node) { | 15059 Object visitTypeParameterList(TypeParameterList node) { |
| 14123 _writer.print('<'); | 15060 _writer.print('<'); |
| 14124 _visitNodeListWithSeparator(node.typeParameters, ", "); | 15061 _visitNodeListWithSeparator(node.typeParameters, ", "); |
| 14125 _writer.print('>'); | 15062 _writer.print('>'); |
| 14126 return null; | 15063 return null; |
| 14127 } | 15064 } |
| 14128 | 15065 |
| 15066 @override |
| 14129 Object visitVariableDeclaration(VariableDeclaration node) { | 15067 Object visitVariableDeclaration(VariableDeclaration node) { |
| 14130 _visitNode(node.name); | 15068 _visitNode(node.name); |
| 14131 _visitNodeWithPrefix(" = ", node.initializer); | 15069 _visitNodeWithPrefix(" = ", node.initializer); |
| 14132 return null; | 15070 return null; |
| 14133 } | 15071 } |
| 14134 | 15072 |
| 15073 @override |
| 14135 Object visitVariableDeclarationList(VariableDeclarationList node) { | 15074 Object visitVariableDeclarationList(VariableDeclarationList node) { |
| 14136 _visitTokenWithSuffix(node.keyword, " "); | 15075 _visitTokenWithSuffix(node.keyword, " "); |
| 14137 _visitNodeWithSuffix(node.type, " "); | 15076 _visitNodeWithSuffix(node.type, " "); |
| 14138 _visitNodeListWithSeparator(node.variables, ", "); | 15077 _visitNodeListWithSeparator(node.variables, ", "); |
| 14139 return null; | 15078 return null; |
| 14140 } | 15079 } |
| 14141 | 15080 |
| 15081 @override |
| 14142 Object visitVariableDeclarationStatement(VariableDeclarationStatement node) { | 15082 Object visitVariableDeclarationStatement(VariableDeclarationStatement node) { |
| 14143 _visitNode(node.variables); | 15083 _visitNode(node.variables); |
| 14144 _writer.print(";"); | 15084 _writer.print(";"); |
| 14145 return null; | 15085 return null; |
| 14146 } | 15086 } |
| 14147 | 15087 |
| 15088 @override |
| 14148 Object visitWhileStatement(WhileStatement node) { | 15089 Object visitWhileStatement(WhileStatement node) { |
| 14149 _writer.print("while ("); | 15090 _writer.print("while ("); |
| 14150 _visitNode(node.condition); | 15091 _visitNode(node.condition); |
| 14151 _writer.print(") "); | 15092 _writer.print(") "); |
| 14152 _visitNode(node.body); | 15093 _visitNode(node.body); |
| 14153 return null; | 15094 return null; |
| 14154 } | 15095 } |
| 14155 | 15096 |
| 15097 @override |
| 14156 Object visitWithClause(WithClause node) { | 15098 Object visitWithClause(WithClause node) { |
| 14157 _writer.print("with "); | 15099 _writer.print("with "); |
| 14158 _visitNodeListWithSeparator(node.mixinTypes, ", "); | 15100 _visitNodeListWithSeparator(node.mixinTypes, ", "); |
| 14159 return null; | 15101 return null; |
| 14160 } | 15102 } |
| 14161 | 15103 |
| 14162 /** | 15104 /** |
| 14163 * Visit the given function body, printing the prefix before if given body is
not empty. | 15105 * Visit the given function body, printing the prefix before if given body is
not empty. |
| 14164 * | 15106 * |
| 14165 * @param prefix the prefix to be printed if there is a node to visit | 15107 * @param prefix the prefix to be printed if there is a node to visit |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14299 * Instances of the class `UnifyingAstVisitor` implement an AST visitor that wil
l recursively | 15241 * Instances of the class `UnifyingAstVisitor` implement an AST visitor that wil
l recursively |
| 14300 * visit all of the nodes in an AST structure (like instances of the class | 15242 * visit all of the nodes in an AST structure (like instances of the class |
| 14301 * [RecursiveAstVisitor]). In addition, every node will also be visited by using
a single | 15243 * [RecursiveAstVisitor]). In addition, every node will also be visited by using
a single |
| 14302 * unified [visitNode] method. | 15244 * unified [visitNode] method. |
| 14303 * | 15245 * |
| 14304 * Subclasses that override a visit method must either invoke the overridden vis
it method or | 15246 * Subclasses that override a visit method must either invoke the overridden vis
it method or |
| 14305 * explicitly invoke the more general [visitNode] method. Failure to do so will | 15247 * explicitly invoke the more general [visitNode] method. Failure to do so will |
| 14306 * cause the children of the visited node to not be visited. | 15248 * cause the children of the visited node to not be visited. |
| 14307 */ | 15249 */ |
| 14308 class UnifyingAstVisitor<R> implements AstVisitor<R> { | 15250 class UnifyingAstVisitor<R> implements AstVisitor<R> { |
| 15251 @override |
| 14309 R visitAdjacentStrings(AdjacentStrings node) => visitNode(node); | 15252 R visitAdjacentStrings(AdjacentStrings node) => visitNode(node); |
| 14310 | 15253 |
| 15254 @override |
| 14311 R visitAnnotation(Annotation node) => visitNode(node); | 15255 R visitAnnotation(Annotation node) => visitNode(node); |
| 14312 | 15256 |
| 15257 @override |
| 14313 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => visitNode(node); | 15258 R visitArgumentDefinitionTest(ArgumentDefinitionTest node) => visitNode(node); |
| 14314 | 15259 |
| 15260 @override |
| 14315 R visitArgumentList(ArgumentList node) => visitNode(node); | 15261 R visitArgumentList(ArgumentList node) => visitNode(node); |
| 14316 | 15262 |
| 15263 @override |
| 14317 R visitAsExpression(AsExpression node) => visitNode(node); | 15264 R visitAsExpression(AsExpression node) => visitNode(node); |
| 14318 | 15265 |
| 15266 @override |
| 14319 R visitAssertStatement(AssertStatement node) => visitNode(node); | 15267 R visitAssertStatement(AssertStatement node) => visitNode(node); |
| 14320 | 15268 |
| 15269 @override |
| 14321 R visitAssignmentExpression(AssignmentExpression node) => visitNode(node); | 15270 R visitAssignmentExpression(AssignmentExpression node) => visitNode(node); |
| 14322 | 15271 |
| 15272 @override |
| 14323 R visitBinaryExpression(BinaryExpression node) => visitNode(node); | 15273 R visitBinaryExpression(BinaryExpression node) => visitNode(node); |
| 14324 | 15274 |
| 15275 @override |
| 14325 R visitBlock(Block node) => visitNode(node); | 15276 R visitBlock(Block node) => visitNode(node); |
| 14326 | 15277 |
| 15278 @override |
| 14327 R visitBlockFunctionBody(BlockFunctionBody node) => visitNode(node); | 15279 R visitBlockFunctionBody(BlockFunctionBody node) => visitNode(node); |
| 14328 | 15280 |
| 15281 @override |
| 14329 R visitBooleanLiteral(BooleanLiteral node) => visitNode(node); | 15282 R visitBooleanLiteral(BooleanLiteral node) => visitNode(node); |
| 14330 | 15283 |
| 15284 @override |
| 14331 R visitBreakStatement(BreakStatement node) => visitNode(node); | 15285 R visitBreakStatement(BreakStatement node) => visitNode(node); |
| 14332 | 15286 |
| 15287 @override |
| 14333 R visitCascadeExpression(CascadeExpression node) => visitNode(node); | 15288 R visitCascadeExpression(CascadeExpression node) => visitNode(node); |
| 14334 | 15289 |
| 15290 @override |
| 14335 R visitCatchClause(CatchClause node) => visitNode(node); | 15291 R visitCatchClause(CatchClause node) => visitNode(node); |
| 14336 | 15292 |
| 15293 @override |
| 14337 R visitClassDeclaration(ClassDeclaration node) => visitNode(node); | 15294 R visitClassDeclaration(ClassDeclaration node) => visitNode(node); |
| 14338 | 15295 |
| 15296 @override |
| 14339 R visitClassTypeAlias(ClassTypeAlias node) => visitNode(node); | 15297 R visitClassTypeAlias(ClassTypeAlias node) => visitNode(node); |
| 14340 | 15298 |
| 15299 @override |
| 14341 R visitComment(Comment node) => visitNode(node); | 15300 R visitComment(Comment node) => visitNode(node); |
| 14342 | 15301 |
| 15302 @override |
| 14343 R visitCommentReference(CommentReference node) => visitNode(node); | 15303 R visitCommentReference(CommentReference node) => visitNode(node); |
| 14344 | 15304 |
| 15305 @override |
| 14345 R visitCompilationUnit(CompilationUnit node) => visitNode(node); | 15306 R visitCompilationUnit(CompilationUnit node) => visitNode(node); |
| 14346 | 15307 |
| 15308 @override |
| 14347 R visitConditionalExpression(ConditionalExpression node) => visitNode(node); | 15309 R visitConditionalExpression(ConditionalExpression node) => visitNode(node); |
| 14348 | 15310 |
| 15311 @override |
| 14349 R visitConstructorDeclaration(ConstructorDeclaration node) => visitNode(node); | 15312 R visitConstructorDeclaration(ConstructorDeclaration node) => visitNode(node); |
| 14350 | 15313 |
| 15314 @override |
| 14351 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) => visitN
ode(node); | 15315 R visitConstructorFieldInitializer(ConstructorFieldInitializer node) => visitN
ode(node); |
| 14352 | 15316 |
| 15317 @override |
| 14353 R visitConstructorName(ConstructorName node) => visitNode(node); | 15318 R visitConstructorName(ConstructorName node) => visitNode(node); |
| 14354 | 15319 |
| 15320 @override |
| 14355 R visitContinueStatement(ContinueStatement node) => visitNode(node); | 15321 R visitContinueStatement(ContinueStatement node) => visitNode(node); |
| 14356 | 15322 |
| 15323 @override |
| 14357 R visitDeclaredIdentifier(DeclaredIdentifier node) => visitNode(node); | 15324 R visitDeclaredIdentifier(DeclaredIdentifier node) => visitNode(node); |
| 14358 | 15325 |
| 15326 @override |
| 14359 R visitDefaultFormalParameter(DefaultFormalParameter node) => visitNode(node); | 15327 R visitDefaultFormalParameter(DefaultFormalParameter node) => visitNode(node); |
| 14360 | 15328 |
| 15329 @override |
| 14361 R visitDoStatement(DoStatement node) => visitNode(node); | 15330 R visitDoStatement(DoStatement node) => visitNode(node); |
| 14362 | 15331 |
| 15332 @override |
| 14363 R visitDoubleLiteral(DoubleLiteral node) => visitNode(node); | 15333 R visitDoubleLiteral(DoubleLiteral node) => visitNode(node); |
| 14364 | 15334 |
| 15335 @override |
| 14365 R visitEmptyFunctionBody(EmptyFunctionBody node) => visitNode(node); | 15336 R visitEmptyFunctionBody(EmptyFunctionBody node) => visitNode(node); |
| 14366 | 15337 |
| 15338 @override |
| 14367 R visitEmptyStatement(EmptyStatement node) => visitNode(node); | 15339 R visitEmptyStatement(EmptyStatement node) => visitNode(node); |
| 14368 | 15340 |
| 15341 @override |
| 14369 R visitExportDirective(ExportDirective node) => visitNode(node); | 15342 R visitExportDirective(ExportDirective node) => visitNode(node); |
| 14370 | 15343 |
| 15344 @override |
| 14371 R visitExpressionFunctionBody(ExpressionFunctionBody node) => visitNode(node); | 15345 R visitExpressionFunctionBody(ExpressionFunctionBody node) => visitNode(node); |
| 14372 | 15346 |
| 15347 @override |
| 14373 R visitExpressionStatement(ExpressionStatement node) => visitNode(node); | 15348 R visitExpressionStatement(ExpressionStatement node) => visitNode(node); |
| 14374 | 15349 |
| 15350 @override |
| 14375 R visitExtendsClause(ExtendsClause node) => visitNode(node); | 15351 R visitExtendsClause(ExtendsClause node) => visitNode(node); |
| 14376 | 15352 |
| 15353 @override |
| 14377 R visitFieldDeclaration(FieldDeclaration node) => visitNode(node); | 15354 R visitFieldDeclaration(FieldDeclaration node) => visitNode(node); |
| 14378 | 15355 |
| 15356 @override |
| 14379 R visitFieldFormalParameter(FieldFormalParameter node) => visitNode(node); | 15357 R visitFieldFormalParameter(FieldFormalParameter node) => visitNode(node); |
| 14380 | 15358 |
| 15359 @override |
| 14381 R visitForEachStatement(ForEachStatement node) => visitNode(node); | 15360 R visitForEachStatement(ForEachStatement node) => visitNode(node); |
| 14382 | 15361 |
| 15362 @override |
| 14383 R visitFormalParameterList(FormalParameterList node) => visitNode(node); | 15363 R visitFormalParameterList(FormalParameterList node) => visitNode(node); |
| 14384 | 15364 |
| 15365 @override |
| 14385 R visitForStatement(ForStatement node) => visitNode(node); | 15366 R visitForStatement(ForStatement node) => visitNode(node); |
| 14386 | 15367 |
| 15368 @override |
| 14387 R visitFunctionDeclaration(FunctionDeclaration node) => visitNode(node); | 15369 R visitFunctionDeclaration(FunctionDeclaration node) => visitNode(node); |
| 14388 | 15370 |
| 15371 @override |
| 14389 R visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => visi
tNode(node); | 15372 R visitFunctionDeclarationStatement(FunctionDeclarationStatement node) => visi
tNode(node); |
| 14390 | 15373 |
| 15374 @override |
| 14391 R visitFunctionExpression(FunctionExpression node) => visitNode(node); | 15375 R visitFunctionExpression(FunctionExpression node) => visitNode(node); |
| 14392 | 15376 |
| 15377 @override |
| 14393 R visitFunctionExpressionInvocation(FunctionExpressionInvocation node) => visi
tNode(node); | 15378 R visitFunctionExpressionInvocation(FunctionExpressionInvocation node) => visi
tNode(node); |
| 14394 | 15379 |
| 15380 @override |
| 14395 R visitFunctionTypeAlias(FunctionTypeAlias node) => visitNode(node); | 15381 R visitFunctionTypeAlias(FunctionTypeAlias node) => visitNode(node); |
| 14396 | 15382 |
| 15383 @override |
| 14397 R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => visi
tNode(node); | 15384 R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) => visi
tNode(node); |
| 14398 | 15385 |
| 15386 @override |
| 14399 R visitHideCombinator(HideCombinator node) => visitNode(node); | 15387 R visitHideCombinator(HideCombinator node) => visitNode(node); |
| 14400 | 15388 |
| 15389 @override |
| 14401 R visitIfStatement(IfStatement node) => visitNode(node); | 15390 R visitIfStatement(IfStatement node) => visitNode(node); |
| 14402 | 15391 |
| 15392 @override |
| 14403 R visitImplementsClause(ImplementsClause node) => visitNode(node); | 15393 R visitImplementsClause(ImplementsClause node) => visitNode(node); |
| 14404 | 15394 |
| 15395 @override |
| 14405 R visitImportDirective(ImportDirective node) => visitNode(node); | 15396 R visitImportDirective(ImportDirective node) => visitNode(node); |
| 14406 | 15397 |
| 15398 @override |
| 14407 R visitIndexExpression(IndexExpression node) => visitNode(node); | 15399 R visitIndexExpression(IndexExpression node) => visitNode(node); |
| 14408 | 15400 |
| 15401 @override |
| 14409 R visitInstanceCreationExpression(InstanceCreationExpression node) => visitNod
e(node); | 15402 R visitInstanceCreationExpression(InstanceCreationExpression node) => visitNod
e(node); |
| 14410 | 15403 |
| 15404 @override |
| 14411 R visitIntegerLiteral(IntegerLiteral node) => visitNode(node); | 15405 R visitIntegerLiteral(IntegerLiteral node) => visitNode(node); |
| 14412 | 15406 |
| 15407 @override |
| 14413 R visitInterpolationExpression(InterpolationExpression node) => visitNode(node
); | 15408 R visitInterpolationExpression(InterpolationExpression node) => visitNode(node
); |
| 14414 | 15409 |
| 15410 @override |
| 14415 R visitInterpolationString(InterpolationString node) => visitNode(node); | 15411 R visitInterpolationString(InterpolationString node) => visitNode(node); |
| 14416 | 15412 |
| 15413 @override |
| 14417 R visitIsExpression(IsExpression node) => visitNode(node); | 15414 R visitIsExpression(IsExpression node) => visitNode(node); |
| 14418 | 15415 |
| 15416 @override |
| 14419 R visitLabel(Label node) => visitNode(node); | 15417 R visitLabel(Label node) => visitNode(node); |
| 14420 | 15418 |
| 15419 @override |
| 14421 R visitLabeledStatement(LabeledStatement node) => visitNode(node); | 15420 R visitLabeledStatement(LabeledStatement node) => visitNode(node); |
| 14422 | 15421 |
| 15422 @override |
| 14423 R visitLibraryDirective(LibraryDirective node) => visitNode(node); | 15423 R visitLibraryDirective(LibraryDirective node) => visitNode(node); |
| 14424 | 15424 |
| 15425 @override |
| 14425 R visitLibraryIdentifier(LibraryIdentifier node) => visitNode(node); | 15426 R visitLibraryIdentifier(LibraryIdentifier node) => visitNode(node); |
| 14426 | 15427 |
| 15428 @override |
| 14427 R visitListLiteral(ListLiteral node) => visitNode(node); | 15429 R visitListLiteral(ListLiteral node) => visitNode(node); |
| 14428 | 15430 |
| 15431 @override |
| 14429 R visitMapLiteral(MapLiteral node) => visitNode(node); | 15432 R visitMapLiteral(MapLiteral node) => visitNode(node); |
| 14430 | 15433 |
| 15434 @override |
| 14431 R visitMapLiteralEntry(MapLiteralEntry node) => visitNode(node); | 15435 R visitMapLiteralEntry(MapLiteralEntry node) => visitNode(node); |
| 14432 | 15436 |
| 15437 @override |
| 14433 R visitMethodDeclaration(MethodDeclaration node) => visitNode(node); | 15438 R visitMethodDeclaration(MethodDeclaration node) => visitNode(node); |
| 14434 | 15439 |
| 15440 @override |
| 14435 R visitMethodInvocation(MethodInvocation node) => visitNode(node); | 15441 R visitMethodInvocation(MethodInvocation node) => visitNode(node); |
| 14436 | 15442 |
| 15443 @override |
| 14437 R visitNamedExpression(NamedExpression node) => visitNode(node); | 15444 R visitNamedExpression(NamedExpression node) => visitNode(node); |
| 14438 | 15445 |
| 15446 @override |
| 14439 R visitNativeClause(NativeClause node) => visitNode(node); | 15447 R visitNativeClause(NativeClause node) => visitNode(node); |
| 14440 | 15448 |
| 15449 @override |
| 14441 R visitNativeFunctionBody(NativeFunctionBody node) => visitNode(node); | 15450 R visitNativeFunctionBody(NativeFunctionBody node) => visitNode(node); |
| 14442 | 15451 |
| 14443 R visitNode(AstNode node) { | 15452 R visitNode(AstNode node) { |
| 14444 node.visitChildren(this); | 15453 node.visitChildren(this); |
| 14445 return null; | 15454 return null; |
| 14446 } | 15455 } |
| 14447 | 15456 |
| 15457 @override |
| 14448 R visitNullLiteral(NullLiteral node) => visitNode(node); | 15458 R visitNullLiteral(NullLiteral node) => visitNode(node); |
| 14449 | 15459 |
| 15460 @override |
| 14450 R visitParenthesizedExpression(ParenthesizedExpression node) => visitNode(node
); | 15461 R visitParenthesizedExpression(ParenthesizedExpression node) => visitNode(node
); |
| 14451 | 15462 |
| 15463 @override |
| 14452 R visitPartDirective(PartDirective node) => visitNode(node); | 15464 R visitPartDirective(PartDirective node) => visitNode(node); |
| 14453 | 15465 |
| 15466 @override |
| 14454 R visitPartOfDirective(PartOfDirective node) => visitNode(node); | 15467 R visitPartOfDirective(PartOfDirective node) => visitNode(node); |
| 14455 | 15468 |
| 15469 @override |
| 14456 R visitPostfixExpression(PostfixExpression node) => visitNode(node); | 15470 R visitPostfixExpression(PostfixExpression node) => visitNode(node); |
| 14457 | 15471 |
| 15472 @override |
| 14458 R visitPrefixedIdentifier(PrefixedIdentifier node) => visitNode(node); | 15473 R visitPrefixedIdentifier(PrefixedIdentifier node) => visitNode(node); |
| 14459 | 15474 |
| 15475 @override |
| 14460 R visitPrefixExpression(PrefixExpression node) => visitNode(node); | 15476 R visitPrefixExpression(PrefixExpression node) => visitNode(node); |
| 14461 | 15477 |
| 15478 @override |
| 14462 R visitPropertyAccess(PropertyAccess node) => visitNode(node); | 15479 R visitPropertyAccess(PropertyAccess node) => visitNode(node); |
| 14463 | 15480 |
| 15481 @override |
| 14464 R visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node)
=> visitNode(node); | 15482 R visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node)
=> visitNode(node); |
| 14465 | 15483 |
| 15484 @override |
| 14466 R visitRethrowExpression(RethrowExpression node) => visitNode(node); | 15485 R visitRethrowExpression(RethrowExpression node) => visitNode(node); |
| 14467 | 15486 |
| 15487 @override |
| 14468 R visitReturnStatement(ReturnStatement node) => visitNode(node); | 15488 R visitReturnStatement(ReturnStatement node) => visitNode(node); |
| 14469 | 15489 |
| 15490 @override |
| 14470 R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag); | 15491 R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag); |
| 14471 | 15492 |
| 15493 @override |
| 14472 R visitShowCombinator(ShowCombinator node) => visitNode(node); | 15494 R visitShowCombinator(ShowCombinator node) => visitNode(node); |
| 14473 | 15495 |
| 15496 @override |
| 14474 R visitSimpleFormalParameter(SimpleFormalParameter node) => visitNode(node); | 15497 R visitSimpleFormalParameter(SimpleFormalParameter node) => visitNode(node); |
| 14475 | 15498 |
| 15499 @override |
| 14476 R visitSimpleIdentifier(SimpleIdentifier node) => visitNode(node); | 15500 R visitSimpleIdentifier(SimpleIdentifier node) => visitNode(node); |
| 14477 | 15501 |
| 15502 @override |
| 14478 R visitSimpleStringLiteral(SimpleStringLiteral node) => visitNode(node); | 15503 R visitSimpleStringLiteral(SimpleStringLiteral node) => visitNode(node); |
| 14479 | 15504 |
| 15505 @override |
| 14480 R visitStringInterpolation(StringInterpolation node) => visitNode(node); | 15506 R visitStringInterpolation(StringInterpolation node) => visitNode(node); |
| 14481 | 15507 |
| 15508 @override |
| 14482 R visitSuperConstructorInvocation(SuperConstructorInvocation node) => visitNod
e(node); | 15509 R visitSuperConstructorInvocation(SuperConstructorInvocation node) => visitNod
e(node); |
| 14483 | 15510 |
| 15511 @override |
| 14484 R visitSuperExpression(SuperExpression node) => visitNode(node); | 15512 R visitSuperExpression(SuperExpression node) => visitNode(node); |
| 14485 | 15513 |
| 15514 @override |
| 14486 R visitSwitchCase(SwitchCase node) => visitNode(node); | 15515 R visitSwitchCase(SwitchCase node) => visitNode(node); |
| 14487 | 15516 |
| 15517 @override |
| 14488 R visitSwitchDefault(SwitchDefault node) => visitNode(node); | 15518 R visitSwitchDefault(SwitchDefault node) => visitNode(node); |
| 14489 | 15519 |
| 15520 @override |
| 14490 R visitSwitchStatement(SwitchStatement node) => visitNode(node); | 15521 R visitSwitchStatement(SwitchStatement node) => visitNode(node); |
| 14491 | 15522 |
| 15523 @override |
| 14492 R visitSymbolLiteral(SymbolLiteral node) => visitNode(node); | 15524 R visitSymbolLiteral(SymbolLiteral node) => visitNode(node); |
| 14493 | 15525 |
| 15526 @override |
| 14494 R visitThisExpression(ThisExpression node) => visitNode(node); | 15527 R visitThisExpression(ThisExpression node) => visitNode(node); |
| 14495 | 15528 |
| 15529 @override |
| 14496 R visitThrowExpression(ThrowExpression node) => visitNode(node); | 15530 R visitThrowExpression(ThrowExpression node) => visitNode(node); |
| 14497 | 15531 |
| 15532 @override |
| 14498 R visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => visitN
ode(node); | 15533 R visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) => visitN
ode(node); |
| 14499 | 15534 |
| 15535 @override |
| 14500 R visitTryStatement(TryStatement node) => visitNode(node); | 15536 R visitTryStatement(TryStatement node) => visitNode(node); |
| 14501 | 15537 |
| 15538 @override |
| 14502 R visitTypeArgumentList(TypeArgumentList node) => visitNode(node); | 15539 R visitTypeArgumentList(TypeArgumentList node) => visitNode(node); |
| 14503 | 15540 |
| 15541 @override |
| 14504 R visitTypeName(TypeName node) => visitNode(node); | 15542 R visitTypeName(TypeName node) => visitNode(node); |
| 14505 | 15543 |
| 15544 @override |
| 14506 R visitTypeParameter(TypeParameter node) => visitNode(node); | 15545 R visitTypeParameter(TypeParameter node) => visitNode(node); |
| 14507 | 15546 |
| 15547 @override |
| 14508 R visitTypeParameterList(TypeParameterList node) => visitNode(node); | 15548 R visitTypeParameterList(TypeParameterList node) => visitNode(node); |
| 14509 | 15549 |
| 15550 @override |
| 14510 R visitVariableDeclaration(VariableDeclaration node) => visitNode(node); | 15551 R visitVariableDeclaration(VariableDeclaration node) => visitNode(node); |
| 14511 | 15552 |
| 15553 @override |
| 14512 R visitVariableDeclarationList(VariableDeclarationList node) => visitNode(node
); | 15554 R visitVariableDeclarationList(VariableDeclarationList node) => visitNode(node
); |
| 14513 | 15555 |
| 15556 @override |
| 14514 R visitVariableDeclarationStatement(VariableDeclarationStatement node) => visi
tNode(node); | 15557 R visitVariableDeclarationStatement(VariableDeclarationStatement node) => visi
tNode(node); |
| 14515 | 15558 |
| 15559 @override |
| 14516 R visitWhileStatement(WhileStatement node) => visitNode(node); | 15560 R visitWhileStatement(WhileStatement node) => visitNode(node); |
| 14517 | 15561 |
| 15562 @override |
| 14518 R visitWithClause(WithClause node) => visitNode(node); | 15563 R visitWithClause(WithClause node) => visitNode(node); |
| 14519 } | 15564 } |
| 14520 | 15565 |
| 14521 /** | 15566 /** |
| 14522 * Instances of the class `AstCloner` implement an object that will clone any AS
T structure | 15567 * Instances of the class `AstCloner` implement an object that will clone any AS
T structure |
| 14523 * that it visits. The cloner will only clone the structure, it will not preserv
e any resolution | 15568 * that it visits. The cloner will only clone the structure, it will not preserv
e any resolution |
| 14524 * results or properties associated with the nodes. | 15569 * results or properties associated with the nodes. |
| 14525 */ | 15570 */ |
| 14526 class AstCloner implements AstVisitor<AstNode> { | 15571 class AstCloner implements AstVisitor<AstNode> { |
| 15572 @override |
| 14527 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); | 15573 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); |
| 14528 | 15574 |
| 15575 @override |
| 14529 Annotation visitAnnotation(Annotation node) => new Annotation(node.atSign, _cl
oneNode(node.name), node.period, _cloneNode(node.constructorName), _cloneNode(no
de.arguments)); | 15576 Annotation visitAnnotation(Annotation node) => new Annotation(node.atSign, _cl
oneNode(node.name), node.period, _cloneNode(node.constructorName), _cloneNode(no
de.arguments)); |
| 14530 | 15577 |
| 15578 @override |
| 14531 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node
) => new ArgumentDefinitionTest(node.question, _cloneNode(node.identifier)); | 15579 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node
) => new ArgumentDefinitionTest(node.question, _cloneNode(node.identifier)); |
| 14532 | 15580 |
| 15581 @override |
| 14533 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(node.lef
tParenthesis, _cloneNodeList(node.arguments), node.rightParenthesis); | 15582 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(node.lef
tParenthesis, _cloneNodeList(node.arguments), node.rightParenthesis); |
| 14534 | 15583 |
| 15584 @override |
| 14535 AsExpression visitAsExpression(AsExpression node) => new AsExpression(_cloneNo
de(node.expression), node.asOperator, _cloneNode(node.type)); | 15585 AsExpression visitAsExpression(AsExpression node) => new AsExpression(_cloneNo
de(node.expression), node.asOperator, _cloneNode(node.type)); |
| 14536 | 15586 |
| 15587 @override |
| 14537 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(node
.keyword, node.leftParenthesis, _cloneNode(node.condition), node.rightParenthesi
s, node.semicolon); | 15588 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(node
.keyword, node.leftParenthesis, _cloneNode(node.condition), node.rightParenthesi
s, node.semicolon); |
| 14538 | 15589 |
| 15590 @override |
| 14539 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => n
ew AssignmentExpression(_cloneNode(node.leftHandSide), node.operator, _cloneNode
(node.rightHandSide)); | 15591 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => n
ew AssignmentExpression(_cloneNode(node.leftHandSide), node.operator, _cloneNode
(node.rightHandSide)); |
| 14540 | 15592 |
| 15593 @override |
| 14541 BinaryExpression visitBinaryExpression(BinaryExpression node) => new BinaryExp
ression(_cloneNode(node.leftOperand), node.operator, _cloneNode(node.rightOperan
d)); | 15594 BinaryExpression visitBinaryExpression(BinaryExpression node) => new BinaryExp
ression(_cloneNode(node.leftOperand), node.operator, _cloneNode(node.rightOperan
d)); |
| 14542 | 15595 |
| 15596 @override |
| 14543 Block visitBlock(Block node) => new Block(node.leftBracket, _cloneNodeList(nod
e.statements), node.rightBracket); | 15597 Block visitBlock(Block node) => new Block(node.leftBracket, _cloneNodeList(nod
e.statements), node.rightBracket); |
| 14544 | 15598 |
| 15599 @override |
| 14545 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockF
unctionBody(_cloneNode(node.block)); | 15600 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockF
unctionBody(_cloneNode(node.block)); |
| 14546 | 15601 |
| 15602 @override |
| 14547 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) => new BooleanLiteral(
node.literal, node.value); | 15603 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) => new BooleanLiteral(
node.literal, node.value); |
| 14548 | 15604 |
| 15605 @override |
| 14549 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
node.keyword, _cloneNode(node.label), node.semicolon); | 15606 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
node.keyword, _cloneNode(node.label), node.semicolon); |
| 14550 | 15607 |
| 15608 @override |
| 14551 CascadeExpression visitCascadeExpression(CascadeExpression node) => new Cascad
eExpression(_cloneNode(node.target), _cloneNodeList(node.cascadeSections)); | 15609 CascadeExpression visitCascadeExpression(CascadeExpression node) => new Cascad
eExpression(_cloneNode(node.target), _cloneNodeList(node.cascadeSections)); |
| 14552 | 15610 |
| 15611 @override |
| 14553 CatchClause visitCatchClause(CatchClause node) => new CatchClause(node.onKeywo
rd, _cloneNode(node.exceptionType), node.catchKeyword, node.leftParenthesis, _cl
oneNode(node.exceptionParameter), node.comma, _cloneNode(node.stackTraceParamete
r), node.rightParenthesis, _cloneNode(node.body)); | 15612 CatchClause visitCatchClause(CatchClause node) => new CatchClause(node.onKeywo
rd, _cloneNode(node.exceptionType), node.catchKeyword, node.leftParenthesis, _cl
oneNode(node.exceptionParameter), node.comma, _cloneNode(node.stackTraceParamete
r), node.rightParenthesis, _cloneNode(node.body)); |
| 14554 | 15613 |
| 15614 @override |
| 14555 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { | 15615 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { |
| 14556 ClassDeclaration copy = new ClassDeclaration(_cloneNode(node.documentationCo
mment), _cloneNodeList(node.metadata), node.abstractKeyword, node.classKeyword,
_cloneNode(node.name), _cloneNode(node.typeParameters), _cloneNode(node.extendsC
lause), _cloneNode(node.withClause), _cloneNode(node.implementsClause), node.lef
tBracket, _cloneNodeList(node.members), node.rightBracket); | 15616 ClassDeclaration copy = new ClassDeclaration(_cloneNode(node.documentationCo
mment), _cloneNodeList(node.metadata), node.abstractKeyword, node.classKeyword,
_cloneNode(node.name), _cloneNode(node.typeParameters), _cloneNode(node.extendsC
lause), _cloneNode(node.withClause), _cloneNode(node.implementsClause), node.lef
tBracket, _cloneNodeList(node.members), node.rightBracket); |
| 14557 copy.nativeClause = _cloneNode(node.nativeClause); | 15617 copy.nativeClause = _cloneNode(node.nativeClause); |
| 14558 return copy; | 15618 return copy; |
| 14559 } | 15619 } |
| 14560 | 15620 |
| 15621 @override |
| 14561 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.keywo
rd, _cloneNode(node.name), _cloneNode(node.typeParameters), node.equals, node.ab
stractKeyword, _cloneNode(node.superclass), _cloneNode(node.withClause), _cloneN
ode(node.implementsClause), node.semicolon); | 15622 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.keywo
rd, _cloneNode(node.name), _cloneNode(node.typeParameters), node.equals, node.ab
stractKeyword, _cloneNode(node.superclass), _cloneNode(node.withClause), _cloneN
ode(node.implementsClause), node.semicolon); |
| 14562 | 15623 |
| 15624 @override |
| 14563 Comment visitComment(Comment node) { | 15625 Comment visitComment(Comment node) { |
| 14564 if (node.isDocumentation) { | 15626 if (node.isDocumentation) { |
| 14565 return Comment.createDocumentationCommentWithReferences(node.tokens, _clon
eNodeList(node.references)); | 15627 return Comment.createDocumentationCommentWithReferences(node.tokens, _clon
eNodeList(node.references)); |
| 14566 } else if (node.isBlock) { | 15628 } else if (node.isBlock) { |
| 14567 return Comment.createBlockComment(node.tokens); | 15629 return Comment.createBlockComment(node.tokens); |
| 14568 } | 15630 } |
| 14569 return Comment.createEndOfLineComment(node.tokens); | 15631 return Comment.createEndOfLineComment(node.tokens); |
| 14570 } | 15632 } |
| 14571 | 15633 |
| 15634 @override |
| 14572 CommentReference visitCommentReference(CommentReference node) => new CommentRe
ference(node.newKeyword, _cloneNode(node.identifier)); | 15635 CommentReference visitCommentReference(CommentReference node) => new CommentRe
ference(node.newKeyword, _cloneNode(node.identifier)); |
| 14573 | 15636 |
| 15637 @override |
| 14574 CompilationUnit visitCompilationUnit(CompilationUnit node) { | 15638 CompilationUnit visitCompilationUnit(CompilationUnit node) { |
| 14575 CompilationUnit clone = new CompilationUnit(node.beginToken, _cloneNode(node
.scriptTag), _cloneNodeList(node.directives), _cloneNodeList(node.declarations),
node.endToken); | 15639 CompilationUnit clone = new CompilationUnit(node.beginToken, _cloneNode(node
.scriptTag), _cloneNodeList(node.directives), _cloneNodeList(node.declarations),
node.endToken); |
| 14576 clone.lineInfo = node.lineInfo; | 15640 clone.lineInfo = node.lineInfo; |
| 14577 return clone; | 15641 return clone; |
| 14578 } | 15642 } |
| 14579 | 15643 |
| 15644 @override |
| 14580 ConditionalExpression visitConditionalExpression(ConditionalExpression node) =
> new ConditionalExpression(_cloneNode(node.condition), node.question, _cloneNod
e(node.thenExpression), node.colon, _cloneNode(node.elseExpression)); | 15645 ConditionalExpression visitConditionalExpression(ConditionalExpression node) =
> new ConditionalExpression(_cloneNode(node.condition), node.question, _cloneNod
e(node.thenExpression), node.colon, _cloneNode(node.elseExpression)); |
| 14581 | 15646 |
| 15647 @override |
| 14582 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node
) => new ConstructorDeclaration(_cloneNode(node.documentationComment), _cloneNod
eList(node.metadata), node.externalKeyword, node.constKeyword, node.factoryKeywo
rd, _cloneNode(node.returnType), node.period, _cloneNode(node.name), _cloneNode(
node.parameters), node.separator, _cloneNodeList(node.initializers), _cloneNode(
node.redirectedConstructor), _cloneNode(node.body)); | 15648 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node
) => new ConstructorDeclaration(_cloneNode(node.documentationComment), _cloneNod
eList(node.metadata), node.externalKeyword, node.constKeyword, node.factoryKeywo
rd, _cloneNode(node.returnType), node.period, _cloneNode(node.name), _cloneNode(
node.parameters), node.separator, _cloneNodeList(node.initializers), _cloneNode(
node.redirectedConstructor), _cloneNode(node.body)); |
| 14583 | 15649 |
| 15650 @override |
| 14584 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI
nitializer node) => new ConstructorFieldInitializer(node.keyword, node.period, _
cloneNode(node.fieldName), node.equals, _cloneNode(node.expression)); | 15651 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI
nitializer node) => new ConstructorFieldInitializer(node.keyword, node.period, _
cloneNode(node.fieldName), node.equals, _cloneNode(node.expression)); |
| 14585 | 15652 |
| 15653 @override |
| 14586 ConstructorName visitConstructorName(ConstructorName node) => new ConstructorN
ame(_cloneNode(node.type), node.period, _cloneNode(node.name)); | 15654 ConstructorName visitConstructorName(ConstructorName node) => new ConstructorN
ame(_cloneNode(node.type), node.period, _cloneNode(node.name)); |
| 14587 | 15655 |
| 15656 @override |
| 14588 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin
ueStatement(node.keyword, _cloneNode(node.label), node.semicolon); | 15657 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin
ueStatement(node.keyword, _cloneNode(node.label), node.semicolon); |
| 14589 | 15658 |
| 15659 @override |
| 14590 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec
laredIdentifier(_cloneNode(node.documentationComment), _cloneNodeList(node.metad
ata), node.keyword, _cloneNode(node.type), _cloneNode(node.identifier)); | 15660 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec
laredIdentifier(_cloneNode(node.documentationComment), _cloneNodeList(node.metad
ata), node.keyword, _cloneNode(node.type), _cloneNode(node.identifier)); |
| 14591 | 15661 |
| 15662 @override |
| 14592 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node
) => new DefaultFormalParameter(_cloneNode(node.parameter), node.kind, node.sepa
rator, _cloneNode(node.defaultValue)); | 15663 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node
) => new DefaultFormalParameter(_cloneNode(node.parameter), node.kind, node.sepa
rator, _cloneNode(node.defaultValue)); |
| 14593 | 15664 |
| 15665 @override |
| 14594 DoStatement visitDoStatement(DoStatement node) => new DoStatement(node.doKeywo
rd, _cloneNode(node.body), node.whileKeyword, node.leftParenthesis, _cloneNode(n
ode.condition), node.rightParenthesis, node.semicolon); | 15666 DoStatement visitDoStatement(DoStatement node) => new DoStatement(node.doKeywo
rd, _cloneNode(node.body), node.whileKeyword, node.leftParenthesis, _cloneNode(n
ode.condition), node.rightParenthesis, node.semicolon); |
| 14595 | 15667 |
| 15668 @override |
| 14596 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) => new DoubleLiteral(node
.literal, node.value); | 15669 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) => new DoubleLiteral(node
.literal, node.value); |
| 14597 | 15670 |
| 15671 @override |
| 14598 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyF
unctionBody(node.semicolon); | 15672 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyF
unctionBody(node.semicolon); |
| 14599 | 15673 |
| 15674 @override |
| 14600 EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement(
node.semicolon); | 15675 EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement(
node.semicolon); |
| 14601 | 15676 |
| 15677 @override |
| 14602 ExportDirective visitExportDirective(ExportDirective node) => new ExportDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.k
eyword, _cloneNode(node.uri), _cloneNodeList(node.combinators), node.semicolon); | 15678 ExportDirective visitExportDirective(ExportDirective node) => new ExportDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.k
eyword, _cloneNode(node.uri), _cloneNodeList(node.combinators), node.semicolon); |
| 14603 | 15679 |
| 15680 @override |
| 14604 ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node
) => new ExpressionFunctionBody(node.functionDefinition, _cloneNode(node.express
ion), node.semicolon); | 15681 ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node
) => new ExpressionFunctionBody(node.functionDefinition, _cloneNode(node.express
ion), node.semicolon); |
| 14605 | 15682 |
| 15683 @override |
| 14606 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new
ExpressionStatement(_cloneNode(node.expression), node.semicolon); | 15684 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new
ExpressionStatement(_cloneNode(node.expression), node.semicolon); |
| 14607 | 15685 |
| 15686 @override |
| 14608 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(node
.keyword, _cloneNode(node.superclass)); | 15687 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(node
.keyword, _cloneNode(node.superclass)); |
| 14609 | 15688 |
| 15689 @override |
| 14610 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDecl
aration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), no
de.staticKeyword, _cloneNode(node.fields), node.semicolon); | 15690 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDecl
aration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), no
de.staticKeyword, _cloneNode(node.fields), node.semicolon); |
| 14611 | 15691 |
| 15692 @override |
| 14612 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => n
ew FieldFormalParameter(_cloneNode(node.documentationComment), _cloneNodeList(no
de.metadata), node.keyword, _cloneNode(node.type), node.thisToken, node.period,
_cloneNode(node.identifier), _cloneNode(node.parameters)); | 15693 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => n
ew FieldFormalParameter(_cloneNode(node.documentationComment), _cloneNodeList(no
de.metadata), node.keyword, _cloneNode(node.type), node.thisToken, node.period,
_cloneNode(node.identifier), _cloneNode(node.parameters)); |
| 14613 | 15694 |
| 15695 @override |
| 14614 ForEachStatement visitForEachStatement(ForEachStatement node) { | 15696 ForEachStatement visitForEachStatement(ForEachStatement node) { |
| 14615 DeclaredIdentifier loopVariable = node.loopVariable; | 15697 DeclaredIdentifier loopVariable = node.loopVariable; |
| 14616 if (loopVariable == null) { | 15698 if (loopVariable == null) { |
| 14617 return new ForEachStatement.con2(node.forKeyword, node.leftParenthesis, _c
loneNode(node.identifier), node.inKeyword, _cloneNode(node.iterator), node.right
Parenthesis, _cloneNode(node.body)); | 15699 return new ForEachStatement.con2(node.forKeyword, node.leftParenthesis, _c
loneNode(node.identifier), node.inKeyword, _cloneNode(node.iterator), node.right
Parenthesis, _cloneNode(node.body)); |
| 14618 } | 15700 } |
| 14619 return new ForEachStatement.con1(node.forKeyword, node.leftParenthesis, _clo
neNode(loopVariable), node.inKeyword, _cloneNode(node.iterator), node.rightParen
thesis, _cloneNode(node.body)); | 15701 return new ForEachStatement.con1(node.forKeyword, node.leftParenthesis, _clo
neNode(loopVariable), node.inKeyword, _cloneNode(node.iterator), node.rightParen
thesis, _cloneNode(node.body)); |
| 14620 } | 15702 } |
| 14621 | 15703 |
| 15704 @override |
| 14622 FormalParameterList visitFormalParameterList(FormalParameterList node) => new
FormalParameterList(node.leftParenthesis, _cloneNodeList(node.parameters), node.
leftDelimiter, node.rightDelimiter, node.rightParenthesis); | 15705 FormalParameterList visitFormalParameterList(FormalParameterList node) => new
FormalParameterList(node.leftParenthesis, _cloneNodeList(node.parameters), node.
leftDelimiter, node.rightDelimiter, node.rightParenthesis); |
| 14623 | 15706 |
| 15707 @override |
| 14624 ForStatement visitForStatement(ForStatement node) => new ForStatement(node.for
Keyword, node.leftParenthesis, _cloneNode(node.variables), _cloneNode(node.initi
alization), node.leftSeparator, _cloneNode(node.condition), node.rightSeparator,
_cloneNodeList(node.updaters), node.rightParenthesis, _cloneNode(node.body)); | 15708 ForStatement visitForStatement(ForStatement node) => new ForStatement(node.for
Keyword, node.leftParenthesis, _cloneNode(node.variables), _cloneNode(node.initi
alization), node.leftSeparator, _cloneNode(node.condition), node.rightSeparator,
_cloneNodeList(node.updaters), node.rightParenthesis, _cloneNode(node.body)); |
| 14625 | 15709 |
| 15710 @override |
| 14626 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new
FunctionDeclaration(_cloneNode(node.documentationComment), _cloneNodeList(node.m
etadata), node.externalKeyword, _cloneNode(node.returnType), node.propertyKeywor
d, _cloneNode(node.name), _cloneNode(node.functionExpression)); | 15711 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new
FunctionDeclaration(_cloneNode(node.documentationComment), _cloneNodeList(node.m
etadata), node.externalKeyword, _cloneNode(node.returnType), node.propertyKeywor
d, _cloneNode(node.name), _cloneNode(node.functionExpression)); |
| 14627 | 15712 |
| 15713 @override |
| 14628 FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclara
tionStatement node) => new FunctionDeclarationStatement(_cloneNode(node.function
Declaration)); | 15714 FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclara
tionStatement node) => new FunctionDeclarationStatement(_cloneNode(node.function
Declaration)); |
| 14629 | 15715 |
| 15716 @override |
| 14630 FunctionExpression visitFunctionExpression(FunctionExpression node) => new Fun
ctionExpression(_cloneNode(node.parameters), _cloneNode(node.body)); | 15717 FunctionExpression visitFunctionExpression(FunctionExpression node) => new Fun
ctionExpression(_cloneNode(node.parameters), _cloneNode(node.body)); |
| 14631 | 15718 |
| 15719 @override |
| 14632 FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpress
ionInvocation node) => new FunctionExpressionInvocation(_cloneNode(node.function
), _cloneNode(node.argumentList)); | 15720 FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpress
ionInvocation node) => new FunctionExpressionInvocation(_cloneNode(node.function
), _cloneNode(node.argumentList)); |
| 14633 | 15721 |
| 15722 @override |
| 14634 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new Functi
onTypeAlias(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, node.keyword, _cloneNode(node.returnType), _cloneNode(node.name), _cloneNode(n
ode.typeParameters), _cloneNode(node.parameters), node.semicolon); | 15723 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new Functi
onTypeAlias(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, node.keyword, _cloneNode(node.returnType), _cloneNode(node.name), _cloneNode(n
ode.typeParameters), _cloneNode(node.parameters), node.semicolon); |
| 14635 | 15724 |
| 15725 @override |
| 14636 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFo
rmalParameter node) => new FunctionTypedFormalParameter(_cloneNode(node.document
ationComment), _cloneNodeList(node.metadata), _cloneNode(node.returnType), _clon
eNode(node.identifier), _cloneNode(node.parameters)); | 15726 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFo
rmalParameter node) => new FunctionTypedFormalParameter(_cloneNode(node.document
ationComment), _cloneNodeList(node.metadata), _cloneNode(node.returnType), _clon
eNode(node.identifier), _cloneNode(node.parameters)); |
| 14637 | 15727 |
| 15728 @override |
| 14638 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
node.keyword, _cloneNodeList(node.hiddenNames)); | 15729 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
node.keyword, _cloneNodeList(node.hiddenNames)); |
| 14639 | 15730 |
| 15731 @override |
| 14640 IfStatement visitIfStatement(IfStatement node) => new IfStatement(node.ifKeywo
rd, node.leftParenthesis, _cloneNode(node.condition), node.rightParenthesis, _cl
oneNode(node.thenStatement), node.elseKeyword, _cloneNode(node.elseStatement)); | 15732 IfStatement visitIfStatement(IfStatement node) => new IfStatement(node.ifKeywo
rd, node.leftParenthesis, _cloneNode(node.condition), node.rightParenthesis, _cl
oneNode(node.thenStatement), node.elseKeyword, _cloneNode(node.elseStatement)); |
| 14641 | 15733 |
| 15734 @override |
| 14642 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(node.keyword, _cloneNodeList(node.interfaces)); | 15735 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(node.keyword, _cloneNodeList(node.interfaces)); |
| 14643 | 15736 |
| 15737 @override |
| 14644 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.k
eyword, _cloneNode(node.uri), node.asToken, _cloneNode(node.prefix), _cloneNodeL
ist(node.combinators), node.semicolon); | 15738 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.k
eyword, _cloneNode(node.uri), node.asToken, _cloneNode(node.prefix), _cloneNodeL
ist(node.combinators), node.semicolon); |
| 14645 | 15739 |
| 15740 @override |
| 14646 IndexExpression visitIndexExpression(IndexExpression node) { | 15741 IndexExpression visitIndexExpression(IndexExpression node) { |
| 14647 Token period = node.period; | 15742 Token period = node.period; |
| 14648 if (period == null) { | 15743 if (period == null) { |
| 14649 return new IndexExpression.forTarget(_cloneNode(node.target), node.leftBra
cket, _cloneNode(node.index), node.rightBracket); | 15744 return new IndexExpression.forTarget(_cloneNode(node.target), node.leftBra
cket, _cloneNode(node.index), node.rightBracket); |
| 14650 } else { | 15745 } else { |
| 14651 return new IndexExpression.forCascade(period, node.leftBracket, _cloneNode
(node.index), node.rightBracket); | 15746 return new IndexExpression.forCascade(period, node.leftBracket, _cloneNode
(node.index), node.rightBracket); |
| 14652 } | 15747 } |
| 14653 } | 15748 } |
| 14654 | 15749 |
| 15750 @override |
| 14655 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp
ression node) => new InstanceCreationExpression(node.keyword, _cloneNode(node.co
nstructorName), _cloneNode(node.argumentList)); | 15751 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp
ression node) => new InstanceCreationExpression(node.keyword, _cloneNode(node.co
nstructorName), _cloneNode(node.argumentList)); |
| 14656 | 15752 |
| 15753 @override |
| 14657 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) => new IntegerLiteral(
node.literal, node.value); | 15754 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) => new IntegerLiteral(
node.literal, node.value); |
| 14658 | 15755 |
| 15756 @override |
| 14659 InterpolationExpression visitInterpolationExpression(InterpolationExpression n
ode) => new InterpolationExpression(node.leftBracket, _cloneNode(node.expression
), node.rightBracket); | 15757 InterpolationExpression visitInterpolationExpression(InterpolationExpression n
ode) => new InterpolationExpression(node.leftBracket, _cloneNode(node.expression
), node.rightBracket); |
| 14660 | 15758 |
| 15759 @override |
| 14661 InterpolationString visitInterpolationString(InterpolationString node) => new
InterpolationString(node.contents, node.value); | 15760 InterpolationString visitInterpolationString(InterpolationString node) => new
InterpolationString(node.contents, node.value); |
| 14662 | 15761 |
| 15762 @override |
| 14663 IsExpression visitIsExpression(IsExpression node) => new IsExpression(_cloneNo
de(node.expression), node.isOperator, node.notOperator, _cloneNode(node.type)); | 15763 IsExpression visitIsExpression(IsExpression node) => new IsExpression(_cloneNo
de(node.expression), node.isOperator, node.notOperator, _cloneNode(node.type)); |
| 14664 | 15764 |
| 15765 @override |
| 14665 Label visitLabel(Label node) => new Label(_cloneNode(node.label), node.colon); | 15766 Label visitLabel(Label node) => new Label(_cloneNode(node.label), node.colon); |
| 14666 | 15767 |
| 15768 @override |
| 14667 LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledSt
atement(_cloneNodeList(node.labels), _cloneNode(node.statement)); | 15769 LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledSt
atement(_cloneNodeList(node.labels), _cloneNode(node.statement)); |
| 14668 | 15770 |
| 15771 @override |
| 14669 LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDi
rective(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), no
de.libraryToken, _cloneNode(node.name), node.semicolon); | 15772 LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDi
rective(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), no
de.libraryToken, _cloneNode(node.name), node.semicolon); |
| 14670 | 15773 |
| 15774 @override |
| 14671 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) => new Librar
yIdentifier(_cloneNodeList(node.components)); | 15775 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) => new Librar
yIdentifier(_cloneNodeList(node.components)); |
| 14672 | 15776 |
| 15777 @override |
| 14673 ListLiteral visitListLiteral(ListLiteral node) => new ListLiteral(node.constKe
yword, _cloneNode(node.typeArguments), node.leftBracket, _cloneNodeList(node.ele
ments), node.rightBracket); | 15778 ListLiteral visitListLiteral(ListLiteral node) => new ListLiteral(node.constKe
yword, _cloneNode(node.typeArguments), node.leftBracket, _cloneNodeList(node.ele
ments), node.rightBracket); |
| 14674 | 15779 |
| 15780 @override |
| 14675 MapLiteral visitMapLiteral(MapLiteral node) => new MapLiteral(node.constKeywor
d, _cloneNode(node.typeArguments), node.leftBracket, _cloneNodeList(node.entries
), node.rightBracket); | 15781 MapLiteral visitMapLiteral(MapLiteral node) => new MapLiteral(node.constKeywor
d, _cloneNode(node.typeArguments), node.leftBracket, _cloneNodeList(node.entries
), node.rightBracket); |
| 14676 | 15782 |
| 15783 @override |
| 14677 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEn
try(_cloneNode(node.key), node.separator, _cloneNode(node.value)); | 15784 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEn
try(_cloneNode(node.key), node.separator, _cloneNode(node.value)); |
| 14678 | 15785 |
| 15786 @override |
| 14679 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new Method
Declaration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, node.externalKeyword, node.modifierKeyword, _cloneNode(node.returnType), node.
propertyKeyword, node.operatorKeyword, _cloneNode(node.name), _cloneNode(node.pa
rameters), _cloneNode(node.body)); | 15787 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new Method
Declaration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, node.externalKeyword, node.modifierKeyword, _cloneNode(node.returnType), node.
propertyKeyword, node.operatorKeyword, _cloneNode(node.name), _cloneNode(node.pa
rameters), _cloneNode(node.body)); |
| 14680 | 15788 |
| 15789 @override |
| 14681 MethodInvocation visitMethodInvocation(MethodInvocation node) => new MethodInv
ocation(_cloneNode(node.target), node.period, _cloneNode(node.methodName), _clon
eNode(node.argumentList)); | 15790 MethodInvocation visitMethodInvocation(MethodInvocation node) => new MethodInv
ocation(_cloneNode(node.target), node.period, _cloneNode(node.methodName), _clon
eNode(node.argumentList)); |
| 14682 | 15791 |
| 15792 @override |
| 14683 NamedExpression visitNamedExpression(NamedExpression node) => new NamedExpress
ion(_cloneNode(node.name), _cloneNode(node.expression)); | 15793 NamedExpression visitNamedExpression(NamedExpression node) => new NamedExpress
ion(_cloneNode(node.name), _cloneNode(node.expression)); |
| 14684 | 15794 |
| 15795 @override |
| 14685 AstNode visitNativeClause(NativeClause node) => new NativeClause(node.keyword,
_cloneNode(node.name)); | 15796 AstNode visitNativeClause(NativeClause node) => new NativeClause(node.keyword,
_cloneNode(node.name)); |
| 14686 | 15797 |
| 15798 @override |
| 14687 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new Nat
iveFunctionBody(node.nativeToken, _cloneNode(node.stringLiteral), node.semicolon
); | 15799 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new Nat
iveFunctionBody(node.nativeToken, _cloneNode(node.stringLiteral), node.semicolon
); |
| 14688 | 15800 |
| 15801 @override |
| 14689 NullLiteral visitNullLiteral(NullLiteral node) => new NullLiteral(node.literal
); | 15802 NullLiteral visitNullLiteral(NullLiteral node) => new NullLiteral(node.literal
); |
| 14690 | 15803 |
| 15804 @override |
| 14691 ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression n
ode) => new ParenthesizedExpression(node.leftParenthesis, _cloneNode(node.expres
sion), node.rightParenthesis); | 15805 ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression n
ode) => new ParenthesizedExpression(node.leftParenthesis, _cloneNode(node.expres
sion), node.rightParenthesis); |
| 14692 | 15806 |
| 15807 @override |
| 14693 PartDirective visitPartDirective(PartDirective node) => new PartDirective(_clo
neNode(node.documentationComment), _cloneNodeList(node.metadata), node.partToken
, _cloneNode(node.uri), node.semicolon); | 15808 PartDirective visitPartDirective(PartDirective node) => new PartDirective(_clo
neNode(node.documentationComment), _cloneNodeList(node.metadata), node.partToken
, _cloneNode(node.uri), node.semicolon); |
| 14694 | 15809 |
| 15810 @override |
| 14695 PartOfDirective visitPartOfDirective(PartOfDirective node) => new PartOfDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.p
artToken, node.ofToken, _cloneNode(node.libraryName), node.semicolon); | 15811 PartOfDirective visitPartOfDirective(PartOfDirective node) => new PartOfDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), node.p
artToken, node.ofToken, _cloneNode(node.libraryName), node.semicolon); |
| 14696 | 15812 |
| 15813 @override |
| 14697 PostfixExpression visitPostfixExpression(PostfixExpression node) => new Postfi
xExpression(_cloneNode(node.operand), node.operator); | 15814 PostfixExpression visitPostfixExpression(PostfixExpression node) => new Postfi
xExpression(_cloneNode(node.operand), node.operator); |
| 14698 | 15815 |
| 15816 @override |
| 14699 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => new Pre
fixedIdentifier(_cloneNode(node.prefix), node.period, _cloneNode(node.identifier
)); | 15817 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => new Pre
fixedIdentifier(_cloneNode(node.prefix), node.period, _cloneNode(node.identifier
)); |
| 14700 | 15818 |
| 15819 @override |
| 14701 PrefixExpression visitPrefixExpression(PrefixExpression node) => new PrefixExp
ression(node.operator, _cloneNode(node.operand)); | 15820 PrefixExpression visitPrefixExpression(PrefixExpression node) => new PrefixExp
ression(node.operator, _cloneNode(node.operand)); |
| 14702 | 15821 |
| 15822 @override |
| 14703 PropertyAccess visitPropertyAccess(PropertyAccess node) => new PropertyAccess(
_cloneNode(node.target), node.operator, _cloneNode(node.propertyName)); | 15823 PropertyAccess visitPropertyAccess(PropertyAccess node) => new PropertyAccess(
_cloneNode(node.target), node.operator, _cloneNode(node.propertyName)); |
| 14704 | 15824 |
| 15825 @override |
| 14705 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(Redirec
tingConstructorInvocation node) => new RedirectingConstructorInvocation(node.key
word, node.period, _cloneNode(node.constructorName), _cloneNode(node.argumentLis
t)); | 15826 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(Redirec
tingConstructorInvocation node) => new RedirectingConstructorInvocation(node.key
word, node.period, _cloneNode(node.constructorName), _cloneNode(node.argumentLis
t)); |
| 14706 | 15827 |
| 15828 @override |
| 14707 RethrowExpression visitRethrowExpression(RethrowExpression node) => new Rethro
wExpression(node.keyword); | 15829 RethrowExpression visitRethrowExpression(RethrowExpression node) => new Rethro
wExpression(node.keyword); |
| 14708 | 15830 |
| 15831 @override |
| 14709 ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatem
ent(node.keyword, _cloneNode(node.expression), node.semicolon); | 15832 ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatem
ent(node.keyword, _cloneNode(node.expression), node.semicolon); |
| 14710 | 15833 |
| 15834 @override |
| 14711 ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag(node.scriptTag); | 15835 ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag(node.scriptTag); |
| 14712 | 15836 |
| 15837 @override |
| 14713 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
node.keyword, _cloneNodeList(node.shownNames)); | 15838 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
node.keyword, _cloneNodeList(node.shownNames)); |
| 14714 | 15839 |
| 15840 @override |
| 14715 SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) =
> new SimpleFormalParameter(_cloneNode(node.documentationComment), _cloneNodeLis
t(node.metadata), node.keyword, _cloneNode(node.type), _cloneNode(node.identifie
r)); | 15841 SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) =
> new SimpleFormalParameter(_cloneNode(node.documentationComment), _cloneNodeLis
t(node.metadata), node.keyword, _cloneNode(node.type), _cloneNode(node.identifie
r)); |
| 14716 | 15842 |
| 15843 @override |
| 14717 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) => new SimpleIde
ntifier(node.token); | 15844 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) => new SimpleIde
ntifier(node.token); |
| 14718 | 15845 |
| 15846 @override |
| 14719 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) => new
SimpleStringLiteral(node.literal, node.value); | 15847 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) => new
SimpleStringLiteral(node.literal, node.value); |
| 14720 | 15848 |
| 15849 @override |
| 14721 StringInterpolation visitStringInterpolation(StringInterpolation node) => new
StringInterpolation(_cloneNodeList(node.elements)); | 15850 StringInterpolation visitStringInterpolation(StringInterpolation node) => new
StringInterpolation(_cloneNodeList(node.elements)); |
| 14722 | 15851 |
| 15852 @override |
| 14723 SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInv
ocation node) => new SuperConstructorInvocation(node.keyword, node.period, _clon
eNode(node.constructorName), _cloneNode(node.argumentList)); | 15853 SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInv
ocation node) => new SuperConstructorInvocation(node.keyword, node.period, _clon
eNode(node.constructorName), _cloneNode(node.argumentList)); |
| 14724 | 15854 |
| 15855 @override |
| 14725 SuperExpression visitSuperExpression(SuperExpression node) => new SuperExpress
ion(node.keyword); | 15856 SuperExpression visitSuperExpression(SuperExpression node) => new SuperExpress
ion(node.keyword); |
| 14726 | 15857 |
| 15858 @override |
| 14727 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(_cloneNodeList(n
ode.labels), node.keyword, _cloneNode(node.expression), node.colon, _cloneNodeLi
st(node.statements)); | 15859 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(_cloneNodeList(n
ode.labels), node.keyword, _cloneNode(node.expression), node.colon, _cloneNodeLi
st(node.statements)); |
| 14728 | 15860 |
| 15861 @override |
| 14729 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(_clo
neNodeList(node.labels), node.keyword, node.colon, _cloneNodeList(node.statement
s)); | 15862 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(_clo
neNodeList(node.labels), node.keyword, node.colon, _cloneNodeList(node.statement
s)); |
| 14730 | 15863 |
| 15864 @override |
| 14731 SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatem
ent(node.keyword, node.leftParenthesis, _cloneNode(node.expression), node.rightP
arenthesis, node.leftBracket, _cloneNodeList(node.members), node.rightBracket); | 15865 SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatem
ent(node.keyword, node.leftParenthesis, _cloneNode(node.expression), node.rightP
arenthesis, node.leftBracket, _cloneNodeList(node.members), node.rightBracket); |
| 14732 | 15866 |
| 15867 @override |
| 14733 AstNode visitSymbolLiteral(SymbolLiteral node) => new SymbolLiteral(node.pound
Sign, node.components); | 15868 AstNode visitSymbolLiteral(SymbolLiteral node) => new SymbolLiteral(node.pound
Sign, node.components); |
| 14734 | 15869 |
| 15870 @override |
| 14735 ThisExpression visitThisExpression(ThisExpression node) => new ThisExpression(
node.keyword); | 15871 ThisExpression visitThisExpression(ThisExpression node) => new ThisExpression(
node.keyword); |
| 14736 | 15872 |
| 15873 @override |
| 14737 ThrowExpression visitThrowExpression(ThrowExpression node) => new ThrowExpress
ion(node.keyword, _cloneNode(node.expression)); | 15874 ThrowExpression visitThrowExpression(ThrowExpression node) => new ThrowExpress
ion(node.keyword, _cloneNode(node.expression)); |
| 14738 | 15875 |
| 15876 @override |
| 14739 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableD
eclaration node) => new TopLevelVariableDeclaration(_cloneNode(node.documentatio
nComment), _cloneNodeList(node.metadata), _cloneNode(node.variables), node.semic
olon); | 15877 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableD
eclaration node) => new TopLevelVariableDeclaration(_cloneNode(node.documentatio
nComment), _cloneNodeList(node.metadata), _cloneNode(node.variables), node.semic
olon); |
| 14740 | 15878 |
| 15879 @override |
| 14741 TryStatement visitTryStatement(TryStatement node) => new TryStatement(node.try
Keyword, _cloneNode(node.body), _cloneNodeList(node.catchClauses), node.finallyK
eyword, _cloneNode(node.finallyBlock)); | 15880 TryStatement visitTryStatement(TryStatement node) => new TryStatement(node.try
Keyword, _cloneNode(node.body), _cloneNodeList(node.catchClauses), node.finallyK
eyword, _cloneNode(node.finallyBlock)); |
| 14742 | 15881 |
| 15882 @override |
| 14743 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgum
entList(node.leftBracket, _cloneNodeList(node.arguments), node.rightBracket); | 15883 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgum
entList(node.leftBracket, _cloneNodeList(node.arguments), node.rightBracket); |
| 14744 | 15884 |
| 15885 @override |
| 14745 TypeName visitTypeName(TypeName node) => new TypeName(_cloneNode(node.name), _
cloneNode(node.typeArguments)); | 15886 TypeName visitTypeName(TypeName node) => new TypeName(_cloneNode(node.name), _
cloneNode(node.typeArguments)); |
| 14746 | 15887 |
| 15888 @override |
| 14747 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(_clo
neNode(node.documentationComment), _cloneNodeList(node.metadata), _cloneNode(nod
e.name), node.keyword, _cloneNode(node.bound)); | 15889 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(_clo
neNode(node.documentationComment), _cloneNodeList(node.metadata), _cloneNode(nod
e.name), node.keyword, _cloneNode(node.bound)); |
| 14748 | 15890 |
| 15891 @override |
| 14749 TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypePa
rameterList(node.leftBracket, _cloneNodeList(node.typeParameters), node.rightBra
cket); | 15892 TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypePa
rameterList(node.leftBracket, _cloneNodeList(node.typeParameters), node.rightBra
cket); |
| 14750 | 15893 |
| 15894 @override |
| 14751 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new
VariableDeclaration(null, _cloneNodeList(node.metadata), _cloneNode(node.name),
node.equals, _cloneNode(node.initializer)); | 15895 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new
VariableDeclaration(null, _cloneNodeList(node.metadata), _cloneNode(node.name),
node.equals, _cloneNode(node.initializer)); |
| 14752 | 15896 |
| 15897 @override |
| 14753 VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList n
ode) => new VariableDeclarationList(null, _cloneNodeList(node.metadata), node.ke
yword, _cloneNode(node.type), _cloneNodeList(node.variables)); | 15898 VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList n
ode) => new VariableDeclarationList(null, _cloneNodeList(node.metadata), node.ke
yword, _cloneNode(node.type), _cloneNodeList(node.variables)); |
| 14754 | 15899 |
| 15900 @override |
| 14755 VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclara
tionStatement node) => new VariableDeclarationStatement(_cloneNode(node.variable
s), node.semicolon); | 15901 VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclara
tionStatement node) => new VariableDeclarationStatement(_cloneNode(node.variable
s), node.semicolon); |
| 14756 | 15902 |
| 15903 @override |
| 14757 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
node.keyword, node.leftParenthesis, _cloneNode(node.condition), node.rightParent
hesis, _cloneNode(node.body)); | 15904 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
node.keyword, node.leftParenthesis, _cloneNode(node.condition), node.rightParent
hesis, _cloneNode(node.body)); |
| 14758 | 15905 |
| 15906 @override |
| 14759 WithClause visitWithClause(WithClause node) => new WithClause(node.withKeyword
, _cloneNodeList(node.mixinTypes)); | 15907 WithClause visitWithClause(WithClause node) => new WithClause(node.withKeyword
, _cloneNodeList(node.mixinTypes)); |
| 14760 | 15908 |
| 14761 AstNode _cloneNode(AstNode node) { | 15909 AstNode _cloneNode(AstNode node) { |
| 14762 if (node == null) { | 15910 if (node == null) { |
| 14763 return null; | 15911 return null; |
| 14764 } | 15912 } |
| 14765 return node.accept(this) as AstNode; | 15913 return node.accept(this) as AstNode; |
| 14766 } | 15914 } |
| 14767 | 15915 |
| 14768 List _cloneNodeList(NodeList nodes) { | 15916 List _cloneNodeList(NodeList nodes) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 14791 AstComparator comparator = new AstComparator(); | 15939 AstComparator comparator = new AstComparator(); |
| 14792 return comparator._isEqualNodes(first, second); | 15940 return comparator._isEqualNodes(first, second); |
| 14793 } | 15941 } |
| 14794 | 15942 |
| 14795 /** | 15943 /** |
| 14796 * The AST node with which the node being visited is to be compared. This is o
nly valid at the | 15944 * The AST node with which the node being visited is to be compared. This is o
nly valid at the |
| 14797 * beginning of each visit method (until [isEqualNodes] is invoked). | 15945 * beginning of each visit method (until [isEqualNodes] is invoked). |
| 14798 */ | 15946 */ |
| 14799 AstNode _other; | 15947 AstNode _other; |
| 14800 | 15948 |
| 15949 @override |
| 14801 bool visitAdjacentStrings(AdjacentStrings node) { | 15950 bool visitAdjacentStrings(AdjacentStrings node) { |
| 14802 AdjacentStrings other = this._other as AdjacentStrings; | 15951 AdjacentStrings other = this._other as AdjacentStrings; |
| 14803 return _isEqualNodeLists(node.strings, other.strings); | 15952 return _isEqualNodeLists(node.strings, other.strings); |
| 14804 } | 15953 } |
| 14805 | 15954 |
| 15955 @override |
| 14806 bool visitAnnotation(Annotation node) { | 15956 bool visitAnnotation(Annotation node) { |
| 14807 Annotation other = this._other as Annotation; | 15957 Annotation other = this._other as Annotation; |
| 14808 return _isEqualTokens(node.atSign, other.atSign) && _isEqualNodes(node.name,
other.name) && _isEqualTokens(node.period, other.period) && _isEqualNodes(node.
constructorName, other.constructorName) && _isEqualNodes(node.arguments, other.a
rguments); | 15958 return _isEqualTokens(node.atSign, other.atSign) && _isEqualNodes(node.name,
other.name) && _isEqualTokens(node.period, other.period) && _isEqualNodes(node.
constructorName, other.constructorName) && _isEqualNodes(node.arguments, other.a
rguments); |
| 14809 } | 15959 } |
| 14810 | 15960 |
| 15961 @override |
| 14811 bool visitArgumentDefinitionTest(ArgumentDefinitionTest node) { | 15962 bool visitArgumentDefinitionTest(ArgumentDefinitionTest node) { |
| 14812 ArgumentDefinitionTest other = this._other as ArgumentDefinitionTest; | 15963 ArgumentDefinitionTest other = this._other as ArgumentDefinitionTest; |
| 14813 return _isEqualTokens(node.question, other.question) && _isEqualNodes(node.i
dentifier, other.identifier); | 15964 return _isEqualTokens(node.question, other.question) && _isEqualNodes(node.i
dentifier, other.identifier); |
| 14814 } | 15965 } |
| 14815 | 15966 |
| 15967 @override |
| 14816 bool visitArgumentList(ArgumentList node) { | 15968 bool visitArgumentList(ArgumentList node) { |
| 14817 ArgumentList other = this._other as ArgumentList; | 15969 ArgumentList other = this._other as ArgumentList; |
| 14818 return _isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqu
alNodeLists(node.arguments, other.arguments) && _isEqualTokens(node.rightParenth
esis, other.rightParenthesis); | 15970 return _isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqu
alNodeLists(node.arguments, other.arguments) && _isEqualTokens(node.rightParenth
esis, other.rightParenthesis); |
| 14819 } | 15971 } |
| 14820 | 15972 |
| 15973 @override |
| 14821 bool visitAsExpression(AsExpression node) { | 15974 bool visitAsExpression(AsExpression node) { |
| 14822 AsExpression other = this._other as AsExpression; | 15975 AsExpression other = this._other as AsExpression; |
| 14823 return _isEqualNodes(node.expression, other.expression) && _isEqualTokens(no
de.asOperator, other.asOperator) && _isEqualNodes(node.type, other.type); | 15976 return _isEqualNodes(node.expression, other.expression) && _isEqualTokens(no
de.asOperator, other.asOperator) && _isEqualNodes(node.type, other.type); |
| 14824 } | 15977 } |
| 14825 | 15978 |
| 15979 @override |
| 14826 bool visitAssertStatement(AssertStatement node) { | 15980 bool visitAssertStatement(AssertStatement node) { |
| 14827 AssertStatement other = this._other as AssertStatement; | 15981 AssertStatement other = this._other as AssertStatement; |
| 14828 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.le
ftParenthesis, other.leftParenthesis) && _isEqualNodes(node.condition, other.con
dition) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) && _isE
qualTokens(node.semicolon, other.semicolon); | 15982 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.le
ftParenthesis, other.leftParenthesis) && _isEqualNodes(node.condition, other.con
dition) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) && _isE
qualTokens(node.semicolon, other.semicolon); |
| 14829 } | 15983 } |
| 14830 | 15984 |
| 15985 @override |
| 14831 bool visitAssignmentExpression(AssignmentExpression node) { | 15986 bool visitAssignmentExpression(AssignmentExpression node) { |
| 14832 AssignmentExpression other = this._other as AssignmentExpression; | 15987 AssignmentExpression other = this._other as AssignmentExpression; |
| 14833 return _isEqualNodes(node.leftHandSide, other.leftHandSide) && _isEqualToken
s(node.operator, other.operator) && _isEqualNodes(node.rightHandSide, other.righ
tHandSide); | 15988 return _isEqualNodes(node.leftHandSide, other.leftHandSide) && _isEqualToken
s(node.operator, other.operator) && _isEqualNodes(node.rightHandSide, other.righ
tHandSide); |
| 14834 } | 15989 } |
| 14835 | 15990 |
| 15991 @override |
| 14836 bool visitBinaryExpression(BinaryExpression node) { | 15992 bool visitBinaryExpression(BinaryExpression node) { |
| 14837 BinaryExpression other = this._other as BinaryExpression; | 15993 BinaryExpression other = this._other as BinaryExpression; |
| 14838 return _isEqualNodes(node.leftOperand, other.leftOperand) && _isEqualTokens(
node.operator, other.operator) && _isEqualNodes(node.rightOperand, other.rightOp
erand); | 15994 return _isEqualNodes(node.leftOperand, other.leftOperand) && _isEqualTokens(
node.operator, other.operator) && _isEqualNodes(node.rightOperand, other.rightOp
erand); |
| 14839 } | 15995 } |
| 14840 | 15996 |
| 15997 @override |
| 14841 bool visitBlock(Block node) { | 15998 bool visitBlock(Block node) { |
| 14842 Block other = this._other as Block; | 15999 Block other = this._other as Block; |
| 14843 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLi
sts(node.statements, other.statements) && _isEqualTokens(node.rightBracket, othe
r.rightBracket); | 16000 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLi
sts(node.statements, other.statements) && _isEqualTokens(node.rightBracket, othe
r.rightBracket); |
| 14844 } | 16001 } |
| 14845 | 16002 |
| 16003 @override |
| 14846 bool visitBlockFunctionBody(BlockFunctionBody node) { | 16004 bool visitBlockFunctionBody(BlockFunctionBody node) { |
| 14847 BlockFunctionBody other = this._other as BlockFunctionBody; | 16005 BlockFunctionBody other = this._other as BlockFunctionBody; |
| 14848 return _isEqualNodes(node.block, other.block); | 16006 return _isEqualNodes(node.block, other.block); |
| 14849 } | 16007 } |
| 14850 | 16008 |
| 16009 @override |
| 14851 bool visitBooleanLiteral(BooleanLiteral node) { | 16010 bool visitBooleanLiteral(BooleanLiteral node) { |
| 14852 BooleanLiteral other = this._other as BooleanLiteral; | 16011 BooleanLiteral other = this._other as BooleanLiteral; |
| 14853 return _isEqualTokens(node.literal, other.literal) && identical(node.value,
other.value); | 16012 return _isEqualTokens(node.literal, other.literal) && identical(node.value,
other.value); |
| 14854 } | 16013 } |
| 14855 | 16014 |
| 16015 @override |
| 14856 bool visitBreakStatement(BreakStatement node) { | 16016 bool visitBreakStatement(BreakStatement node) { |
| 14857 BreakStatement other = this._other as BreakStatement; | 16017 BreakStatement other = this._other as BreakStatement; |
| 14858 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.lab
el, other.label) && _isEqualTokens(node.semicolon, other.semicolon); | 16018 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.lab
el, other.label) && _isEqualTokens(node.semicolon, other.semicolon); |
| 14859 } | 16019 } |
| 14860 | 16020 |
| 16021 @override |
| 14861 bool visitCascadeExpression(CascadeExpression node) { | 16022 bool visitCascadeExpression(CascadeExpression node) { |
| 14862 CascadeExpression other = this._other as CascadeExpression; | 16023 CascadeExpression other = this._other as CascadeExpression; |
| 14863 return _isEqualNodes(node.target, other.target) && _isEqualNodeLists(node.ca
scadeSections, other.cascadeSections); | 16024 return _isEqualNodes(node.target, other.target) && _isEqualNodeLists(node.ca
scadeSections, other.cascadeSections); |
| 14864 } | 16025 } |
| 14865 | 16026 |
| 16027 @override |
| 14866 bool visitCatchClause(CatchClause node) { | 16028 bool visitCatchClause(CatchClause node) { |
| 14867 CatchClause other = this._other as CatchClause; | 16029 CatchClause other = this._other as CatchClause; |
| 14868 return _isEqualTokens(node.onKeyword, other.onKeyword) && _isEqualNodes(node
.exceptionType, other.exceptionType) && _isEqualTokens(node.catchKeyword, other.
catchKeyword) && _isEqualTokens(node.leftParenthesis, other.leftParenthesis) &&
_isEqualNodes(node.exceptionParameter, other.exceptionParameter) && _isEqualToke
ns(node.comma, other.comma) && _isEqualNodes(node.stackTraceParameter, other.sta
ckTraceParameter) && _isEqualTokens(node.rightParenthesis, other.rightParenthesi
s) && _isEqualNodes(node.body, other.body); | 16030 return _isEqualTokens(node.onKeyword, other.onKeyword) && _isEqualNodes(node
.exceptionType, other.exceptionType) && _isEqualTokens(node.catchKeyword, other.
catchKeyword) && _isEqualTokens(node.leftParenthesis, other.leftParenthesis) &&
_isEqualNodes(node.exceptionParameter, other.exceptionParameter) && _isEqualToke
ns(node.comma, other.comma) && _isEqualNodes(node.stackTraceParameter, other.sta
ckTraceParameter) && _isEqualTokens(node.rightParenthesis, other.rightParenthesi
s) && _isEqualNodes(node.body, other.body); |
| 14869 } | 16031 } |
| 14870 | 16032 |
| 16033 @override |
| 14871 bool visitClassDeclaration(ClassDeclaration node) { | 16034 bool visitClassDeclaration(ClassDeclaration node) { |
| 14872 ClassDeclaration other = this._other as ClassDeclaration; | 16035 ClassDeclaration other = this._other as ClassDeclaration; |
| 14873 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.abstr
actKeyword, other.abstractKeyword) && _isEqualTokens(node.classKeyword, other.cl
assKeyword) && _isEqualNodes(node.name, other.name) && _isEqualNodes(node.typePa
rameters, other.typeParameters) && _isEqualNodes(node.extendsClause, other.exten
dsClause) && _isEqualNodes(node.withClause, other.withClause) && _isEqualNodes(n
ode.implementsClause, other.implementsClause) && _isEqualTokens(node.leftBracket
, other.leftBracket) && _isEqualNodeLists(node.members, other.members) && _isEqu
alTokens(node.rightBracket, other.rightBracket); | 16036 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.abstr
actKeyword, other.abstractKeyword) && _isEqualTokens(node.classKeyword, other.cl
assKeyword) && _isEqualNodes(node.name, other.name) && _isEqualNodes(node.typePa
rameters, other.typeParameters) && _isEqualNodes(node.extendsClause, other.exten
dsClause) && _isEqualNodes(node.withClause, other.withClause) && _isEqualNodes(n
ode.implementsClause, other.implementsClause) && _isEqualTokens(node.leftBracket
, other.leftBracket) && _isEqualNodeLists(node.members, other.members) && _isEqu
alTokens(node.rightBracket, other.rightBracket); |
| 14874 } | 16037 } |
| 14875 | 16038 |
| 16039 @override |
| 14876 bool visitClassTypeAlias(ClassTypeAlias node) { | 16040 bool visitClassTypeAlias(ClassTypeAlias node) { |
| 14877 ClassTypeAlias other = this._other as ClassTypeAlias; | 16041 ClassTypeAlias other = this._other as ClassTypeAlias; |
| 14878 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.name, other.name) && _isEqualNodes(node
.typeParameters, other.typeParameters) && _isEqualTokens(node.equals, other.equa
ls) && _isEqualTokens(node.abstractKeyword, other.abstractKeyword) && _isEqualNo
des(node.superclass, other.superclass) && _isEqualNodes(node.withClause, other.w
ithClause) && _isEqualNodes(node.implementsClause, other.implementsClause) && _i
sEqualTokens(node.semicolon, other.semicolon); | 16042 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.name, other.name) && _isEqualNodes(node
.typeParameters, other.typeParameters) && _isEqualTokens(node.equals, other.equa
ls) && _isEqualTokens(node.abstractKeyword, other.abstractKeyword) && _isEqualNo
des(node.superclass, other.superclass) && _isEqualNodes(node.withClause, other.w
ithClause) && _isEqualNodes(node.implementsClause, other.implementsClause) && _i
sEqualTokens(node.semicolon, other.semicolon); |
| 14879 } | 16043 } |
| 14880 | 16044 |
| 16045 @override |
| 14881 bool visitComment(Comment node) { | 16046 bool visitComment(Comment node) { |
| 14882 Comment other = this._other as Comment; | 16047 Comment other = this._other as Comment; |
| 14883 return _isEqualNodeLists(node.references, other.references); | 16048 return _isEqualNodeLists(node.references, other.references); |
| 14884 } | 16049 } |
| 14885 | 16050 |
| 16051 @override |
| 14886 bool visitCommentReference(CommentReference node) { | 16052 bool visitCommentReference(CommentReference node) { |
| 14887 CommentReference other = this._other as CommentReference; | 16053 CommentReference other = this._other as CommentReference; |
| 14888 return _isEqualTokens(node.newKeyword, other.newKeyword) && _isEqualNodes(no
de.identifier, other.identifier); | 16054 return _isEqualTokens(node.newKeyword, other.newKeyword) && _isEqualNodes(no
de.identifier, other.identifier); |
| 14889 } | 16055 } |
| 14890 | 16056 |
| 16057 @override |
| 14891 bool visitCompilationUnit(CompilationUnit node) { | 16058 bool visitCompilationUnit(CompilationUnit node) { |
| 14892 CompilationUnit other = this._other as CompilationUnit; | 16059 CompilationUnit other = this._other as CompilationUnit; |
| 14893 return _isEqualTokens(node.beginToken, other.beginToken) && _isEqualNodes(no
de.scriptTag, other.scriptTag) && _isEqualNodeLists(node.directives, other.direc
tives) && _isEqualNodeLists(node.declarations, other.declarations) && _isEqualTo
kens(node.endToken, other.endToken); | 16060 return _isEqualTokens(node.beginToken, other.beginToken) && _isEqualNodes(no
de.scriptTag, other.scriptTag) && _isEqualNodeLists(node.directives, other.direc
tives) && _isEqualNodeLists(node.declarations, other.declarations) && _isEqualTo
kens(node.endToken, other.endToken); |
| 14894 } | 16061 } |
| 14895 | 16062 |
| 16063 @override |
| 14896 bool visitConditionalExpression(ConditionalExpression node) { | 16064 bool visitConditionalExpression(ConditionalExpression node) { |
| 14897 ConditionalExpression other = this._other as ConditionalExpression; | 16065 ConditionalExpression other = this._other as ConditionalExpression; |
| 14898 return _isEqualNodes(node.condition, other.condition) && _isEqualTokens(node
.question, other.question) && _isEqualNodes(node.thenExpression, other.thenExpre
ssion) && _isEqualTokens(node.colon, other.colon) && _isEqualNodes(node.elseExpr
ession, other.elseExpression); | 16066 return _isEqualNodes(node.condition, other.condition) && _isEqualTokens(node
.question, other.question) && _isEqualNodes(node.thenExpression, other.thenExpre
ssion) && _isEqualTokens(node.colon, other.colon) && _isEqualNodes(node.elseExpr
ession, other.elseExpression); |
| 14899 } | 16067 } |
| 14900 | 16068 |
| 16069 @override |
| 14901 bool visitConstructorDeclaration(ConstructorDeclaration node) { | 16070 bool visitConstructorDeclaration(ConstructorDeclaration node) { |
| 14902 ConstructorDeclaration other = this._other as ConstructorDeclaration; | 16071 ConstructorDeclaration other = this._other as ConstructorDeclaration; |
| 14903 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.exter
nalKeyword, other.externalKeyword) && _isEqualTokens(node.constKeyword, other.co
nstKeyword) && _isEqualTokens(node.factoryKeyword, other.factoryKeyword) && _isE
qualNodes(node.returnType, other.returnType) && _isEqualTokens(node.period, othe
r.period) && _isEqualNodes(node.name, other.name) && _isEqualNodes(node.paramete
rs, other.parameters) && _isEqualTokens(node.separator, other.separator) && _isE
qualNodeLists(node.initializers, other.initializers) && _isEqualNodes(node.redir
ectedConstructor, other.redirectedConstructor) && _isEqualNodes(node.body, other
.body); | 16072 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.exter
nalKeyword, other.externalKeyword) && _isEqualTokens(node.constKeyword, other.co
nstKeyword) && _isEqualTokens(node.factoryKeyword, other.factoryKeyword) && _isE
qualNodes(node.returnType, other.returnType) && _isEqualTokens(node.period, othe
r.period) && _isEqualNodes(node.name, other.name) && _isEqualNodes(node.paramete
rs, other.parameters) && _isEqualTokens(node.separator, other.separator) && _isE
qualNodeLists(node.initializers, other.initializers) && _isEqualNodes(node.redir
ectedConstructor, other.redirectedConstructor) && _isEqualNodes(node.body, other
.body); |
| 14904 } | 16073 } |
| 14905 | 16074 |
| 16075 @override |
| 14906 bool visitConstructorFieldInitializer(ConstructorFieldInitializer node) { | 16076 bool visitConstructorFieldInitializer(ConstructorFieldInitializer node) { |
| 14907 ConstructorFieldInitializer other = this._other as ConstructorFieldInitializ
er; | 16077 ConstructorFieldInitializer other = this._other as ConstructorFieldInitializ
er; |
| 14908 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.pe
riod, other.period) && _isEqualNodes(node.fieldName, other.fieldName) && _isEqua
lTokens(node.equals, other.equals) && _isEqualNodes(node.expression, other.expre
ssion); | 16078 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.pe
riod, other.period) && _isEqualNodes(node.fieldName, other.fieldName) && _isEqua
lTokens(node.equals, other.equals) && _isEqualNodes(node.expression, other.expre
ssion); |
| 14909 } | 16079 } |
| 14910 | 16080 |
| 16081 @override |
| 14911 bool visitConstructorName(ConstructorName node) { | 16082 bool visitConstructorName(ConstructorName node) { |
| 14912 ConstructorName other = this._other as ConstructorName; | 16083 ConstructorName other = this._other as ConstructorName; |
| 14913 return _isEqualNodes(node.type, other.type) && _isEqualTokens(node.period, o
ther.period) && _isEqualNodes(node.name, other.name); | 16084 return _isEqualNodes(node.type, other.type) && _isEqualTokens(node.period, o
ther.period) && _isEqualNodes(node.name, other.name); |
| 14914 } | 16085 } |
| 14915 | 16086 |
| 16087 @override |
| 14916 bool visitContinueStatement(ContinueStatement node) { | 16088 bool visitContinueStatement(ContinueStatement node) { |
| 14917 ContinueStatement other = this._other as ContinueStatement; | 16089 ContinueStatement other = this._other as ContinueStatement; |
| 14918 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.lab
el, other.label) && _isEqualTokens(node.semicolon, other.semicolon); | 16090 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.lab
el, other.label) && _isEqualTokens(node.semicolon, other.semicolon); |
| 14919 } | 16091 } |
| 14920 | 16092 |
| 16093 @override |
| 14921 bool visitDeclaredIdentifier(DeclaredIdentifier node) { | 16094 bool visitDeclaredIdentifier(DeclaredIdentifier node) { |
| 14922 DeclaredIdentifier other = this._other as DeclaredIdentifier; | 16095 DeclaredIdentifier other = this._other as DeclaredIdentifier; |
| 14923 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualNodes(node
.identifier, other.identifier); | 16096 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualNodes(node
.identifier, other.identifier); |
| 14924 } | 16097 } |
| 14925 | 16098 |
| 16099 @override |
| 14926 bool visitDefaultFormalParameter(DefaultFormalParameter node) { | 16100 bool visitDefaultFormalParameter(DefaultFormalParameter node) { |
| 14927 DefaultFormalParameter other = this._other as DefaultFormalParameter; | 16101 DefaultFormalParameter other = this._other as DefaultFormalParameter; |
| 14928 return _isEqualNodes(node.parameter, other.parameter) && identical(node.kind
, other.kind) && _isEqualTokens(node.separator, other.separator) && _isEqualNode
s(node.defaultValue, other.defaultValue); | 16102 return _isEqualNodes(node.parameter, other.parameter) && identical(node.kind
, other.kind) && _isEqualTokens(node.separator, other.separator) && _isEqualNode
s(node.defaultValue, other.defaultValue); |
| 14929 } | 16103 } |
| 14930 | 16104 |
| 16105 @override |
| 14931 bool visitDoStatement(DoStatement node) { | 16106 bool visitDoStatement(DoStatement node) { |
| 14932 DoStatement other = this._other as DoStatement; | 16107 DoStatement other = this._other as DoStatement; |
| 14933 return _isEqualTokens(node.doKeyword, other.doKeyword) && _isEqualNodes(node
.body, other.body) && _isEqualTokens(node.whileKeyword, other.whileKeyword) && _
isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node
.condition, other.condition) && _isEqualTokens(node.rightParenthesis, other.righ
tParenthesis) && _isEqualTokens(node.semicolon, other.semicolon); | 16108 return _isEqualTokens(node.doKeyword, other.doKeyword) && _isEqualNodes(node
.body, other.body) && _isEqualTokens(node.whileKeyword, other.whileKeyword) && _
isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node
.condition, other.condition) && _isEqualTokens(node.rightParenthesis, other.righ
tParenthesis) && _isEqualTokens(node.semicolon, other.semicolon); |
| 14934 } | 16109 } |
| 14935 | 16110 |
| 16111 @override |
| 14936 bool visitDoubleLiteral(DoubleLiteral node) { | 16112 bool visitDoubleLiteral(DoubleLiteral node) { |
| 14937 DoubleLiteral other = this._other as DoubleLiteral; | 16113 DoubleLiteral other = this._other as DoubleLiteral; |
| 14938 return _isEqualTokens(node.literal, other.literal) && node.value == other.va
lue; | 16114 return _isEqualTokens(node.literal, other.literal) && node.value == other.va
lue; |
| 14939 } | 16115 } |
| 14940 | 16116 |
| 16117 @override |
| 14941 bool visitEmptyFunctionBody(EmptyFunctionBody node) { | 16118 bool visitEmptyFunctionBody(EmptyFunctionBody node) { |
| 14942 EmptyFunctionBody other = this._other as EmptyFunctionBody; | 16119 EmptyFunctionBody other = this._other as EmptyFunctionBody; |
| 14943 return _isEqualTokens(node.semicolon, other.semicolon); | 16120 return _isEqualTokens(node.semicolon, other.semicolon); |
| 14944 } | 16121 } |
| 14945 | 16122 |
| 16123 @override |
| 14946 bool visitEmptyStatement(EmptyStatement node) { | 16124 bool visitEmptyStatement(EmptyStatement node) { |
| 14947 EmptyStatement other = this._other as EmptyStatement; | 16125 EmptyStatement other = this._other as EmptyStatement; |
| 14948 return _isEqualTokens(node.semicolon, other.semicolon); | 16126 return _isEqualTokens(node.semicolon, other.semicolon); |
| 14949 } | 16127 } |
| 14950 | 16128 |
| 16129 @override |
| 14951 bool visitExportDirective(ExportDirective node) { | 16130 bool visitExportDirective(ExportDirective node) { |
| 14952 ExportDirective other = this._other as ExportDirective; | 16131 ExportDirective other = this._other as ExportDirective; |
| 14953 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.uri, other.uri) && _isEqualNodeLists(no
de.combinators, other.combinators) && _isEqualTokens(node.semicolon, other.semic
olon); | 16132 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.uri, other.uri) && _isEqualNodeLists(no
de.combinators, other.combinators) && _isEqualTokens(node.semicolon, other.semic
olon); |
| 14954 } | 16133 } |
| 14955 | 16134 |
| 16135 @override |
| 14956 bool visitExpressionFunctionBody(ExpressionFunctionBody node) { | 16136 bool visitExpressionFunctionBody(ExpressionFunctionBody node) { |
| 14957 ExpressionFunctionBody other = this._other as ExpressionFunctionBody; | 16137 ExpressionFunctionBody other = this._other as ExpressionFunctionBody; |
| 14958 return _isEqualTokens(node.functionDefinition, other.functionDefinition) &&
_isEqualNodes(node.expression, other.expression) && _isEqualTokens(node.semicolo
n, other.semicolon); | 16138 return _isEqualTokens(node.functionDefinition, other.functionDefinition) &&
_isEqualNodes(node.expression, other.expression) && _isEqualTokens(node.semicolo
n, other.semicolon); |
| 14959 } | 16139 } |
| 14960 | 16140 |
| 16141 @override |
| 14961 bool visitExpressionStatement(ExpressionStatement node) { | 16142 bool visitExpressionStatement(ExpressionStatement node) { |
| 14962 ExpressionStatement other = this._other as ExpressionStatement; | 16143 ExpressionStatement other = this._other as ExpressionStatement; |
| 14963 return _isEqualNodes(node.expression, other.expression) && _isEqualTokens(no
de.semicolon, other.semicolon); | 16144 return _isEqualNodes(node.expression, other.expression) && _isEqualTokens(no
de.semicolon, other.semicolon); |
| 14964 } | 16145 } |
| 14965 | 16146 |
| 16147 @override |
| 14966 bool visitExtendsClause(ExtendsClause node) { | 16148 bool visitExtendsClause(ExtendsClause node) { |
| 14967 ExtendsClause other = this._other as ExtendsClause; | 16149 ExtendsClause other = this._other as ExtendsClause; |
| 14968 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.sup
erclass, other.superclass); | 16150 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.sup
erclass, other.superclass); |
| 14969 } | 16151 } |
| 14970 | 16152 |
| 16153 @override |
| 14971 bool visitFieldDeclaration(FieldDeclaration node) { | 16154 bool visitFieldDeclaration(FieldDeclaration node) { |
| 14972 FieldDeclaration other = this._other as FieldDeclaration; | 16155 FieldDeclaration other = this._other as FieldDeclaration; |
| 14973 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.stati
cKeyword, other.staticKeyword) && _isEqualNodes(node.fields, other.fields) && _i
sEqualTokens(node.semicolon, other.semicolon); | 16156 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.stati
cKeyword, other.staticKeyword) && _isEqualNodes(node.fields, other.fields) && _i
sEqualTokens(node.semicolon, other.semicolon); |
| 14974 } | 16157 } |
| 14975 | 16158 |
| 16159 @override |
| 14976 bool visitFieldFormalParameter(FieldFormalParameter node) { | 16160 bool visitFieldFormalParameter(FieldFormalParameter node) { |
| 14977 FieldFormalParameter other = this._other as FieldFormalParameter; | 16161 FieldFormalParameter other = this._other as FieldFormalParameter; |
| 14978 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualTokens(nod
e.thisToken, other.thisToken) && _isEqualTokens(node.period, other.period) && _i
sEqualNodes(node.identifier, other.identifier); | 16162 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualTokens(nod
e.thisToken, other.thisToken) && _isEqualTokens(node.period, other.period) && _i
sEqualNodes(node.identifier, other.identifier); |
| 14979 } | 16163 } |
| 14980 | 16164 |
| 16165 @override |
| 14981 bool visitForEachStatement(ForEachStatement node) { | 16166 bool visitForEachStatement(ForEachStatement node) { |
| 14982 ForEachStatement other = this._other as ForEachStatement; | 16167 ForEachStatement other = this._other as ForEachStatement; |
| 14983 return _isEqualTokens(node.forKeyword, other.forKeyword) && _isEqualTokens(n
ode.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node.loopVariable,
other.loopVariable) && _isEqualTokens(node.inKeyword, other.inKeyword) && _isEqu
alNodes(node.iterator, other.iterator) && _isEqualTokens(node.rightParenthesis,
other.rightParenthesis) && _isEqualNodes(node.body, other.body); | 16168 return _isEqualTokens(node.forKeyword, other.forKeyword) && _isEqualTokens(n
ode.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node.loopVariable,
other.loopVariable) && _isEqualTokens(node.inKeyword, other.inKeyword) && _isEqu
alNodes(node.iterator, other.iterator) && _isEqualTokens(node.rightParenthesis,
other.rightParenthesis) && _isEqualNodes(node.body, other.body); |
| 14984 } | 16169 } |
| 14985 | 16170 |
| 16171 @override |
| 14986 bool visitFormalParameterList(FormalParameterList node) { | 16172 bool visitFormalParameterList(FormalParameterList node) { |
| 14987 FormalParameterList other = this._other as FormalParameterList; | 16173 FormalParameterList other = this._other as FormalParameterList; |
| 14988 return _isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqu
alNodeLists(node.parameters, other.parameters) && _isEqualTokens(node.leftDelimi
ter, other.leftDelimiter) && _isEqualTokens(node.rightDelimiter, other.rightDeli
miter) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis); | 16174 return _isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqu
alNodeLists(node.parameters, other.parameters) && _isEqualTokens(node.leftDelimi
ter, other.leftDelimiter) && _isEqualTokens(node.rightDelimiter, other.rightDeli
miter) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis); |
| 14989 } | 16175 } |
| 14990 | 16176 |
| 16177 @override |
| 14991 bool visitForStatement(ForStatement node) { | 16178 bool visitForStatement(ForStatement node) { |
| 14992 ForStatement other = this._other as ForStatement; | 16179 ForStatement other = this._other as ForStatement; |
| 14993 return _isEqualTokens(node.forKeyword, other.forKeyword) && _isEqualTokens(n
ode.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node.variables, oth
er.variables) && _isEqualNodes(node.initialization, other.initialization) && _is
EqualTokens(node.leftSeparator, other.leftSeparator) && _isEqualNodes(node.condi
tion, other.condition) && _isEqualTokens(node.rightSeparator, other.rightSeparat
or) && _isEqualNodeLists(node.updaters, other.updaters) && _isEqualTokens(node.r
ightParenthesis, other.rightParenthesis) && _isEqualNodes(node.body, other.body)
; | 16180 return _isEqualTokens(node.forKeyword, other.forKeyword) && _isEqualTokens(n
ode.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node.variables, oth
er.variables) && _isEqualNodes(node.initialization, other.initialization) && _is
EqualTokens(node.leftSeparator, other.leftSeparator) && _isEqualNodes(node.condi
tion, other.condition) && _isEqualTokens(node.rightSeparator, other.rightSeparat
or) && _isEqualNodeLists(node.updaters, other.updaters) && _isEqualTokens(node.r
ightParenthesis, other.rightParenthesis) && _isEqualNodes(node.body, other.body)
; |
| 14994 } | 16181 } |
| 14995 | 16182 |
| 16183 @override |
| 14996 bool visitFunctionDeclaration(FunctionDeclaration node) { | 16184 bool visitFunctionDeclaration(FunctionDeclaration node) { |
| 14997 FunctionDeclaration other = this._other as FunctionDeclaration; | 16185 FunctionDeclaration other = this._other as FunctionDeclaration; |
| 14998 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.exter
nalKeyword, other.externalKeyword) && _isEqualNodes(node.returnType, other.retur
nType) && _isEqualTokens(node.propertyKeyword, other.propertyKeyword) && _isEqua
lNodes(node.name, other.name) && _isEqualNodes(node.functionExpression, other.fu
nctionExpression); | 16186 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.exter
nalKeyword, other.externalKeyword) && _isEqualNodes(node.returnType, other.retur
nType) && _isEqualTokens(node.propertyKeyword, other.propertyKeyword) && _isEqua
lNodes(node.name, other.name) && _isEqualNodes(node.functionExpression, other.fu
nctionExpression); |
| 14999 } | 16187 } |
| 15000 | 16188 |
| 16189 @override |
| 15001 bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { | 16190 bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { |
| 15002 FunctionDeclarationStatement other = this._other as FunctionDeclarationState
ment; | 16191 FunctionDeclarationStatement other = this._other as FunctionDeclarationState
ment; |
| 15003 return _isEqualNodes(node.functionDeclaration, other.functionDeclaration); | 16192 return _isEqualNodes(node.functionDeclaration, other.functionDeclaration); |
| 15004 } | 16193 } |
| 15005 | 16194 |
| 16195 @override |
| 15006 bool visitFunctionExpression(FunctionExpression node) { | 16196 bool visitFunctionExpression(FunctionExpression node) { |
| 15007 FunctionExpression other = this._other as FunctionExpression; | 16197 FunctionExpression other = this._other as FunctionExpression; |
| 15008 return _isEqualNodes(node.parameters, other.parameters) && _isEqualNodes(nod
e.body, other.body); | 16198 return _isEqualNodes(node.parameters, other.parameters) && _isEqualNodes(nod
e.body, other.body); |
| 15009 } | 16199 } |
| 15010 | 16200 |
| 16201 @override |
| 15011 bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { | 16202 bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { |
| 15012 FunctionExpressionInvocation other = this._other as FunctionExpressionInvoca
tion; | 16203 FunctionExpressionInvocation other = this._other as FunctionExpressionInvoca
tion; |
| 15013 return _isEqualNodes(node.function, other.function) && _isEqualNodes(node.ar
gumentList, other.argumentList); | 16204 return _isEqualNodes(node.function, other.function) && _isEqualNodes(node.ar
gumentList, other.argumentList); |
| 15014 } | 16205 } |
| 15015 | 16206 |
| 16207 @override |
| 15016 bool visitFunctionTypeAlias(FunctionTypeAlias node) { | 16208 bool visitFunctionTypeAlias(FunctionTypeAlias node) { |
| 15017 FunctionTypeAlias other = this._other as FunctionTypeAlias; | 16209 FunctionTypeAlias other = this._other as FunctionTypeAlias; |
| 15018 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.returnType, other.returnType) && _isEqu
alNodes(node.name, other.name) && _isEqualNodes(node.typeParameters, other.typeP
arameters) && _isEqualNodes(node.parameters, other.parameters) && _isEqualTokens
(node.semicolon, other.semicolon); | 16210 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.returnType, other.returnType) && _isEqu
alNodes(node.name, other.name) && _isEqualNodes(node.typeParameters, other.typeP
arameters) && _isEqualNodes(node.parameters, other.parameters) && _isEqualTokens
(node.semicolon, other.semicolon); |
| 15019 } | 16211 } |
| 15020 | 16212 |
| 16213 @override |
| 15021 bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { | 16214 bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { |
| 15022 FunctionTypedFormalParameter other = this._other as FunctionTypedFormalParam
eter; | 16215 FunctionTypedFormalParameter other = this._other as FunctionTypedFormalParam
eter; |
| 15023 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.return
Type, other.returnType) && _isEqualNodes(node.identifier, other.identifier) && _
isEqualNodes(node.parameters, other.parameters); | 16216 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.return
Type, other.returnType) && _isEqualNodes(node.identifier, other.identifier) && _
isEqualNodes(node.parameters, other.parameters); |
| 15024 } | 16217 } |
| 15025 | 16218 |
| 16219 @override |
| 15026 bool visitHideCombinator(HideCombinator node) { | 16220 bool visitHideCombinator(HideCombinator node) { |
| 15027 HideCombinator other = this._other as HideCombinator; | 16221 HideCombinator other = this._other as HideCombinator; |
| 15028 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodeLists(node
.hiddenNames, other.hiddenNames); | 16222 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodeLists(node
.hiddenNames, other.hiddenNames); |
| 15029 } | 16223 } |
| 15030 | 16224 |
| 16225 @override |
| 15031 bool visitIfStatement(IfStatement node) { | 16226 bool visitIfStatement(IfStatement node) { |
| 15032 IfStatement other = this._other as IfStatement; | 16227 IfStatement other = this._other as IfStatement; |
| 15033 return _isEqualTokens(node.ifKeyword, other.ifKeyword) && _isEqualTokens(nod
e.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node.condition, other
.condition) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) &&
_isEqualNodes(node.thenStatement, other.thenStatement) && _isEqualTokens(node.el
seKeyword, other.elseKeyword) && _isEqualNodes(node.elseStatement, other.elseSta
tement); | 16228 return _isEqualTokens(node.ifKeyword, other.ifKeyword) && _isEqualTokens(nod
e.leftParenthesis, other.leftParenthesis) && _isEqualNodes(node.condition, other
.condition) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) &&
_isEqualNodes(node.thenStatement, other.thenStatement) && _isEqualTokens(node.el
seKeyword, other.elseKeyword) && _isEqualNodes(node.elseStatement, other.elseSta
tement); |
| 15034 } | 16229 } |
| 15035 | 16230 |
| 16231 @override |
| 15036 bool visitImplementsClause(ImplementsClause node) { | 16232 bool visitImplementsClause(ImplementsClause node) { |
| 15037 ImplementsClause other = this._other as ImplementsClause; | 16233 ImplementsClause other = this._other as ImplementsClause; |
| 15038 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodeLists(node
.interfaces, other.interfaces); | 16234 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodeLists(node
.interfaces, other.interfaces); |
| 15039 } | 16235 } |
| 15040 | 16236 |
| 16237 @override |
| 15041 bool visitImportDirective(ImportDirective node) { | 16238 bool visitImportDirective(ImportDirective node) { |
| 15042 ImportDirective other = this._other as ImportDirective; | 16239 ImportDirective other = this._other as ImportDirective; |
| 15043 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.uri, other.uri) && _isEqualTokens(node.
asToken, other.asToken) && _isEqualNodes(node.prefix, other.prefix) && _isEqualN
odeLists(node.combinators, other.combinators) && _isEqualTokens(node.semicolon,
other.semicolon); | 16240 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.uri, other.uri) && _isEqualTokens(node.
asToken, other.asToken) && _isEqualNodes(node.prefix, other.prefix) && _isEqualN
odeLists(node.combinators, other.combinators) && _isEqualTokens(node.semicolon,
other.semicolon); |
| 15044 } | 16241 } |
| 15045 | 16242 |
| 16243 @override |
| 15046 bool visitIndexExpression(IndexExpression node) { | 16244 bool visitIndexExpression(IndexExpression node) { |
| 15047 IndexExpression other = this._other as IndexExpression; | 16245 IndexExpression other = this._other as IndexExpression; |
| 15048 return _isEqualNodes(node.target, other.target) && _isEqualTokens(node.leftB
racket, other.leftBracket) && _isEqualNodes(node.index, other.index) && _isEqual
Tokens(node.rightBracket, other.rightBracket); | 16246 return _isEqualNodes(node.target, other.target) && _isEqualTokens(node.leftB
racket, other.leftBracket) && _isEqualNodes(node.index, other.index) && _isEqual
Tokens(node.rightBracket, other.rightBracket); |
| 15049 } | 16247 } |
| 15050 | 16248 |
| 16249 @override |
| 15051 bool visitInstanceCreationExpression(InstanceCreationExpression node) { | 16250 bool visitInstanceCreationExpression(InstanceCreationExpression node) { |
| 15052 InstanceCreationExpression other = this._other as InstanceCreationExpression
; | 16251 InstanceCreationExpression other = this._other as InstanceCreationExpression
; |
| 15053 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.con
structorName, other.constructorName) && _isEqualNodes(node.argumentList, other.a
rgumentList); | 16252 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.con
structorName, other.constructorName) && _isEqualNodes(node.argumentList, other.a
rgumentList); |
| 15054 } | 16253 } |
| 15055 | 16254 |
| 16255 @override |
| 15056 bool visitIntegerLiteral(IntegerLiteral node) { | 16256 bool visitIntegerLiteral(IntegerLiteral node) { |
| 15057 IntegerLiteral other = this._other as IntegerLiteral; | 16257 IntegerLiteral other = this._other as IntegerLiteral; |
| 15058 return _isEqualTokens(node.literal, other.literal) && (node.value == other.v
alue); | 16258 return _isEqualTokens(node.literal, other.literal) && (node.value == other.v
alue); |
| 15059 } | 16259 } |
| 15060 | 16260 |
| 16261 @override |
| 15061 bool visitInterpolationExpression(InterpolationExpression node) { | 16262 bool visitInterpolationExpression(InterpolationExpression node) { |
| 15062 InterpolationExpression other = this._other as InterpolationExpression; | 16263 InterpolationExpression other = this._other as InterpolationExpression; |
| 15063 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodes(
node.expression, other.expression) && _isEqualTokens(node.rightBracket, other.ri
ghtBracket); | 16264 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodes(
node.expression, other.expression) && _isEqualTokens(node.rightBracket, other.ri
ghtBracket); |
| 15064 } | 16265 } |
| 15065 | 16266 |
| 16267 @override |
| 15066 bool visitInterpolationString(InterpolationString node) { | 16268 bool visitInterpolationString(InterpolationString node) { |
| 15067 InterpolationString other = this._other as InterpolationString; | 16269 InterpolationString other = this._other as InterpolationString; |
| 15068 return _isEqualTokens(node.contents, other.contents) && node.value == other.
value; | 16270 return _isEqualTokens(node.contents, other.contents) && node.value == other.
value; |
| 15069 } | 16271 } |
| 15070 | 16272 |
| 16273 @override |
| 15071 bool visitIsExpression(IsExpression node) { | 16274 bool visitIsExpression(IsExpression node) { |
| 15072 IsExpression other = this._other as IsExpression; | 16275 IsExpression other = this._other as IsExpression; |
| 15073 return _isEqualNodes(node.expression, other.expression) && _isEqualTokens(no
de.isOperator, other.isOperator) && _isEqualTokens(node.notOperator, other.notOp
erator) && _isEqualNodes(node.type, other.type); | 16276 return _isEqualNodes(node.expression, other.expression) && _isEqualTokens(no
de.isOperator, other.isOperator) && _isEqualTokens(node.notOperator, other.notOp
erator) && _isEqualNodes(node.type, other.type); |
| 15074 } | 16277 } |
| 15075 | 16278 |
| 16279 @override |
| 15076 bool visitLabel(Label node) { | 16280 bool visitLabel(Label node) { |
| 15077 Label other = this._other as Label; | 16281 Label other = this._other as Label; |
| 15078 return _isEqualNodes(node.label, other.label) && _isEqualTokens(node.colon,
other.colon); | 16282 return _isEqualNodes(node.label, other.label) && _isEqualTokens(node.colon,
other.colon); |
| 15079 } | 16283 } |
| 15080 | 16284 |
| 16285 @override |
| 15081 bool visitLabeledStatement(LabeledStatement node) { | 16286 bool visitLabeledStatement(LabeledStatement node) { |
| 15082 LabeledStatement other = this._other as LabeledStatement; | 16287 LabeledStatement other = this._other as LabeledStatement; |
| 15083 return _isEqualNodeLists(node.labels, other.labels) && _isEqualNodes(node.st
atement, other.statement); | 16288 return _isEqualNodeLists(node.labels, other.labels) && _isEqualNodes(node.st
atement, other.statement); |
| 15084 } | 16289 } |
| 15085 | 16290 |
| 16291 @override |
| 15086 bool visitLibraryDirective(LibraryDirective node) { | 16292 bool visitLibraryDirective(LibraryDirective node) { |
| 15087 LibraryDirective other = this._other as LibraryDirective; | 16293 LibraryDirective other = this._other as LibraryDirective; |
| 15088 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.libra
ryToken, other.libraryToken) && _isEqualNodes(node.name, other.name) && _isEqual
Tokens(node.semicolon, other.semicolon); | 16294 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.libra
ryToken, other.libraryToken) && _isEqualNodes(node.name, other.name) && _isEqual
Tokens(node.semicolon, other.semicolon); |
| 15089 } | 16295 } |
| 15090 | 16296 |
| 16297 @override |
| 15091 bool visitLibraryIdentifier(LibraryIdentifier node) { | 16298 bool visitLibraryIdentifier(LibraryIdentifier node) { |
| 15092 LibraryIdentifier other = this._other as LibraryIdentifier; | 16299 LibraryIdentifier other = this._other as LibraryIdentifier; |
| 15093 return _isEqualNodeLists(node.components, other.components); | 16300 return _isEqualNodeLists(node.components, other.components); |
| 15094 } | 16301 } |
| 15095 | 16302 |
| 16303 @override |
| 15096 bool visitListLiteral(ListLiteral node) { | 16304 bool visitListLiteral(ListLiteral node) { |
| 15097 ListLiteral other = this._other as ListLiteral; | 16305 ListLiteral other = this._other as ListLiteral; |
| 15098 return _isEqualTokens(node.constKeyword, other.constKeyword) && _isEqualNode
s(node.typeArguments, other.typeArguments) && _isEqualTokens(node.leftBracket, o
ther.leftBracket) && _isEqualNodeLists(node.elements, other.elements) && _isEqua
lTokens(node.rightBracket, other.rightBracket); | 16306 return _isEqualTokens(node.constKeyword, other.constKeyword) && _isEqualNode
s(node.typeArguments, other.typeArguments) && _isEqualTokens(node.leftBracket, o
ther.leftBracket) && _isEqualNodeLists(node.elements, other.elements) && _isEqua
lTokens(node.rightBracket, other.rightBracket); |
| 15099 } | 16307 } |
| 15100 | 16308 |
| 16309 @override |
| 15101 bool visitMapLiteral(MapLiteral node) { | 16310 bool visitMapLiteral(MapLiteral node) { |
| 15102 MapLiteral other = this._other as MapLiteral; | 16311 MapLiteral other = this._other as MapLiteral; |
| 15103 return _isEqualTokens(node.constKeyword, other.constKeyword) && _isEqualNode
s(node.typeArguments, other.typeArguments) && _isEqualTokens(node.leftBracket, o
ther.leftBracket) && _isEqualNodeLists(node.entries, other.entries) && _isEqualT
okens(node.rightBracket, other.rightBracket); | 16312 return _isEqualTokens(node.constKeyword, other.constKeyword) && _isEqualNode
s(node.typeArguments, other.typeArguments) && _isEqualTokens(node.leftBracket, o
ther.leftBracket) && _isEqualNodeLists(node.entries, other.entries) && _isEqualT
okens(node.rightBracket, other.rightBracket); |
| 15104 } | 16313 } |
| 15105 | 16314 |
| 16315 @override |
| 15106 bool visitMapLiteralEntry(MapLiteralEntry node) { | 16316 bool visitMapLiteralEntry(MapLiteralEntry node) { |
| 15107 MapLiteralEntry other = this._other as MapLiteralEntry; | 16317 MapLiteralEntry other = this._other as MapLiteralEntry; |
| 15108 return _isEqualNodes(node.key, other.key) && _isEqualTokens(node.separator,
other.separator) && _isEqualNodes(node.value, other.value); | 16318 return _isEqualNodes(node.key, other.key) && _isEqualTokens(node.separator,
other.separator) && _isEqualNodes(node.value, other.value); |
| 15109 } | 16319 } |
| 15110 | 16320 |
| 16321 @override |
| 15111 bool visitMethodDeclaration(MethodDeclaration node) { | 16322 bool visitMethodDeclaration(MethodDeclaration node) { |
| 15112 MethodDeclaration other = this._other as MethodDeclaration; | 16323 MethodDeclaration other = this._other as MethodDeclaration; |
| 15113 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.exter
nalKeyword, other.externalKeyword) && _isEqualTokens(node.modifierKeyword, other
.modifierKeyword) && _isEqualNodes(node.returnType, other.returnType) && _isEqua
lTokens(node.propertyKeyword, other.propertyKeyword) && _isEqualTokens(node.prop
ertyKeyword, other.propertyKeyword) && _isEqualNodes(node.name, other.name) && _
isEqualNodes(node.parameters, other.parameters) && _isEqualNodes(node.body, othe
r.body); | 16324 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.exter
nalKeyword, other.externalKeyword) && _isEqualTokens(node.modifierKeyword, other
.modifierKeyword) && _isEqualNodes(node.returnType, other.returnType) && _isEqua
lTokens(node.propertyKeyword, other.propertyKeyword) && _isEqualTokens(node.prop
ertyKeyword, other.propertyKeyword) && _isEqualNodes(node.name, other.name) && _
isEqualNodes(node.parameters, other.parameters) && _isEqualNodes(node.body, othe
r.body); |
| 15114 } | 16325 } |
| 15115 | 16326 |
| 16327 @override |
| 15116 bool visitMethodInvocation(MethodInvocation node) { | 16328 bool visitMethodInvocation(MethodInvocation node) { |
| 15117 MethodInvocation other = this._other as MethodInvocation; | 16329 MethodInvocation other = this._other as MethodInvocation; |
| 15118 return _isEqualNodes(node.target, other.target) && _isEqualTokens(node.perio
d, other.period) && _isEqualNodes(node.methodName, other.methodName) && _isEqual
Nodes(node.argumentList, other.argumentList); | 16330 return _isEqualNodes(node.target, other.target) && _isEqualTokens(node.perio
d, other.period) && _isEqualNodes(node.methodName, other.methodName) && _isEqual
Nodes(node.argumentList, other.argumentList); |
| 15119 } | 16331 } |
| 15120 | 16332 |
| 16333 @override |
| 15121 bool visitNamedExpression(NamedExpression node) { | 16334 bool visitNamedExpression(NamedExpression node) { |
| 15122 NamedExpression other = this._other as NamedExpression; | 16335 NamedExpression other = this._other as NamedExpression; |
| 15123 return _isEqualNodes(node.name, other.name) && _isEqualNodes(node.expression
, other.expression); | 16336 return _isEqualNodes(node.name, other.name) && _isEqualNodes(node.expression
, other.expression); |
| 15124 } | 16337 } |
| 15125 | 16338 |
| 16339 @override |
| 15126 bool visitNativeClause(NativeClause node) { | 16340 bool visitNativeClause(NativeClause node) { |
| 15127 NativeClause other = this._other as NativeClause; | 16341 NativeClause other = this._other as NativeClause; |
| 15128 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.nam
e, other.name); | 16342 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.nam
e, other.name); |
| 15129 } | 16343 } |
| 15130 | 16344 |
| 16345 @override |
| 15131 bool visitNativeFunctionBody(NativeFunctionBody node) { | 16346 bool visitNativeFunctionBody(NativeFunctionBody node) { |
| 15132 NativeFunctionBody other = this._other as NativeFunctionBody; | 16347 NativeFunctionBody other = this._other as NativeFunctionBody; |
| 15133 return _isEqualTokens(node.nativeToken, other.nativeToken) && _isEqualNodes(
node.stringLiteral, other.stringLiteral) && _isEqualTokens(node.semicolon, other
.semicolon); | 16348 return _isEqualTokens(node.nativeToken, other.nativeToken) && _isEqualNodes(
node.stringLiteral, other.stringLiteral) && _isEqualTokens(node.semicolon, other
.semicolon); |
| 15134 } | 16349 } |
| 15135 | 16350 |
| 16351 @override |
| 15136 bool visitNullLiteral(NullLiteral node) { | 16352 bool visitNullLiteral(NullLiteral node) { |
| 15137 NullLiteral other = this._other as NullLiteral; | 16353 NullLiteral other = this._other as NullLiteral; |
| 15138 return _isEqualTokens(node.literal, other.literal); | 16354 return _isEqualTokens(node.literal, other.literal); |
| 15139 } | 16355 } |
| 15140 | 16356 |
| 16357 @override |
| 15141 bool visitParenthesizedExpression(ParenthesizedExpression node) { | 16358 bool visitParenthesizedExpression(ParenthesizedExpression node) { |
| 15142 ParenthesizedExpression other = this._other as ParenthesizedExpression; | 16359 ParenthesizedExpression other = this._other as ParenthesizedExpression; |
| 15143 return _isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqu
alNodes(node.expression, other.expression) && _isEqualTokens(node.rightParenthes
is, other.rightParenthesis); | 16360 return _isEqualTokens(node.leftParenthesis, other.leftParenthesis) && _isEqu
alNodes(node.expression, other.expression) && _isEqualTokens(node.rightParenthes
is, other.rightParenthesis); |
| 15144 } | 16361 } |
| 15145 | 16362 |
| 16363 @override |
| 15146 bool visitPartDirective(PartDirective node) { | 16364 bool visitPartDirective(PartDirective node) { |
| 15147 PartDirective other = this._other as PartDirective; | 16365 PartDirective other = this._other as PartDirective; |
| 15148 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.partT
oken, other.partToken) && _isEqualNodes(node.uri, other.uri) && _isEqualTokens(n
ode.semicolon, other.semicolon); | 16366 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.partT
oken, other.partToken) && _isEqualNodes(node.uri, other.uri) && _isEqualTokens(n
ode.semicolon, other.semicolon); |
| 15149 } | 16367 } |
| 15150 | 16368 |
| 16369 @override |
| 15151 bool visitPartOfDirective(PartOfDirective node) { | 16370 bool visitPartOfDirective(PartOfDirective node) { |
| 15152 PartOfDirective other = this._other as PartOfDirective; | 16371 PartOfDirective other = this._other as PartOfDirective; |
| 15153 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.partT
oken, other.partToken) && _isEqualTokens(node.ofToken, other.ofToken) && _isEqua
lNodes(node.libraryName, other.libraryName) && _isEqualTokens(node.semicolon, ot
her.semicolon); | 16372 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.partT
oken, other.partToken) && _isEqualTokens(node.ofToken, other.ofToken) && _isEqua
lNodes(node.libraryName, other.libraryName) && _isEqualTokens(node.semicolon, ot
her.semicolon); |
| 15154 } | 16373 } |
| 15155 | 16374 |
| 16375 @override |
| 15156 bool visitPostfixExpression(PostfixExpression node) { | 16376 bool visitPostfixExpression(PostfixExpression node) { |
| 15157 PostfixExpression other = this._other as PostfixExpression; | 16377 PostfixExpression other = this._other as PostfixExpression; |
| 15158 return _isEqualNodes(node.operand, other.operand) && _isEqualTokens(node.ope
rator, other.operator); | 16378 return _isEqualNodes(node.operand, other.operand) && _isEqualTokens(node.ope
rator, other.operator); |
| 15159 } | 16379 } |
| 15160 | 16380 |
| 16381 @override |
| 15161 bool visitPrefixedIdentifier(PrefixedIdentifier node) { | 16382 bool visitPrefixedIdentifier(PrefixedIdentifier node) { |
| 15162 PrefixedIdentifier other = this._other as PrefixedIdentifier; | 16383 PrefixedIdentifier other = this._other as PrefixedIdentifier; |
| 15163 return _isEqualNodes(node.prefix, other.prefix) && _isEqualTokens(node.perio
d, other.period) && _isEqualNodes(node.identifier, other.identifier); | 16384 return _isEqualNodes(node.prefix, other.prefix) && _isEqualTokens(node.perio
d, other.period) && _isEqualNodes(node.identifier, other.identifier); |
| 15164 } | 16385 } |
| 15165 | 16386 |
| 16387 @override |
| 15166 bool visitPrefixExpression(PrefixExpression node) { | 16388 bool visitPrefixExpression(PrefixExpression node) { |
| 15167 PrefixExpression other = this._other as PrefixExpression; | 16389 PrefixExpression other = this._other as PrefixExpression; |
| 15168 return _isEqualTokens(node.operator, other.operator) && _isEqualNodes(node.o
perand, other.operand); | 16390 return _isEqualTokens(node.operator, other.operator) && _isEqualNodes(node.o
perand, other.operand); |
| 15169 } | 16391 } |
| 15170 | 16392 |
| 16393 @override |
| 15171 bool visitPropertyAccess(PropertyAccess node) { | 16394 bool visitPropertyAccess(PropertyAccess node) { |
| 15172 PropertyAccess other = this._other as PropertyAccess; | 16395 PropertyAccess other = this._other as PropertyAccess; |
| 15173 return _isEqualNodes(node.target, other.target) && _isEqualTokens(node.opera
tor, other.operator) && _isEqualNodes(node.propertyName, other.propertyName); | 16396 return _isEqualNodes(node.target, other.target) && _isEqualTokens(node.opera
tor, other.operator) && _isEqualNodes(node.propertyName, other.propertyName); |
| 15174 } | 16397 } |
| 15175 | 16398 |
| 16399 @override |
| 15176 bool visitRedirectingConstructorInvocation(RedirectingConstructorInvocation no
de) { | 16400 bool visitRedirectingConstructorInvocation(RedirectingConstructorInvocation no
de) { |
| 15177 RedirectingConstructorInvocation other = this._other as RedirectingConstruct
orInvocation; | 16401 RedirectingConstructorInvocation other = this._other as RedirectingConstruct
orInvocation; |
| 15178 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.pe
riod, other.period) && _isEqualNodes(node.constructorName, other.constructorName
) && _isEqualNodes(node.argumentList, other.argumentList); | 16402 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.pe
riod, other.period) && _isEqualNodes(node.constructorName, other.constructorName
) && _isEqualNodes(node.argumentList, other.argumentList); |
| 15179 } | 16403 } |
| 15180 | 16404 |
| 16405 @override |
| 15181 bool visitRethrowExpression(RethrowExpression node) { | 16406 bool visitRethrowExpression(RethrowExpression node) { |
| 15182 RethrowExpression other = this._other as RethrowExpression; | 16407 RethrowExpression other = this._other as RethrowExpression; |
| 15183 return _isEqualTokens(node.keyword, other.keyword); | 16408 return _isEqualTokens(node.keyword, other.keyword); |
| 15184 } | 16409 } |
| 15185 | 16410 |
| 16411 @override |
| 15186 bool visitReturnStatement(ReturnStatement node) { | 16412 bool visitReturnStatement(ReturnStatement node) { |
| 15187 ReturnStatement other = this._other as ReturnStatement; | 16413 ReturnStatement other = this._other as ReturnStatement; |
| 15188 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.exp
ression, other.expression) && _isEqualTokens(node.semicolon, other.semicolon); | 16414 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.exp
ression, other.expression) && _isEqualTokens(node.semicolon, other.semicolon); |
| 15189 } | 16415 } |
| 15190 | 16416 |
| 16417 @override |
| 15191 bool visitScriptTag(ScriptTag node) { | 16418 bool visitScriptTag(ScriptTag node) { |
| 15192 ScriptTag other = this._other as ScriptTag; | 16419 ScriptTag other = this._other as ScriptTag; |
| 15193 return _isEqualTokens(node.scriptTag, other.scriptTag); | 16420 return _isEqualTokens(node.scriptTag, other.scriptTag); |
| 15194 } | 16421 } |
| 15195 | 16422 |
| 16423 @override |
| 15196 bool visitShowCombinator(ShowCombinator node) { | 16424 bool visitShowCombinator(ShowCombinator node) { |
| 15197 ShowCombinator other = this._other as ShowCombinator; | 16425 ShowCombinator other = this._other as ShowCombinator; |
| 15198 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodeLists(node
.shownNames, other.shownNames); | 16426 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodeLists(node
.shownNames, other.shownNames); |
| 15199 } | 16427 } |
| 15200 | 16428 |
| 16429 @override |
| 15201 bool visitSimpleFormalParameter(SimpleFormalParameter node) { | 16430 bool visitSimpleFormalParameter(SimpleFormalParameter node) { |
| 15202 SimpleFormalParameter other = this._other as SimpleFormalParameter; | 16431 SimpleFormalParameter other = this._other as SimpleFormalParameter; |
| 15203 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualNodes(node
.identifier, other.identifier); | 16432 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualNodes(node
.identifier, other.identifier); |
| 15204 } | 16433 } |
| 15205 | 16434 |
| 16435 @override |
| 15206 bool visitSimpleIdentifier(SimpleIdentifier node) { | 16436 bool visitSimpleIdentifier(SimpleIdentifier node) { |
| 15207 SimpleIdentifier other = this._other as SimpleIdentifier; | 16437 SimpleIdentifier other = this._other as SimpleIdentifier; |
| 15208 return _isEqualTokens(node.token, other.token); | 16438 return _isEqualTokens(node.token, other.token); |
| 15209 } | 16439 } |
| 15210 | 16440 |
| 16441 @override |
| 15211 bool visitSimpleStringLiteral(SimpleStringLiteral node) { | 16442 bool visitSimpleStringLiteral(SimpleStringLiteral node) { |
| 15212 SimpleStringLiteral other = this._other as SimpleStringLiteral; | 16443 SimpleStringLiteral other = this._other as SimpleStringLiteral; |
| 15213 return _isEqualTokens(node.literal, other.literal) && (node.value == other.v
alue); | 16444 return _isEqualTokens(node.literal, other.literal) && (node.value == other.v
alue); |
| 15214 } | 16445 } |
| 15215 | 16446 |
| 16447 @override |
| 15216 bool visitStringInterpolation(StringInterpolation node) { | 16448 bool visitStringInterpolation(StringInterpolation node) { |
| 15217 StringInterpolation other = this._other as StringInterpolation; | 16449 StringInterpolation other = this._other as StringInterpolation; |
| 15218 return _isEqualNodeLists(node.elements, other.elements); | 16450 return _isEqualNodeLists(node.elements, other.elements); |
| 15219 } | 16451 } |
| 15220 | 16452 |
| 16453 @override |
| 15221 bool visitSuperConstructorInvocation(SuperConstructorInvocation node) { | 16454 bool visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
| 15222 SuperConstructorInvocation other = this._other as SuperConstructorInvocation
; | 16455 SuperConstructorInvocation other = this._other as SuperConstructorInvocation
; |
| 15223 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.pe
riod, other.period) && _isEqualNodes(node.constructorName, other.constructorName
) && _isEqualNodes(node.argumentList, other.argumentList); | 16456 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.pe
riod, other.period) && _isEqualNodes(node.constructorName, other.constructorName
) && _isEqualNodes(node.argumentList, other.argumentList); |
| 15224 } | 16457 } |
| 15225 | 16458 |
| 16459 @override |
| 15226 bool visitSuperExpression(SuperExpression node) { | 16460 bool visitSuperExpression(SuperExpression node) { |
| 15227 SuperExpression other = this._other as SuperExpression; | 16461 SuperExpression other = this._other as SuperExpression; |
| 15228 return _isEqualTokens(node.keyword, other.keyword); | 16462 return _isEqualTokens(node.keyword, other.keyword); |
| 15229 } | 16463 } |
| 15230 | 16464 |
| 16465 @override |
| 15231 bool visitSwitchCase(SwitchCase node) { | 16466 bool visitSwitchCase(SwitchCase node) { |
| 15232 SwitchCase other = this._other as SwitchCase; | 16467 SwitchCase other = this._other as SwitchCase; |
| 15233 return _isEqualNodeLists(node.labels, other.labels) && _isEqualTokens(node.k
eyword, other.keyword) && _isEqualNodes(node.expression, other.expression) && _i
sEqualTokens(node.colon, other.colon) && _isEqualNodeLists(node.statements, othe
r.statements); | 16468 return _isEqualNodeLists(node.labels, other.labels) && _isEqualTokens(node.k
eyword, other.keyword) && _isEqualNodes(node.expression, other.expression) && _i
sEqualTokens(node.colon, other.colon) && _isEqualNodeLists(node.statements, othe
r.statements); |
| 15234 } | 16469 } |
| 15235 | 16470 |
| 16471 @override |
| 15236 bool visitSwitchDefault(SwitchDefault node) { | 16472 bool visitSwitchDefault(SwitchDefault node) { |
| 15237 SwitchDefault other = this._other as SwitchDefault; | 16473 SwitchDefault other = this._other as SwitchDefault; |
| 15238 return _isEqualNodeLists(node.labels, other.labels) && _isEqualTokens(node.k
eyword, other.keyword) && _isEqualTokens(node.colon, other.colon) && _isEqualNod
eLists(node.statements, other.statements); | 16474 return _isEqualNodeLists(node.labels, other.labels) && _isEqualTokens(node.k
eyword, other.keyword) && _isEqualTokens(node.colon, other.colon) && _isEqualNod
eLists(node.statements, other.statements); |
| 15239 } | 16475 } |
| 15240 | 16476 |
| 16477 @override |
| 15241 bool visitSwitchStatement(SwitchStatement node) { | 16478 bool visitSwitchStatement(SwitchStatement node) { |
| 15242 SwitchStatement other = this._other as SwitchStatement; | 16479 SwitchStatement other = this._other as SwitchStatement; |
| 15243 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.le
ftParenthesis, other.leftParenthesis) && _isEqualNodes(node.expression, other.ex
pression) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) && _i
sEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLists(node.memb
ers, other.members) && _isEqualTokens(node.rightBracket, other.rightBracket); | 16480 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.le
ftParenthesis, other.leftParenthesis) && _isEqualNodes(node.expression, other.ex
pression) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) && _i
sEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLists(node.memb
ers, other.members) && _isEqualTokens(node.rightBracket, other.rightBracket); |
| 15244 } | 16481 } |
| 15245 | 16482 |
| 16483 @override |
| 15246 bool visitSymbolLiteral(SymbolLiteral node) { | 16484 bool visitSymbolLiteral(SymbolLiteral node) { |
| 15247 SymbolLiteral other = this._other as SymbolLiteral; | 16485 SymbolLiteral other = this._other as SymbolLiteral; |
| 15248 return _isEqualTokens(node.poundSign, other.poundSign) && _isEqualTokenLists
(node.components, other.components); | 16486 return _isEqualTokens(node.poundSign, other.poundSign) && _isEqualTokenLists
(node.components, other.components); |
| 15249 } | 16487 } |
| 15250 | 16488 |
| 16489 @override |
| 15251 bool visitThisExpression(ThisExpression node) { | 16490 bool visitThisExpression(ThisExpression node) { |
| 15252 ThisExpression other = this._other as ThisExpression; | 16491 ThisExpression other = this._other as ThisExpression; |
| 15253 return _isEqualTokens(node.keyword, other.keyword); | 16492 return _isEqualTokens(node.keyword, other.keyword); |
| 15254 } | 16493 } |
| 15255 | 16494 |
| 16495 @override |
| 15256 bool visitThrowExpression(ThrowExpression node) { | 16496 bool visitThrowExpression(ThrowExpression node) { |
| 15257 ThrowExpression other = this._other as ThrowExpression; | 16497 ThrowExpression other = this._other as ThrowExpression; |
| 15258 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.exp
ression, other.expression); | 16498 return _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node.exp
ression, other.expression); |
| 15259 } | 16499 } |
| 15260 | 16500 |
| 16501 @override |
| 15261 bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { | 16502 bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { |
| 15262 TopLevelVariableDeclaration other = this._other as TopLevelVariableDeclarati
on; | 16503 TopLevelVariableDeclaration other = this._other as TopLevelVariableDeclarati
on; |
| 15263 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.variab
les, other.variables) && _isEqualTokens(node.semicolon, other.semicolon); | 16504 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.variab
les, other.variables) && _isEqualTokens(node.semicolon, other.semicolon); |
| 15264 } | 16505 } |
| 15265 | 16506 |
| 16507 @override |
| 15266 bool visitTryStatement(TryStatement node) { | 16508 bool visitTryStatement(TryStatement node) { |
| 15267 TryStatement other = this._other as TryStatement; | 16509 TryStatement other = this._other as TryStatement; |
| 15268 return _isEqualTokens(node.tryKeyword, other.tryKeyword) && _isEqualNodes(no
de.body, other.body) && _isEqualNodeLists(node.catchClauses, other.catchClauses)
&& _isEqualTokens(node.finallyKeyword, other.finallyKeyword) && _isEqualNodes(n
ode.finallyBlock, other.finallyBlock); | 16510 return _isEqualTokens(node.tryKeyword, other.tryKeyword) && _isEqualNodes(no
de.body, other.body) && _isEqualNodeLists(node.catchClauses, other.catchClauses)
&& _isEqualTokens(node.finallyKeyword, other.finallyKeyword) && _isEqualNodes(n
ode.finallyBlock, other.finallyBlock); |
| 15269 } | 16511 } |
| 15270 | 16512 |
| 16513 @override |
| 15271 bool visitTypeArgumentList(TypeArgumentList node) { | 16514 bool visitTypeArgumentList(TypeArgumentList node) { |
| 15272 TypeArgumentList other = this._other as TypeArgumentList; | 16515 TypeArgumentList other = this._other as TypeArgumentList; |
| 15273 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLi
sts(node.arguments, other.arguments) && _isEqualTokens(node.rightBracket, other.
rightBracket); | 16516 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLi
sts(node.arguments, other.arguments) && _isEqualTokens(node.rightBracket, other.
rightBracket); |
| 15274 } | 16517 } |
| 15275 | 16518 |
| 16519 @override |
| 15276 bool visitTypeName(TypeName node) { | 16520 bool visitTypeName(TypeName node) { |
| 15277 TypeName other = this._other as TypeName; | 16521 TypeName other = this._other as TypeName; |
| 15278 return _isEqualNodes(node.name, other.name) && _isEqualNodes(node.typeArgume
nts, other.typeArguments); | 16522 return _isEqualNodes(node.name, other.name) && _isEqualNodes(node.typeArgume
nts, other.typeArguments); |
| 15279 } | 16523 } |
| 15280 | 16524 |
| 16525 @override |
| 15281 bool visitTypeParameter(TypeParameter node) { | 16526 bool visitTypeParameter(TypeParameter node) { |
| 15282 TypeParameter other = this._other as TypeParameter; | 16527 TypeParameter other = this._other as TypeParameter; |
| 15283 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.name,
other.name) && _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node
.bound, other.bound); | 16528 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.name,
other.name) && _isEqualTokens(node.keyword, other.keyword) && _isEqualNodes(node
.bound, other.bound); |
| 15284 } | 16529 } |
| 15285 | 16530 |
| 16531 @override |
| 15286 bool visitTypeParameterList(TypeParameterList node) { | 16532 bool visitTypeParameterList(TypeParameterList node) { |
| 15287 TypeParameterList other = this._other as TypeParameterList; | 16533 TypeParameterList other = this._other as TypeParameterList; |
| 15288 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLi
sts(node.typeParameters, other.typeParameters) && _isEqualTokens(node.rightBrack
et, other.rightBracket); | 16534 return _isEqualTokens(node.leftBracket, other.leftBracket) && _isEqualNodeLi
sts(node.typeParameters, other.typeParameters) && _isEqualTokens(node.rightBrack
et, other.rightBracket); |
| 15289 } | 16535 } |
| 15290 | 16536 |
| 16537 @override |
| 15291 bool visitVariableDeclaration(VariableDeclaration node) { | 16538 bool visitVariableDeclaration(VariableDeclaration node) { |
| 15292 VariableDeclaration other = this._other as VariableDeclaration; | 16539 VariableDeclaration other = this._other as VariableDeclaration; |
| 15293 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.name,
other.name) && _isEqualTokens(node.equals, other.equals) && _isEqualNodes(node.i
nitializer, other.initializer); | 16540 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualNodes(node.name,
other.name) && _isEqualTokens(node.equals, other.equals) && _isEqualNodes(node.i
nitializer, other.initializer); |
| 15294 } | 16541 } |
| 15295 | 16542 |
| 16543 @override |
| 15296 bool visitVariableDeclarationList(VariableDeclarationList node) { | 16544 bool visitVariableDeclarationList(VariableDeclarationList node) { |
| 15297 VariableDeclarationList other = this._other as VariableDeclarationList; | 16545 VariableDeclarationList other = this._other as VariableDeclarationList; |
| 15298 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualNodeLists(
node.variables, other.variables); | 16546 return _isEqualNodes(node.documentationComment, other.documentationComment)
&& _isEqualNodeLists(node.metadata, other.metadata) && _isEqualTokens(node.keywo
rd, other.keyword) && _isEqualNodes(node.type, other.type) && _isEqualNodeLists(
node.variables, other.variables); |
| 15299 } | 16547 } |
| 15300 | 16548 |
| 16549 @override |
| 15301 bool visitVariableDeclarationStatement(VariableDeclarationStatement node) { | 16550 bool visitVariableDeclarationStatement(VariableDeclarationStatement node) { |
| 15302 VariableDeclarationStatement other = this._other as VariableDeclarationState
ment; | 16551 VariableDeclarationStatement other = this._other as VariableDeclarationState
ment; |
| 15303 return _isEqualNodes(node.variables, other.variables) && _isEqualTokens(node
.semicolon, other.semicolon); | 16552 return _isEqualNodes(node.variables, other.variables) && _isEqualTokens(node
.semicolon, other.semicolon); |
| 15304 } | 16553 } |
| 15305 | 16554 |
| 16555 @override |
| 15306 bool visitWhileStatement(WhileStatement node) { | 16556 bool visitWhileStatement(WhileStatement node) { |
| 15307 WhileStatement other = this._other as WhileStatement; | 16557 WhileStatement other = this._other as WhileStatement; |
| 15308 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.le
ftParenthesis, other.leftParenthesis) && _isEqualNodes(node.condition, other.con
dition) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) && _isE
qualNodes(node.body, other.body); | 16558 return _isEqualTokens(node.keyword, other.keyword) && _isEqualTokens(node.le
ftParenthesis, other.leftParenthesis) && _isEqualNodes(node.condition, other.con
dition) && _isEqualTokens(node.rightParenthesis, other.rightParenthesis) && _isE
qualNodes(node.body, other.body); |
| 15309 } | 16559 } |
| 15310 | 16560 |
| 16561 @override |
| 15311 bool visitWithClause(WithClause node) { | 16562 bool visitWithClause(WithClause node) { |
| 15312 WithClause other = this._other as WithClause; | 16563 WithClause other = this._other as WithClause; |
| 15313 return _isEqualTokens(node.withKeyword, other.withKeyword) && _isEqualNodeLi
sts(node.mixinTypes, other.mixinTypes); | 16564 return _isEqualTokens(node.withKeyword, other.withKeyword) && _isEqualNodeLi
sts(node.mixinTypes, other.mixinTypes); |
| 15314 } | 16565 } |
| 15315 | 16566 |
| 15316 /** | 16567 /** |
| 15317 * Return `true` if the given lists of AST nodes have the same size and corres
ponding | 16568 * Return `true` if the given lists of AST nodes have the same size and corres
ponding |
| 15318 * elements are equal. | 16569 * elements are equal. |
| 15319 * | 16570 * |
| 15320 * @param first the first node being compared | 16571 * @param first the first node being compared |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15427 * @param oldNode the node to be replaced | 16678 * @param oldNode the node to be replaced |
| 15428 * @param newNode the replacement node | 16679 * @param newNode the replacement node |
| 15429 * @param tokenMap a mapping of old tokens to new tokens (not `null`) | 16680 * @param tokenMap a mapping of old tokens to new tokens (not `null`) |
| 15430 */ | 16681 */ |
| 15431 IncrementalAstCloner(AstNode oldNode, AstNode newNode, TokenMap tokenMap) { | 16682 IncrementalAstCloner(AstNode oldNode, AstNode newNode, TokenMap tokenMap) { |
| 15432 this._oldNode = oldNode; | 16683 this._oldNode = oldNode; |
| 15433 this._newNode = newNode; | 16684 this._newNode = newNode; |
| 15434 this._tokenMap = tokenMap; | 16685 this._tokenMap = tokenMap; |
| 15435 } | 16686 } |
| 15436 | 16687 |
| 16688 @override |
| 15437 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); | 16689 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); |
| 15438 | 16690 |
| 16691 @override |
| 15439 Annotation visitAnnotation(Annotation node) { | 16692 Annotation visitAnnotation(Annotation node) { |
| 15440 Annotation copy = new Annotation(_mapToken(node.atSign), _cloneNode(node.nam
e), _mapToken(node.period), _cloneNode(node.constructorName), _cloneNode(node.ar
guments)); | 16693 Annotation copy = new Annotation(_mapToken(node.atSign), _cloneNode(node.nam
e), _mapToken(node.period), _cloneNode(node.constructorName), _cloneNode(node.ar
guments)); |
| 15441 copy.element = node.element; | 16694 copy.element = node.element; |
| 15442 return copy; | 16695 return copy; |
| 15443 } | 16696 } |
| 15444 | 16697 |
| 16698 @override |
| 15445 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node
) { | 16699 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node
) { |
| 15446 ArgumentDefinitionTest copy = new ArgumentDefinitionTest(_mapToken(node.ques
tion), _cloneNode(node.identifier)); | 16700 ArgumentDefinitionTest copy = new ArgumentDefinitionTest(_mapToken(node.ques
tion), _cloneNode(node.identifier)); |
| 15447 copy.propagatedType = node.propagatedType; | 16701 copy.propagatedType = node.propagatedType; |
| 15448 copy.staticType = node.staticType; | 16702 copy.staticType = node.staticType; |
| 15449 return copy; | 16703 return copy; |
| 15450 } | 16704 } |
| 15451 | 16705 |
| 16706 @override |
| 15452 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(_mapToke
n(node.leftParenthesis), _cloneNodeList(node.arguments), _mapToken(node.rightPar
enthesis)); | 16707 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList(_mapToke
n(node.leftParenthesis), _cloneNodeList(node.arguments), _mapToken(node.rightPar
enthesis)); |
| 15453 | 16708 |
| 16709 @override |
| 15454 AsExpression visitAsExpression(AsExpression node) { | 16710 AsExpression visitAsExpression(AsExpression node) { |
| 15455 AsExpression copy = new AsExpression(_cloneNode(node.expression), _mapToken(
node.asOperator), _cloneNode(node.type)); | 16711 AsExpression copy = new AsExpression(_cloneNode(node.expression), _mapToken(
node.asOperator), _cloneNode(node.type)); |
| 15456 copy.propagatedType = node.propagatedType; | 16712 copy.propagatedType = node.propagatedType; |
| 15457 copy.staticType = node.staticType; | 16713 copy.staticType = node.staticType; |
| 15458 return copy; | 16714 return copy; |
| 15459 } | 16715 } |
| 15460 | 16716 |
| 16717 @override |
| 15461 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(_map
Token(node.keyword), _mapToken(node.leftParenthesis), _cloneNode(node.condition)
, _mapToken(node.rightParenthesis), _mapToken(node.semicolon)); | 16718 AstNode visitAssertStatement(AssertStatement node) => new AssertStatement(_map
Token(node.keyword), _mapToken(node.leftParenthesis), _cloneNode(node.condition)
, _mapToken(node.rightParenthesis), _mapToken(node.semicolon)); |
| 15462 | 16719 |
| 16720 @override |
| 15463 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) { | 16721 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) { |
| 15464 AssignmentExpression copy = new AssignmentExpression(_cloneNode(node.leftHan
dSide), _mapToken(node.operator), _cloneNode(node.rightHandSide)); | 16722 AssignmentExpression copy = new AssignmentExpression(_cloneNode(node.leftHan
dSide), _mapToken(node.operator), _cloneNode(node.rightHandSide)); |
| 15465 copy.propagatedElement = node.propagatedElement; | 16723 copy.propagatedElement = node.propagatedElement; |
| 15466 copy.propagatedType = node.propagatedType; | 16724 copy.propagatedType = node.propagatedType; |
| 15467 copy.staticElement = node.staticElement; | 16725 copy.staticElement = node.staticElement; |
| 15468 copy.staticType = node.staticType; | 16726 copy.staticType = node.staticType; |
| 15469 return copy; | 16727 return copy; |
| 15470 } | 16728 } |
| 15471 | 16729 |
| 16730 @override |
| 15472 BinaryExpression visitBinaryExpression(BinaryExpression node) { | 16731 BinaryExpression visitBinaryExpression(BinaryExpression node) { |
| 15473 BinaryExpression copy = new BinaryExpression(_cloneNode(node.leftOperand), _
mapToken(node.operator), _cloneNode(node.rightOperand)); | 16732 BinaryExpression copy = new BinaryExpression(_cloneNode(node.leftOperand), _
mapToken(node.operator), _cloneNode(node.rightOperand)); |
| 15474 copy.propagatedElement = node.propagatedElement; | 16733 copy.propagatedElement = node.propagatedElement; |
| 15475 copy.propagatedType = node.propagatedType; | 16734 copy.propagatedType = node.propagatedType; |
| 15476 copy.staticElement = node.staticElement; | 16735 copy.staticElement = node.staticElement; |
| 15477 copy.staticType = node.staticType; | 16736 copy.staticType = node.staticType; |
| 15478 return copy; | 16737 return copy; |
| 15479 } | 16738 } |
| 15480 | 16739 |
| 16740 @override |
| 15481 Block visitBlock(Block node) => new Block(_mapToken(node.leftBracket), _cloneN
odeList(node.statements), _mapToken(node.rightBracket)); | 16741 Block visitBlock(Block node) => new Block(_mapToken(node.leftBracket), _cloneN
odeList(node.statements), _mapToken(node.rightBracket)); |
| 15482 | 16742 |
| 16743 @override |
| 15483 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockF
unctionBody(_cloneNode(node.block)); | 16744 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockF
unctionBody(_cloneNode(node.block)); |
| 15484 | 16745 |
| 16746 @override |
| 15485 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) { | 16747 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) { |
| 15486 BooleanLiteral copy = new BooleanLiteral(_mapToken(node.literal), node.value
); | 16748 BooleanLiteral copy = new BooleanLiteral(_mapToken(node.literal), node.value
); |
| 15487 copy.propagatedType = node.propagatedType; | 16749 copy.propagatedType = node.propagatedType; |
| 15488 copy.staticType = node.staticType; | 16750 copy.staticType = node.staticType; |
| 15489 return copy; | 16751 return copy; |
| 15490 } | 16752 } |
| 15491 | 16753 |
| 16754 @override |
| 15492 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
_mapToken(node.keyword), _cloneNode(node.label), _mapToken(node.semicolon)); | 16755 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement(
_mapToken(node.keyword), _cloneNode(node.label), _mapToken(node.semicolon)); |
| 15493 | 16756 |
| 16757 @override |
| 15494 CascadeExpression visitCascadeExpression(CascadeExpression node) { | 16758 CascadeExpression visitCascadeExpression(CascadeExpression node) { |
| 15495 CascadeExpression copy = new CascadeExpression(_cloneNode(node.target), _clo
neNodeList(node.cascadeSections)); | 16759 CascadeExpression copy = new CascadeExpression(_cloneNode(node.target), _clo
neNodeList(node.cascadeSections)); |
| 15496 copy.propagatedType = node.propagatedType; | 16760 copy.propagatedType = node.propagatedType; |
| 15497 copy.staticType = node.staticType; | 16761 copy.staticType = node.staticType; |
| 15498 return copy; | 16762 return copy; |
| 15499 } | 16763 } |
| 15500 | 16764 |
| 16765 @override |
| 15501 CatchClause visitCatchClause(CatchClause node) => new CatchClause(_mapToken(no
de.onKeyword), _cloneNode(node.exceptionType), _mapToken(node.catchKeyword), _ma
pToken(node.leftParenthesis), _cloneNode(node.exceptionParameter), _mapToken(nod
e.comma), _cloneNode(node.stackTraceParameter), _mapToken(node.rightParenthesis)
, _cloneNode(node.body)); | 16766 CatchClause visitCatchClause(CatchClause node) => new CatchClause(_mapToken(no
de.onKeyword), _cloneNode(node.exceptionType), _mapToken(node.catchKeyword), _ma
pToken(node.leftParenthesis), _cloneNode(node.exceptionParameter), _mapToken(nod
e.comma), _cloneNode(node.stackTraceParameter), _mapToken(node.rightParenthesis)
, _cloneNode(node.body)); |
| 15502 | 16767 |
| 16768 @override |
| 15503 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { | 16769 ClassDeclaration visitClassDeclaration(ClassDeclaration node) { |
| 15504 ClassDeclaration copy = new ClassDeclaration(_cloneNode(node.documentationCo
mment), _cloneNodeList(node.metadata), _mapToken(node.abstractKeyword), _mapToke
n(node.classKeyword), _cloneNode(node.name), _cloneNode(node.typeParameters), _c
loneNode(node.extendsClause), _cloneNode(node.withClause), _cloneNode(node.imple
mentsClause), _mapToken(node.leftBracket), _cloneNodeList(node.members), _mapTok
en(node.rightBracket)); | 16770 ClassDeclaration copy = new ClassDeclaration(_cloneNode(node.documentationCo
mment), _cloneNodeList(node.metadata), _mapToken(node.abstractKeyword), _mapToke
n(node.classKeyword), _cloneNode(node.name), _cloneNode(node.typeParameters), _c
loneNode(node.extendsClause), _cloneNode(node.withClause), _cloneNode(node.imple
mentsClause), _mapToken(node.leftBracket), _cloneNodeList(node.members), _mapTok
en(node.rightBracket)); |
| 15505 copy.nativeClause = _cloneNode(node.nativeClause); | 16771 copy.nativeClause = _cloneNode(node.nativeClause); |
| 15506 return copy; | 16772 return copy; |
| 15507 } | 16773 } |
| 15508 | 16774 |
| 16775 @override |
| 15509 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _mapToken(
node.keyword), _cloneNode(node.name), _cloneNode(node.typeParameters), _mapToken
(node.equals), _mapToken(node.abstractKeyword), _cloneNode(node.superclass), _cl
oneNode(node.withClause), _cloneNode(node.implementsClause), _mapToken(node.semi
colon)); | 16776 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias(
_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _mapToken(
node.keyword), _cloneNode(node.name), _cloneNode(node.typeParameters), _mapToken
(node.equals), _mapToken(node.abstractKeyword), _cloneNode(node.superclass), _cl
oneNode(node.withClause), _cloneNode(node.implementsClause), _mapToken(node.semi
colon)); |
| 15510 | 16777 |
| 16778 @override |
| 15511 Comment visitComment(Comment node) { | 16779 Comment visitComment(Comment node) { |
| 15512 if (node.isDocumentation) { | 16780 if (node.isDocumentation) { |
| 15513 return Comment.createDocumentationCommentWithReferences(_mapTokens(node.to
kens), _cloneNodeList(node.references)); | 16781 return Comment.createDocumentationCommentWithReferences(_mapTokens(node.to
kens), _cloneNodeList(node.references)); |
| 15514 } else if (node.isBlock) { | 16782 } else if (node.isBlock) { |
| 15515 return Comment.createBlockComment(_mapTokens(node.tokens)); | 16783 return Comment.createBlockComment(_mapTokens(node.tokens)); |
| 15516 } | 16784 } |
| 15517 return Comment.createEndOfLineComment(_mapTokens(node.tokens)); | 16785 return Comment.createEndOfLineComment(_mapTokens(node.tokens)); |
| 15518 } | 16786 } |
| 15519 | 16787 |
| 16788 @override |
| 15520 CommentReference visitCommentReference(CommentReference node) => new CommentRe
ference(_mapToken(node.newKeyword), _cloneNode(node.identifier)); | 16789 CommentReference visitCommentReference(CommentReference node) => new CommentRe
ference(_mapToken(node.newKeyword), _cloneNode(node.identifier)); |
| 15521 | 16790 |
| 16791 @override |
| 15522 CompilationUnit visitCompilationUnit(CompilationUnit node) { | 16792 CompilationUnit visitCompilationUnit(CompilationUnit node) { |
| 15523 CompilationUnit copy = new CompilationUnit(_mapToken(node.beginToken), _clon
eNode(node.scriptTag), _cloneNodeList(node.directives), _cloneNodeList(node.decl
arations), _mapToken(node.endToken)); | 16793 CompilationUnit copy = new CompilationUnit(_mapToken(node.beginToken), _clon
eNode(node.scriptTag), _cloneNodeList(node.directives), _cloneNodeList(node.decl
arations), _mapToken(node.endToken)); |
| 15524 copy.lineInfo = node.lineInfo; | 16794 copy.lineInfo = node.lineInfo; |
| 15525 copy.element = node.element; | 16795 copy.element = node.element; |
| 15526 return copy; | 16796 return copy; |
| 15527 } | 16797 } |
| 15528 | 16798 |
| 16799 @override |
| 15529 ConditionalExpression visitConditionalExpression(ConditionalExpression node) { | 16800 ConditionalExpression visitConditionalExpression(ConditionalExpression node) { |
| 15530 ConditionalExpression copy = new ConditionalExpression(_cloneNode(node.condi
tion), _mapToken(node.question), _cloneNode(node.thenExpression), _mapToken(node
.colon), _cloneNode(node.elseExpression)); | 16801 ConditionalExpression copy = new ConditionalExpression(_cloneNode(node.condi
tion), _mapToken(node.question), _cloneNode(node.thenExpression), _mapToken(node
.colon), _cloneNode(node.elseExpression)); |
| 15531 copy.propagatedType = node.propagatedType; | 16802 copy.propagatedType = node.propagatedType; |
| 15532 copy.staticType = node.staticType; | 16803 copy.staticType = node.staticType; |
| 15533 return copy; | 16804 return copy; |
| 15534 } | 16805 } |
| 15535 | 16806 |
| 16807 @override |
| 15536 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node
) { | 16808 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node
) { |
| 15537 ConstructorDeclaration copy = new ConstructorDeclaration(_cloneNode(node.doc
umentationComment), _cloneNodeList(node.metadata), _mapToken(node.externalKeywor
d), _mapToken(node.constKeyword), _mapToken(node.factoryKeyword), _cloneNode(nod
e.returnType), _mapToken(node.period), _cloneNode(node.name), _cloneNode(node.pa
rameters), _mapToken(node.separator), _cloneNodeList(node.initializers), _cloneN
ode(node.redirectedConstructor), _cloneNode(node.body)); | 16809 ConstructorDeclaration copy = new ConstructorDeclaration(_cloneNode(node.doc
umentationComment), _cloneNodeList(node.metadata), _mapToken(node.externalKeywor
d), _mapToken(node.constKeyword), _mapToken(node.factoryKeyword), _cloneNode(nod
e.returnType), _mapToken(node.period), _cloneNode(node.name), _cloneNode(node.pa
rameters), _mapToken(node.separator), _cloneNodeList(node.initializers), _cloneN
ode(node.redirectedConstructor), _cloneNode(node.body)); |
| 15538 copy.element = node.element; | 16810 copy.element = node.element; |
| 15539 return copy; | 16811 return copy; |
| 15540 } | 16812 } |
| 15541 | 16813 |
| 16814 @override |
| 15542 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI
nitializer node) => new ConstructorFieldInitializer(_mapToken(node.keyword), _ma
pToken(node.period), _cloneNode(node.fieldName), _mapToken(node.equals), _cloneN
ode(node.expression)); | 16815 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI
nitializer node) => new ConstructorFieldInitializer(_mapToken(node.keyword), _ma
pToken(node.period), _cloneNode(node.fieldName), _mapToken(node.equals), _cloneN
ode(node.expression)); |
| 15543 | 16816 |
| 16817 @override |
| 15544 ConstructorName visitConstructorName(ConstructorName node) { | 16818 ConstructorName visitConstructorName(ConstructorName node) { |
| 15545 ConstructorName copy = new ConstructorName(_cloneNode(node.type), _mapToken(
node.period), _cloneNode(node.name)); | 16819 ConstructorName copy = new ConstructorName(_cloneNode(node.type), _mapToken(
node.period), _cloneNode(node.name)); |
| 15546 copy.staticElement = node.staticElement; | 16820 copy.staticElement = node.staticElement; |
| 15547 return copy; | 16821 return copy; |
| 15548 } | 16822 } |
| 15549 | 16823 |
| 16824 @override |
| 15550 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin
ueStatement(_mapToken(node.keyword), _cloneNode(node.label), _mapToken(node.semi
colon)); | 16825 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin
ueStatement(_mapToken(node.keyword), _cloneNode(node.label), _mapToken(node.semi
colon)); |
| 15551 | 16826 |
| 16827 @override |
| 15552 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec
laredIdentifier(_cloneNode(node.documentationComment), _cloneNodeList(node.metad
ata), _mapToken(node.keyword), _cloneNode(node.type), _cloneNode(node.identifier
)); | 16828 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec
laredIdentifier(_cloneNode(node.documentationComment), _cloneNodeList(node.metad
ata), _mapToken(node.keyword), _cloneNode(node.type), _cloneNode(node.identifier
)); |
| 15553 | 16829 |
| 16830 @override |
| 15554 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node
) => new DefaultFormalParameter(_cloneNode(node.parameter), node.kind, _mapToken
(node.separator), _cloneNode(node.defaultValue)); | 16831 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node
) => new DefaultFormalParameter(_cloneNode(node.parameter), node.kind, _mapToken
(node.separator), _cloneNode(node.defaultValue)); |
| 15555 | 16832 |
| 16833 @override |
| 15556 DoStatement visitDoStatement(DoStatement node) => new DoStatement(_mapToken(no
de.doKeyword), _cloneNode(node.body), _mapToken(node.whileKeyword), _mapToken(no
de.leftParenthesis), _cloneNode(node.condition), _mapToken(node.rightParenthesis
), _mapToken(node.semicolon)); | 16834 DoStatement visitDoStatement(DoStatement node) => new DoStatement(_mapToken(no
de.doKeyword), _cloneNode(node.body), _mapToken(node.whileKeyword), _mapToken(no
de.leftParenthesis), _cloneNode(node.condition), _mapToken(node.rightParenthesis
), _mapToken(node.semicolon)); |
| 15557 | 16835 |
| 16836 @override |
| 15558 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) { | 16837 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) { |
| 15559 DoubleLiteral copy = new DoubleLiteral(_mapToken(node.literal), node.value); | 16838 DoubleLiteral copy = new DoubleLiteral(_mapToken(node.literal), node.value); |
| 15560 copy.propagatedType = node.propagatedType; | 16839 copy.propagatedType = node.propagatedType; |
| 15561 copy.staticType = node.staticType; | 16840 copy.staticType = node.staticType; |
| 15562 return copy; | 16841 return copy; |
| 15563 } | 16842 } |
| 15564 | 16843 |
| 16844 @override |
| 15565 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyF
unctionBody(_mapToken(node.semicolon)); | 16845 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyF
unctionBody(_mapToken(node.semicolon)); |
| 15566 | 16846 |
| 16847 @override |
| 15567 EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement(
_mapToken(node.semicolon)); | 16848 EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement(
_mapToken(node.semicolon)); |
| 15568 | 16849 |
| 16850 @override |
| 15569 ExportDirective visitExportDirective(ExportDirective node) { | 16851 ExportDirective visitExportDirective(ExportDirective node) { |
| 15570 ExportDirective copy = new ExportDirective(_cloneNode(node.documentationComm
ent), _cloneNodeList(node.metadata), _mapToken(node.keyword), _cloneNode(node.ur
i), _cloneNodeList(node.combinators), _mapToken(node.semicolon)); | 16852 ExportDirective copy = new ExportDirective(_cloneNode(node.documentationComm
ent), _cloneNodeList(node.metadata), _mapToken(node.keyword), _cloneNode(node.ur
i), _cloneNodeList(node.combinators), _mapToken(node.semicolon)); |
| 15571 copy.element = node.element; | 16853 copy.element = node.element; |
| 15572 return copy; | 16854 return copy; |
| 15573 } | 16855 } |
| 15574 | 16856 |
| 16857 @override |
| 15575 ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node
) => new ExpressionFunctionBody(_mapToken(node.functionDefinition), _cloneNode(n
ode.expression), _mapToken(node.semicolon)); | 16858 ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node
) => new ExpressionFunctionBody(_mapToken(node.functionDefinition), _cloneNode(n
ode.expression), _mapToken(node.semicolon)); |
| 15576 | 16859 |
| 16860 @override |
| 15577 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new
ExpressionStatement(_cloneNode(node.expression), _mapToken(node.semicolon)); | 16861 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new
ExpressionStatement(_cloneNode(node.expression), _mapToken(node.semicolon)); |
| 15578 | 16862 |
| 16863 @override |
| 15579 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(_map
Token(node.keyword), _cloneNode(node.superclass)); | 16864 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause(_map
Token(node.keyword), _cloneNode(node.superclass)); |
| 15580 | 16865 |
| 16866 @override |
| 15581 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDecl
aration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _m
apToken(node.staticKeyword), _cloneNode(node.fields), _mapToken(node.semicolon))
; | 16867 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDecl
aration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _m
apToken(node.staticKeyword), _cloneNode(node.fields), _mapToken(node.semicolon))
; |
| 15582 | 16868 |
| 16869 @override |
| 15583 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => n
ew FieldFormalParameter(_cloneNode(node.documentationComment), _cloneNodeList(no
de.metadata), _mapToken(node.keyword), _cloneNode(node.type), _mapToken(node.thi
sToken), _mapToken(node.period), _cloneNode(node.identifier), _cloneNode(node.pa
rameters)); | 16870 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => n
ew FieldFormalParameter(_cloneNode(node.documentationComment), _cloneNodeList(no
de.metadata), _mapToken(node.keyword), _cloneNode(node.type), _mapToken(node.thi
sToken), _mapToken(node.period), _cloneNode(node.identifier), _cloneNode(node.pa
rameters)); |
| 15584 | 16871 |
| 16872 @override |
| 15585 ForEachStatement visitForEachStatement(ForEachStatement node) { | 16873 ForEachStatement visitForEachStatement(ForEachStatement node) { |
| 15586 DeclaredIdentifier loopVariable = node.loopVariable; | 16874 DeclaredIdentifier loopVariable = node.loopVariable; |
| 15587 if (loopVariable == null) { | 16875 if (loopVariable == null) { |
| 15588 return new ForEachStatement.con2(_mapToken(node.forKeyword), _mapToken(nod
e.leftParenthesis), _cloneNode(node.identifier), _mapToken(node.inKeyword), _clo
neNode(node.iterator), _mapToken(node.rightParenthesis), _cloneNode(node.body)); | 16876 return new ForEachStatement.con2(_mapToken(node.forKeyword), _mapToken(nod
e.leftParenthesis), _cloneNode(node.identifier), _mapToken(node.inKeyword), _clo
neNode(node.iterator), _mapToken(node.rightParenthesis), _cloneNode(node.body)); |
| 15589 } | 16877 } |
| 15590 return new ForEachStatement.con1(_mapToken(node.forKeyword), _mapToken(node.
leftParenthesis), _cloneNode(loopVariable), _mapToken(node.inKeyword), _cloneNod
e(node.iterator), _mapToken(node.rightParenthesis), _cloneNode(node.body)); | 16878 return new ForEachStatement.con1(_mapToken(node.forKeyword), _mapToken(node.
leftParenthesis), _cloneNode(loopVariable), _mapToken(node.inKeyword), _cloneNod
e(node.iterator), _mapToken(node.rightParenthesis), _cloneNode(node.body)); |
| 15591 } | 16879 } |
| 15592 | 16880 |
| 16881 @override |
| 15593 FormalParameterList visitFormalParameterList(FormalParameterList node) => new
FormalParameterList(_mapToken(node.leftParenthesis), _cloneNodeList(node.paramet
ers), _mapToken(node.leftDelimiter), _mapToken(node.rightDelimiter), _mapToken(n
ode.rightParenthesis)); | 16882 FormalParameterList visitFormalParameterList(FormalParameterList node) => new
FormalParameterList(_mapToken(node.leftParenthesis), _cloneNodeList(node.paramet
ers), _mapToken(node.leftDelimiter), _mapToken(node.rightDelimiter), _mapToken(n
ode.rightParenthesis)); |
| 15594 | 16883 |
| 16884 @override |
| 15595 ForStatement visitForStatement(ForStatement node) => new ForStatement(_mapToke
n(node.forKeyword), _mapToken(node.leftParenthesis), _cloneNode(node.variables),
_cloneNode(node.initialization), _mapToken(node.leftSeparator), _cloneNode(node
.condition), _mapToken(node.rightSeparator), _cloneNodeList(node.updaters), _map
Token(node.rightParenthesis), _cloneNode(node.body)); | 16885 ForStatement visitForStatement(ForStatement node) => new ForStatement(_mapToke
n(node.forKeyword), _mapToken(node.leftParenthesis), _cloneNode(node.variables),
_cloneNode(node.initialization), _mapToken(node.leftSeparator), _cloneNode(node
.condition), _mapToken(node.rightSeparator), _cloneNodeList(node.updaters), _map
Token(node.rightParenthesis), _cloneNode(node.body)); |
| 15596 | 16886 |
| 16887 @override |
| 15597 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new
FunctionDeclaration(_cloneNode(node.documentationComment), _cloneNodeList(node.m
etadata), _mapToken(node.externalKeyword), _cloneNode(node.returnType), _mapToke
n(node.propertyKeyword), _cloneNode(node.name), _cloneNode(node.functionExpressi
on)); | 16888 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new
FunctionDeclaration(_cloneNode(node.documentationComment), _cloneNodeList(node.m
etadata), _mapToken(node.externalKeyword), _cloneNode(node.returnType), _mapToke
n(node.propertyKeyword), _cloneNode(node.name), _cloneNode(node.functionExpressi
on)); |
| 15598 | 16889 |
| 16890 @override |
| 15599 FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclara
tionStatement node) => new FunctionDeclarationStatement(_cloneNode(node.function
Declaration)); | 16891 FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclara
tionStatement node) => new FunctionDeclarationStatement(_cloneNode(node.function
Declaration)); |
| 15600 | 16892 |
| 16893 @override |
| 15601 FunctionExpression visitFunctionExpression(FunctionExpression node) { | 16894 FunctionExpression visitFunctionExpression(FunctionExpression node) { |
| 15602 FunctionExpression copy = new FunctionExpression(_cloneNode(node.parameters)
, _cloneNode(node.body)); | 16895 FunctionExpression copy = new FunctionExpression(_cloneNode(node.parameters)
, _cloneNode(node.body)); |
| 15603 copy.element = node.element; | 16896 copy.element = node.element; |
| 15604 copy.propagatedType = node.propagatedType; | 16897 copy.propagatedType = node.propagatedType; |
| 15605 copy.staticType = node.staticType; | 16898 copy.staticType = node.staticType; |
| 15606 return copy; | 16899 return copy; |
| 15607 } | 16900 } |
| 15608 | 16901 |
| 16902 @override |
| 15609 FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpress
ionInvocation node) { | 16903 FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpress
ionInvocation node) { |
| 15610 FunctionExpressionInvocation copy = new FunctionExpressionInvocation(_cloneN
ode(node.function), _cloneNode(node.argumentList)); | 16904 FunctionExpressionInvocation copy = new FunctionExpressionInvocation(_cloneN
ode(node.function), _cloneNode(node.argumentList)); |
| 15611 copy.propagatedElement = node.propagatedElement; | 16905 copy.propagatedElement = node.propagatedElement; |
| 15612 copy.propagatedType = node.propagatedType; | 16906 copy.propagatedType = node.propagatedType; |
| 15613 copy.staticElement = node.staticElement; | 16907 copy.staticElement = node.staticElement; |
| 15614 copy.staticType = node.staticType; | 16908 copy.staticType = node.staticType; |
| 15615 return copy; | 16909 return copy; |
| 15616 } | 16910 } |
| 15617 | 16911 |
| 16912 @override |
| 15618 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new Functi
onTypeAlias(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, _mapToken(node.keyword), _cloneNode(node.returnType), _cloneNode(node.name), _
cloneNode(node.typeParameters), _cloneNode(node.parameters), _mapToken(node.semi
colon)); | 16913 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new Functi
onTypeAlias(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, _mapToken(node.keyword), _cloneNode(node.returnType), _cloneNode(node.name), _
cloneNode(node.typeParameters), _cloneNode(node.parameters), _mapToken(node.semi
colon)); |
| 15619 | 16914 |
| 16915 @override |
| 15620 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFo
rmalParameter node) => new FunctionTypedFormalParameter(_cloneNode(node.document
ationComment), _cloneNodeList(node.metadata), _cloneNode(node.returnType), _clon
eNode(node.identifier), _cloneNode(node.parameters)); | 16916 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFo
rmalParameter node) => new FunctionTypedFormalParameter(_cloneNode(node.document
ationComment), _cloneNodeList(node.metadata), _cloneNode(node.returnType), _clon
eNode(node.identifier), _cloneNode(node.parameters)); |
| 15621 | 16917 |
| 16918 @override |
| 15622 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
_mapToken(node.keyword), _cloneNodeList(node.hiddenNames)); | 16919 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator(
_mapToken(node.keyword), _cloneNodeList(node.hiddenNames)); |
| 15623 | 16920 |
| 16921 @override |
| 15624 IfStatement visitIfStatement(IfStatement node) => new IfStatement(_mapToken(no
de.ifKeyword), _mapToken(node.leftParenthesis), _cloneNode(node.condition), _map
Token(node.rightParenthesis), _cloneNode(node.thenStatement), _mapToken(node.els
eKeyword), _cloneNode(node.elseStatement)); | 16922 IfStatement visitIfStatement(IfStatement node) => new IfStatement(_mapToken(no
de.ifKeyword), _mapToken(node.leftParenthesis), _cloneNode(node.condition), _map
Token(node.rightParenthesis), _cloneNode(node.thenStatement), _mapToken(node.els
eKeyword), _cloneNode(node.elseStatement)); |
| 15625 | 16923 |
| 16924 @override |
| 15626 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(_mapToken(node.keyword), _cloneNodeList(node.interfaces)); | 16925 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement
sClause(_mapToken(node.keyword), _cloneNodeList(node.interfaces)); |
| 15627 | 16926 |
| 16927 @override |
| 15628 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _mapTo
ken(node.keyword), _cloneNode(node.uri), _mapToken(node.asToken), _cloneNode(nod
e.prefix), _cloneNodeList(node.combinators), _mapToken(node.semicolon)); | 16928 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect
ive(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _mapTo
ken(node.keyword), _cloneNode(node.uri), _mapToken(node.asToken), _cloneNode(nod
e.prefix), _cloneNodeList(node.combinators), _mapToken(node.semicolon)); |
| 15629 | 16929 |
| 16930 @override |
| 15630 IndexExpression visitIndexExpression(IndexExpression node) { | 16931 IndexExpression visitIndexExpression(IndexExpression node) { |
| 15631 Token period = _mapToken(node.period); | 16932 Token period = _mapToken(node.period); |
| 15632 IndexExpression copy; | 16933 IndexExpression copy; |
| 15633 if (period == null) { | 16934 if (period == null) { |
| 15634 copy = new IndexExpression.forTarget(_cloneNode(node.target), _mapToken(no
de.leftBracket), _cloneNode(node.index), _mapToken(node.rightBracket)); | 16935 copy = new IndexExpression.forTarget(_cloneNode(node.target), _mapToken(no
de.leftBracket), _cloneNode(node.index), _mapToken(node.rightBracket)); |
| 15635 } else { | 16936 } else { |
| 15636 copy = new IndexExpression.forCascade(period, _mapToken(node.leftBracket),
_cloneNode(node.index), _mapToken(node.rightBracket)); | 16937 copy = new IndexExpression.forCascade(period, _mapToken(node.leftBracket),
_cloneNode(node.index), _mapToken(node.rightBracket)); |
| 15637 } | 16938 } |
| 15638 copy.auxiliaryElements = node.auxiliaryElements; | 16939 copy.auxiliaryElements = node.auxiliaryElements; |
| 15639 copy.propagatedElement = node.propagatedElement; | 16940 copy.propagatedElement = node.propagatedElement; |
| 15640 copy.propagatedType = node.propagatedType; | 16941 copy.propagatedType = node.propagatedType; |
| 15641 copy.staticElement = node.staticElement; | 16942 copy.staticElement = node.staticElement; |
| 15642 copy.staticType = node.staticType; | 16943 copy.staticType = node.staticType; |
| 15643 return copy; | 16944 return copy; |
| 15644 } | 16945 } |
| 15645 | 16946 |
| 16947 @override |
| 15646 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp
ression node) { | 16948 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp
ression node) { |
| 15647 InstanceCreationExpression copy = new InstanceCreationExpression(_mapToken(n
ode.keyword), _cloneNode(node.constructorName), _cloneNode(node.argumentList)); | 16949 InstanceCreationExpression copy = new InstanceCreationExpression(_mapToken(n
ode.keyword), _cloneNode(node.constructorName), _cloneNode(node.argumentList)); |
| 15648 copy.propagatedType = node.propagatedType; | 16950 copy.propagatedType = node.propagatedType; |
| 15649 copy.staticElement = node.staticElement; | 16951 copy.staticElement = node.staticElement; |
| 15650 copy.staticType = node.staticType; | 16952 copy.staticType = node.staticType; |
| 15651 return copy; | 16953 return copy; |
| 15652 } | 16954 } |
| 15653 | 16955 |
| 16956 @override |
| 15654 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) { | 16957 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) { |
| 15655 IntegerLiteral copy = new IntegerLiteral(_mapToken(node.literal), node.value
); | 16958 IntegerLiteral copy = new IntegerLiteral(_mapToken(node.literal), node.value
); |
| 15656 copy.propagatedType = node.propagatedType; | 16959 copy.propagatedType = node.propagatedType; |
| 15657 copy.staticType = node.staticType; | 16960 copy.staticType = node.staticType; |
| 15658 return copy; | 16961 return copy; |
| 15659 } | 16962 } |
| 15660 | 16963 |
| 16964 @override |
| 15661 InterpolationExpression visitInterpolationExpression(InterpolationExpression n
ode) => new InterpolationExpression(_mapToken(node.leftBracket), _cloneNode(node
.expression), _mapToken(node.rightBracket)); | 16965 InterpolationExpression visitInterpolationExpression(InterpolationExpression n
ode) => new InterpolationExpression(_mapToken(node.leftBracket), _cloneNode(node
.expression), _mapToken(node.rightBracket)); |
| 15662 | 16966 |
| 16967 @override |
| 15663 InterpolationString visitInterpolationString(InterpolationString node) => new
InterpolationString(_mapToken(node.contents), node.value); | 16968 InterpolationString visitInterpolationString(InterpolationString node) => new
InterpolationString(_mapToken(node.contents), node.value); |
| 15664 | 16969 |
| 16970 @override |
| 15665 IsExpression visitIsExpression(IsExpression node) { | 16971 IsExpression visitIsExpression(IsExpression node) { |
| 15666 IsExpression copy = new IsExpression(_cloneNode(node.expression), _mapToken(
node.isOperator), _mapToken(node.notOperator), _cloneNode(node.type)); | 16972 IsExpression copy = new IsExpression(_cloneNode(node.expression), _mapToken(
node.isOperator), _mapToken(node.notOperator), _cloneNode(node.type)); |
| 15667 copy.propagatedType = node.propagatedType; | 16973 copy.propagatedType = node.propagatedType; |
| 15668 copy.staticType = node.staticType; | 16974 copy.staticType = node.staticType; |
| 15669 return copy; | 16975 return copy; |
| 15670 } | 16976 } |
| 15671 | 16977 |
| 16978 @override |
| 15672 Label visitLabel(Label node) => new Label(_cloneNode(node.label), _mapToken(no
de.colon)); | 16979 Label visitLabel(Label node) => new Label(_cloneNode(node.label), _mapToken(no
de.colon)); |
| 15673 | 16980 |
| 16981 @override |
| 15674 LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledSt
atement(_cloneNodeList(node.labels), _cloneNode(node.statement)); | 16982 LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledSt
atement(_cloneNodeList(node.labels), _cloneNode(node.statement)); |
| 15675 | 16983 |
| 16984 @override |
| 15676 LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDi
rective(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _m
apToken(node.libraryToken), _cloneNode(node.name), _mapToken(node.semicolon)); | 16985 LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDi
rective(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata), _m
apToken(node.libraryToken), _cloneNode(node.name), _mapToken(node.semicolon)); |
| 15677 | 16986 |
| 16987 @override |
| 15678 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) { | 16988 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) { |
| 15679 LibraryIdentifier copy = new LibraryIdentifier(_cloneNodeList(node.component
s)); | 16989 LibraryIdentifier copy = new LibraryIdentifier(_cloneNodeList(node.component
s)); |
| 15680 copy.propagatedType = node.propagatedType; | 16990 copy.propagatedType = node.propagatedType; |
| 15681 copy.staticType = node.staticType; | 16991 copy.staticType = node.staticType; |
| 15682 return copy; | 16992 return copy; |
| 15683 } | 16993 } |
| 15684 | 16994 |
| 16995 @override |
| 15685 ListLiteral visitListLiteral(ListLiteral node) { | 16996 ListLiteral visitListLiteral(ListLiteral node) { |
| 15686 ListLiteral copy = new ListLiteral(_mapToken(node.constKeyword), _cloneNode(
node.typeArguments), _mapToken(node.leftBracket), _cloneNodeList(node.elements),
_mapToken(node.rightBracket)); | 16997 ListLiteral copy = new ListLiteral(_mapToken(node.constKeyword), _cloneNode(
node.typeArguments), _mapToken(node.leftBracket), _cloneNodeList(node.elements),
_mapToken(node.rightBracket)); |
| 15687 copy.propagatedType = node.propagatedType; | 16998 copy.propagatedType = node.propagatedType; |
| 15688 copy.staticType = node.staticType; | 16999 copy.staticType = node.staticType; |
| 15689 return copy; | 17000 return copy; |
| 15690 } | 17001 } |
| 15691 | 17002 |
| 17003 @override |
| 15692 MapLiteral visitMapLiteral(MapLiteral node) { | 17004 MapLiteral visitMapLiteral(MapLiteral node) { |
| 15693 MapLiteral copy = new MapLiteral(_mapToken(node.constKeyword), _cloneNode(no
de.typeArguments), _mapToken(node.leftBracket), _cloneNodeList(node.entries), _m
apToken(node.rightBracket)); | 17005 MapLiteral copy = new MapLiteral(_mapToken(node.constKeyword), _cloneNode(no
de.typeArguments), _mapToken(node.leftBracket), _cloneNodeList(node.entries), _m
apToken(node.rightBracket)); |
| 15694 copy.propagatedType = node.propagatedType; | 17006 copy.propagatedType = node.propagatedType; |
| 15695 copy.staticType = node.staticType; | 17007 copy.staticType = node.staticType; |
| 15696 return copy; | 17008 return copy; |
| 15697 } | 17009 } |
| 15698 | 17010 |
| 17011 @override |
| 15699 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEn
try(_cloneNode(node.key), _mapToken(node.separator), _cloneNode(node.value)); | 17012 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEn
try(_cloneNode(node.key), _mapToken(node.separator), _cloneNode(node.value)); |
| 15700 | 17013 |
| 17014 @override |
| 15701 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new Method
Declaration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, _mapToken(node.externalKeyword), _mapToken(node.modifierKeyword), _cloneNode(n
ode.returnType), _mapToken(node.propertyKeyword), _mapToken(node.operatorKeyword
), _cloneNode(node.name), _cloneNode(node.parameters), _cloneNode(node.body)); | 17015 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new Method
Declaration(_cloneNode(node.documentationComment), _cloneNodeList(node.metadata)
, _mapToken(node.externalKeyword), _mapToken(node.modifierKeyword), _cloneNode(n
ode.returnType), _mapToken(node.propertyKeyword), _mapToken(node.operatorKeyword
), _cloneNode(node.name), _cloneNode(node.parameters), _cloneNode(node.body)); |
| 15702 | 17016 |
| 17017 @override |
| 15703 MethodInvocation visitMethodInvocation(MethodInvocation node) { | 17018 MethodInvocation visitMethodInvocation(MethodInvocation node) { |
| 15704 MethodInvocation copy = new MethodInvocation(_cloneNode(node.target), _mapTo
ken(node.period), _cloneNode(node.methodName), _cloneNode(node.argumentList)); | 17019 MethodInvocation copy = new MethodInvocation(_cloneNode(node.target), _mapTo
ken(node.period), _cloneNode(node.methodName), _cloneNode(node.argumentList)); |
| 15705 copy.propagatedType = node.propagatedType; | 17020 copy.propagatedType = node.propagatedType; |
| 15706 copy.staticType = node.staticType; | 17021 copy.staticType = node.staticType; |
| 15707 return copy; | 17022 return copy; |
| 15708 } | 17023 } |
| 15709 | 17024 |
| 17025 @override |
| 15710 NamedExpression visitNamedExpression(NamedExpression node) { | 17026 NamedExpression visitNamedExpression(NamedExpression node) { |
| 15711 NamedExpression copy = new NamedExpression(_cloneNode(node.name), _cloneNode
(node.expression)); | 17027 NamedExpression copy = new NamedExpression(_cloneNode(node.name), _cloneNode
(node.expression)); |
| 15712 copy.propagatedType = node.propagatedType; | 17028 copy.propagatedType = node.propagatedType; |
| 15713 copy.staticType = node.staticType; | 17029 copy.staticType = node.staticType; |
| 15714 return copy; | 17030 return copy; |
| 15715 } | 17031 } |
| 15716 | 17032 |
| 17033 @override |
| 15717 AstNode visitNativeClause(NativeClause node) => new NativeClause(_mapToken(nod
e.keyword), _cloneNode(node.name)); | 17034 AstNode visitNativeClause(NativeClause node) => new NativeClause(_mapToken(nod
e.keyword), _cloneNode(node.name)); |
| 15718 | 17035 |
| 17036 @override |
| 15719 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new Nat
iveFunctionBody(_mapToken(node.nativeToken), _cloneNode(node.stringLiteral), _ma
pToken(node.semicolon)); | 17037 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new Nat
iveFunctionBody(_mapToken(node.nativeToken), _cloneNode(node.stringLiteral), _ma
pToken(node.semicolon)); |
| 15720 | 17038 |
| 17039 @override |
| 15721 NullLiteral visitNullLiteral(NullLiteral node) { | 17040 NullLiteral visitNullLiteral(NullLiteral node) { |
| 15722 NullLiteral copy = new NullLiteral(_mapToken(node.literal)); | 17041 NullLiteral copy = new NullLiteral(_mapToken(node.literal)); |
| 15723 copy.propagatedType = node.propagatedType; | 17042 copy.propagatedType = node.propagatedType; |
| 15724 copy.staticType = node.staticType; | 17043 copy.staticType = node.staticType; |
| 15725 return copy; | 17044 return copy; |
| 15726 } | 17045 } |
| 15727 | 17046 |
| 17047 @override |
| 15728 ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression n
ode) { | 17048 ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression n
ode) { |
| 15729 ParenthesizedExpression copy = new ParenthesizedExpression(_mapToken(node.le
ftParenthesis), _cloneNode(node.expression), _mapToken(node.rightParenthesis)); | 17049 ParenthesizedExpression copy = new ParenthesizedExpression(_mapToken(node.le
ftParenthesis), _cloneNode(node.expression), _mapToken(node.rightParenthesis)); |
| 15730 copy.propagatedType = node.propagatedType; | 17050 copy.propagatedType = node.propagatedType; |
| 15731 copy.staticType = node.staticType; | 17051 copy.staticType = node.staticType; |
| 15732 return copy; | 17052 return copy; |
| 15733 } | 17053 } |
| 15734 | 17054 |
| 17055 @override |
| 15735 PartDirective visitPartDirective(PartDirective node) { | 17056 PartDirective visitPartDirective(PartDirective node) { |
| 15736 PartDirective copy = new PartDirective(_cloneNode(node.documentationComment)
, _cloneNodeList(node.metadata), _mapToken(node.partToken), _cloneNode(node.uri)
, _mapToken(node.semicolon)); | 17057 PartDirective copy = new PartDirective(_cloneNode(node.documentationComment)
, _cloneNodeList(node.metadata), _mapToken(node.partToken), _cloneNode(node.uri)
, _mapToken(node.semicolon)); |
| 15737 copy.element = node.element; | 17058 copy.element = node.element; |
| 15738 return copy; | 17059 return copy; |
| 15739 } | 17060 } |
| 15740 | 17061 |
| 17062 @override |
| 15741 PartOfDirective visitPartOfDirective(PartOfDirective node) { | 17063 PartOfDirective visitPartOfDirective(PartOfDirective node) { |
| 15742 PartOfDirective copy = new PartOfDirective(_cloneNode(node.documentationComm
ent), _cloneNodeList(node.metadata), _mapToken(node.partToken), _mapToken(node.o
fToken), _cloneNode(node.libraryName), _mapToken(node.semicolon)); | 17064 PartOfDirective copy = new PartOfDirective(_cloneNode(node.documentationComm
ent), _cloneNodeList(node.metadata), _mapToken(node.partToken), _mapToken(node.o
fToken), _cloneNode(node.libraryName), _mapToken(node.semicolon)); |
| 15743 copy.element = node.element; | 17065 copy.element = node.element; |
| 15744 return copy; | 17066 return copy; |
| 15745 } | 17067 } |
| 15746 | 17068 |
| 17069 @override |
| 15747 PostfixExpression visitPostfixExpression(PostfixExpression node) { | 17070 PostfixExpression visitPostfixExpression(PostfixExpression node) { |
| 15748 PostfixExpression copy = new PostfixExpression(_cloneNode(node.operand), _ma
pToken(node.operator)); | 17071 PostfixExpression copy = new PostfixExpression(_cloneNode(node.operand), _ma
pToken(node.operator)); |
| 15749 copy.propagatedElement = node.propagatedElement; | 17072 copy.propagatedElement = node.propagatedElement; |
| 15750 copy.propagatedType = node.propagatedType; | 17073 copy.propagatedType = node.propagatedType; |
| 15751 copy.staticElement = node.staticElement; | 17074 copy.staticElement = node.staticElement; |
| 15752 copy.staticType = node.staticType; | 17075 copy.staticType = node.staticType; |
| 15753 return copy; | 17076 return copy; |
| 15754 } | 17077 } |
| 15755 | 17078 |
| 17079 @override |
| 15756 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) { | 17080 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) { |
| 15757 PrefixedIdentifier copy = new PrefixedIdentifier(_cloneNode(node.prefix), _m
apToken(node.period), _cloneNode(node.identifier)); | 17081 PrefixedIdentifier copy = new PrefixedIdentifier(_cloneNode(node.prefix), _m
apToken(node.period), _cloneNode(node.identifier)); |
| 15758 copy.propagatedType = node.propagatedType; | 17082 copy.propagatedType = node.propagatedType; |
| 15759 copy.staticType = node.staticType; | 17083 copy.staticType = node.staticType; |
| 15760 return copy; | 17084 return copy; |
| 15761 } | 17085 } |
| 15762 | 17086 |
| 17087 @override |
| 15763 PrefixExpression visitPrefixExpression(PrefixExpression node) { | 17088 PrefixExpression visitPrefixExpression(PrefixExpression node) { |
| 15764 PrefixExpression copy = new PrefixExpression(_mapToken(node.operator), _clon
eNode(node.operand)); | 17089 PrefixExpression copy = new PrefixExpression(_mapToken(node.operator), _clon
eNode(node.operand)); |
| 15765 copy.propagatedElement = node.propagatedElement; | 17090 copy.propagatedElement = node.propagatedElement; |
| 15766 copy.propagatedType = node.propagatedType; | 17091 copy.propagatedType = node.propagatedType; |
| 15767 copy.staticElement = node.staticElement; | 17092 copy.staticElement = node.staticElement; |
| 15768 copy.staticType = node.staticType; | 17093 copy.staticType = node.staticType; |
| 15769 return copy; | 17094 return copy; |
| 15770 } | 17095 } |
| 15771 | 17096 |
| 17097 @override |
| 15772 PropertyAccess visitPropertyAccess(PropertyAccess node) { | 17098 PropertyAccess visitPropertyAccess(PropertyAccess node) { |
| 15773 PropertyAccess copy = new PropertyAccess(_cloneNode(node.target), _mapToken(
node.operator), _cloneNode(node.propertyName)); | 17099 PropertyAccess copy = new PropertyAccess(_cloneNode(node.target), _mapToken(
node.operator), _cloneNode(node.propertyName)); |
| 15774 copy.propagatedType = node.propagatedType; | 17100 copy.propagatedType = node.propagatedType; |
| 15775 copy.staticType = node.staticType; | 17101 copy.staticType = node.staticType; |
| 15776 return copy; | 17102 return copy; |
| 15777 } | 17103 } |
| 15778 | 17104 |
| 17105 @override |
| 15779 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(Redirec
tingConstructorInvocation node) { | 17106 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(Redirec
tingConstructorInvocation node) { |
| 15780 RedirectingConstructorInvocation copy = new RedirectingConstructorInvocation
(_mapToken(node.keyword), _mapToken(node.period), _cloneNode(node.constructorNam
e), _cloneNode(node.argumentList)); | 17107 RedirectingConstructorInvocation copy = new RedirectingConstructorInvocation
(_mapToken(node.keyword), _mapToken(node.period), _cloneNode(node.constructorNam
e), _cloneNode(node.argumentList)); |
| 15781 copy.staticElement = node.staticElement; | 17108 copy.staticElement = node.staticElement; |
| 15782 return copy; | 17109 return copy; |
| 15783 } | 17110 } |
| 15784 | 17111 |
| 17112 @override |
| 15785 RethrowExpression visitRethrowExpression(RethrowExpression node) { | 17113 RethrowExpression visitRethrowExpression(RethrowExpression node) { |
| 15786 RethrowExpression copy = new RethrowExpression(_mapToken(node.keyword)); | 17114 RethrowExpression copy = new RethrowExpression(_mapToken(node.keyword)); |
| 15787 copy.propagatedType = node.propagatedType; | 17115 copy.propagatedType = node.propagatedType; |
| 15788 copy.staticType = node.staticType; | 17116 copy.staticType = node.staticType; |
| 15789 return copy; | 17117 return copy; |
| 15790 } | 17118 } |
| 15791 | 17119 |
| 17120 @override |
| 15792 ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatem
ent(_mapToken(node.keyword), _cloneNode(node.expression), _mapToken(node.semicol
on)); | 17121 ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatem
ent(_mapToken(node.keyword), _cloneNode(node.expression), _mapToken(node.semicol
on)); |
| 15793 | 17122 |
| 17123 @override |
| 15794 ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag(_mapToken(node.scrip
tTag)); | 17124 ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag(_mapToken(node.scrip
tTag)); |
| 15795 | 17125 |
| 17126 @override |
| 15796 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
_mapToken(node.keyword), _cloneNodeList(node.shownNames)); | 17127 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator(
_mapToken(node.keyword), _cloneNodeList(node.shownNames)); |
| 15797 | 17128 |
| 17129 @override |
| 15798 SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) =
> new SimpleFormalParameter(_cloneNode(node.documentationComment), _cloneNodeLis
t(node.metadata), _mapToken(node.keyword), _cloneNode(node.type), _cloneNode(nod
e.identifier)); | 17130 SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) =
> new SimpleFormalParameter(_cloneNode(node.documentationComment), _cloneNodeLis
t(node.metadata), _mapToken(node.keyword), _cloneNode(node.type), _cloneNode(nod
e.identifier)); |
| 15799 | 17131 |
| 17132 @override |
| 15800 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) { | 17133 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) { |
| 15801 Token mappedToken = _mapToken(node.token); | 17134 Token mappedToken = _mapToken(node.token); |
| 15802 if (mappedToken == null) { | 17135 if (mappedToken == null) { |
| 15803 // This only happens for SimpleIdentifiers created by the parser as part o
f scanning | 17136 // This only happens for SimpleIdentifiers created by the parser as part o
f scanning |
| 15804 // documentation comments (the tokens for those identifiers are not in the
original token | 17137 // documentation comments (the tokens for those identifiers are not in the
original token |
| 15805 // stream and hence do not get copied). This extra check can be removed if
the scanner is | 17138 // stream and hence do not get copied). This extra check can be removed if
the scanner is |
| 15806 // changed to scan documentation comments for the parser. | 17139 // changed to scan documentation comments for the parser. |
| 15807 mappedToken = node.token; | 17140 mappedToken = node.token; |
| 15808 } | 17141 } |
| 15809 SimpleIdentifier copy = new SimpleIdentifier(mappedToken); | 17142 SimpleIdentifier copy = new SimpleIdentifier(mappedToken); |
| 15810 copy.auxiliaryElements = node.auxiliaryElements; | 17143 copy.auxiliaryElements = node.auxiliaryElements; |
| 15811 copy.propagatedElement = node.propagatedElement; | 17144 copy.propagatedElement = node.propagatedElement; |
| 15812 copy.propagatedType = node.propagatedType; | 17145 copy.propagatedType = node.propagatedType; |
| 15813 copy.staticElement = node.staticElement; | 17146 copy.staticElement = node.staticElement; |
| 15814 copy.staticType = node.staticType; | 17147 copy.staticType = node.staticType; |
| 15815 return copy; | 17148 return copy; |
| 15816 } | 17149 } |
| 15817 | 17150 |
| 17151 @override |
| 15818 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) { | 17152 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) { |
| 15819 SimpleStringLiteral copy = new SimpleStringLiteral(_mapToken(node.literal),
node.value); | 17153 SimpleStringLiteral copy = new SimpleStringLiteral(_mapToken(node.literal),
node.value); |
| 15820 copy.propagatedType = node.propagatedType; | 17154 copy.propagatedType = node.propagatedType; |
| 15821 copy.staticType = node.staticType; | 17155 copy.staticType = node.staticType; |
| 15822 return copy; | 17156 return copy; |
| 15823 } | 17157 } |
| 15824 | 17158 |
| 17159 @override |
| 15825 StringInterpolation visitStringInterpolation(StringInterpolation node) { | 17160 StringInterpolation visitStringInterpolation(StringInterpolation node) { |
| 15826 StringInterpolation copy = new StringInterpolation(_cloneNodeList(node.eleme
nts)); | 17161 StringInterpolation copy = new StringInterpolation(_cloneNodeList(node.eleme
nts)); |
| 15827 copy.propagatedType = node.propagatedType; | 17162 copy.propagatedType = node.propagatedType; |
| 15828 copy.staticType = node.staticType; | 17163 copy.staticType = node.staticType; |
| 15829 return copy; | 17164 return copy; |
| 15830 } | 17165 } |
| 15831 | 17166 |
| 17167 @override |
| 15832 SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInv
ocation node) { | 17168 SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInv
ocation node) { |
| 15833 SuperConstructorInvocation copy = new SuperConstructorInvocation(_mapToken(n
ode.keyword), _mapToken(node.period), _cloneNode(node.constructorName), _cloneNo
de(node.argumentList)); | 17169 SuperConstructorInvocation copy = new SuperConstructorInvocation(_mapToken(n
ode.keyword), _mapToken(node.period), _cloneNode(node.constructorName), _cloneNo
de(node.argumentList)); |
| 15834 copy.staticElement = node.staticElement; | 17170 copy.staticElement = node.staticElement; |
| 15835 return copy; | 17171 return copy; |
| 15836 } | 17172 } |
| 15837 | 17173 |
| 17174 @override |
| 15838 SuperExpression visitSuperExpression(SuperExpression node) { | 17175 SuperExpression visitSuperExpression(SuperExpression node) { |
| 15839 SuperExpression copy = new SuperExpression(_mapToken(node.keyword)); | 17176 SuperExpression copy = new SuperExpression(_mapToken(node.keyword)); |
| 15840 copy.propagatedType = node.propagatedType; | 17177 copy.propagatedType = node.propagatedType; |
| 15841 copy.staticType = node.staticType; | 17178 copy.staticType = node.staticType; |
| 15842 return copy; | 17179 return copy; |
| 15843 } | 17180 } |
| 15844 | 17181 |
| 17182 @override |
| 15845 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(_cloneNodeList(n
ode.labels), _mapToken(node.keyword), _cloneNode(node.expression), _mapToken(nod
e.colon), _cloneNodeList(node.statements)); | 17183 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase(_cloneNodeList(n
ode.labels), _mapToken(node.keyword), _cloneNode(node.expression), _mapToken(nod
e.colon), _cloneNodeList(node.statements)); |
| 15846 | 17184 |
| 17185 @override |
| 15847 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(_clo
neNodeList(node.labels), _mapToken(node.keyword), _mapToken(node.colon), _cloneN
odeList(node.statements)); | 17186 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault(_clo
neNodeList(node.labels), _mapToken(node.keyword), _mapToken(node.colon), _cloneN
odeList(node.statements)); |
| 15848 | 17187 |
| 17188 @override |
| 15849 SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatem
ent(_mapToken(node.keyword), _mapToken(node.leftParenthesis), _cloneNode(node.ex
pression), _mapToken(node.rightParenthesis), _mapToken(node.leftBracket), _clone
NodeList(node.members), _mapToken(node.rightBracket)); | 17189 SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatem
ent(_mapToken(node.keyword), _mapToken(node.leftParenthesis), _cloneNode(node.ex
pression), _mapToken(node.rightParenthesis), _mapToken(node.leftBracket), _clone
NodeList(node.members), _mapToken(node.rightBracket)); |
| 15850 | 17190 |
| 17191 @override |
| 15851 AstNode visitSymbolLiteral(SymbolLiteral node) { | 17192 AstNode visitSymbolLiteral(SymbolLiteral node) { |
| 15852 SymbolLiteral copy = new SymbolLiteral(_mapToken(node.poundSign), _mapTokens
(node.components)); | 17193 SymbolLiteral copy = new SymbolLiteral(_mapToken(node.poundSign), _mapTokens
(node.components)); |
| 15853 copy.propagatedType = node.propagatedType; | 17194 copy.propagatedType = node.propagatedType; |
| 15854 copy.staticType = node.staticType; | 17195 copy.staticType = node.staticType; |
| 15855 return copy; | 17196 return copy; |
| 15856 } | 17197 } |
| 15857 | 17198 |
| 17199 @override |
| 15858 ThisExpression visitThisExpression(ThisExpression node) { | 17200 ThisExpression visitThisExpression(ThisExpression node) { |
| 15859 ThisExpression copy = new ThisExpression(_mapToken(node.keyword)); | 17201 ThisExpression copy = new ThisExpression(_mapToken(node.keyword)); |
| 15860 copy.propagatedType = node.propagatedType; | 17202 copy.propagatedType = node.propagatedType; |
| 15861 copy.staticType = node.staticType; | 17203 copy.staticType = node.staticType; |
| 15862 return copy; | 17204 return copy; |
| 15863 } | 17205 } |
| 15864 | 17206 |
| 17207 @override |
| 15865 ThrowExpression visitThrowExpression(ThrowExpression node) { | 17208 ThrowExpression visitThrowExpression(ThrowExpression node) { |
| 15866 ThrowExpression copy = new ThrowExpression(_mapToken(node.keyword), _cloneNo
de(node.expression)); | 17209 ThrowExpression copy = new ThrowExpression(_mapToken(node.keyword), _cloneNo
de(node.expression)); |
| 15867 copy.propagatedType = node.propagatedType; | 17210 copy.propagatedType = node.propagatedType; |
| 15868 copy.staticType = node.staticType; | 17211 copy.staticType = node.staticType; |
| 15869 return copy; | 17212 return copy; |
| 15870 } | 17213 } |
| 15871 | 17214 |
| 17215 @override |
| 15872 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableD
eclaration node) => new TopLevelVariableDeclaration(_cloneNode(node.documentatio
nComment), _cloneNodeList(node.metadata), _cloneNode(node.variables), _mapToken(
node.semicolon)); | 17216 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableD
eclaration node) => new TopLevelVariableDeclaration(_cloneNode(node.documentatio
nComment), _cloneNodeList(node.metadata), _cloneNode(node.variables), _mapToken(
node.semicolon)); |
| 15873 | 17217 |
| 17218 @override |
| 15874 TryStatement visitTryStatement(TryStatement node) => new TryStatement(_mapToke
n(node.tryKeyword), _cloneNode(node.body), _cloneNodeList(node.catchClauses), _m
apToken(node.finallyKeyword), _cloneNode(node.finallyBlock)); | 17219 TryStatement visitTryStatement(TryStatement node) => new TryStatement(_mapToke
n(node.tryKeyword), _cloneNode(node.body), _cloneNodeList(node.catchClauses), _m
apToken(node.finallyKeyword), _cloneNode(node.finallyBlock)); |
| 15875 | 17220 |
| 17221 @override |
| 15876 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgum
entList(_mapToken(node.leftBracket), _cloneNodeList(node.arguments), _mapToken(n
ode.rightBracket)); | 17222 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgum
entList(_mapToken(node.leftBracket), _cloneNodeList(node.arguments), _mapToken(n
ode.rightBracket)); |
| 15877 | 17223 |
| 17224 @override |
| 15878 TypeName visitTypeName(TypeName node) { | 17225 TypeName visitTypeName(TypeName node) { |
| 15879 TypeName copy = new TypeName(_cloneNode(node.name), _cloneNode(node.typeArgu
ments)); | 17226 TypeName copy = new TypeName(_cloneNode(node.name), _cloneNode(node.typeArgu
ments)); |
| 15880 copy.type = node.type; | 17227 copy.type = node.type; |
| 15881 return copy; | 17228 return copy; |
| 15882 } | 17229 } |
| 15883 | 17230 |
| 17231 @override |
| 15884 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(_clo
neNode(node.documentationComment), _cloneNodeList(node.metadata), _cloneNode(nod
e.name), _mapToken(node.keyword), _cloneNode(node.bound)); | 17232 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter(_clo
neNode(node.documentationComment), _cloneNodeList(node.metadata), _cloneNode(nod
e.name), _mapToken(node.keyword), _cloneNode(node.bound)); |
| 15885 | 17233 |
| 17234 @override |
| 15886 TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypePa
rameterList(_mapToken(node.leftBracket), _cloneNodeList(node.typeParameters), _m
apToken(node.rightBracket)); | 17235 TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypePa
rameterList(_mapToken(node.leftBracket), _cloneNodeList(node.typeParameters), _m
apToken(node.rightBracket)); |
| 15887 | 17236 |
| 17237 @override |
| 15888 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new
VariableDeclaration(null, _cloneNodeList(node.metadata), _cloneNode(node.name),
_mapToken(node.equals), _cloneNode(node.initializer)); | 17238 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new
VariableDeclaration(null, _cloneNodeList(node.metadata), _cloneNode(node.name),
_mapToken(node.equals), _cloneNode(node.initializer)); |
| 15889 | 17239 |
| 17240 @override |
| 15890 VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList n
ode) => new VariableDeclarationList(null, _cloneNodeList(node.metadata), _mapTok
en(node.keyword), _cloneNode(node.type), _cloneNodeList(node.variables)); | 17241 VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList n
ode) => new VariableDeclarationList(null, _cloneNodeList(node.metadata), _mapTok
en(node.keyword), _cloneNode(node.type), _cloneNodeList(node.variables)); |
| 15891 | 17242 |
| 17243 @override |
| 15892 VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclara
tionStatement node) => new VariableDeclarationStatement(_cloneNode(node.variable
s), _mapToken(node.semicolon)); | 17244 VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclara
tionStatement node) => new VariableDeclarationStatement(_cloneNode(node.variable
s), _mapToken(node.semicolon)); |
| 15893 | 17245 |
| 17246 @override |
| 15894 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
_mapToken(node.keyword), _mapToken(node.leftParenthesis), _cloneNode(node.condit
ion), _mapToken(node.rightParenthesis), _cloneNode(node.body)); | 17247 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement(
_mapToken(node.keyword), _mapToken(node.leftParenthesis), _cloneNode(node.condit
ion), _mapToken(node.rightParenthesis), _cloneNode(node.body)); |
| 15895 | 17248 |
| 17249 @override |
| 15896 WithClause visitWithClause(WithClause node) => new WithClause(_mapToken(node.w
ithKeyword), _cloneNodeList(node.mixinTypes)); | 17250 WithClause visitWithClause(WithClause node) => new WithClause(_mapToken(node.w
ithKeyword), _cloneNodeList(node.mixinTypes)); |
| 15897 | 17251 |
| 15898 AstNode _cloneNode(AstNode node) { | 17252 AstNode _cloneNode(AstNode node) { |
| 15899 if (node == null) { | 17253 if (node == null) { |
| 15900 return null; | 17254 return null; |
| 15901 } | 17255 } |
| 15902 if (identical(node, _oldNode)) { | 17256 if (identical(node, _oldNode)) { |
| 15903 return _newNode; | 17257 return _newNode; |
| 15904 } | 17258 } |
| 15905 return node.accept(this) as AstNode; | 17259 return node.accept(this) as AstNode; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15949 bool _referenceIsWithinLocalFunction = false; | 17303 bool _referenceIsWithinLocalFunction = false; |
| 15950 | 17304 |
| 15951 ScopedNameFinder(int position) { | 17305 ScopedNameFinder(int position) { |
| 15952 this._position = position; | 17306 this._position = position; |
| 15953 } | 17307 } |
| 15954 | 17308 |
| 15955 Declaration get declaration => _declarationNode; | 17309 Declaration get declaration => _declarationNode; |
| 15956 | 17310 |
| 15957 Map<String, SimpleIdentifier> get locals => _locals; | 17311 Map<String, SimpleIdentifier> get locals => _locals; |
| 15958 | 17312 |
| 17313 @override |
| 15959 Object visitBlock(Block node) { | 17314 Object visitBlock(Block node) { |
| 15960 _checkStatements(node.statements); | 17315 _checkStatements(node.statements); |
| 15961 return super.visitBlock(node); | 17316 return super.visitBlock(node); |
| 15962 } | 17317 } |
| 15963 | 17318 |
| 17319 @override |
| 15964 Object visitCatchClause(CatchClause node) { | 17320 Object visitCatchClause(CatchClause node) { |
| 15965 _addToScope(node.exceptionParameter); | 17321 _addToScope(node.exceptionParameter); |
| 15966 _addToScope(node.stackTraceParameter); | 17322 _addToScope(node.stackTraceParameter); |
| 15967 return super.visitCatchClause(node); | 17323 return super.visitCatchClause(node); |
| 15968 } | 17324 } |
| 15969 | 17325 |
| 17326 @override |
| 15970 Object visitConstructorDeclaration(ConstructorDeclaration node) { | 17327 Object visitConstructorDeclaration(ConstructorDeclaration node) { |
| 15971 if (_immediateChild != node.parameters) { | 17328 if (_immediateChild != node.parameters) { |
| 15972 _addParameters(node.parameters.parameters); | 17329 _addParameters(node.parameters.parameters); |
| 15973 } | 17330 } |
| 15974 _declarationNode = node; | 17331 _declarationNode = node; |
| 15975 return null; | 17332 return null; |
| 15976 } | 17333 } |
| 15977 | 17334 |
| 17335 @override |
| 15978 Object visitFieldDeclaration(FieldDeclaration node) { | 17336 Object visitFieldDeclaration(FieldDeclaration node) { |
| 15979 _declarationNode = node; | 17337 _declarationNode = node; |
| 15980 return null; | 17338 return null; |
| 15981 } | 17339 } |
| 15982 | 17340 |
| 17341 @override |
| 15983 Object visitForEachStatement(ForEachStatement node) { | 17342 Object visitForEachStatement(ForEachStatement node) { |
| 15984 DeclaredIdentifier loopVariable = node.loopVariable; | 17343 DeclaredIdentifier loopVariable = node.loopVariable; |
| 15985 if (loopVariable != null) { | 17344 if (loopVariable != null) { |
| 15986 _addToScope(loopVariable.identifier); | 17345 _addToScope(loopVariable.identifier); |
| 15987 } | 17346 } |
| 15988 return super.visitForEachStatement(node); | 17347 return super.visitForEachStatement(node); |
| 15989 } | 17348 } |
| 15990 | 17349 |
| 17350 @override |
| 15991 Object visitForStatement(ForStatement node) { | 17351 Object visitForStatement(ForStatement node) { |
| 15992 if (_immediateChild != node.variables && node.variables != null) { | 17352 if (_immediateChild != node.variables && node.variables != null) { |
| 15993 _addVariables(node.variables.variables); | 17353 _addVariables(node.variables.variables); |
| 15994 } | 17354 } |
| 15995 return super.visitForStatement(node); | 17355 return super.visitForStatement(node); |
| 15996 } | 17356 } |
| 15997 | 17357 |
| 17358 @override |
| 15998 Object visitFunctionDeclaration(FunctionDeclaration node) { | 17359 Object visitFunctionDeclaration(FunctionDeclaration node) { |
| 15999 if (node.parent is! FunctionDeclarationStatement) { | 17360 if (node.parent is! FunctionDeclarationStatement) { |
| 16000 _declarationNode = node; | 17361 _declarationNode = node; |
| 16001 return null; | 17362 return null; |
| 16002 } | 17363 } |
| 16003 return super.visitFunctionDeclaration(node); | 17364 return super.visitFunctionDeclaration(node); |
| 16004 } | 17365 } |
| 16005 | 17366 |
| 17367 @override |
| 16006 Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { | 17368 Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) { |
| 16007 _referenceIsWithinLocalFunction = true; | 17369 _referenceIsWithinLocalFunction = true; |
| 16008 return super.visitFunctionDeclarationStatement(node); | 17370 return super.visitFunctionDeclarationStatement(node); |
| 16009 } | 17371 } |
| 16010 | 17372 |
| 17373 @override |
| 16011 Object visitFunctionExpression(FunctionExpression node) { | 17374 Object visitFunctionExpression(FunctionExpression node) { |
| 16012 if (node.parameters != null && _immediateChild != node.parameters) { | 17375 if (node.parameters != null && _immediateChild != node.parameters) { |
| 16013 _addParameters(node.parameters.parameters); | 17376 _addParameters(node.parameters.parameters); |
| 16014 } | 17377 } |
| 16015 return super.visitFunctionExpression(node); | 17378 return super.visitFunctionExpression(node); |
| 16016 } | 17379 } |
| 16017 | 17380 |
| 17381 @override |
| 16018 Object visitMethodDeclaration(MethodDeclaration node) { | 17382 Object visitMethodDeclaration(MethodDeclaration node) { |
| 16019 _declarationNode = node; | 17383 _declarationNode = node; |
| 16020 if (node.parameters == null) { | 17384 if (node.parameters == null) { |
| 16021 return null; | 17385 return null; |
| 16022 } | 17386 } |
| 16023 if (_immediateChild != node.parameters) { | 17387 if (_immediateChild != node.parameters) { |
| 16024 _addParameters(node.parameters.parameters); | 17388 _addParameters(node.parameters.parameters); |
| 16025 } | 17389 } |
| 16026 return null; | 17390 return null; |
| 16027 } | 17391 } |
| 16028 | 17392 |
| 17393 @override |
| 16029 Object visitNode(AstNode node) { | 17394 Object visitNode(AstNode node) { |
| 16030 _immediateChild = node; | 17395 _immediateChild = node; |
| 16031 AstNode parent = node.parent; | 17396 AstNode parent = node.parent; |
| 16032 if (parent != null) { | 17397 if (parent != null) { |
| 16033 parent.accept(this); | 17398 parent.accept(this); |
| 16034 } | 17399 } |
| 16035 return null; | 17400 return null; |
| 16036 } | 17401 } |
| 16037 | 17402 |
| 17403 @override |
| 16038 Object visitSwitchMember(SwitchMember node) { | 17404 Object visitSwitchMember(SwitchMember node) { |
| 16039 _checkStatements(node.statements); | 17405 _checkStatements(node.statements); |
| 16040 return super.visitSwitchMember(node); | 17406 return super.visitSwitchMember(node); |
| 16041 } | 17407 } |
| 16042 | 17408 |
| 17409 @override |
| 16043 Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { | 17410 Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { |
| 16044 _declarationNode = node; | 17411 _declarationNode = node; |
| 16045 return null; | 17412 return null; |
| 16046 } | 17413 } |
| 16047 | 17414 |
| 17415 @override |
| 16048 Object visitTypeAlias(TypeAlias node) { | 17416 Object visitTypeAlias(TypeAlias node) { |
| 16049 _declarationNode = node; | 17417 _declarationNode = node; |
| 16050 return null; | 17418 return null; |
| 16051 } | 17419 } |
| 16052 | 17420 |
| 16053 void _addParameters(NodeList<FormalParameter> vars) { | 17421 void _addParameters(NodeList<FormalParameter> vars) { |
| 16054 for (FormalParameter var2 in vars) { | 17422 for (FormalParameter var2 in vars) { |
| 16055 _addToScope(var2.identifier); | 17423 _addToScope(var2.identifier); |
| 16056 } | 17424 } |
| 16057 } | 17425 } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16212 throw new RangeError("Index: ${index}, Size: ${_elements.length}"); | 17580 throw new RangeError("Index: ${index}, Size: ${_elements.length}"); |
| 16213 } | 17581 } |
| 16214 owner.becomeParentOf(node); | 17582 owner.becomeParentOf(node); |
| 16215 _elements[index] = node; | 17583 _elements[index] = node; |
| 16216 } | 17584 } |
| 16217 int get length => _elements.length; | 17585 int get length => _elements.length; |
| 16218 void set length(int value) { | 17586 void set length(int value) { |
| 16219 throw new UnsupportedError("Cannot resize NodeList."); | 17587 throw new UnsupportedError("Cannot resize NodeList."); |
| 16220 } | 17588 } |
| 16221 } | 17589 } |
| OLD | NEW |