| 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 library analyzer.src.dart.ast.ast; | 5 library analyzer.src.dart.ast.ast; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 /** | 89 /** |
| 90 * The annotations associated with this node. | 90 * The annotations associated with this node. |
| 91 */ | 91 */ |
| 92 NodeList<Annotation> _metadata; | 92 NodeList<Annotation> _metadata; |
| 93 | 93 |
| 94 /** | 94 /** |
| 95 * Initialize a newly created annotated node. Either or both of the [comment] | 95 * Initialize a newly created annotated node. Either or both of the [comment] |
| 96 * and [metadata] can be `null` if the node does not have the corresponding | 96 * and [metadata] can be `null` if the node does not have the corresponding |
| 97 * attribute. | 97 * attribute. |
| 98 */ | 98 */ |
| 99 AnnotatedNodeImpl(Comment comment, List<Annotation> metadata) { | 99 AnnotatedNodeImpl(CommentImpl comment, List<Annotation> metadata) { |
| 100 _comment = _becomeParentOf(comment); | 100 _comment = _becomeParentOf(comment); |
| 101 _metadata = new NodeListImpl<Annotation>(this, metadata); | 101 _metadata = new NodeListImpl<Annotation>(this, metadata); |
| 102 } | 102 } |
| 103 | 103 |
| 104 @override | 104 @override |
| 105 Token get beginToken { | 105 Token get beginToken { |
| 106 if (_comment == null) { | 106 if (_comment == null) { |
| 107 if (_metadata.isEmpty) { | 107 if (_metadata.isEmpty) { |
| 108 return firstTokenAfterCommentAndMetadata; | 108 return firstTokenAfterCommentAndMetadata; |
| 109 } | 109 } |
| 110 return _metadata.beginToken; | 110 return _metadata.beginToken; |
| 111 } else if (_metadata.isEmpty) { | 111 } else if (_metadata.isEmpty) { |
| 112 return _comment.beginToken; | 112 return _comment.beginToken; |
| 113 } | 113 } |
| 114 Token commentToken = _comment.beginToken; | 114 Token commentToken = _comment.beginToken; |
| 115 Token metadataToken = _metadata.beginToken; | 115 Token metadataToken = _metadata.beginToken; |
| 116 if (commentToken.offset < metadataToken.offset) { | 116 if (commentToken.offset < metadataToken.offset) { |
| 117 return commentToken; | 117 return commentToken; |
| 118 } | 118 } |
| 119 return metadataToken; | 119 return metadataToken; |
| 120 } | 120 } |
| 121 | 121 |
| 122 @override | 122 @override |
| 123 Comment get documentationComment => _comment; | 123 Comment get documentationComment => _comment; |
| 124 | 124 |
| 125 @override | 125 @override |
| 126 void set documentationComment(Comment comment) { | 126 void set documentationComment(Comment comment) { |
| 127 _comment = _becomeParentOf(comment); | 127 _comment = _becomeParentOf(comment as AstNodeImpl); |
| 128 } | 128 } |
| 129 | 129 |
| 130 @override | 130 @override |
| 131 NodeList<Annotation> get metadata => _metadata; | 131 NodeList<Annotation> get metadata => _metadata; |
| 132 | 132 |
| 133 @override | 133 @override |
| 134 List<AstNode> get sortedCommentAndAnnotations { | 134 List<AstNode> get sortedCommentAndAnnotations { |
| 135 return <AstNode>[] | 135 return <AstNode>[] |
| 136 ..add(_comment) | 136 ..add(_comment) |
| 137 ..addAll(_metadata) | 137 ..addAll(_metadata) |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 */ | 231 */ |
| 232 @override | 232 @override |
| 233 ElementAnnotation elementAnnotation; | 233 ElementAnnotation elementAnnotation; |
| 234 | 234 |
| 235 /** | 235 /** |
| 236 * Initialize a newly created annotation. Both the [period] and the | 236 * Initialize a newly created annotation. Both the [period] and the |
| 237 * [constructorName] can be `null` if the annotation is not referencing a | 237 * [constructorName] can be `null` if the annotation is not referencing a |
| 238 * named constructor. The [arguments] can be `null` if the annotation is not | 238 * named constructor. The [arguments] can be `null` if the annotation is not |
| 239 * referencing a constructor. | 239 * referencing a constructor. |
| 240 */ | 240 */ |
| 241 AnnotationImpl(this.atSign, Identifier name, this.period, | 241 AnnotationImpl(this.atSign, IdentifierImpl name, this.period, |
| 242 SimpleIdentifier constructorName, ArgumentList arguments) { | 242 SimpleIdentifierImpl constructorName, ArgumentListImpl arguments) { |
| 243 _name = _becomeParentOf(name); | 243 _name = _becomeParentOf(name); |
| 244 _constructorName = _becomeParentOf(constructorName); | 244 _constructorName = _becomeParentOf(constructorName); |
| 245 _arguments = _becomeParentOf(arguments); | 245 _arguments = _becomeParentOf(arguments); |
| 246 } | 246 } |
| 247 | 247 |
| 248 @override | 248 @override |
| 249 ArgumentList get arguments => _arguments; | 249 ArgumentList get arguments => _arguments; |
| 250 | 250 |
| 251 @override | 251 @override |
| 252 void set arguments(ArgumentList arguments) { | 252 void set arguments(ArgumentList arguments) { |
| 253 _arguments = _becomeParentOf(arguments); | 253 _arguments = _becomeParentOf(arguments as AstNodeImpl); |
| 254 } | 254 } |
| 255 | 255 |
| 256 @override | 256 @override |
| 257 Token get beginToken => atSign; | 257 Token get beginToken => atSign; |
| 258 | 258 |
| 259 @override | 259 @override |
| 260 Iterable get childEntities => new ChildEntities() | 260 Iterable get childEntities => new ChildEntities() |
| 261 ..add(atSign) | 261 ..add(atSign) |
| 262 ..add(_name) | 262 ..add(_name) |
| 263 ..add(period) | 263 ..add(period) |
| 264 ..add(_constructorName) | 264 ..add(_constructorName) |
| 265 ..add(_arguments); | 265 ..add(_arguments); |
| 266 | 266 |
| 267 @override | 267 @override |
| 268 SimpleIdentifier get constructorName => _constructorName; | 268 SimpleIdentifier get constructorName => _constructorName; |
| 269 | 269 |
| 270 @override | 270 @override |
| 271 void set constructorName(SimpleIdentifier name) { | 271 void set constructorName(SimpleIdentifier name) { |
| 272 _constructorName = _becomeParentOf(name); | 272 _constructorName = _becomeParentOf(name as AstNodeImpl); |
| 273 } | 273 } |
| 274 | 274 |
| 275 @override | 275 @override |
| 276 Element get element { | 276 Element get element { |
| 277 if (_element != null) { | 277 if (_element != null) { |
| 278 return _element; | 278 return _element; |
| 279 } else if (_name != null) { | 279 } else if (_name != null) { |
| 280 return _name.staticElement; | 280 return _name.staticElement; |
| 281 } | 281 } |
| 282 return null; | 282 return null; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 295 return _constructorName.endToken; | 295 return _constructorName.endToken; |
| 296 } | 296 } |
| 297 return _name.endToken; | 297 return _name.endToken; |
| 298 } | 298 } |
| 299 | 299 |
| 300 @override | 300 @override |
| 301 Identifier get name => _name; | 301 Identifier get name => _name; |
| 302 | 302 |
| 303 @override | 303 @override |
| 304 void set name(Identifier name) { | 304 void set name(Identifier name) { |
| 305 _name = _becomeParentOf(name); | 305 _name = _becomeParentOf(name as AstNodeImpl); |
| 306 } | 306 } |
| 307 | 307 |
| 308 @override | 308 @override |
| 309 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 309 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 310 visitor.visitAnnotation(this); | 310 visitor.visitAnnotation(this); |
| 311 | 311 |
| 312 @override | 312 @override |
| 313 void visitChildren(AstVisitor visitor) { | 313 void visitChildren(AstVisitor visitor) { |
| 314 _name?.accept(visitor); | 314 _name?.accept(visitor); |
| 315 _constructorName?.accept(visitor); | 315 _constructorName?.accept(visitor); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 Token asOperator; | 492 Token asOperator; |
| 493 | 493 |
| 494 /** | 494 /** |
| 495 * The name of the type being cast to. | 495 * The name of the type being cast to. |
| 496 */ | 496 */ |
| 497 TypeName _type; | 497 TypeName _type; |
| 498 | 498 |
| 499 /** | 499 /** |
| 500 * Initialize a newly created as expression. | 500 * Initialize a newly created as expression. |
| 501 */ | 501 */ |
| 502 AsExpressionImpl(Expression expression, this.asOperator, TypeName type) { | 502 AsExpressionImpl( |
| 503 ExpressionImpl expression, this.asOperator, TypeNameImpl type) { |
| 503 _expression = _becomeParentOf(expression); | 504 _expression = _becomeParentOf(expression); |
| 504 _type = _becomeParentOf(type); | 505 _type = _becomeParentOf(type); |
| 505 } | 506 } |
| 506 | 507 |
| 507 @override | 508 @override |
| 508 Token get beginToken => _expression.beginToken; | 509 Token get beginToken => _expression.beginToken; |
| 509 | 510 |
| 510 @override | 511 @override |
| 511 Iterable get childEntities => | 512 Iterable get childEntities => |
| 512 new ChildEntities()..add(_expression)..add(asOperator)..add(_type); | 513 new ChildEntities()..add(_expression)..add(asOperator)..add(_type); |
| 513 | 514 |
| 514 @override | 515 @override |
| 515 Token get endToken => _type.endToken; | 516 Token get endToken => _type.endToken; |
| 516 | 517 |
| 517 @override | 518 @override |
| 518 Expression get expression => _expression; | 519 Expression get expression => _expression; |
| 519 | 520 |
| 520 @override | 521 @override |
| 521 void set expression(Expression expression) { | 522 void set expression(Expression expression) { |
| 522 _expression = _becomeParentOf(expression); | 523 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 523 } | 524 } |
| 524 | 525 |
| 525 @override | 526 @override |
| 526 int get precedence => 7; | 527 int get precedence => 7; |
| 527 | 528 |
| 528 @override | 529 @override |
| 529 TypeName get type => _type; | 530 TypeName get type => _type; |
| 530 | 531 |
| 531 @override | 532 @override |
| 532 void set type(TypeName name) { | 533 void set type(TypeName name) { |
| 533 _type = _becomeParentOf(name); | 534 _type = _becomeParentOf(name as AstNodeImpl); |
| 534 } | 535 } |
| 535 | 536 |
| 536 @override | 537 @override |
| 537 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 538 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 538 visitor.visitAsExpression(this); | 539 visitor.visitAsExpression(this); |
| 539 | 540 |
| 540 @override | 541 @override |
| 541 void visitChildren(AstVisitor visitor) { | 542 void visitChildren(AstVisitor visitor) { |
| 542 _expression?.accept(visitor); | 543 _expression?.accept(visitor); |
| 543 _type?.accept(visitor); | 544 _type?.accept(visitor); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 */ | 592 */ |
| 592 @override | 593 @override |
| 593 Token semicolon; | 594 Token semicolon; |
| 594 | 595 |
| 595 /** | 596 /** |
| 596 * Initialize a newly created assert statement. | 597 * Initialize a newly created assert statement. |
| 597 */ | 598 */ |
| 598 AssertStatementImpl( | 599 AssertStatementImpl( |
| 599 this.assertKeyword, | 600 this.assertKeyword, |
| 600 this.leftParenthesis, | 601 this.leftParenthesis, |
| 601 Expression condition, | 602 ExpressionImpl condition, |
| 602 this.comma, | 603 this.comma, |
| 603 Expression message, | 604 ExpressionImpl message, |
| 604 this.rightParenthesis, | 605 this.rightParenthesis, |
| 605 this.semicolon) { | 606 this.semicolon) { |
| 606 _condition = _becomeParentOf(condition); | 607 _condition = _becomeParentOf(condition); |
| 607 _message = _becomeParentOf(message); | 608 _message = _becomeParentOf(message); |
| 608 } | 609 } |
| 609 | 610 |
| 610 @override | 611 @override |
| 611 Token get beginToken => assertKeyword; | 612 Token get beginToken => assertKeyword; |
| 612 | 613 |
| 613 @override | 614 @override |
| 614 Iterable get childEntities => new ChildEntities() | 615 Iterable get childEntities => new ChildEntities() |
| 615 ..add(assertKeyword) | 616 ..add(assertKeyword) |
| 616 ..add(leftParenthesis) | 617 ..add(leftParenthesis) |
| 617 ..add(_condition) | 618 ..add(_condition) |
| 618 ..add(comma) | 619 ..add(comma) |
| 619 ..add(_message) | 620 ..add(_message) |
| 620 ..add(rightParenthesis) | 621 ..add(rightParenthesis) |
| 621 ..add(semicolon); | 622 ..add(semicolon); |
| 622 | 623 |
| 623 @override | 624 @override |
| 624 Expression get condition => _condition; | 625 Expression get condition => _condition; |
| 625 | 626 |
| 626 @override | 627 @override |
| 627 void set condition(Expression condition) { | 628 void set condition(Expression condition) { |
| 628 _condition = _becomeParentOf(condition); | 629 _condition = _becomeParentOf(condition as AstNodeImpl); |
| 629 } | 630 } |
| 630 | 631 |
| 631 @override | 632 @override |
| 632 Token get endToken => semicolon; | 633 Token get endToken => semicolon; |
| 633 | 634 |
| 634 @override | 635 @override |
| 635 Expression get message => _message; | 636 Expression get message => _message; |
| 636 | 637 |
| 637 @override | 638 @override |
| 638 void set message(Expression expression) { | 639 void set message(Expression expression) { |
| 639 _message = _becomeParentOf(expression); | 640 _message = _becomeParentOf(expression as AstNodeImpl); |
| 640 } | 641 } |
| 641 | 642 |
| 642 @override | 643 @override |
| 643 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 644 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 644 visitor.visitAssertStatement(this); | 645 visitor.visitAssertStatement(this); |
| 645 | 646 |
| 646 @override | 647 @override |
| 647 void visitChildren(AstVisitor visitor) { | 648 void visitChildren(AstVisitor visitor) { |
| 648 _condition?.accept(visitor); | 649 _condition?.accept(visitor); |
| 649 message?.accept(visitor); | 650 message?.accept(visitor); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 * the left-hand-side, or `null` if the AST structure has not been resolved, | 689 * the left-hand-side, or `null` if the AST structure has not been resolved, |
| 689 * if the operator is not a compound operator, or if the operator could not be | 690 * if the operator is not a compound operator, or if the operator could not be |
| 690 * resolved. | 691 * resolved. |
| 691 */ | 692 */ |
| 692 @override | 693 @override |
| 693 MethodElement propagatedElement; | 694 MethodElement propagatedElement; |
| 694 | 695 |
| 695 /** | 696 /** |
| 696 * Initialize a newly created assignment expression. | 697 * Initialize a newly created assignment expression. |
| 697 */ | 698 */ |
| 698 AssignmentExpressionImpl( | 699 AssignmentExpressionImpl(ExpressionImpl leftHandSide, this.operator, |
| 699 Expression leftHandSide, this.operator, Expression rightHandSide) { | 700 ExpressionImpl rightHandSide) { |
| 700 if (leftHandSide == null || rightHandSide == null) { | 701 if (leftHandSide == null || rightHandSide == null) { |
| 701 String message; | 702 String message; |
| 702 if (leftHandSide == null) { | 703 if (leftHandSide == null) { |
| 703 if (rightHandSide == null) { | 704 if (rightHandSide == null) { |
| 704 message = "Both the left-hand and right-hand sides are null"; | 705 message = "Both the left-hand and right-hand sides are null"; |
| 705 } else { | 706 } else { |
| 706 message = "The left-hand size is null"; | 707 message = "The left-hand size is null"; |
| 707 } | 708 } |
| 708 } else { | 709 } else { |
| 709 message = "The right-hand size is null"; | 710 message = "The right-hand size is null"; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 734 ..add(_rightHandSide); | 735 ..add(_rightHandSide); |
| 735 | 736 |
| 736 @override | 737 @override |
| 737 Token get endToken => _rightHandSide.endToken; | 738 Token get endToken => _rightHandSide.endToken; |
| 738 | 739 |
| 739 @override | 740 @override |
| 740 Expression get leftHandSide => _leftHandSide; | 741 Expression get leftHandSide => _leftHandSide; |
| 741 | 742 |
| 742 @override | 743 @override |
| 743 void set leftHandSide(Expression expression) { | 744 void set leftHandSide(Expression expression) { |
| 744 _leftHandSide = _becomeParentOf(expression); | 745 _leftHandSide = _becomeParentOf(expression as AstNodeImpl); |
| 745 } | 746 } |
| 746 | 747 |
| 747 @override | 748 @override |
| 748 int get precedence => 1; | 749 int get precedence => 1; |
| 749 | 750 |
| 750 @override | 751 @override |
| 751 Expression get rightHandSide => _rightHandSide; | 752 Expression get rightHandSide => _rightHandSide; |
| 752 | 753 |
| 753 @override | 754 @override |
| 754 void set rightHandSide(Expression expression) { | 755 void set rightHandSide(Expression expression) { |
| 755 _rightHandSide = _becomeParentOf(expression); | 756 _rightHandSide = _becomeParentOf(expression as AstNodeImpl); |
| 756 } | 757 } |
| 757 | 758 |
| 758 /** | 759 /** |
| 759 * If the AST structure has been resolved, and the function being invoked is | 760 * If the AST structure has been resolved, and the function being invoked is |
| 760 * known based on propagated type information, then return the parameter | 761 * known based on propagated type information, then return the parameter |
| 761 * element representing the parameter to which the value of the right operand | 762 * element representing the parameter to which the value of the right operand |
| 762 * will be bound. Otherwise, return `null`. | 763 * will be bound. Otherwise, return `null`. |
| 763 */ | 764 */ |
| 764 ParameterElement get _propagatedParameterElementForRightHandSide { | 765 ParameterElement get _propagatedParameterElementForRightHandSide { |
| 765 ExecutableElement executableElement = null; | 766 ExecutableElement executableElement = null; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 accept(new ToSourceVisitor(writer)); | 931 accept(new ToSourceVisitor(writer)); |
| 931 return writer.toString(); | 932 return writer.toString(); |
| 932 } | 933 } |
| 933 | 934 |
| 934 @override | 935 @override |
| 935 String toString() => toSource(); | 936 String toString() => toSource(); |
| 936 | 937 |
| 937 /** | 938 /** |
| 938 * Make this node the parent of the given [child] node. Return the child node. | 939 * Make this node the parent of the given [child] node. Return the child node. |
| 939 */ | 940 */ |
| 940 AstNode _becomeParentOf(AstNode child) { | 941 AstNode _becomeParentOf(AstNodeImpl child) { |
| 941 if (child != null) { | 942 if (child != null) { |
| 942 (child as AstNodeImpl)._parent = this; | 943 child._parent = this; |
| 943 } | 944 } |
| 944 return child; | 945 return child; |
| 945 } | 946 } |
| 946 } | 947 } |
| 947 | 948 |
| 948 /** | 949 /** |
| 949 * An await expression. | 950 * An await expression. |
| 950 * | 951 * |
| 951 * awaitExpression ::= | 952 * awaitExpression ::= |
| 952 * 'await' [Expression] | 953 * 'await' [Expression] |
| 953 */ | 954 */ |
| 954 class AwaitExpressionImpl extends ExpressionImpl implements AwaitExpression { | 955 class AwaitExpressionImpl extends ExpressionImpl implements AwaitExpression { |
| 955 /** | 956 /** |
| 956 * The 'await' keyword. | 957 * The 'await' keyword. |
| 957 */ | 958 */ |
| 958 @override | 959 @override |
| 959 Token awaitKeyword; | 960 Token awaitKeyword; |
| 960 | 961 |
| 961 /** | 962 /** |
| 962 * The expression whose value is being waited on. | 963 * The expression whose value is being waited on. |
| 963 */ | 964 */ |
| 964 Expression _expression; | 965 Expression _expression; |
| 965 | 966 |
| 966 /** | 967 /** |
| 967 * Initialize a newly created await expression. | 968 * Initialize a newly created await expression. |
| 968 */ | 969 */ |
| 969 AwaitExpressionImpl(this.awaitKeyword, Expression expression) { | 970 AwaitExpressionImpl(this.awaitKeyword, ExpressionImpl expression) { |
| 970 _expression = _becomeParentOf(expression); | 971 _expression = _becomeParentOf(expression); |
| 971 } | 972 } |
| 972 | 973 |
| 973 @override | 974 @override |
| 974 Token get beginToken { | 975 Token get beginToken { |
| 975 if (awaitKeyword != null) { | 976 if (awaitKeyword != null) { |
| 976 return awaitKeyword; | 977 return awaitKeyword; |
| 977 } | 978 } |
| 978 return _expression.beginToken; | 979 return _expression.beginToken; |
| 979 } | 980 } |
| 980 | 981 |
| 981 @override | 982 @override |
| 982 Iterable get childEntities => | 983 Iterable get childEntities => |
| 983 new ChildEntities()..add(awaitKeyword)..add(_expression); | 984 new ChildEntities()..add(awaitKeyword)..add(_expression); |
| 984 | 985 |
| 985 @override | 986 @override |
| 986 Token get endToken => _expression.endToken; | 987 Token get endToken => _expression.endToken; |
| 987 | 988 |
| 988 @override | 989 @override |
| 989 Expression get expression => _expression; | 990 Expression get expression => _expression; |
| 990 | 991 |
| 991 @override | 992 @override |
| 992 void set expression(Expression expression) { | 993 void set expression(Expression expression) { |
| 993 _expression = _becomeParentOf(expression); | 994 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 994 } | 995 } |
| 995 | 996 |
| 996 @override | 997 @override |
| 997 int get precedence => 0; | 998 int get precedence => 0; |
| 998 | 999 |
| 999 @override | 1000 @override |
| 1000 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 1001 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 1001 visitor.visitAwaitExpression(this); | 1002 visitor.visitAwaitExpression(this); |
| 1002 | 1003 |
| 1003 @override | 1004 @override |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 * the operator is not user definable, or if the operator could not be | 1044 * the operator is not user definable, or if the operator could not be |
| 1044 * resolved. | 1045 * resolved. |
| 1045 */ | 1046 */ |
| 1046 @override | 1047 @override |
| 1047 MethodElement propagatedElement; | 1048 MethodElement propagatedElement; |
| 1048 | 1049 |
| 1049 /** | 1050 /** |
| 1050 * Initialize a newly created binary expression. | 1051 * Initialize a newly created binary expression. |
| 1051 */ | 1052 */ |
| 1052 BinaryExpressionImpl( | 1053 BinaryExpressionImpl( |
| 1053 Expression leftOperand, this.operator, Expression rightOperand) { | 1054 ExpressionImpl leftOperand, this.operator, ExpressionImpl rightOperand) { |
| 1054 _leftOperand = _becomeParentOf(leftOperand); | 1055 _leftOperand = _becomeParentOf(leftOperand); |
| 1055 _rightOperand = _becomeParentOf(rightOperand); | 1056 _rightOperand = _becomeParentOf(rightOperand); |
| 1056 } | 1057 } |
| 1057 | 1058 |
| 1058 @override | 1059 @override |
| 1059 Token get beginToken => _leftOperand.beginToken; | 1060 Token get beginToken => _leftOperand.beginToken; |
| 1060 | 1061 |
| 1061 @override | 1062 @override |
| 1062 MethodElement get bestElement { | 1063 MethodElement get bestElement { |
| 1063 MethodElement element = propagatedElement; | 1064 MethodElement element = propagatedElement; |
| 1064 if (element == null) { | 1065 if (element == null) { |
| 1065 element = staticElement; | 1066 element = staticElement; |
| 1066 } | 1067 } |
| 1067 return element; | 1068 return element; |
| 1068 } | 1069 } |
| 1069 | 1070 |
| 1070 @override | 1071 @override |
| 1071 Iterable get childEntities => | 1072 Iterable get childEntities => |
| 1072 new ChildEntities()..add(_leftOperand)..add(operator)..add(_rightOperand); | 1073 new ChildEntities()..add(_leftOperand)..add(operator)..add(_rightOperand); |
| 1073 | 1074 |
| 1074 @override | 1075 @override |
| 1075 Token get endToken => _rightOperand.endToken; | 1076 Token get endToken => _rightOperand.endToken; |
| 1076 | 1077 |
| 1077 @override | 1078 @override |
| 1078 Expression get leftOperand => _leftOperand; | 1079 Expression get leftOperand => _leftOperand; |
| 1079 | 1080 |
| 1080 @override | 1081 @override |
| 1081 void set leftOperand(Expression expression) { | 1082 void set leftOperand(Expression expression) { |
| 1082 _leftOperand = _becomeParentOf(expression); | 1083 _leftOperand = _becomeParentOf(expression as AstNodeImpl); |
| 1083 } | 1084 } |
| 1084 | 1085 |
| 1085 @override | 1086 @override |
| 1086 int get precedence => operator.type.precedence; | 1087 int get precedence => operator.type.precedence; |
| 1087 | 1088 |
| 1088 @override | 1089 @override |
| 1089 Expression get rightOperand => _rightOperand; | 1090 Expression get rightOperand => _rightOperand; |
| 1090 | 1091 |
| 1091 @override | 1092 @override |
| 1092 void set rightOperand(Expression expression) { | 1093 void set rightOperand(Expression expression) { |
| 1093 _rightOperand = _becomeParentOf(expression); | 1094 _rightOperand = _becomeParentOf(expression as AstNodeImpl); |
| 1094 } | 1095 } |
| 1095 | 1096 |
| 1096 /** | 1097 /** |
| 1097 * If the AST structure has been resolved, and the function being invoked is | 1098 * If the AST structure has been resolved, and the function being invoked is |
| 1098 * known based on propagated type information, then return the parameter | 1099 * known based on propagated type information, then return the parameter |
| 1099 * element representing the parameter to which the value of the right operand | 1100 * element representing the parameter to which the value of the right operand |
| 1100 * will be bound. Otherwise, return `null`. | 1101 * will be bound. Otherwise, return `null`. |
| 1101 */ | 1102 */ |
| 1102 ParameterElement get _propagatedParameterElementForRightOperand { | 1103 ParameterElement get _propagatedParameterElementForRightOperand { |
| 1103 if (propagatedElement == null) { | 1104 if (propagatedElement == null) { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 * The block representing the body of the function. | 1165 * The block representing the body of the function. |
| 1165 */ | 1166 */ |
| 1166 Block _block; | 1167 Block _block; |
| 1167 | 1168 |
| 1168 /** | 1169 /** |
| 1169 * Initialize a newly created function body consisting of a block of | 1170 * Initialize a newly created function body consisting of a block of |
| 1170 * statements. The [keyword] can be `null` if there is no keyword specified | 1171 * statements. The [keyword] can be `null` if there is no keyword specified |
| 1171 * for the block. The [star] can be `null` if there is no star following the | 1172 * for the block. The [star] can be `null` if there is no star following the |
| 1172 * keyword (and must be `null` if there is no keyword). | 1173 * keyword (and must be `null` if there is no keyword). |
| 1173 */ | 1174 */ |
| 1174 BlockFunctionBodyImpl(this.keyword, this.star, Block block) { | 1175 BlockFunctionBodyImpl(this.keyword, this.star, BlockImpl block) { |
| 1175 _block = _becomeParentOf(block); | 1176 _block = _becomeParentOf(block); |
| 1176 } | 1177 } |
| 1177 | 1178 |
| 1178 @override | 1179 @override |
| 1179 Token get beginToken { | 1180 Token get beginToken { |
| 1180 if (keyword != null) { | 1181 if (keyword != null) { |
| 1181 return keyword; | 1182 return keyword; |
| 1182 } | 1183 } |
| 1183 return _block.beginToken; | 1184 return _block.beginToken; |
| 1184 } | 1185 } |
| 1185 | 1186 |
| 1186 @override | 1187 @override |
| 1187 Block get block => _block; | 1188 Block get block => _block; |
| 1188 | 1189 |
| 1189 @override | 1190 @override |
| 1190 void set block(Block block) { | 1191 void set block(Block block) { |
| 1191 _block = _becomeParentOf(block); | 1192 _block = _becomeParentOf(block as AstNodeImpl); |
| 1192 } | 1193 } |
| 1193 | 1194 |
| 1194 @override | 1195 @override |
| 1195 Iterable get childEntities => | 1196 Iterable get childEntities => |
| 1196 new ChildEntities()..add(keyword)..add(star)..add(_block); | 1197 new ChildEntities()..add(keyword)..add(star)..add(_block); |
| 1197 | 1198 |
| 1198 @override | 1199 @override |
| 1199 Token get endToken => _block.endToken; | 1200 Token get endToken => _block.endToken; |
| 1200 | 1201 |
| 1201 @override | 1202 @override |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 * invalid (e.g. trying to break to a switch case). | 1354 * invalid (e.g. trying to break to a switch case). |
| 1354 */ | 1355 */ |
| 1355 @override | 1356 @override |
| 1356 AstNode target; | 1357 AstNode target; |
| 1357 | 1358 |
| 1358 /** | 1359 /** |
| 1359 * Initialize a newly created break statement. The [label] can be `null` if | 1360 * Initialize a newly created break statement. The [label] can be `null` if |
| 1360 * there is no label associated with the statement. | 1361 * there is no label associated with the statement. |
| 1361 */ | 1362 */ |
| 1362 BreakStatementImpl( | 1363 BreakStatementImpl( |
| 1363 this.breakKeyword, SimpleIdentifier label, this.semicolon) { | 1364 this.breakKeyword, SimpleIdentifierImpl label, this.semicolon) { |
| 1364 _label = _becomeParentOf(label); | 1365 _label = _becomeParentOf(label); |
| 1365 } | 1366 } |
| 1366 | 1367 |
| 1367 @override | 1368 @override |
| 1368 Token get beginToken => breakKeyword; | 1369 Token get beginToken => breakKeyword; |
| 1369 | 1370 |
| 1370 @override | 1371 @override |
| 1371 Iterable get childEntities => | 1372 Iterable get childEntities => |
| 1372 new ChildEntities()..add(breakKeyword)..add(_label)..add(semicolon); | 1373 new ChildEntities()..add(breakKeyword)..add(_label)..add(semicolon); |
| 1373 | 1374 |
| 1374 @override | 1375 @override |
| 1375 Token get endToken => semicolon; | 1376 Token get endToken => semicolon; |
| 1376 | 1377 |
| 1377 @override | 1378 @override |
| 1378 SimpleIdentifier get label => _label; | 1379 SimpleIdentifier get label => _label; |
| 1379 | 1380 |
| 1380 @override | 1381 @override |
| 1381 void set label(SimpleIdentifier identifier) { | 1382 void set label(SimpleIdentifier identifier) { |
| 1382 _label = _becomeParentOf(identifier); | 1383 _label = _becomeParentOf(identifier as AstNodeImpl); |
| 1383 } | 1384 } |
| 1384 | 1385 |
| 1385 @override | 1386 @override |
| 1386 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 1387 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 1387 visitor.visitBreakStatement(this); | 1388 visitor.visitBreakStatement(this); |
| 1388 | 1389 |
| 1389 @override | 1390 @override |
| 1390 void visitChildren(AstVisitor visitor) { | 1391 void visitChildren(AstVisitor visitor) { |
| 1391 _label?.accept(visitor); | 1392 _label?.accept(visitor); |
| 1392 } | 1393 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1417 | 1418 |
| 1418 /** | 1419 /** |
| 1419 * The cascade sections sharing the common target. | 1420 * The cascade sections sharing the common target. |
| 1420 */ | 1421 */ |
| 1421 NodeList<Expression> _cascadeSections; | 1422 NodeList<Expression> _cascadeSections; |
| 1422 | 1423 |
| 1423 /** | 1424 /** |
| 1424 * Initialize a newly created cascade expression. The list of | 1425 * Initialize a newly created cascade expression. The list of |
| 1425 * [cascadeSections] must contain at least one element. | 1426 * [cascadeSections] must contain at least one element. |
| 1426 */ | 1427 */ |
| 1427 CascadeExpressionImpl(Expression target, List<Expression> cascadeSections) { | 1428 CascadeExpressionImpl( |
| 1429 ExpressionImpl target, List<Expression> cascadeSections) { |
| 1428 _target = _becomeParentOf(target); | 1430 _target = _becomeParentOf(target); |
| 1429 _cascadeSections = new NodeListImpl<Expression>(this, cascadeSections); | 1431 _cascadeSections = new NodeListImpl<Expression>(this, cascadeSections); |
| 1430 } | 1432 } |
| 1431 | 1433 |
| 1432 @override | 1434 @override |
| 1433 Token get beginToken => _target.beginToken; | 1435 Token get beginToken => _target.beginToken; |
| 1434 | 1436 |
| 1435 @override | 1437 @override |
| 1436 NodeList<Expression> get cascadeSections => _cascadeSections; | 1438 NodeList<Expression> get cascadeSections => _cascadeSections; |
| 1437 | 1439 |
| 1438 @override | 1440 @override |
| 1439 Iterable get childEntities => new ChildEntities() | 1441 Iterable get childEntities => new ChildEntities() |
| 1440 ..add(_target) | 1442 ..add(_target) |
| 1441 ..addAll(_cascadeSections); | 1443 ..addAll(_cascadeSections); |
| 1442 | 1444 |
| 1443 @override | 1445 @override |
| 1444 Token get endToken => _cascadeSections.endToken; | 1446 Token get endToken => _cascadeSections.endToken; |
| 1445 | 1447 |
| 1446 @override | 1448 @override |
| 1447 int get precedence => 2; | 1449 int get precedence => 2; |
| 1448 | 1450 |
| 1449 @override | 1451 @override |
| 1450 Expression get target => _target; | 1452 Expression get target => _target; |
| 1451 | 1453 |
| 1452 @override | 1454 @override |
| 1453 void set target(Expression target) { | 1455 void set target(Expression target) { |
| 1454 _target = _becomeParentOf(target); | 1456 _target = _becomeParentOf(target as AstNodeImpl); |
| 1455 } | 1457 } |
| 1456 | 1458 |
| 1457 @override | 1459 @override |
| 1458 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 1460 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 1459 visitor.visitCascadeExpression(this); | 1461 visitor.visitCascadeExpression(this); |
| 1460 | 1462 |
| 1461 @override | 1463 @override |
| 1462 void visitChildren(AstVisitor visitor) { | 1464 void visitChildren(AstVisitor visitor) { |
| 1463 _target?.accept(visitor); | 1465 _target?.accept(visitor); |
| 1464 _cascadeSections.accept(visitor); | 1466 _cascadeSections.accept(visitor); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 Block _body; | 1535 Block _body; |
| 1534 | 1536 |
| 1535 /** | 1537 /** |
| 1536 * Initialize a newly created catch clause. The [onKeyword] and | 1538 * Initialize a newly created catch clause. The [onKeyword] and |
| 1537 * [exceptionType] can be `null` if the clause will catch all exceptions. The | 1539 * [exceptionType] can be `null` if the clause will catch all exceptions. The |
| 1538 * [comma] and [stackTraceParameter] can be `null` if the stack trace | 1540 * [comma] and [stackTraceParameter] can be `null` if the stack trace |
| 1539 * parameter is not defined. | 1541 * parameter is not defined. |
| 1540 */ | 1542 */ |
| 1541 CatchClauseImpl( | 1543 CatchClauseImpl( |
| 1542 this.onKeyword, | 1544 this.onKeyword, |
| 1543 TypeName exceptionType, | 1545 TypeNameImpl exceptionType, |
| 1544 this.catchKeyword, | 1546 this.catchKeyword, |
| 1545 this.leftParenthesis, | 1547 this.leftParenthesis, |
| 1546 SimpleIdentifier exceptionParameter, | 1548 SimpleIdentifierImpl exceptionParameter, |
| 1547 this.comma, | 1549 this.comma, |
| 1548 SimpleIdentifier stackTraceParameter, | 1550 SimpleIdentifierImpl stackTraceParameter, |
| 1549 this.rightParenthesis, | 1551 this.rightParenthesis, |
| 1550 Block body) { | 1552 BlockImpl body) { |
| 1551 _exceptionType = _becomeParentOf(exceptionType); | 1553 _exceptionType = _becomeParentOf(exceptionType); |
| 1552 _exceptionParameter = _becomeParentOf(exceptionParameter); | 1554 _exceptionParameter = _becomeParentOf(exceptionParameter); |
| 1553 _stackTraceParameter = _becomeParentOf(stackTraceParameter); | 1555 _stackTraceParameter = _becomeParentOf(stackTraceParameter); |
| 1554 _body = _becomeParentOf(body); | 1556 _body = _becomeParentOf(body); |
| 1555 } | 1557 } |
| 1556 | 1558 |
| 1557 @override | 1559 @override |
| 1558 Token get beginToken { | 1560 Token get beginToken { |
| 1559 if (onKeyword != null) { | 1561 if (onKeyword != null) { |
| 1560 return onKeyword; | 1562 return onKeyword; |
| 1561 } | 1563 } |
| 1562 return catchKeyword; | 1564 return catchKeyword; |
| 1563 } | 1565 } |
| 1564 | 1566 |
| 1565 @override | 1567 @override |
| 1566 Block get body => _body; | 1568 Block get body => _body; |
| 1567 | 1569 |
| 1568 @override | 1570 @override |
| 1569 void set body(Block block) { | 1571 void set body(Block block) { |
| 1570 _body = _becomeParentOf(block); | 1572 _body = _becomeParentOf(block as AstNodeImpl); |
| 1571 } | 1573 } |
| 1572 | 1574 |
| 1573 @override | 1575 @override |
| 1574 Iterable get childEntities => new ChildEntities() | 1576 Iterable get childEntities => new ChildEntities() |
| 1575 ..add(onKeyword) | 1577 ..add(onKeyword) |
| 1576 ..add(_exceptionType) | 1578 ..add(_exceptionType) |
| 1577 ..add(catchKeyword) | 1579 ..add(catchKeyword) |
| 1578 ..add(leftParenthesis) | 1580 ..add(leftParenthesis) |
| 1579 ..add(_exceptionParameter) | 1581 ..add(_exceptionParameter) |
| 1580 ..add(comma) | 1582 ..add(comma) |
| 1581 ..add(_stackTraceParameter) | 1583 ..add(_stackTraceParameter) |
| 1582 ..add(rightParenthesis) | 1584 ..add(rightParenthesis) |
| 1583 ..add(_body); | 1585 ..add(_body); |
| 1584 | 1586 |
| 1585 @override | 1587 @override |
| 1586 Token get endToken => _body.endToken; | 1588 Token get endToken => _body.endToken; |
| 1587 | 1589 |
| 1588 @override | 1590 @override |
| 1589 SimpleIdentifier get exceptionParameter => _exceptionParameter; | 1591 SimpleIdentifier get exceptionParameter => _exceptionParameter; |
| 1590 | 1592 |
| 1591 @override | 1593 @override |
| 1592 void set exceptionParameter(SimpleIdentifier parameter) { | 1594 void set exceptionParameter(SimpleIdentifier parameter) { |
| 1593 _exceptionParameter = _becomeParentOf(parameter); | 1595 _exceptionParameter = _becomeParentOf(parameter as AstNodeImpl); |
| 1594 } | 1596 } |
| 1595 | 1597 |
| 1596 @override | 1598 @override |
| 1597 TypeName get exceptionType => _exceptionType; | 1599 TypeName get exceptionType => _exceptionType; |
| 1598 | 1600 |
| 1599 @override | 1601 @override |
| 1600 void set exceptionType(TypeName exceptionType) { | 1602 void set exceptionType(TypeName exceptionType) { |
| 1601 _exceptionType = _becomeParentOf(exceptionType); | 1603 _exceptionType = _becomeParentOf(exceptionType as AstNodeImpl); |
| 1602 } | 1604 } |
| 1603 | 1605 |
| 1604 @override | 1606 @override |
| 1605 SimpleIdentifier get stackTraceParameter => _stackTraceParameter; | 1607 SimpleIdentifier get stackTraceParameter => _stackTraceParameter; |
| 1606 | 1608 |
| 1607 @override | 1609 @override |
| 1608 void set stackTraceParameter(SimpleIdentifier parameter) { | 1610 void set stackTraceParameter(SimpleIdentifier parameter) { |
| 1609 _stackTraceParameter = _becomeParentOf(parameter); | 1611 _stackTraceParameter = _becomeParentOf(parameter as AstNodeImpl); |
| 1610 } | 1612 } |
| 1611 | 1613 |
| 1612 @override | 1614 @override |
| 1613 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 1615 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 1614 visitor.visitCatchClause(this); | 1616 visitor.visitCatchClause(this); |
| 1615 | 1617 |
| 1616 @override | 1618 @override |
| 1617 void visitChildren(AstVisitor visitor) { | 1619 void visitChildren(AstVisitor visitor) { |
| 1618 _exceptionType?.accept(visitor); | 1620 _exceptionType?.accept(visitor); |
| 1619 _exceptionParameter?.accept(visitor); | 1621 _exceptionParameter?.accept(visitor); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1732 * have any type parameters. Any or all of the [extendsClause], [withClause], | 1734 * have any type parameters. Any or all of the [extendsClause], [withClause], |
| 1733 * and [implementsClause] can be `null` if the class does not have the | 1735 * and [implementsClause] can be `null` if the class does not have the |
| 1734 * corresponding clause. The list of [members] can be `null` if the class does | 1736 * corresponding clause. The list of [members] can be `null` if the class does |
| 1735 * not have any members. | 1737 * not have any members. |
| 1736 */ | 1738 */ |
| 1737 ClassDeclarationImpl( | 1739 ClassDeclarationImpl( |
| 1738 Comment comment, | 1740 Comment comment, |
| 1739 List<Annotation> metadata, | 1741 List<Annotation> metadata, |
| 1740 this.abstractKeyword, | 1742 this.abstractKeyword, |
| 1741 this.classKeyword, | 1743 this.classKeyword, |
| 1742 SimpleIdentifier name, | 1744 SimpleIdentifierImpl name, |
| 1743 TypeParameterList typeParameters, | 1745 TypeParameterListImpl typeParameters, |
| 1744 ExtendsClause extendsClause, | 1746 ExtendsClauseImpl extendsClause, |
| 1745 WithClause withClause, | 1747 WithClauseImpl withClause, |
| 1746 ImplementsClause implementsClause, | 1748 ImplementsClauseImpl implementsClause, |
| 1747 this.leftBracket, | 1749 this.leftBracket, |
| 1748 List<ClassMember> members, | 1750 List<ClassMember> members, |
| 1749 this.rightBracket) | 1751 this.rightBracket) |
| 1750 : super(comment, metadata, name) { | 1752 : super(comment, metadata, name) { |
| 1751 _typeParameters = _becomeParentOf(typeParameters); | 1753 _typeParameters = _becomeParentOf(typeParameters); |
| 1752 _extendsClause = _becomeParentOf(extendsClause); | 1754 _extendsClause = _becomeParentOf(extendsClause); |
| 1753 _withClause = _becomeParentOf(withClause); | 1755 _withClause = _becomeParentOf(withClause); |
| 1754 _implementsClause = _becomeParentOf(implementsClause); | 1756 _implementsClause = _becomeParentOf(implementsClause); |
| 1755 _members = new NodeListImpl<ClassMember>(this, members); | 1757 _members = new NodeListImpl<ClassMember>(this, members); |
| 1756 } | 1758 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1773 ClassElement get element => _name?.staticElement as ClassElement; | 1775 ClassElement get element => _name?.staticElement as ClassElement; |
| 1774 | 1776 |
| 1775 @override | 1777 @override |
| 1776 Token get endToken => rightBracket; | 1778 Token get endToken => rightBracket; |
| 1777 | 1779 |
| 1778 @override | 1780 @override |
| 1779 ExtendsClause get extendsClause => _extendsClause; | 1781 ExtendsClause get extendsClause => _extendsClause; |
| 1780 | 1782 |
| 1781 @override | 1783 @override |
| 1782 void set extendsClause(ExtendsClause extendsClause) { | 1784 void set extendsClause(ExtendsClause extendsClause) { |
| 1783 _extendsClause = _becomeParentOf(extendsClause); | 1785 _extendsClause = _becomeParentOf(extendsClause as AstNodeImpl); |
| 1784 } | 1786 } |
| 1785 | 1787 |
| 1786 @override | 1788 @override |
| 1787 Token get firstTokenAfterCommentAndMetadata { | 1789 Token get firstTokenAfterCommentAndMetadata { |
| 1788 if (abstractKeyword != null) { | 1790 if (abstractKeyword != null) { |
| 1789 return abstractKeyword; | 1791 return abstractKeyword; |
| 1790 } | 1792 } |
| 1791 return classKeyword; | 1793 return classKeyword; |
| 1792 } | 1794 } |
| 1793 | 1795 |
| 1794 @override | 1796 @override |
| 1795 ImplementsClause get implementsClause => _implementsClause; | 1797 ImplementsClause get implementsClause => _implementsClause; |
| 1796 | 1798 |
| 1797 @override | 1799 @override |
| 1798 void set implementsClause(ImplementsClause implementsClause) { | 1800 void set implementsClause(ImplementsClause implementsClause) { |
| 1799 _implementsClause = _becomeParentOf(implementsClause); | 1801 _implementsClause = _becomeParentOf(implementsClause as AstNodeImpl); |
| 1800 } | 1802 } |
| 1801 | 1803 |
| 1802 @override | 1804 @override |
| 1803 bool get isAbstract => abstractKeyword != null; | 1805 bool get isAbstract => abstractKeyword != null; |
| 1804 | 1806 |
| 1805 @override | 1807 @override |
| 1806 NodeList<ClassMember> get members => _members; | 1808 NodeList<ClassMember> get members => _members; |
| 1807 | 1809 |
| 1808 @override | 1810 @override |
| 1809 NativeClause get nativeClause => _nativeClause; | 1811 NativeClause get nativeClause => _nativeClause; |
| 1810 | 1812 |
| 1811 @override | 1813 @override |
| 1812 void set nativeClause(NativeClause nativeClause) { | 1814 void set nativeClause(NativeClause nativeClause) { |
| 1813 _nativeClause = _becomeParentOf(nativeClause); | 1815 _nativeClause = _becomeParentOf(nativeClause as AstNodeImpl); |
| 1814 } | 1816 } |
| 1815 | 1817 |
| 1816 @override | 1818 @override |
| 1817 TypeParameterList get typeParameters => _typeParameters; | 1819 TypeParameterList get typeParameters => _typeParameters; |
| 1818 | 1820 |
| 1819 @override | 1821 @override |
| 1820 void set typeParameters(TypeParameterList typeParameters) { | 1822 void set typeParameters(TypeParameterList typeParameters) { |
| 1821 _typeParameters = _becomeParentOf(typeParameters); | 1823 _typeParameters = _becomeParentOf(typeParameters as AstNodeImpl); |
| 1822 } | 1824 } |
| 1823 | 1825 |
| 1824 @override | 1826 @override |
| 1825 WithClause get withClause => _withClause; | 1827 WithClause get withClause => _withClause; |
| 1826 | 1828 |
| 1827 @override | 1829 @override |
| 1828 void set withClause(WithClause withClause) { | 1830 void set withClause(WithClause withClause) { |
| 1829 _withClause = _becomeParentOf(withClause); | 1831 _withClause = _becomeParentOf(withClause as AstNodeImpl); |
| 1830 } | 1832 } |
| 1831 | 1833 |
| 1832 @override | 1834 @override |
| 1833 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 1835 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 1834 visitor.visitClassDeclaration(this); | 1836 visitor.visitClassDeclaration(this); |
| 1835 | 1837 |
| 1836 @override | 1838 @override |
| 1837 ConstructorDeclaration getConstructor(String name) { | 1839 ConstructorDeclaration getConstructor(String name) { |
| 1838 for (ClassMember classMember in _members) { | 1840 for (ClassMember classMember in _members) { |
| 1839 if (classMember is ConstructorDeclaration) { | 1841 if (classMember is ConstructorDeclaration) { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1955 | 1957 |
| 1956 /** | 1958 /** |
| 1957 * Initialize a newly created class type alias. Either or both of the | 1959 * Initialize a newly created class type alias. Either or both of the |
| 1958 * [comment] and [metadata] can be `null` if the class type alias does not | 1960 * [comment] and [metadata] can be `null` if the class type alias does not |
| 1959 * have the corresponding attribute. The [typeParameters] can be `null` if the | 1961 * have the corresponding attribute. The [typeParameters] can be `null` if the |
| 1960 * class does not have any type parameters. The [abstractKeyword] can be | 1962 * class does not have any type parameters. The [abstractKeyword] can be |
| 1961 * `null` if the class is not abstract. The [implementsClause] can be `null` | 1963 * `null` if the class is not abstract. The [implementsClause] can be `null` |
| 1962 * if the class does not implement any interfaces. | 1964 * if the class does not implement any interfaces. |
| 1963 */ | 1965 */ |
| 1964 ClassTypeAliasImpl( | 1966 ClassTypeAliasImpl( |
| 1965 Comment comment, | 1967 CommentImpl comment, |
| 1966 List<Annotation> metadata, | 1968 List<Annotation> metadata, |
| 1967 Token keyword, | 1969 Token keyword, |
| 1968 SimpleIdentifier name, | 1970 SimpleIdentifierImpl name, |
| 1969 TypeParameterList typeParameters, | 1971 TypeParameterListImpl typeParameters, |
| 1970 this.equals, | 1972 this.equals, |
| 1971 this.abstractKeyword, | 1973 this.abstractKeyword, |
| 1972 TypeName superclass, | 1974 TypeNameImpl superclass, |
| 1973 WithClause withClause, | 1975 WithClauseImpl withClause, |
| 1974 ImplementsClause implementsClause, | 1976 ImplementsClauseImpl implementsClause, |
| 1975 Token semicolon) | 1977 Token semicolon) |
| 1976 : super(comment, metadata, keyword, name, semicolon) { | 1978 : super(comment, metadata, keyword, name, semicolon) { |
| 1977 _typeParameters = _becomeParentOf(typeParameters); | 1979 _typeParameters = _becomeParentOf(typeParameters); |
| 1978 _superclass = _becomeParentOf(superclass); | 1980 _superclass = _becomeParentOf(superclass); |
| 1979 _withClause = _becomeParentOf(withClause); | 1981 _withClause = _becomeParentOf(withClause); |
| 1980 _implementsClause = _becomeParentOf(implementsClause); | 1982 _implementsClause = _becomeParentOf(implementsClause); |
| 1981 } | 1983 } |
| 1982 | 1984 |
| 1983 @override | 1985 @override |
| 1984 Iterable get childEntities => super._childEntities | 1986 Iterable get childEntities => super._childEntities |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2001 return abstractKeyword; | 2003 return abstractKeyword; |
| 2002 } | 2004 } |
| 2003 return typedefKeyword; | 2005 return typedefKeyword; |
| 2004 } | 2006 } |
| 2005 | 2007 |
| 2006 @override | 2008 @override |
| 2007 ImplementsClause get implementsClause => _implementsClause; | 2009 ImplementsClause get implementsClause => _implementsClause; |
| 2008 | 2010 |
| 2009 @override | 2011 @override |
| 2010 void set implementsClause(ImplementsClause implementsClause) { | 2012 void set implementsClause(ImplementsClause implementsClause) { |
| 2011 _implementsClause = _becomeParentOf(implementsClause); | 2013 _implementsClause = _becomeParentOf(implementsClause as AstNodeImpl); |
| 2012 } | 2014 } |
| 2013 | 2015 |
| 2014 @override | 2016 @override |
| 2015 bool get isAbstract => abstractKeyword != null; | 2017 bool get isAbstract => abstractKeyword != null; |
| 2016 | 2018 |
| 2017 @override | 2019 @override |
| 2018 TypeName get superclass => _superclass; | 2020 TypeName get superclass => _superclass; |
| 2019 | 2021 |
| 2020 @override | 2022 @override |
| 2021 void set superclass(TypeName superclass) { | 2023 void set superclass(TypeName superclass) { |
| 2022 _superclass = _becomeParentOf(superclass); | 2024 _superclass = _becomeParentOf(superclass as AstNodeImpl); |
| 2023 } | 2025 } |
| 2024 | 2026 |
| 2025 @override | 2027 @override |
| 2026 TypeParameterList get typeParameters => _typeParameters; | 2028 TypeParameterList get typeParameters => _typeParameters; |
| 2027 | 2029 |
| 2028 @override | 2030 @override |
| 2029 void set typeParameters(TypeParameterList typeParameters) { | 2031 void set typeParameters(TypeParameterList typeParameters) { |
| 2030 _typeParameters = _becomeParentOf(typeParameters); | 2032 _typeParameters = _becomeParentOf(typeParameters as AstNodeImpl); |
| 2031 } | 2033 } |
| 2032 | 2034 |
| 2033 @override | 2035 @override |
| 2034 WithClause get withClause => _withClause; | 2036 WithClause get withClause => _withClause; |
| 2035 | 2037 |
| 2036 @override | 2038 @override |
| 2037 void set withClause(WithClause withClause) { | 2039 void set withClause(WithClause withClause) { |
| 2038 _withClause = _becomeParentOf(withClause); | 2040 _withClause = _becomeParentOf(withClause as AstNodeImpl); |
| 2039 } | 2041 } |
| 2040 | 2042 |
| 2041 @override | 2043 @override |
| 2042 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 2044 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 2043 visitor.visitClassTypeAlias(this); | 2045 visitor.visitClassTypeAlias(this); |
| 2044 | 2046 |
| 2045 @override | 2047 @override |
| 2046 void visitChildren(AstVisitor visitor) { | 2048 void visitChildren(AstVisitor visitor) { |
| 2047 super.visitChildren(visitor); | 2049 super.visitChildren(visitor); |
| 2048 _name?.accept(visitor); | 2050 _name?.accept(visitor); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2198 | 2200 |
| 2199 /** | 2201 /** |
| 2200 * The identifier being referenced. | 2202 * The identifier being referenced. |
| 2201 */ | 2203 */ |
| 2202 Identifier _identifier; | 2204 Identifier _identifier; |
| 2203 | 2205 |
| 2204 /** | 2206 /** |
| 2205 * Initialize a newly created reference to a Dart element. The [newKeyword] | 2207 * Initialize a newly created reference to a Dart element. The [newKeyword] |
| 2206 * can be `null` if the reference is not to a constructor. | 2208 * can be `null` if the reference is not to a constructor. |
| 2207 */ | 2209 */ |
| 2208 CommentReferenceImpl(this.newKeyword, Identifier identifier) { | 2210 CommentReferenceImpl(this.newKeyword, IdentifierImpl identifier) { |
| 2209 _identifier = _becomeParentOf(identifier); | 2211 _identifier = _becomeParentOf(identifier); |
| 2210 } | 2212 } |
| 2211 | 2213 |
| 2212 @override | 2214 @override |
| 2213 Token get beginToken => _identifier.beginToken; | 2215 Token get beginToken => _identifier.beginToken; |
| 2214 | 2216 |
| 2215 @override | 2217 @override |
| 2216 Iterable get childEntities => | 2218 Iterable get childEntities => |
| 2217 new ChildEntities()..add(newKeyword)..add(_identifier); | 2219 new ChildEntities()..add(newKeyword)..add(_identifier); |
| 2218 | 2220 |
| 2219 @override | 2221 @override |
| 2220 Token get endToken => _identifier.endToken; | 2222 Token get endToken => _identifier.endToken; |
| 2221 | 2223 |
| 2222 @override | 2224 @override |
| 2223 Identifier get identifier => _identifier; | 2225 Identifier get identifier => _identifier; |
| 2224 | 2226 |
| 2225 @override | 2227 @override |
| 2226 void set identifier(Identifier identifier) { | 2228 void set identifier(Identifier identifier) { |
| 2227 _identifier = _becomeParentOf(identifier); | 2229 _identifier = _becomeParentOf(identifier as AstNodeImpl); |
| 2228 } | 2230 } |
| 2229 | 2231 |
| 2230 @override | 2232 @override |
| 2231 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 2233 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 2232 visitor.visitCommentReference(this); | 2234 visitor.visitCommentReference(this); |
| 2233 | 2235 |
| 2234 @override | 2236 @override |
| 2235 void visitChildren(AstVisitor visitor) { | 2237 void visitChildren(AstVisitor visitor) { |
| 2236 _identifier?.accept(visitor); | 2238 _identifier?.accept(visitor); |
| 2237 } | 2239 } |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2339 | 2341 |
| 2340 /** | 2342 /** |
| 2341 * Initialize a newly created compilation unit to have the given directives | 2343 * Initialize a newly created compilation unit to have the given directives |
| 2342 * and declarations. The [scriptTag] can be `null` if there is no script tag | 2344 * and declarations. The [scriptTag] can be `null` if there is no script tag |
| 2343 * in the compilation unit. The list of [directives] can be `null` if there | 2345 * in the compilation unit. The list of [directives] can be `null` if there |
| 2344 * are no directives in the compilation unit. The list of [declarations] can | 2346 * are no directives in the compilation unit. The list of [declarations] can |
| 2345 * be `null` if there are no declarations in the compilation unit. | 2347 * be `null` if there are no declarations in the compilation unit. |
| 2346 */ | 2348 */ |
| 2347 CompilationUnitImpl( | 2349 CompilationUnitImpl( |
| 2348 this.beginToken, | 2350 this.beginToken, |
| 2349 ScriptTag scriptTag, | 2351 ScriptTagImpl scriptTag, |
| 2350 List<Directive> directives, | 2352 List<Directive> directives, |
| 2351 List<CompilationUnitMember> declarations, | 2353 List<CompilationUnitMember> declarations, |
| 2352 this.endToken) { | 2354 this.endToken) { |
| 2353 _scriptTag = _becomeParentOf(scriptTag); | 2355 _scriptTag = _becomeParentOf(scriptTag); |
| 2354 _directives = new NodeListImpl<Directive>(this, directives); | 2356 _directives = new NodeListImpl<Directive>(this, directives); |
| 2355 _declarations = new NodeListImpl<CompilationUnitMember>(this, declarations); | 2357 _declarations = new NodeListImpl<CompilationUnitMember>(this, declarations); |
| 2356 } | 2358 } |
| 2357 | 2359 |
| 2358 @override | 2360 @override |
| 2359 Iterable get childEntities { | 2361 Iterable get childEntities { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 2382 } | 2384 } |
| 2383 | 2385 |
| 2384 @override | 2386 @override |
| 2385 int get offset => 0; | 2387 int get offset => 0; |
| 2386 | 2388 |
| 2387 @override | 2389 @override |
| 2388 ScriptTag get scriptTag => _scriptTag; | 2390 ScriptTag get scriptTag => _scriptTag; |
| 2389 | 2391 |
| 2390 @override | 2392 @override |
| 2391 void set scriptTag(ScriptTag scriptTag) { | 2393 void set scriptTag(ScriptTag scriptTag) { |
| 2392 _scriptTag = _becomeParentOf(scriptTag); | 2394 _scriptTag = _becomeParentOf(scriptTag as AstNodeImpl); |
| 2393 } | 2395 } |
| 2394 | 2396 |
| 2395 @override | 2397 @override |
| 2396 List<AstNode> get sortedDirectivesAndDeclarations { | 2398 List<AstNode> get sortedDirectivesAndDeclarations { |
| 2397 return <AstNode>[] | 2399 return <AstNode>[] |
| 2398 ..addAll(_directives) | 2400 ..addAll(_directives) |
| 2399 ..addAll(_declarations) | 2401 ..addAll(_declarations) |
| 2400 ..sort(AstNode.LEXICAL_ORDER); | 2402 ..sort(AstNode.LEXICAL_ORDER); |
| 2401 } | 2403 } |
| 2402 | 2404 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2485 Token colon; | 2487 Token colon; |
| 2486 | 2488 |
| 2487 /** | 2489 /** |
| 2488 * The expression that is executed if the condition evaluates to `false`. | 2490 * The expression that is executed if the condition evaluates to `false`. |
| 2489 */ | 2491 */ |
| 2490 Expression _elseExpression; | 2492 Expression _elseExpression; |
| 2491 | 2493 |
| 2492 /** | 2494 /** |
| 2493 * Initialize a newly created conditional expression. | 2495 * Initialize a newly created conditional expression. |
| 2494 */ | 2496 */ |
| 2495 ConditionalExpressionImpl(Expression condition, this.question, | 2497 ConditionalExpressionImpl( |
| 2496 Expression thenExpression, this.colon, Expression elseExpression) { | 2498 ExpressionImpl condition, |
| 2499 this.question, |
| 2500 ExpressionImpl thenExpression, |
| 2501 this.colon, |
| 2502 ExpressionImpl elseExpression) { |
| 2497 _condition = _becomeParentOf(condition); | 2503 _condition = _becomeParentOf(condition); |
| 2498 _thenExpression = _becomeParentOf(thenExpression); | 2504 _thenExpression = _becomeParentOf(thenExpression); |
| 2499 _elseExpression = _becomeParentOf(elseExpression); | 2505 _elseExpression = _becomeParentOf(elseExpression); |
| 2500 } | 2506 } |
| 2501 | 2507 |
| 2502 @override | 2508 @override |
| 2503 Token get beginToken => _condition.beginToken; | 2509 Token get beginToken => _condition.beginToken; |
| 2504 | 2510 |
| 2505 @override | 2511 @override |
| 2506 Iterable get childEntities => new ChildEntities() | 2512 Iterable get childEntities => new ChildEntities() |
| 2507 ..add(_condition) | 2513 ..add(_condition) |
| 2508 ..add(question) | 2514 ..add(question) |
| 2509 ..add(_thenExpression) | 2515 ..add(_thenExpression) |
| 2510 ..add(colon) | 2516 ..add(colon) |
| 2511 ..add(_elseExpression); | 2517 ..add(_elseExpression); |
| 2512 | 2518 |
| 2513 @override | 2519 @override |
| 2514 Expression get condition => _condition; | 2520 Expression get condition => _condition; |
| 2515 | 2521 |
| 2516 @override | 2522 @override |
| 2517 void set condition(Expression expression) { | 2523 void set condition(Expression expression) { |
| 2518 _condition = _becomeParentOf(expression); | 2524 _condition = _becomeParentOf(expression as AstNodeImpl); |
| 2519 } | 2525 } |
| 2520 | 2526 |
| 2521 @override | 2527 @override |
| 2522 Expression get elseExpression => _elseExpression; | 2528 Expression get elseExpression => _elseExpression; |
| 2523 | 2529 |
| 2524 @override | 2530 @override |
| 2525 void set elseExpression(Expression expression) { | 2531 void set elseExpression(Expression expression) { |
| 2526 _elseExpression = _becomeParentOf(expression); | 2532 _elseExpression = _becomeParentOf(expression as AstNodeImpl); |
| 2527 } | 2533 } |
| 2528 | 2534 |
| 2529 @override | 2535 @override |
| 2530 Token get endToken => _elseExpression.endToken; | 2536 Token get endToken => _elseExpression.endToken; |
| 2531 | 2537 |
| 2532 @override | 2538 @override |
| 2533 int get precedence => 3; | 2539 int get precedence => 3; |
| 2534 | 2540 |
| 2535 @override | 2541 @override |
| 2536 Expression get thenExpression => _thenExpression; | 2542 Expression get thenExpression => _thenExpression; |
| 2537 | 2543 |
| 2538 @override | 2544 @override |
| 2539 void set thenExpression(Expression expression) { | 2545 void set thenExpression(Expression expression) { |
| 2540 _thenExpression = _becomeParentOf(expression); | 2546 _thenExpression = _becomeParentOf(expression as AstNodeImpl); |
| 2541 } | 2547 } |
| 2542 | 2548 |
| 2543 @override | 2549 @override |
| 2544 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 2550 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 2545 visitor.visitConditionalExpression(this); | 2551 visitor.visitConditionalExpression(this); |
| 2546 | 2552 |
| 2547 @override | 2553 @override |
| 2548 void visitChildren(AstVisitor visitor) { | 2554 void visitChildren(AstVisitor visitor) { |
| 2549 _condition?.accept(visitor); | 2555 _condition?.accept(visitor); |
| 2550 _thenExpression?.accept(visitor); | 2556 _thenExpression?.accept(visitor); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 2573 @override | 2579 @override |
| 2574 Token equalToken; | 2580 Token equalToken; |
| 2575 StringLiteral _value; | 2581 StringLiteral _value; |
| 2576 @override | 2582 @override |
| 2577 Token rightParenthesis; | 2583 Token rightParenthesis; |
| 2578 StringLiteral _libraryUri; | 2584 StringLiteral _libraryUri; |
| 2579 | 2585 |
| 2580 ConfigurationImpl( | 2586 ConfigurationImpl( |
| 2581 this.ifKeyword, | 2587 this.ifKeyword, |
| 2582 this.leftParenthesis, | 2588 this.leftParenthesis, |
| 2583 DottedName name, | 2589 DottedNameImpl name, |
| 2584 this.equalToken, | 2590 this.equalToken, |
| 2585 StringLiteral value, | 2591 StringLiteralImpl value, |
| 2586 this.rightParenthesis, | 2592 this.rightParenthesis, |
| 2587 StringLiteral libraryUri) { | 2593 StringLiteralImpl libraryUri) { |
| 2588 _name = _becomeParentOf(name); | 2594 _name = _becomeParentOf(name); |
| 2589 _value = _becomeParentOf(value); | 2595 _value = _becomeParentOf(value); |
| 2590 _libraryUri = _becomeParentOf(libraryUri); | 2596 _libraryUri = _becomeParentOf(libraryUri); |
| 2591 } | 2597 } |
| 2592 | 2598 |
| 2593 @override | 2599 @override |
| 2594 Token get beginToken => ifKeyword; | 2600 Token get beginToken => ifKeyword; |
| 2595 | 2601 |
| 2596 @override | 2602 @override |
| 2597 Iterable get childEntities => new ChildEntities() | 2603 Iterable get childEntities => new ChildEntities() |
| 2598 ..add(ifKeyword) | 2604 ..add(ifKeyword) |
| 2599 ..add(leftParenthesis) | 2605 ..add(leftParenthesis) |
| 2600 ..add(_name) | 2606 ..add(_name) |
| 2601 ..add(equalToken) | 2607 ..add(equalToken) |
| 2602 ..add(_value) | 2608 ..add(_value) |
| 2603 ..add(rightParenthesis) | 2609 ..add(rightParenthesis) |
| 2604 ..add(_libraryUri); | 2610 ..add(_libraryUri); |
| 2605 | 2611 |
| 2606 @override | 2612 @override |
| 2607 Token get endToken => _libraryUri.endToken; | 2613 Token get endToken => _libraryUri.endToken; |
| 2608 | 2614 |
| 2609 @override | 2615 @override |
| 2610 StringLiteral get libraryUri => _libraryUri; | 2616 StringLiteral get libraryUri => _libraryUri; |
| 2611 | 2617 |
| 2612 @override | 2618 @override |
| 2613 void set libraryUri(StringLiteral libraryUri) { | 2619 void set libraryUri(StringLiteral libraryUri) { |
| 2614 _libraryUri = _becomeParentOf(libraryUri); | 2620 _libraryUri = _becomeParentOf(libraryUri as AstNodeImpl); |
| 2615 } | 2621 } |
| 2616 | 2622 |
| 2617 @override | 2623 @override |
| 2618 DottedName get name => _name; | 2624 DottedName get name => _name; |
| 2619 | 2625 |
| 2620 @override | 2626 @override |
| 2621 void set name(DottedName name) { | 2627 void set name(DottedName name) { |
| 2622 _name = _becomeParentOf(name); | 2628 _name = _becomeParentOf(name as AstNodeImpl); |
| 2623 } | 2629 } |
| 2624 | 2630 |
| 2625 @override | 2631 @override |
| 2626 StringLiteral get value => _value; | 2632 StringLiteral get value => _value; |
| 2627 | 2633 |
| 2628 @override | 2634 @override |
| 2629 void set value(StringLiteral value) { | 2635 void set value(StringLiteral value) { |
| 2630 _value = _becomeParentOf(value); | 2636 _value = _becomeParentOf(value as AstNodeImpl); |
| 2631 } | 2637 } |
| 2632 | 2638 |
| 2633 @override | 2639 @override |
| 2634 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 2640 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 2635 visitor.visitConfiguration(this); | 2641 visitor.visitConfiguration(this); |
| 2636 | 2642 |
| 2637 @override | 2643 @override |
| 2638 void visitChildren(AstVisitor visitor) { | 2644 void visitChildren(AstVisitor visitor) { |
| 2639 _name?.accept(visitor); | 2645 _name?.accept(visitor); |
| 2640 _value?.accept(visitor); | 2646 _value?.accept(visitor); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2752 * be `null` if the constructor is not a factory. The [period] and [name] can | 2758 * be `null` if the constructor is not a factory. The [period] and [name] can |
| 2753 * both be `null` if the constructor is not a named constructor. The | 2759 * both be `null` if the constructor is not a named constructor. The |
| 2754 * [separator] can be `null` if the constructor does not have any initializers | 2760 * [separator] can be `null` if the constructor does not have any initializers |
| 2755 * and does not redirect to a different constructor. The list of | 2761 * and does not redirect to a different constructor. The list of |
| 2756 * [initializers] can be `null` if the constructor does not have any | 2762 * [initializers] can be `null` if the constructor does not have any |
| 2757 * initializers. The [redirectedConstructor] can be `null` if the constructor | 2763 * initializers. The [redirectedConstructor] can be `null` if the constructor |
| 2758 * does not redirect to a different constructor. The [body] can be `null` if | 2764 * does not redirect to a different constructor. The [body] can be `null` if |
| 2759 * the constructor does not have a body. | 2765 * the constructor does not have a body. |
| 2760 */ | 2766 */ |
| 2761 ConstructorDeclarationImpl( | 2767 ConstructorDeclarationImpl( |
| 2762 Comment comment, | 2768 CommentImpl comment, |
| 2763 List<Annotation> metadata, | 2769 List<Annotation> metadata, |
| 2764 this.externalKeyword, | 2770 this.externalKeyword, |
| 2765 this.constKeyword, | 2771 this.constKeyword, |
| 2766 this.factoryKeyword, | 2772 this.factoryKeyword, |
| 2767 Identifier returnType, | 2773 IdentifierImpl returnType, |
| 2768 this.period, | 2774 this.period, |
| 2769 SimpleIdentifier name, | 2775 SimpleIdentifierImpl name, |
| 2770 FormalParameterList parameters, | 2776 FormalParameterListImpl parameters, |
| 2771 this.separator, | 2777 this.separator, |
| 2772 List<ConstructorInitializer> initializers, | 2778 List<ConstructorInitializer> initializers, |
| 2773 ConstructorName redirectedConstructor, | 2779 ConstructorNameImpl redirectedConstructor, |
| 2774 FunctionBody body) | 2780 FunctionBodyImpl body) |
| 2775 : super(comment, metadata) { | 2781 : super(comment, metadata) { |
| 2776 _returnType = _becomeParentOf(returnType); | 2782 _returnType = _becomeParentOf(returnType); |
| 2777 _name = _becomeParentOf(name); | 2783 _name = _becomeParentOf(name); |
| 2778 _parameters = _becomeParentOf(parameters); | 2784 _parameters = _becomeParentOf(parameters); |
| 2779 _initializers = | 2785 _initializers = |
| 2780 new NodeListImpl<ConstructorInitializer>(this, initializers); | 2786 new NodeListImpl<ConstructorInitializer>(this, initializers); |
| 2781 _redirectedConstructor = _becomeParentOf(redirectedConstructor); | 2787 _redirectedConstructor = _becomeParentOf(redirectedConstructor); |
| 2782 _body = _becomeParentOf(body); | 2788 _body = _becomeParentOf(body); |
| 2783 } | 2789 } |
| 2784 | 2790 |
| 2785 @override | 2791 @override |
| 2786 FunctionBody get body => _body; | 2792 FunctionBody get body => _body; |
| 2787 | 2793 |
| 2788 @override | 2794 @override |
| 2789 void set body(FunctionBody functionBody) { | 2795 void set body(FunctionBody functionBody) { |
| 2790 _body = _becomeParentOf(functionBody); | 2796 _body = _becomeParentOf(functionBody as AstNodeImpl); |
| 2791 } | 2797 } |
| 2792 | 2798 |
| 2793 @override | 2799 @override |
| 2794 Iterable get childEntities => super._childEntities | 2800 Iterable get childEntities => super._childEntities |
| 2795 ..add(externalKeyword) | 2801 ..add(externalKeyword) |
| 2796 ..add(constKeyword) | 2802 ..add(constKeyword) |
| 2797 ..add(factoryKeyword) | 2803 ..add(factoryKeyword) |
| 2798 ..add(_returnType) | 2804 ..add(_returnType) |
| 2799 ..add(period) | 2805 ..add(period) |
| 2800 ..add(_name) | 2806 ..add(_name) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2825 } | 2831 } |
| 2826 | 2832 |
| 2827 @override | 2833 @override |
| 2828 NodeList<ConstructorInitializer> get initializers => _initializers; | 2834 NodeList<ConstructorInitializer> get initializers => _initializers; |
| 2829 | 2835 |
| 2830 @override | 2836 @override |
| 2831 SimpleIdentifier get name => _name; | 2837 SimpleIdentifier get name => _name; |
| 2832 | 2838 |
| 2833 @override | 2839 @override |
| 2834 void set name(SimpleIdentifier identifier) { | 2840 void set name(SimpleIdentifier identifier) { |
| 2835 _name = _becomeParentOf(identifier); | 2841 _name = _becomeParentOf(identifier as AstNodeImpl); |
| 2836 } | 2842 } |
| 2837 | 2843 |
| 2838 @override | 2844 @override |
| 2839 FormalParameterList get parameters => _parameters; | 2845 FormalParameterList get parameters => _parameters; |
| 2840 | 2846 |
| 2841 @override | 2847 @override |
| 2842 void set parameters(FormalParameterList parameters) { | 2848 void set parameters(FormalParameterList parameters) { |
| 2843 _parameters = _becomeParentOf(parameters); | 2849 _parameters = _becomeParentOf(parameters as AstNodeImpl); |
| 2844 } | 2850 } |
| 2845 | 2851 |
| 2846 @override | 2852 @override |
| 2847 ConstructorName get redirectedConstructor => _redirectedConstructor; | 2853 ConstructorName get redirectedConstructor => _redirectedConstructor; |
| 2848 | 2854 |
| 2849 @override | 2855 @override |
| 2850 void set redirectedConstructor(ConstructorName redirectedConstructor) { | 2856 void set redirectedConstructor(ConstructorName redirectedConstructor) { |
| 2851 _redirectedConstructor = _becomeParentOf(redirectedConstructor); | 2857 _redirectedConstructor = |
| 2858 _becomeParentOf(redirectedConstructor as AstNodeImpl); |
| 2852 } | 2859 } |
| 2853 | 2860 |
| 2854 @override | 2861 @override |
| 2855 Identifier get returnType => _returnType; | 2862 Identifier get returnType => _returnType; |
| 2856 | 2863 |
| 2857 @override | 2864 @override |
| 2858 void set returnType(Identifier typeName) { | 2865 void set returnType(Identifier typeName) { |
| 2859 _returnType = _becomeParentOf(typeName); | 2866 _returnType = _becomeParentOf(typeName as AstNodeImpl); |
| 2860 } | 2867 } |
| 2861 | 2868 |
| 2862 @override | 2869 @override |
| 2863 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 2870 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 2864 visitor.visitConstructorDeclaration(this); | 2871 visitor.visitConstructorDeclaration(this); |
| 2865 | 2872 |
| 2866 @override | 2873 @override |
| 2867 void visitChildren(AstVisitor visitor) { | 2874 void visitChildren(AstVisitor visitor) { |
| 2868 super.visitChildren(visitor); | 2875 super.visitChildren(visitor); |
| 2869 _returnType?.accept(visitor); | 2876 _returnType?.accept(visitor); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2911 * The expression computing the value to which the field will be initialized. | 2918 * The expression computing the value to which the field will be initialized. |
| 2912 */ | 2919 */ |
| 2913 Expression _expression; | 2920 Expression _expression; |
| 2914 | 2921 |
| 2915 /** | 2922 /** |
| 2916 * Initialize a newly created field initializer to initialize the field with | 2923 * Initialize a newly created field initializer to initialize the field with |
| 2917 * the given name to the value of the given expression. The [thisKeyword] and | 2924 * the given name to the value of the given expression. The [thisKeyword] and |
| 2918 * [period] can be `null` if the 'this' keyword was not specified. | 2925 * [period] can be `null` if the 'this' keyword was not specified. |
| 2919 */ | 2926 */ |
| 2920 ConstructorFieldInitializerImpl(this.thisKeyword, this.period, | 2927 ConstructorFieldInitializerImpl(this.thisKeyword, this.period, |
| 2921 SimpleIdentifier fieldName, this.equals, Expression expression) { | 2928 SimpleIdentifierImpl fieldName, this.equals, ExpressionImpl expression) { |
| 2922 _fieldName = _becomeParentOf(fieldName); | 2929 _fieldName = _becomeParentOf(fieldName); |
| 2923 _expression = _becomeParentOf(expression); | 2930 _expression = _becomeParentOf(expression); |
| 2924 } | 2931 } |
| 2925 | 2932 |
| 2926 @override | 2933 @override |
| 2927 Token get beginToken { | 2934 Token get beginToken { |
| 2928 if (thisKeyword != null) { | 2935 if (thisKeyword != null) { |
| 2929 return thisKeyword; | 2936 return thisKeyword; |
| 2930 } | 2937 } |
| 2931 return _fieldName.beginToken; | 2938 return _fieldName.beginToken; |
| 2932 } | 2939 } |
| 2933 | 2940 |
| 2934 @override | 2941 @override |
| 2935 Iterable get childEntities => new ChildEntities() | 2942 Iterable get childEntities => new ChildEntities() |
| 2936 ..add(thisKeyword) | 2943 ..add(thisKeyword) |
| 2937 ..add(period) | 2944 ..add(period) |
| 2938 ..add(_fieldName) | 2945 ..add(_fieldName) |
| 2939 ..add(equals) | 2946 ..add(equals) |
| 2940 ..add(_expression); | 2947 ..add(_expression); |
| 2941 | 2948 |
| 2942 @override | 2949 @override |
| 2943 Token get endToken => _expression.endToken; | 2950 Token get endToken => _expression.endToken; |
| 2944 | 2951 |
| 2945 @override | 2952 @override |
| 2946 Expression get expression => _expression; | 2953 Expression get expression => _expression; |
| 2947 | 2954 |
| 2948 @override | 2955 @override |
| 2949 void set expression(Expression expression) { | 2956 void set expression(Expression expression) { |
| 2950 _expression = _becomeParentOf(expression); | 2957 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 2951 } | 2958 } |
| 2952 | 2959 |
| 2953 @override | 2960 @override |
| 2954 SimpleIdentifier get fieldName => _fieldName; | 2961 SimpleIdentifier get fieldName => _fieldName; |
| 2955 | 2962 |
| 2956 @override | 2963 @override |
| 2957 void set fieldName(SimpleIdentifier identifier) { | 2964 void set fieldName(SimpleIdentifier identifier) { |
| 2958 _fieldName = _becomeParentOf(identifier); | 2965 _fieldName = _becomeParentOf(identifier as AstNodeImpl); |
| 2959 } | 2966 } |
| 2960 | 2967 |
| 2961 @override | 2968 @override |
| 2962 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 2969 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 2963 visitor.visitConstructorFieldInitializer(this); | 2970 visitor.visitConstructorFieldInitializer(this); |
| 2964 | 2971 |
| 2965 @override | 2972 @override |
| 2966 void visitChildren(AstVisitor visitor) { | 2973 void visitChildren(AstVisitor visitor) { |
| 2967 _fieldName?.accept(visitor); | 2974 _fieldName?.accept(visitor); |
| 2968 _expression?.accept(visitor); | 2975 _expression?.accept(visitor); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3010 * information, or `null` if the AST structure has not been resolved or if | 3017 * information, or `null` if the AST structure has not been resolved or if |
| 3011 * this constructor name could not be resolved. | 3018 * this constructor name could not be resolved. |
| 3012 */ | 3019 */ |
| 3013 @override | 3020 @override |
| 3014 ConstructorElement staticElement; | 3021 ConstructorElement staticElement; |
| 3015 | 3022 |
| 3016 /** | 3023 /** |
| 3017 * Initialize a newly created constructor name. The [period] and [name] can be | 3024 * Initialize a newly created constructor name. The [period] and [name] can be |
| 3018 * `null` if the constructor being named is the unnamed constructor. | 3025 * `null` if the constructor being named is the unnamed constructor. |
| 3019 */ | 3026 */ |
| 3020 ConstructorNameImpl(TypeName type, this.period, SimpleIdentifier name) { | 3027 ConstructorNameImpl( |
| 3028 TypeNameImpl type, this.period, SimpleIdentifierImpl name) { |
| 3021 _type = _becomeParentOf(type); | 3029 _type = _becomeParentOf(type); |
| 3022 _name = _becomeParentOf(name); | 3030 _name = _becomeParentOf(name); |
| 3023 } | 3031 } |
| 3024 | 3032 |
| 3025 @override | 3033 @override |
| 3026 Token get beginToken => _type.beginToken; | 3034 Token get beginToken => _type.beginToken; |
| 3027 | 3035 |
| 3028 @override | 3036 @override |
| 3029 Iterable get childEntities => | 3037 Iterable get childEntities => |
| 3030 new ChildEntities()..add(_type)..add(period)..add(_name); | 3038 new ChildEntities()..add(_type)..add(period)..add(_name); |
| 3031 | 3039 |
| 3032 @override | 3040 @override |
| 3033 Token get endToken { | 3041 Token get endToken { |
| 3034 if (_name != null) { | 3042 if (_name != null) { |
| 3035 return _name.endToken; | 3043 return _name.endToken; |
| 3036 } | 3044 } |
| 3037 return _type.endToken; | 3045 return _type.endToken; |
| 3038 } | 3046 } |
| 3039 | 3047 |
| 3040 @override | 3048 @override |
| 3041 SimpleIdentifier get name => _name; | 3049 SimpleIdentifier get name => _name; |
| 3042 | 3050 |
| 3043 @override | 3051 @override |
| 3044 void set name(SimpleIdentifier name) { | 3052 void set name(SimpleIdentifier name) { |
| 3045 _name = _becomeParentOf(name); | 3053 _name = _becomeParentOf(name as AstNodeImpl); |
| 3046 } | 3054 } |
| 3047 | 3055 |
| 3048 @override | 3056 @override |
| 3049 TypeName get type => _type; | 3057 TypeName get type => _type; |
| 3050 | 3058 |
| 3051 @override | 3059 @override |
| 3052 void set type(TypeName type) { | 3060 void set type(TypeName type) { |
| 3053 _type = _becomeParentOf(type); | 3061 _type = _becomeParentOf(type as AstNodeImpl); |
| 3054 } | 3062 } |
| 3055 | 3063 |
| 3056 @override | 3064 @override |
| 3057 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 3065 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 3058 visitor.visitConstructorName(this); | 3066 visitor.visitConstructorName(this); |
| 3059 | 3067 |
| 3060 @override | 3068 @override |
| 3061 void visitChildren(AstVisitor visitor) { | 3069 void visitChildren(AstVisitor visitor) { |
| 3062 _type?.accept(visitor); | 3070 _type?.accept(visitor); |
| 3063 _name?.accept(visitor); | 3071 _name?.accept(visitor); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3096 * Note that if the source code has errors, the target may be invalid (e.g. | 3104 * Note that if the source code has errors, the target may be invalid (e.g. |
| 3097 * the target may be in an enclosing function). | 3105 * the target may be in an enclosing function). |
| 3098 */ | 3106 */ |
| 3099 AstNode target; | 3107 AstNode target; |
| 3100 | 3108 |
| 3101 /** | 3109 /** |
| 3102 * Initialize a newly created continue statement. The [label] can be `null` if | 3110 * Initialize a newly created continue statement. The [label] can be `null` if |
| 3103 * there is no label associated with the statement. | 3111 * there is no label associated with the statement. |
| 3104 */ | 3112 */ |
| 3105 ContinueStatementImpl( | 3113 ContinueStatementImpl( |
| 3106 this.continueKeyword, SimpleIdentifier label, this.semicolon) { | 3114 this.continueKeyword, SimpleIdentifierImpl label, this.semicolon) { |
| 3107 _label = _becomeParentOf(label); | 3115 _label = _becomeParentOf(label); |
| 3108 } | 3116 } |
| 3109 | 3117 |
| 3110 @override | 3118 @override |
| 3111 Token get beginToken => continueKeyword; | 3119 Token get beginToken => continueKeyword; |
| 3112 | 3120 |
| 3113 @override | 3121 @override |
| 3114 Iterable get childEntities => | 3122 Iterable get childEntities => |
| 3115 new ChildEntities()..add(continueKeyword)..add(_label)..add(semicolon); | 3123 new ChildEntities()..add(continueKeyword)..add(_label)..add(semicolon); |
| 3116 | 3124 |
| 3117 @override | 3125 @override |
| 3118 Token get endToken => semicolon; | 3126 Token get endToken => semicolon; |
| 3119 | 3127 |
| 3120 @override | 3128 @override |
| 3121 SimpleIdentifier get label => _label; | 3129 SimpleIdentifier get label => _label; |
| 3122 | 3130 |
| 3123 @override | 3131 @override |
| 3124 void set label(SimpleIdentifier identifier) { | 3132 void set label(SimpleIdentifier identifier) { |
| 3125 _label = _becomeParentOf(identifier); | 3133 _label = _becomeParentOf(identifier as AstNodeImpl); |
| 3126 } | 3134 } |
| 3127 | 3135 |
| 3128 @override | 3136 @override |
| 3129 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 3137 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 3130 visitor.visitContinueStatement(this); | 3138 visitor.visitContinueStatement(this); |
| 3131 | 3139 |
| 3132 @override | 3140 @override |
| 3133 void visitChildren(AstVisitor visitor) { | 3141 void visitChildren(AstVisitor visitor) { |
| 3134 _label?.accept(visitor); | 3142 _label?.accept(visitor); |
| 3135 } | 3143 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3175 * The name of the variable being declared. | 3183 * The name of the variable being declared. |
| 3176 */ | 3184 */ |
| 3177 SimpleIdentifier _identifier; | 3185 SimpleIdentifier _identifier; |
| 3178 | 3186 |
| 3179 /** | 3187 /** |
| 3180 * Initialize a newly created formal parameter. Either or both of the | 3188 * Initialize a newly created formal parameter. Either or both of the |
| 3181 * [comment] and [metadata] can be `null` if the declaration does not have the | 3189 * [comment] and [metadata] can be `null` if the declaration does not have the |
| 3182 * corresponding attribute. The [keyword] can be `null` if a type name is | 3190 * corresponding attribute. The [keyword] can be `null` if a type name is |
| 3183 * given. The [type] must be `null` if the keyword is 'var'. | 3191 * given. The [type] must be `null` if the keyword is 'var'. |
| 3184 */ | 3192 */ |
| 3185 DeclaredIdentifierImpl(Comment comment, List<Annotation> metadata, | 3193 DeclaredIdentifierImpl(CommentImpl comment, List<Annotation> metadata, |
| 3186 this.keyword, TypeName type, SimpleIdentifier identifier) | 3194 this.keyword, TypeNameImpl type, SimpleIdentifierImpl identifier) |
| 3187 : super(comment, metadata) { | 3195 : super(comment, metadata) { |
| 3188 _type = _becomeParentOf(type); | 3196 _type = _becomeParentOf(type); |
| 3189 _identifier = _becomeParentOf(identifier); | 3197 _identifier = _becomeParentOf(identifier); |
| 3190 } | 3198 } |
| 3191 | 3199 |
| 3192 @override | 3200 @override |
| 3193 Iterable get childEntities => | 3201 Iterable get childEntities => |
| 3194 super._childEntities..add(keyword)..add(_type)..add(_identifier); | 3202 super._childEntities..add(keyword)..add(_type)..add(_identifier); |
| 3195 | 3203 |
| 3196 @override | 3204 @override |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3212 return _type.beginToken; | 3220 return _type.beginToken; |
| 3213 } | 3221 } |
| 3214 return _identifier.beginToken; | 3222 return _identifier.beginToken; |
| 3215 } | 3223 } |
| 3216 | 3224 |
| 3217 @override | 3225 @override |
| 3218 SimpleIdentifier get identifier => _identifier; | 3226 SimpleIdentifier get identifier => _identifier; |
| 3219 | 3227 |
| 3220 @override | 3228 @override |
| 3221 void set identifier(SimpleIdentifier identifier) { | 3229 void set identifier(SimpleIdentifier identifier) { |
| 3222 _identifier = _becomeParentOf(identifier); | 3230 _identifier = _becomeParentOf(identifier as AstNodeImpl); |
| 3223 } | 3231 } |
| 3224 | 3232 |
| 3225 @override | 3233 @override |
| 3226 bool get isConst => keyword?.keyword == Keyword.CONST; | 3234 bool get isConst => keyword?.keyword == Keyword.CONST; |
| 3227 | 3235 |
| 3228 @override | 3236 @override |
| 3229 bool get isFinal => keyword?.keyword == Keyword.FINAL; | 3237 bool get isFinal => keyword?.keyword == Keyword.FINAL; |
| 3230 | 3238 |
| 3231 @override | 3239 @override |
| 3232 TypeName get type => _type; | 3240 TypeName get type => _type; |
| 3233 | 3241 |
| 3234 @override | 3242 @override |
| 3235 void set type(TypeName typeName) { | 3243 void set type(TypeName typeName) { |
| 3236 _type = _becomeParentOf(typeName); | 3244 _type = _becomeParentOf(typeName as AstNodeImpl); |
| 3237 } | 3245 } |
| 3238 | 3246 |
| 3239 @override | 3247 @override |
| 3240 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 3248 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 3241 visitor.visitDeclaredIdentifier(this); | 3249 visitor.visitDeclaredIdentifier(this); |
| 3242 | 3250 |
| 3243 @override | 3251 @override |
| 3244 void visitChildren(AstVisitor visitor) { | 3252 void visitChildren(AstVisitor visitor) { |
| 3245 super.visitChildren(visitor); | 3253 super.visitChildren(visitor); |
| 3246 _type?.accept(visitor); | 3254 _type?.accept(visitor); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3300 /** | 3308 /** |
| 3301 * The expression computing the default value for the parameter, or `null` if | 3309 * The expression computing the default value for the parameter, or `null` if |
| 3302 * there is no default value. | 3310 * there is no default value. |
| 3303 */ | 3311 */ |
| 3304 Expression _defaultValue; | 3312 Expression _defaultValue; |
| 3305 | 3313 |
| 3306 /** | 3314 /** |
| 3307 * Initialize a newly created default formal parameter. The [separator] and | 3315 * Initialize a newly created default formal parameter. The [separator] and |
| 3308 * [defaultValue] can be `null` if there is no default value. | 3316 * [defaultValue] can be `null` if there is no default value. |
| 3309 */ | 3317 */ |
| 3310 DefaultFormalParameterImpl(NormalFormalParameter parameter, this.kind, | 3318 DefaultFormalParameterImpl(NormalFormalParameterImpl parameter, this.kind, |
| 3311 this.separator, Expression defaultValue) { | 3319 this.separator, ExpressionImpl defaultValue) { |
| 3312 _parameter = _becomeParentOf(parameter); | 3320 _parameter = _becomeParentOf(parameter); |
| 3313 _defaultValue = _becomeParentOf(defaultValue); | 3321 _defaultValue = _becomeParentOf(defaultValue); |
| 3314 } | 3322 } |
| 3315 | 3323 |
| 3316 @override | 3324 @override |
| 3317 Token get beginToken => _parameter.beginToken; | 3325 Token get beginToken => _parameter.beginToken; |
| 3318 | 3326 |
| 3319 @override | 3327 @override |
| 3320 Iterable get childEntities => | 3328 Iterable get childEntities => |
| 3321 new ChildEntities()..add(_parameter)..add(separator)..add(_defaultValue); | 3329 new ChildEntities()..add(_parameter)..add(separator)..add(_defaultValue); |
| 3322 | 3330 |
| 3323 @override | 3331 @override |
| 3324 Expression get defaultValue => _defaultValue; | 3332 Expression get defaultValue => _defaultValue; |
| 3325 | 3333 |
| 3326 @override | 3334 @override |
| 3327 void set defaultValue(Expression expression) { | 3335 void set defaultValue(Expression expression) { |
| 3328 _defaultValue = _becomeParentOf(expression); | 3336 _defaultValue = _becomeParentOf(expression as AstNodeImpl); |
| 3329 } | 3337 } |
| 3330 | 3338 |
| 3331 @override | 3339 @override |
| 3332 Token get endToken { | 3340 Token get endToken { |
| 3333 if (_defaultValue != null) { | 3341 if (_defaultValue != null) { |
| 3334 return _defaultValue.endToken; | 3342 return _defaultValue.endToken; |
| 3335 } | 3343 } |
| 3336 return _parameter.endToken; | 3344 return _parameter.endToken; |
| 3337 } | 3345 } |
| 3338 | 3346 |
| 3339 @override | 3347 @override |
| 3340 SimpleIdentifier get identifier => _parameter.identifier; | 3348 SimpleIdentifier get identifier => _parameter.identifier; |
| 3341 | 3349 |
| 3342 @override | 3350 @override |
| 3343 bool get isConst => _parameter != null && _parameter.isConst; | 3351 bool get isConst => _parameter != null && _parameter.isConst; |
| 3344 | 3352 |
| 3345 @override | 3353 @override |
| 3346 bool get isFinal => _parameter != null && _parameter.isFinal; | 3354 bool get isFinal => _parameter != null && _parameter.isFinal; |
| 3347 | 3355 |
| 3348 @override | 3356 @override |
| 3349 NodeList<Annotation> get metadata => _parameter.metadata; | 3357 NodeList<Annotation> get metadata => _parameter.metadata; |
| 3350 | 3358 |
| 3351 @override | 3359 @override |
| 3352 NormalFormalParameter get parameter => _parameter; | 3360 NormalFormalParameter get parameter => _parameter; |
| 3353 | 3361 |
| 3354 @override | 3362 @override |
| 3355 void set parameter(NormalFormalParameter formalParameter) { | 3363 void set parameter(NormalFormalParameter formalParameter) { |
| 3356 _parameter = _becomeParentOf(formalParameter); | 3364 _parameter = _becomeParentOf(formalParameter as AstNodeImpl); |
| 3357 } | 3365 } |
| 3358 | 3366 |
| 3359 @override | 3367 @override |
| 3360 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 3368 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 3361 visitor.visitDefaultFormalParameter(this); | 3369 visitor.visitDefaultFormalParameter(this); |
| 3362 | 3370 |
| 3363 @override | 3371 @override |
| 3364 void visitChildren(AstVisitor visitor) { | 3372 void visitChildren(AstVisitor visitor) { |
| 3365 _parameter?.accept(visitor); | 3373 _parameter?.accept(visitor); |
| 3366 _defaultValue?.accept(visitor); | 3374 _defaultValue?.accept(visitor); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3447 * The semicolon terminating the statement. | 3455 * The semicolon terminating the statement. |
| 3448 */ | 3456 */ |
| 3449 @override | 3457 @override |
| 3450 Token semicolon; | 3458 Token semicolon; |
| 3451 | 3459 |
| 3452 /** | 3460 /** |
| 3453 * Initialize a newly created do loop. | 3461 * Initialize a newly created do loop. |
| 3454 */ | 3462 */ |
| 3455 DoStatementImpl( | 3463 DoStatementImpl( |
| 3456 this.doKeyword, | 3464 this.doKeyword, |
| 3457 Statement body, | 3465 StatementImpl body, |
| 3458 this.whileKeyword, | 3466 this.whileKeyword, |
| 3459 this.leftParenthesis, | 3467 this.leftParenthesis, |
| 3460 Expression condition, | 3468 ExpressionImpl condition, |
| 3461 this.rightParenthesis, | 3469 this.rightParenthesis, |
| 3462 this.semicolon) { | 3470 this.semicolon) { |
| 3463 _body = _becomeParentOf(body); | 3471 _body = _becomeParentOf(body); |
| 3464 _condition = _becomeParentOf(condition); | 3472 _condition = _becomeParentOf(condition); |
| 3465 } | 3473 } |
| 3466 | 3474 |
| 3467 @override | 3475 @override |
| 3468 Token get beginToken => doKeyword; | 3476 Token get beginToken => doKeyword; |
| 3469 | 3477 |
| 3470 @override | 3478 @override |
| 3471 Statement get body => _body; | 3479 Statement get body => _body; |
| 3472 | 3480 |
| 3473 @override | 3481 @override |
| 3474 void set body(Statement statement) { | 3482 void set body(Statement statement) { |
| 3475 _body = _becomeParentOf(statement); | 3483 _body = _becomeParentOf(statement as AstNodeImpl); |
| 3476 } | 3484 } |
| 3477 | 3485 |
| 3478 @override | 3486 @override |
| 3479 Iterable get childEntities => new ChildEntities() | 3487 Iterable get childEntities => new ChildEntities() |
| 3480 ..add(doKeyword) | 3488 ..add(doKeyword) |
| 3481 ..add(_body) | 3489 ..add(_body) |
| 3482 ..add(whileKeyword) | 3490 ..add(whileKeyword) |
| 3483 ..add(leftParenthesis) | 3491 ..add(leftParenthesis) |
| 3484 ..add(_condition) | 3492 ..add(_condition) |
| 3485 ..add(rightParenthesis) | 3493 ..add(rightParenthesis) |
| 3486 ..add(semicolon); | 3494 ..add(semicolon); |
| 3487 | 3495 |
| 3488 @override | 3496 @override |
| 3489 Expression get condition => _condition; | 3497 Expression get condition => _condition; |
| 3490 | 3498 |
| 3491 @override | 3499 @override |
| 3492 void set condition(Expression expression) { | 3500 void set condition(Expression expression) { |
| 3493 _condition = _becomeParentOf(expression); | 3501 _condition = _becomeParentOf(expression as AstNodeImpl); |
| 3494 } | 3502 } |
| 3495 | 3503 |
| 3496 @override | 3504 @override |
| 3497 Token get endToken => semicolon; | 3505 Token get endToken => semicolon; |
| 3498 | 3506 |
| 3499 @override | 3507 @override |
| 3500 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 3508 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 3501 visitor.visitDoStatement(this); | 3509 visitor.visitDoStatement(this); |
| 3502 | 3510 |
| 3503 @override | 3511 @override |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3682 */ | 3690 */ |
| 3683 SimpleIdentifier _name; | 3691 SimpleIdentifier _name; |
| 3684 | 3692 |
| 3685 /** | 3693 /** |
| 3686 * Initialize a newly created enum constant declaration. Either or both of the | 3694 * Initialize a newly created enum constant declaration. Either or both of the |
| 3687 * [comment] and [metadata] can be `null` if the constant does not have the | 3695 * [comment] and [metadata] can be `null` if the constant does not have the |
| 3688 * corresponding attribute. (Technically, enum constants cannot have metadata, | 3696 * corresponding attribute. (Technically, enum constants cannot have metadata, |
| 3689 * but we allow it for consistency.) | 3697 * but we allow it for consistency.) |
| 3690 */ | 3698 */ |
| 3691 EnumConstantDeclarationImpl( | 3699 EnumConstantDeclarationImpl( |
| 3692 Comment comment, List<Annotation> metadata, SimpleIdentifier name) | 3700 CommentImpl comment, List<Annotation> metadata, SimpleIdentifierImpl name) |
| 3693 : super(comment, metadata) { | 3701 : super(comment, metadata) { |
| 3694 _name = _becomeParentOf(name); | 3702 _name = _becomeParentOf(name); |
| 3695 } | 3703 } |
| 3696 | 3704 |
| 3697 @override | 3705 @override |
| 3698 Iterable get childEntities => super._childEntities..add(_name); | 3706 Iterable get childEntities => super._childEntities..add(_name); |
| 3699 | 3707 |
| 3700 @override | 3708 @override |
| 3701 FieldElement get element => _name?.staticElement as FieldElement; | 3709 FieldElement get element => _name?.staticElement as FieldElement; |
| 3702 | 3710 |
| 3703 @override | 3711 @override |
| 3704 Token get endToken => _name.endToken; | 3712 Token get endToken => _name.endToken; |
| 3705 | 3713 |
| 3706 @override | 3714 @override |
| 3707 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; | 3715 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; |
| 3708 | 3716 |
| 3709 @override | 3717 @override |
| 3710 SimpleIdentifier get name => _name; | 3718 SimpleIdentifier get name => _name; |
| 3711 | 3719 |
| 3712 @override | 3720 @override |
| 3713 void set name(SimpleIdentifier name) { | 3721 void set name(SimpleIdentifier name) { |
| 3714 _name = _becomeParentOf(name); | 3722 _name = _becomeParentOf(name as AstNodeImpl); |
| 3715 } | 3723 } |
| 3716 | 3724 |
| 3717 @override | 3725 @override |
| 3718 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 3726 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 3719 visitor.visitEnumConstantDeclaration(this); | 3727 visitor.visitEnumConstantDeclaration(this); |
| 3720 | 3728 |
| 3721 @override | 3729 @override |
| 3722 void visitChildren(AstVisitor visitor) { | 3730 void visitChildren(AstVisitor visitor) { |
| 3723 super.visitChildren(visitor); | 3731 super.visitChildren(visitor); |
| 3724 _name?.accept(visitor); | 3732 _name?.accept(visitor); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3903 */ | 3911 */ |
| 3904 @override | 3912 @override |
| 3905 Token semicolon; | 3913 Token semicolon; |
| 3906 | 3914 |
| 3907 /** | 3915 /** |
| 3908 * Initialize a newly created function body consisting of a block of | 3916 * Initialize a newly created function body consisting of a block of |
| 3909 * statements. The [keyword] can be `null` if the function body is not an | 3917 * statements. The [keyword] can be `null` if the function body is not an |
| 3910 * async function body. | 3918 * async function body. |
| 3911 */ | 3919 */ |
| 3912 ExpressionFunctionBodyImpl(this.keyword, this.functionDefinition, | 3920 ExpressionFunctionBodyImpl(this.keyword, this.functionDefinition, |
| 3913 Expression expression, this.semicolon) { | 3921 ExpressionImpl expression, this.semicolon) { |
| 3914 _expression = _becomeParentOf(expression); | 3922 _expression = _becomeParentOf(expression); |
| 3915 } | 3923 } |
| 3916 | 3924 |
| 3917 @override | 3925 @override |
| 3918 Token get beginToken { | 3926 Token get beginToken { |
| 3919 if (keyword != null) { | 3927 if (keyword != null) { |
| 3920 return keyword; | 3928 return keyword; |
| 3921 } | 3929 } |
| 3922 return functionDefinition; | 3930 return functionDefinition; |
| 3923 } | 3931 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 3935 return semicolon; | 3943 return semicolon; |
| 3936 } | 3944 } |
| 3937 return _expression.endToken; | 3945 return _expression.endToken; |
| 3938 } | 3946 } |
| 3939 | 3947 |
| 3940 @override | 3948 @override |
| 3941 Expression get expression => _expression; | 3949 Expression get expression => _expression; |
| 3942 | 3950 |
| 3943 @override | 3951 @override |
| 3944 void set expression(Expression expression) { | 3952 void set expression(Expression expression) { |
| 3945 _expression = _becomeParentOf(expression); | 3953 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 3946 } | 3954 } |
| 3947 | 3955 |
| 3948 @override | 3956 @override |
| 3949 bool get isAsynchronous => keyword != null; | 3957 bool get isAsynchronous => keyword != null; |
| 3950 | 3958 |
| 3951 @override | 3959 @override |
| 3952 bool get isSynchronous => keyword == null; | 3960 bool get isSynchronous => keyword == null; |
| 3953 | 3961 |
| 3954 @override | 3962 @override |
| 3955 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 3963 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4081 /** | 4089 /** |
| 4082 * The semicolon terminating the statement, or `null` if the expression is a | 4090 * The semicolon terminating the statement, or `null` if the expression is a |
| 4083 * function expression and therefore isn't followed by a semicolon. | 4091 * function expression and therefore isn't followed by a semicolon. |
| 4084 */ | 4092 */ |
| 4085 @override | 4093 @override |
| 4086 Token semicolon; | 4094 Token semicolon; |
| 4087 | 4095 |
| 4088 /** | 4096 /** |
| 4089 * Initialize a newly created expression statement. | 4097 * Initialize a newly created expression statement. |
| 4090 */ | 4098 */ |
| 4091 ExpressionStatementImpl(Expression expression, this.semicolon) { | 4099 ExpressionStatementImpl(ExpressionImpl expression, this.semicolon) { |
| 4092 _expression = _becomeParentOf(expression); | 4100 _expression = _becomeParentOf(expression); |
| 4093 } | 4101 } |
| 4094 | 4102 |
| 4095 @override | 4103 @override |
| 4096 Token get beginToken => _expression.beginToken; | 4104 Token get beginToken => _expression.beginToken; |
| 4097 | 4105 |
| 4098 @override | 4106 @override |
| 4099 Iterable get childEntities => | 4107 Iterable get childEntities => |
| 4100 new ChildEntities()..add(_expression)..add(semicolon); | 4108 new ChildEntities()..add(_expression)..add(semicolon); |
| 4101 | 4109 |
| 4102 @override | 4110 @override |
| 4103 Token get endToken { | 4111 Token get endToken { |
| 4104 if (semicolon != null) { | 4112 if (semicolon != null) { |
| 4105 return semicolon; | 4113 return semicolon; |
| 4106 } | 4114 } |
| 4107 return _expression.endToken; | 4115 return _expression.endToken; |
| 4108 } | 4116 } |
| 4109 | 4117 |
| 4110 @override | 4118 @override |
| 4111 Expression get expression => _expression; | 4119 Expression get expression => _expression; |
| 4112 | 4120 |
| 4113 @override | 4121 @override |
| 4114 void set expression(Expression expression) { | 4122 void set expression(Expression expression) { |
| 4115 _expression = _becomeParentOf(expression); | 4123 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 4116 } | 4124 } |
| 4117 | 4125 |
| 4118 @override | 4126 @override |
| 4119 bool get isSynthetic => _expression.isSynthetic && semicolon.isSynthetic; | 4127 bool get isSynthetic => _expression.isSynthetic && semicolon.isSynthetic; |
| 4120 | 4128 |
| 4121 @override | 4129 @override |
| 4122 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 4130 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 4123 visitor.visitExpressionStatement(this); | 4131 visitor.visitExpressionStatement(this); |
| 4124 | 4132 |
| 4125 @override | 4133 @override |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4142 Token extendsKeyword; | 4150 Token extendsKeyword; |
| 4143 | 4151 |
| 4144 /** | 4152 /** |
| 4145 * The name of the class that is being extended. | 4153 * The name of the class that is being extended. |
| 4146 */ | 4154 */ |
| 4147 TypeName _superclass; | 4155 TypeName _superclass; |
| 4148 | 4156 |
| 4149 /** | 4157 /** |
| 4150 * Initialize a newly created extends clause. | 4158 * Initialize a newly created extends clause. |
| 4151 */ | 4159 */ |
| 4152 ExtendsClauseImpl(this.extendsKeyword, TypeName superclass) { | 4160 ExtendsClauseImpl(this.extendsKeyword, TypeNameImpl superclass) { |
| 4153 _superclass = _becomeParentOf(superclass); | 4161 _superclass = _becomeParentOf(superclass); |
| 4154 } | 4162 } |
| 4155 | 4163 |
| 4156 @override | 4164 @override |
| 4157 Token get beginToken => extendsKeyword; | 4165 Token get beginToken => extendsKeyword; |
| 4158 | 4166 |
| 4159 @override | 4167 @override |
| 4160 Iterable get childEntities => | 4168 Iterable get childEntities => |
| 4161 new ChildEntities()..add(extendsKeyword)..add(_superclass); | 4169 new ChildEntities()..add(extendsKeyword)..add(_superclass); |
| 4162 | 4170 |
| 4163 @override | 4171 @override |
| 4164 Token get endToken => _superclass.endToken; | 4172 Token get endToken => _superclass.endToken; |
| 4165 | 4173 |
| 4166 @override | 4174 @override |
| 4167 TypeName get superclass => _superclass; | 4175 TypeName get superclass => _superclass; |
| 4168 | 4176 |
| 4169 @override | 4177 @override |
| 4170 void set superclass(TypeName name) { | 4178 void set superclass(TypeName name) { |
| 4171 _superclass = _becomeParentOf(name); | 4179 _superclass = _becomeParentOf(name as AstNodeImpl); |
| 4172 } | 4180 } |
| 4173 | 4181 |
| 4174 @override | 4182 @override |
| 4175 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 4183 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 4176 visitor.visitExtendsClause(this); | 4184 visitor.visitExtendsClause(this); |
| 4177 | 4185 |
| 4178 @override | 4186 @override |
| 4179 void visitChildren(AstVisitor visitor) { | 4187 void visitChildren(AstVisitor visitor) { |
| 4180 _superclass?.accept(visitor); | 4188 _superclass?.accept(visitor); |
| 4181 } | 4189 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 4205 */ | 4213 */ |
| 4206 @override | 4214 @override |
| 4207 Token semicolon; | 4215 Token semicolon; |
| 4208 | 4216 |
| 4209 /** | 4217 /** |
| 4210 * Initialize a newly created field declaration. Either or both of the | 4218 * Initialize a newly created field declaration. Either or both of the |
| 4211 * [comment] and [metadata] can be `null` if the declaration does not have the | 4219 * [comment] and [metadata] can be `null` if the declaration does not have the |
| 4212 * corresponding attribute. The [staticKeyword] can be `null` if the field is | 4220 * corresponding attribute. The [staticKeyword] can be `null` if the field is |
| 4213 * not a static field. | 4221 * not a static field. |
| 4214 */ | 4222 */ |
| 4215 FieldDeclarationImpl(Comment comment, List<Annotation> metadata, | 4223 FieldDeclarationImpl(CommentImpl comment, List<Annotation> metadata, |
| 4216 this.staticKeyword, VariableDeclarationList fieldList, this.semicolon) | 4224 this.staticKeyword, VariableDeclarationListImpl fieldList, this.semicolon) |
| 4217 : super(comment, metadata) { | 4225 : super(comment, metadata) { |
| 4218 _fieldList = _becomeParentOf(fieldList); | 4226 _fieldList = _becomeParentOf(fieldList); |
| 4219 } | 4227 } |
| 4220 | 4228 |
| 4221 @override | 4229 @override |
| 4222 Iterable get childEntities => | 4230 Iterable get childEntities => |
| 4223 super._childEntities..add(staticKeyword)..add(_fieldList)..add(semicolon); | 4231 super._childEntities..add(staticKeyword)..add(_fieldList)..add(semicolon); |
| 4224 | 4232 |
| 4225 @override | 4233 @override |
| 4226 Element get element => null; | 4234 Element get element => null; |
| 4227 | 4235 |
| 4228 @override | 4236 @override |
| 4229 Token get endToken => semicolon; | 4237 Token get endToken => semicolon; |
| 4230 | 4238 |
| 4231 @override | 4239 @override |
| 4232 VariableDeclarationList get fields => _fieldList; | 4240 VariableDeclarationList get fields => _fieldList; |
| 4233 | 4241 |
| 4234 @override | 4242 @override |
| 4235 void set fields(VariableDeclarationList fields) { | 4243 void set fields(VariableDeclarationList fields) { |
| 4236 _fieldList = _becomeParentOf(fields); | 4244 _fieldList = _becomeParentOf(fields as AstNodeImpl); |
| 4237 } | 4245 } |
| 4238 | 4246 |
| 4239 @override | 4247 @override |
| 4240 Token get firstTokenAfterCommentAndMetadata { | 4248 Token get firstTokenAfterCommentAndMetadata { |
| 4241 if (staticKeyword != null) { | 4249 if (staticKeyword != null) { |
| 4242 return staticKeyword; | 4250 return staticKeyword; |
| 4243 } | 4251 } |
| 4244 return _fieldList.beginToken; | 4252 return _fieldList.beginToken; |
| 4245 } | 4253 } |
| 4246 | 4254 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4307 /** | 4315 /** |
| 4308 * Initialize a newly created formal parameter. Either or both of the | 4316 * Initialize a newly created formal parameter. Either or both of the |
| 4309 * [comment] and [metadata] can be `null` if the parameter does not have the | 4317 * [comment] and [metadata] can be `null` if the parameter does not have the |
| 4310 * corresponding attribute. The [keyword] can be `null` if there is a type. | 4318 * corresponding attribute. The [keyword] can be `null` if there is a type. |
| 4311 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and | 4319 * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and |
| 4312 * [period] can be `null` if the keyword 'this' was not provided. The | 4320 * [period] can be `null` if the keyword 'this' was not provided. The |
| 4313 * [parameters] can be `null` if this is not a function-typed field formal | 4321 * [parameters] can be `null` if this is not a function-typed field formal |
| 4314 * parameter. | 4322 * parameter. |
| 4315 */ | 4323 */ |
| 4316 FieldFormalParameterImpl( | 4324 FieldFormalParameterImpl( |
| 4317 Comment comment, | 4325 CommentImpl comment, |
| 4318 List<Annotation> metadata, | 4326 List<Annotation> metadata, |
| 4319 this.keyword, | 4327 this.keyword, |
| 4320 TypeName type, | 4328 TypeNameImpl type, |
| 4321 this.thisKeyword, | 4329 this.thisKeyword, |
| 4322 this.period, | 4330 this.period, |
| 4323 SimpleIdentifier identifier, | 4331 SimpleIdentifierImpl identifier, |
| 4324 TypeParameterList typeParameters, | 4332 TypeParameterListImpl typeParameters, |
| 4325 FormalParameterList parameters) | 4333 FormalParameterListImpl parameters) |
| 4326 : super(comment, metadata, identifier) { | 4334 : super(comment, metadata, identifier) { |
| 4327 _type = _becomeParentOf(type); | 4335 _type = _becomeParentOf(type); |
| 4328 _typeParameters = _becomeParentOf(typeParameters); | 4336 _typeParameters = _becomeParentOf(typeParameters); |
| 4329 _parameters = _becomeParentOf(parameters); | 4337 _parameters = _becomeParentOf(parameters); |
| 4330 } | 4338 } |
| 4331 | 4339 |
| 4332 @override | 4340 @override |
| 4333 Token get beginToken { | 4341 Token get beginToken { |
| 4334 if (keyword != null) { | 4342 if (keyword != null) { |
| 4335 return keyword; | 4343 return keyword; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 4360 bool get isConst => keyword?.keyword == Keyword.CONST; | 4368 bool get isConst => keyword?.keyword == Keyword.CONST; |
| 4361 | 4369 |
| 4362 @override | 4370 @override |
| 4363 bool get isFinal => keyword?.keyword == Keyword.FINAL; | 4371 bool get isFinal => keyword?.keyword == Keyword.FINAL; |
| 4364 | 4372 |
| 4365 @override | 4373 @override |
| 4366 FormalParameterList get parameters => _parameters; | 4374 FormalParameterList get parameters => _parameters; |
| 4367 | 4375 |
| 4368 @override | 4376 @override |
| 4369 void set parameters(FormalParameterList parameters) { | 4377 void set parameters(FormalParameterList parameters) { |
| 4370 _parameters = _becomeParentOf(parameters); | 4378 _parameters = _becomeParentOf(parameters as AstNodeImpl); |
| 4371 } | 4379 } |
| 4372 | 4380 |
| 4373 @override | 4381 @override |
| 4374 TypeName get type => _type; | 4382 TypeName get type => _type; |
| 4375 | 4383 |
| 4376 @override | 4384 @override |
| 4377 void set type(TypeName typeName) { | 4385 void set type(TypeName typeName) { |
| 4378 _type = _becomeParentOf(typeName); | 4386 _type = _becomeParentOf(typeName as AstNodeImpl); |
| 4379 } | 4387 } |
| 4380 | 4388 |
| 4381 @override | 4389 @override |
| 4382 TypeParameterList get typeParameters => _typeParameters; | 4390 TypeParameterList get typeParameters => _typeParameters; |
| 4383 | 4391 |
| 4384 @override | 4392 @override |
| 4385 void set typeParameters(TypeParameterList typeParameters) { | 4393 void set typeParameters(TypeParameterList typeParameters) { |
| 4386 _typeParameters = _becomeParentOf(typeParameters); | 4394 _typeParameters = _becomeParentOf(typeParameters as AstNodeImpl); |
| 4387 } | 4395 } |
| 4388 | 4396 |
| 4389 @override | 4397 @override |
| 4390 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 4398 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 4391 visitor.visitFieldFormalParameter(this); | 4399 visitor.visitFieldFormalParameter(this); |
| 4392 | 4400 |
| 4393 @override | 4401 @override |
| 4394 void visitChildren(AstVisitor visitor) { | 4402 void visitChildren(AstVisitor visitor) { |
| 4395 super.visitChildren(visitor); | 4403 super.visitChildren(visitor); |
| 4396 _type?.accept(visitor); | 4404 _type?.accept(visitor); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4462 | 4470 |
| 4463 /** | 4471 /** |
| 4464 * Initialize a newly created for-each statement whose loop control variable | 4472 * Initialize a newly created for-each statement whose loop control variable |
| 4465 * is declared internally (in the for-loop part). The [awaitKeyword] can be | 4473 * is declared internally (in the for-loop part). The [awaitKeyword] can be |
| 4466 * `null` if this is not an asynchronous for loop. | 4474 * `null` if this is not an asynchronous for loop. |
| 4467 */ | 4475 */ |
| 4468 ForEachStatementImpl.withDeclaration( | 4476 ForEachStatementImpl.withDeclaration( |
| 4469 this.awaitKeyword, | 4477 this.awaitKeyword, |
| 4470 this.forKeyword, | 4478 this.forKeyword, |
| 4471 this.leftParenthesis, | 4479 this.leftParenthesis, |
| 4472 DeclaredIdentifier loopVariable, | 4480 DeclaredIdentifierImpl loopVariable, |
| 4473 this.inKeyword, | 4481 this.inKeyword, |
| 4474 Expression iterator, | 4482 ExpressionImpl iterator, |
| 4475 this.rightParenthesis, | 4483 this.rightParenthesis, |
| 4476 Statement body) { | 4484 StatementImpl body) { |
| 4477 _loopVariable = _becomeParentOf(loopVariable); | 4485 _loopVariable = _becomeParentOf(loopVariable); |
| 4478 _iterable = _becomeParentOf(iterator); | 4486 _iterable = _becomeParentOf(iterator); |
| 4479 _body = _becomeParentOf(body); | 4487 _body = _becomeParentOf(body); |
| 4480 } | 4488 } |
| 4481 | 4489 |
| 4482 /** | 4490 /** |
| 4483 * Initialize a newly created for-each statement whose loop control variable | 4491 * Initialize a newly created for-each statement whose loop control variable |
| 4484 * is declared outside the for loop. The [awaitKeyword] can be `null` if this | 4492 * is declared outside the for loop. The [awaitKeyword] can be `null` if this |
| 4485 * is not an asynchronous for loop. | 4493 * is not an asynchronous for loop. |
| 4486 */ | 4494 */ |
| 4487 ForEachStatementImpl.withReference( | 4495 ForEachStatementImpl.withReference( |
| 4488 this.awaitKeyword, | 4496 this.awaitKeyword, |
| 4489 this.forKeyword, | 4497 this.forKeyword, |
| 4490 this.leftParenthesis, | 4498 this.leftParenthesis, |
| 4491 SimpleIdentifier identifier, | 4499 SimpleIdentifierImpl identifier, |
| 4492 this.inKeyword, | 4500 this.inKeyword, |
| 4493 Expression iterator, | 4501 ExpressionImpl iterator, |
| 4494 this.rightParenthesis, | 4502 this.rightParenthesis, |
| 4495 Statement body) { | 4503 StatementImpl body) { |
| 4496 _identifier = _becomeParentOf(identifier); | 4504 _identifier = _becomeParentOf(identifier); |
| 4497 _iterable = _becomeParentOf(iterator); | 4505 _iterable = _becomeParentOf(iterator); |
| 4498 _body = _becomeParentOf(body); | 4506 _body = _becomeParentOf(body); |
| 4499 } | 4507 } |
| 4500 | 4508 |
| 4501 @override | 4509 @override |
| 4502 Token get beginToken => forKeyword; | 4510 Token get beginToken => forKeyword; |
| 4503 | 4511 |
| 4504 @override | 4512 @override |
| 4505 Statement get body => _body; | 4513 Statement get body => _body; |
| 4506 | 4514 |
| 4507 @override | 4515 @override |
| 4508 void set body(Statement statement) { | 4516 void set body(Statement statement) { |
| 4509 _body = _becomeParentOf(statement); | 4517 _body = _becomeParentOf(statement as AstNodeImpl); |
| 4510 } | 4518 } |
| 4511 | 4519 |
| 4512 @override | 4520 @override |
| 4513 Iterable get childEntities => new ChildEntities() | 4521 Iterable get childEntities => new ChildEntities() |
| 4514 ..add(awaitKeyword) | 4522 ..add(awaitKeyword) |
| 4515 ..add(forKeyword) | 4523 ..add(forKeyword) |
| 4516 ..add(leftParenthesis) | 4524 ..add(leftParenthesis) |
| 4517 ..add(_loopVariable) | 4525 ..add(_loopVariable) |
| 4518 ..add(_identifier) | 4526 ..add(_identifier) |
| 4519 ..add(inKeyword) | 4527 ..add(inKeyword) |
| 4520 ..add(_iterable) | 4528 ..add(_iterable) |
| 4521 ..add(rightParenthesis) | 4529 ..add(rightParenthesis) |
| 4522 ..add(_body); | 4530 ..add(_body); |
| 4523 | 4531 |
| 4524 @override | 4532 @override |
| 4525 Token get endToken => _body.endToken; | 4533 Token get endToken => _body.endToken; |
| 4526 | 4534 |
| 4527 @override | 4535 @override |
| 4528 SimpleIdentifier get identifier => _identifier; | 4536 SimpleIdentifier get identifier => _identifier; |
| 4529 | 4537 |
| 4530 @override | 4538 @override |
| 4531 void set identifier(SimpleIdentifier identifier) { | 4539 void set identifier(SimpleIdentifier identifier) { |
| 4532 _identifier = _becomeParentOf(identifier); | 4540 _identifier = _becomeParentOf(identifier as AstNodeImpl); |
| 4533 } | 4541 } |
| 4534 | 4542 |
| 4535 @override | 4543 @override |
| 4536 Expression get iterable => _iterable; | 4544 Expression get iterable => _iterable; |
| 4537 | 4545 |
| 4538 @override | 4546 @override |
| 4539 void set iterable(Expression expression) { | 4547 void set iterable(Expression expression) { |
| 4540 _iterable = _becomeParentOf(expression); | 4548 _iterable = _becomeParentOf(expression as AstNodeImpl); |
| 4541 } | 4549 } |
| 4542 | 4550 |
| 4543 @override | 4551 @override |
| 4544 DeclaredIdentifier get loopVariable => _loopVariable; | 4552 DeclaredIdentifier get loopVariable => _loopVariable; |
| 4545 | 4553 |
| 4546 @override | 4554 @override |
| 4547 void set loopVariable(DeclaredIdentifier variable) { | 4555 void set loopVariable(DeclaredIdentifier variable) { |
| 4548 _loopVariable = _becomeParentOf(variable); | 4556 _loopVariable = _becomeParentOf(variable as AstNodeImpl); |
| 4549 } | 4557 } |
| 4550 | 4558 |
| 4551 @override | 4559 @override |
| 4552 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 4560 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 4553 visitor.visitForEachStatement(this); | 4561 visitor.visitForEachStatement(this); |
| 4554 | 4562 |
| 4555 @override | 4563 @override |
| 4556 void visitChildren(AstVisitor visitor) { | 4564 void visitChildren(AstVisitor visitor) { |
| 4557 _loopVariable?.accept(visitor); | 4565 _loopVariable?.accept(visitor); |
| 4558 _identifier?.accept(visitor); | 4566 _identifier?.accept(visitor); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4775 | 4783 |
| 4776 /** | 4784 /** |
| 4777 * Initialize a newly created for statement. Either the [variableList] or the | 4785 * Initialize a newly created for statement. Either the [variableList] or the |
| 4778 * [initialization] must be `null`. Either the [condition] and the list of | 4786 * [initialization] must be `null`. Either the [condition] and the list of |
| 4779 * [updaters] can be `null` if the loop does not have the corresponding | 4787 * [updaters] can be `null` if the loop does not have the corresponding |
| 4780 * attribute. | 4788 * attribute. |
| 4781 */ | 4789 */ |
| 4782 ForStatementImpl( | 4790 ForStatementImpl( |
| 4783 this.forKeyword, | 4791 this.forKeyword, |
| 4784 this.leftParenthesis, | 4792 this.leftParenthesis, |
| 4785 VariableDeclarationList variableList, | 4793 VariableDeclarationListImpl variableList, |
| 4786 Expression initialization, | 4794 ExpressionImpl initialization, |
| 4787 this.leftSeparator, | 4795 this.leftSeparator, |
| 4788 Expression condition, | 4796 ExpressionImpl condition, |
| 4789 this.rightSeparator, | 4797 this.rightSeparator, |
| 4790 List<Expression> updaters, | 4798 List<Expression> updaters, |
| 4791 this.rightParenthesis, | 4799 this.rightParenthesis, |
| 4792 Statement body) { | 4800 StatementImpl body) { |
| 4793 _variableList = _becomeParentOf(variableList); | 4801 _variableList = _becomeParentOf(variableList); |
| 4794 _initialization = _becomeParentOf(initialization); | 4802 _initialization = _becomeParentOf(initialization); |
| 4795 _condition = _becomeParentOf(condition); | 4803 _condition = _becomeParentOf(condition); |
| 4796 _updaters = new NodeListImpl<Expression>(this, updaters); | 4804 _updaters = new NodeListImpl<Expression>(this, updaters); |
| 4797 _body = _becomeParentOf(body); | 4805 _body = _becomeParentOf(body); |
| 4798 } | 4806 } |
| 4799 | 4807 |
| 4800 @override | 4808 @override |
| 4801 Token get beginToken => forKeyword; | 4809 Token get beginToken => forKeyword; |
| 4802 | 4810 |
| 4803 @override | 4811 @override |
| 4804 Statement get body => _body; | 4812 Statement get body => _body; |
| 4805 | 4813 |
| 4806 @override | 4814 @override |
| 4807 void set body(Statement statement) { | 4815 void set body(Statement statement) { |
| 4808 _body = _becomeParentOf(statement); | 4816 _body = _becomeParentOf(statement as AstNodeImpl); |
| 4809 } | 4817 } |
| 4810 | 4818 |
| 4811 @override | 4819 @override |
| 4812 Iterable get childEntities => new ChildEntities() | 4820 Iterable get childEntities => new ChildEntities() |
| 4813 ..add(forKeyword) | 4821 ..add(forKeyword) |
| 4814 ..add(leftParenthesis) | 4822 ..add(leftParenthesis) |
| 4815 ..add(_variableList) | 4823 ..add(_variableList) |
| 4816 ..add(_initialization) | 4824 ..add(_initialization) |
| 4817 ..add(leftSeparator) | 4825 ..add(leftSeparator) |
| 4818 ..add(_condition) | 4826 ..add(_condition) |
| 4819 ..add(rightSeparator) | 4827 ..add(rightSeparator) |
| 4820 ..addAll(_updaters) | 4828 ..addAll(_updaters) |
| 4821 ..add(rightParenthesis) | 4829 ..add(rightParenthesis) |
| 4822 ..add(_body); | 4830 ..add(_body); |
| 4823 | 4831 |
| 4824 @override | 4832 @override |
| 4825 Expression get condition => _condition; | 4833 Expression get condition => _condition; |
| 4826 | 4834 |
| 4827 @override | 4835 @override |
| 4828 void set condition(Expression expression) { | 4836 void set condition(Expression expression) { |
| 4829 _condition = _becomeParentOf(expression); | 4837 _condition = _becomeParentOf(expression as AstNodeImpl); |
| 4830 } | 4838 } |
| 4831 | 4839 |
| 4832 @override | 4840 @override |
| 4833 Token get endToken => _body.endToken; | 4841 Token get endToken => _body.endToken; |
| 4834 | 4842 |
| 4835 @override | 4843 @override |
| 4836 Expression get initialization => _initialization; | 4844 Expression get initialization => _initialization; |
| 4837 | 4845 |
| 4838 @override | 4846 @override |
| 4839 void set initialization(Expression initialization) { | 4847 void set initialization(Expression initialization) { |
| 4840 _initialization = _becomeParentOf(initialization); | 4848 _initialization = _becomeParentOf(initialization as AstNodeImpl); |
| 4841 } | 4849 } |
| 4842 | 4850 |
| 4843 @override | 4851 @override |
| 4844 NodeList<Expression> get updaters => _updaters; | 4852 NodeList<Expression> get updaters => _updaters; |
| 4845 | 4853 |
| 4846 @override | 4854 @override |
| 4847 VariableDeclarationList get variables => _variableList; | 4855 VariableDeclarationList get variables => _variableList; |
| 4848 | 4856 |
| 4849 @override | 4857 @override |
| 4850 void set variables(VariableDeclarationList variableList) { | 4858 void set variables(VariableDeclarationList variableList) { |
| 4851 _variableList = _becomeParentOf(variableList); | 4859 _variableList = _becomeParentOf(variableList as AstNodeImpl); |
| 4852 } | 4860 } |
| 4853 | 4861 |
| 4854 @override | 4862 @override |
| 4855 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 4863 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 4856 visitor.visitForStatement(this); | 4864 visitor.visitForStatement(this); |
| 4857 | 4865 |
| 4858 @override | 4866 @override |
| 4859 void visitChildren(AstVisitor visitor) { | 4867 void visitChildren(AstVisitor visitor) { |
| 4860 _variableList?.accept(visitor); | 4868 _variableList?.accept(visitor); |
| 4861 _initialization?.accept(visitor); | 4869 _initialization?.accept(visitor); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4968 | 4976 |
| 4969 /** | 4977 /** |
| 4970 * Initialize a newly created function declaration. Either or both of the | 4978 * Initialize a newly created function declaration. Either or both of the |
| 4971 * [comment] and [metadata] can be `null` if the function does not have the | 4979 * [comment] and [metadata] can be `null` if the function does not have the |
| 4972 * corresponding attribute. The [externalKeyword] can be `null` if the | 4980 * corresponding attribute. The [externalKeyword] can be `null` if the |
| 4973 * function is not an external function. The [returnType] can be `null` if no | 4981 * function is not an external function. The [returnType] can be `null` if no |
| 4974 * return type was specified. The [propertyKeyword] can be `null` if the | 4982 * return type was specified. The [propertyKeyword] can be `null` if the |
| 4975 * function is neither a getter or a setter. | 4983 * function is neither a getter or a setter. |
| 4976 */ | 4984 */ |
| 4977 FunctionDeclarationImpl( | 4985 FunctionDeclarationImpl( |
| 4978 Comment comment, | 4986 CommentImpl comment, |
| 4979 List<Annotation> metadata, | 4987 List<Annotation> metadata, |
| 4980 this.externalKeyword, | 4988 this.externalKeyword, |
| 4981 TypeName returnType, | 4989 TypeNameImpl returnType, |
| 4982 this.propertyKeyword, | 4990 this.propertyKeyword, |
| 4983 SimpleIdentifier name, | 4991 SimpleIdentifierImpl name, |
| 4984 FunctionExpression functionExpression) | 4992 FunctionExpressionImpl functionExpression) |
| 4985 : super(comment, metadata, name) { | 4993 : super(comment, metadata, name) { |
| 4986 _returnType = _becomeParentOf(returnType); | 4994 _returnType = _becomeParentOf(returnType); |
| 4987 _functionExpression = _becomeParentOf(functionExpression); | 4995 _functionExpression = _becomeParentOf(functionExpression); |
| 4988 } | 4996 } |
| 4989 | 4997 |
| 4990 @override | 4998 @override |
| 4991 Iterable get childEntities => super._childEntities | 4999 Iterable get childEntities => super._childEntities |
| 4992 ..add(externalKeyword) | 5000 ..add(externalKeyword) |
| 4993 ..add(_returnType) | 5001 ..add(_returnType) |
| 4994 ..add(propertyKeyword) | 5002 ..add(propertyKeyword) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 5013 return _name.beginToken; | 5021 return _name.beginToken; |
| 5014 } | 5022 } |
| 5015 return _functionExpression.beginToken; | 5023 return _functionExpression.beginToken; |
| 5016 } | 5024 } |
| 5017 | 5025 |
| 5018 @override | 5026 @override |
| 5019 FunctionExpression get functionExpression => _functionExpression; | 5027 FunctionExpression get functionExpression => _functionExpression; |
| 5020 | 5028 |
| 5021 @override | 5029 @override |
| 5022 void set functionExpression(FunctionExpression functionExpression) { | 5030 void set functionExpression(FunctionExpression functionExpression) { |
| 5023 _functionExpression = _becomeParentOf(functionExpression); | 5031 _functionExpression = _becomeParentOf(functionExpression as AstNodeImpl); |
| 5024 } | 5032 } |
| 5025 | 5033 |
| 5026 @override | 5034 @override |
| 5027 bool get isGetter => propertyKeyword?.keyword == Keyword.GET; | 5035 bool get isGetter => propertyKeyword?.keyword == Keyword.GET; |
| 5028 | 5036 |
| 5029 @override | 5037 @override |
| 5030 bool get isSetter => propertyKeyword?.keyword == Keyword.SET; | 5038 bool get isSetter => propertyKeyword?.keyword == Keyword.SET; |
| 5031 | 5039 |
| 5032 @override | 5040 @override |
| 5033 TypeName get returnType => _returnType; | 5041 TypeName get returnType => _returnType; |
| 5034 | 5042 |
| 5035 @override | 5043 @override |
| 5036 void set returnType(TypeName returnType) { | 5044 void set returnType(TypeName returnType) { |
| 5037 _returnType = _becomeParentOf(returnType); | 5045 _returnType = _becomeParentOf(returnType as AstNodeImpl); |
| 5038 } | 5046 } |
| 5039 | 5047 |
| 5040 @override | 5048 @override |
| 5041 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 5049 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 5042 visitor.visitFunctionDeclaration(this); | 5050 visitor.visitFunctionDeclaration(this); |
| 5043 | 5051 |
| 5044 @override | 5052 @override |
| 5045 void visitChildren(AstVisitor visitor) { | 5053 void visitChildren(AstVisitor visitor) { |
| 5046 super.visitChildren(visitor); | 5054 super.visitChildren(visitor); |
| 5047 _returnType?.accept(visitor); | 5055 _returnType?.accept(visitor); |
| 5048 _name?.accept(visitor); | 5056 _name?.accept(visitor); |
| 5049 _functionExpression?.accept(visitor); | 5057 _functionExpression?.accept(visitor); |
| 5050 } | 5058 } |
| 5051 } | 5059 } |
| 5052 | 5060 |
| 5053 /** | 5061 /** |
| 5054 * A [FunctionDeclaration] used as a statement. | 5062 * A [FunctionDeclaration] used as a statement. |
| 5055 */ | 5063 */ |
| 5056 class FunctionDeclarationStatementImpl extends StatementImpl | 5064 class FunctionDeclarationStatementImpl extends StatementImpl |
| 5057 implements FunctionDeclarationStatement { | 5065 implements FunctionDeclarationStatement { |
| 5058 /** | 5066 /** |
| 5059 * The function declaration being wrapped. | 5067 * The function declaration being wrapped. |
| 5060 */ | 5068 */ |
| 5061 FunctionDeclaration _functionDeclaration; | 5069 FunctionDeclaration _functionDeclaration; |
| 5062 | 5070 |
| 5063 /** | 5071 /** |
| 5064 * Initialize a newly created function declaration statement. | 5072 * Initialize a newly created function declaration statement. |
| 5065 */ | 5073 */ |
| 5066 FunctionDeclarationStatementImpl(FunctionDeclaration functionDeclaration) { | 5074 FunctionDeclarationStatementImpl(FunctionDeclaration functionDeclaration) { |
| 5067 _functionDeclaration = _becomeParentOf(functionDeclaration); | 5075 _functionDeclaration = _becomeParentOf(functionDeclaration as AstNodeImpl); |
| 5068 } | 5076 } |
| 5069 | 5077 |
| 5070 @override | 5078 @override |
| 5071 Token get beginToken => _functionDeclaration.beginToken; | 5079 Token get beginToken => _functionDeclaration.beginToken; |
| 5072 | 5080 |
| 5073 @override | 5081 @override |
| 5074 Iterable get childEntities => new ChildEntities()..add(_functionDeclaration); | 5082 Iterable get childEntities => new ChildEntities()..add(_functionDeclaration); |
| 5075 | 5083 |
| 5076 @override | 5084 @override |
| 5077 Token get endToken => _functionDeclaration.endToken; | 5085 Token get endToken => _functionDeclaration.endToken; |
| 5078 | 5086 |
| 5079 @override | 5087 @override |
| 5080 FunctionDeclaration get functionDeclaration => _functionDeclaration; | 5088 FunctionDeclaration get functionDeclaration => _functionDeclaration; |
| 5081 | 5089 |
| 5082 @override | 5090 @override |
| 5083 void set functionDeclaration(FunctionDeclaration functionDeclaration) { | 5091 void set functionDeclaration(FunctionDeclaration functionDeclaration) { |
| 5084 _functionDeclaration = _becomeParentOf(functionDeclaration); | 5092 _functionDeclaration = _becomeParentOf(functionDeclaration as AstNodeImpl); |
| 5085 } | 5093 } |
| 5086 | 5094 |
| 5087 @override | 5095 @override |
| 5088 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 5096 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 5089 visitor.visitFunctionDeclarationStatement(this); | 5097 visitor.visitFunctionDeclarationStatement(this); |
| 5090 | 5098 |
| 5091 @override | 5099 @override |
| 5092 void visitChildren(AstVisitor visitor) { | 5100 void visitChildren(AstVisitor visitor) { |
| 5093 _functionDeclaration?.accept(visitor); | 5101 _functionDeclaration?.accept(visitor); |
| 5094 } | 5102 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 5121 /** | 5129 /** |
| 5122 * The element associated with the function, or `null` if the AST structure | 5130 * The element associated with the function, or `null` if the AST structure |
| 5123 * has not been resolved. | 5131 * has not been resolved. |
| 5124 */ | 5132 */ |
| 5125 @override | 5133 @override |
| 5126 ExecutableElement element; | 5134 ExecutableElement element; |
| 5127 | 5135 |
| 5128 /** | 5136 /** |
| 5129 * Initialize a newly created function declaration. | 5137 * Initialize a newly created function declaration. |
| 5130 */ | 5138 */ |
| 5131 FunctionExpressionImpl(TypeParameterList typeParameters, | 5139 FunctionExpressionImpl(TypeParameterListImpl typeParameters, |
| 5132 FormalParameterList parameters, FunctionBody body) { | 5140 FormalParameterListImpl parameters, FunctionBodyImpl body) { |
| 5133 _typeParameters = _becomeParentOf(typeParameters); | 5141 _typeParameters = _becomeParentOf(typeParameters); |
| 5134 _parameters = _becomeParentOf(parameters); | 5142 _parameters = _becomeParentOf(parameters); |
| 5135 _body = _becomeParentOf(body); | 5143 _body = _becomeParentOf(body); |
| 5136 } | 5144 } |
| 5137 | 5145 |
| 5138 @override | 5146 @override |
| 5139 Token get beginToken { | 5147 Token get beginToken { |
| 5140 if (_typeParameters != null) { | 5148 if (_typeParameters != null) { |
| 5141 return _typeParameters.beginToken; | 5149 return _typeParameters.beginToken; |
| 5142 } else if (_parameters != null) { | 5150 } else if (_parameters != null) { |
| 5143 return _parameters.beginToken; | 5151 return _parameters.beginToken; |
| 5144 } else if (_body != null) { | 5152 } else if (_body != null) { |
| 5145 return _body.beginToken; | 5153 return _body.beginToken; |
| 5146 } | 5154 } |
| 5147 // This should never be reached because external functions must be named, | 5155 // This should never be reached because external functions must be named, |
| 5148 // hence either the body or the name should be non-null. | 5156 // hence either the body or the name should be non-null. |
| 5149 throw new IllegalStateException("Non-external functions must have a body"); | 5157 throw new IllegalStateException("Non-external functions must have a body"); |
| 5150 } | 5158 } |
| 5151 | 5159 |
| 5152 @override | 5160 @override |
| 5153 FunctionBody get body => _body; | 5161 FunctionBody get body => _body; |
| 5154 | 5162 |
| 5155 @override | 5163 @override |
| 5156 void set body(FunctionBody functionBody) { | 5164 void set body(FunctionBody functionBody) { |
| 5157 _body = _becomeParentOf(functionBody); | 5165 _body = _becomeParentOf(functionBody as AstNodeImpl); |
| 5158 } | 5166 } |
| 5159 | 5167 |
| 5160 @override | 5168 @override |
| 5161 Iterable get childEntities => | 5169 Iterable get childEntities => |
| 5162 new ChildEntities()..add(_parameters)..add(_body); | 5170 new ChildEntities()..add(_parameters)..add(_body); |
| 5163 | 5171 |
| 5164 @override | 5172 @override |
| 5165 Token get endToken { | 5173 Token get endToken { |
| 5166 if (_body != null) { | 5174 if (_body != null) { |
| 5167 return _body.endToken; | 5175 return _body.endToken; |
| 5168 } else if (_parameters != null) { | 5176 } else if (_parameters != null) { |
| 5169 return _parameters.endToken; | 5177 return _parameters.endToken; |
| 5170 } | 5178 } |
| 5171 // This should never be reached because external functions must be named, | 5179 // This should never be reached because external functions must be named, |
| 5172 // hence either the body or the name should be non-null. | 5180 // hence either the body or the name should be non-null. |
| 5173 throw new IllegalStateException("Non-external functions must have a body"); | 5181 throw new IllegalStateException("Non-external functions must have a body"); |
| 5174 } | 5182 } |
| 5175 | 5183 |
| 5176 @override | 5184 @override |
| 5177 FormalParameterList get parameters => _parameters; | 5185 FormalParameterList get parameters => _parameters; |
| 5178 | 5186 |
| 5179 @override | 5187 @override |
| 5180 void set parameters(FormalParameterList parameters) { | 5188 void set parameters(FormalParameterList parameters) { |
| 5181 _parameters = _becomeParentOf(parameters); | 5189 _parameters = _becomeParentOf(parameters as AstNodeImpl); |
| 5182 } | 5190 } |
| 5183 | 5191 |
| 5184 @override | 5192 @override |
| 5185 int get precedence => 16; | 5193 int get precedence => 16; |
| 5186 | 5194 |
| 5187 @override | 5195 @override |
| 5188 TypeParameterList get typeParameters => _typeParameters; | 5196 TypeParameterList get typeParameters => _typeParameters; |
| 5189 | 5197 |
| 5190 @override | 5198 @override |
| 5191 void set typeParameters(TypeParameterList typeParameters) { | 5199 void set typeParameters(TypeParameterList typeParameters) { |
| 5192 _typeParameters = _becomeParentOf(typeParameters); | 5200 _typeParameters = _becomeParentOf(typeParameters as AstNodeImpl); |
| 5193 } | 5201 } |
| 5194 | 5202 |
| 5195 @override | 5203 @override |
| 5196 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 5204 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 5197 visitor.visitFunctionExpression(this); | 5205 visitor.visitFunctionExpression(this); |
| 5198 | 5206 |
| 5199 @override | 5207 @override |
| 5200 void visitChildren(AstVisitor visitor) { | 5208 void visitChildren(AstVisitor visitor) { |
| 5201 _typeParameters?.accept(visitor); | 5209 _typeParameters?.accept(visitor); |
| 5202 _parameters?.accept(visitor); | 5210 _parameters?.accept(visitor); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 5232 * The element associated with the function being invoked based on propagated | 5240 * The element associated with the function being invoked based on propagated |
| 5233 * type information, or `null` if the AST structure has not been resolved or | 5241 * type information, or `null` if the AST structure has not been resolved or |
| 5234 * the function could not be resolved. | 5242 * the function could not be resolved. |
| 5235 */ | 5243 */ |
| 5236 @override | 5244 @override |
| 5237 ExecutableElement propagatedElement; | 5245 ExecutableElement propagatedElement; |
| 5238 | 5246 |
| 5239 /** | 5247 /** |
| 5240 * Initialize a newly created function expression invocation. | 5248 * Initialize a newly created function expression invocation. |
| 5241 */ | 5249 */ |
| 5242 FunctionExpressionInvocationImpl(Expression function, | 5250 FunctionExpressionInvocationImpl(ExpressionImpl function, |
| 5243 TypeArgumentList typeArguments, ArgumentList argumentList) | 5251 TypeArgumentListImpl typeArguments, ArgumentListImpl argumentList) |
| 5244 : super(typeArguments, argumentList) { | 5252 : super(typeArguments, argumentList) { |
| 5245 _function = _becomeParentOf(function); | 5253 _function = _becomeParentOf(function); |
| 5246 } | 5254 } |
| 5247 | 5255 |
| 5248 @override | 5256 @override |
| 5249 Token get beginToken => _function.beginToken; | 5257 Token get beginToken => _function.beginToken; |
| 5250 | 5258 |
| 5251 @override | 5259 @override |
| 5252 ExecutableElement get bestElement { | 5260 ExecutableElement get bestElement { |
| 5253 ExecutableElement element = propagatedElement; | 5261 ExecutableElement element = propagatedElement; |
| 5254 if (element == null) { | 5262 if (element == null) { |
| 5255 element = staticElement; | 5263 element = staticElement; |
| 5256 } | 5264 } |
| 5257 return element; | 5265 return element; |
| 5258 } | 5266 } |
| 5259 | 5267 |
| 5260 @override | 5268 @override |
| 5261 Iterable get childEntities => | 5269 Iterable get childEntities => |
| 5262 new ChildEntities()..add(_function)..add(_argumentList); | 5270 new ChildEntities()..add(_function)..add(_argumentList); |
| 5263 | 5271 |
| 5264 @override | 5272 @override |
| 5265 Token get endToken => _argumentList.endToken; | 5273 Token get endToken => _argumentList.endToken; |
| 5266 | 5274 |
| 5267 @override | 5275 @override |
| 5268 Expression get function => _function; | 5276 Expression get function => _function; |
| 5269 | 5277 |
| 5270 @override | 5278 @override |
| 5271 void set function(Expression expression) { | 5279 void set function(Expression expression) { |
| 5272 _function = _becomeParentOf(expression); | 5280 _function = _becomeParentOf(expression as AstNodeImpl); |
| 5273 } | 5281 } |
| 5274 | 5282 |
| 5275 @override | 5283 @override |
| 5276 int get precedence => 15; | 5284 int get precedence => 15; |
| 5277 | 5285 |
| 5278 @override | 5286 @override |
| 5279 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 5287 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 5280 visitor.visitFunctionExpressionInvocation(this); | 5288 visitor.visitFunctionExpressionInvocation(this); |
| 5281 | 5289 |
| 5282 @override | 5290 @override |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5315 FormalParameterList _parameters; | 5323 FormalParameterList _parameters; |
| 5316 | 5324 |
| 5317 /** | 5325 /** |
| 5318 * Initialize a newly created function type alias. Either or both of the | 5326 * Initialize a newly created function type alias. Either or both of the |
| 5319 * [comment] and [metadata] can be `null` if the function does not have the | 5327 * [comment] and [metadata] can be `null` if the function does not have the |
| 5320 * corresponding attribute. The [returnType] can be `null` if no return type | 5328 * corresponding attribute. The [returnType] can be `null` if no return type |
| 5321 * was specified. The [typeParameters] can be `null` if the function has no | 5329 * was specified. The [typeParameters] can be `null` if the function has no |
| 5322 * type parameters. | 5330 * type parameters. |
| 5323 */ | 5331 */ |
| 5324 FunctionTypeAliasImpl( | 5332 FunctionTypeAliasImpl( |
| 5325 Comment comment, | 5333 CommentImpl comment, |
| 5326 List<Annotation> metadata, | 5334 List<Annotation> metadata, |
| 5327 Token keyword, | 5335 Token keyword, |
| 5328 TypeName returnType, | 5336 TypeNameImpl returnType, |
| 5329 SimpleIdentifier name, | 5337 SimpleIdentifierImpl name, |
| 5330 TypeParameterList typeParameters, | 5338 TypeParameterListImpl typeParameters, |
| 5331 FormalParameterList parameters, | 5339 FormalParameterListImpl parameters, |
| 5332 Token semicolon) | 5340 Token semicolon) |
| 5333 : super(comment, metadata, keyword, name, semicolon) { | 5341 : super(comment, metadata, keyword, name, semicolon) { |
| 5334 _returnType = _becomeParentOf(returnType); | 5342 _returnType = _becomeParentOf(returnType); |
| 5335 _typeParameters = _becomeParentOf(typeParameters); | 5343 _typeParameters = _becomeParentOf(typeParameters); |
| 5336 _parameters = _becomeParentOf(parameters); | 5344 _parameters = _becomeParentOf(parameters); |
| 5337 } | 5345 } |
| 5338 | 5346 |
| 5339 @override | 5347 @override |
| 5340 Iterable get childEntities => super._childEntities | 5348 Iterable get childEntities => super._childEntities |
| 5341 ..add(typedefKeyword) | 5349 ..add(typedefKeyword) |
| 5342 ..add(_returnType) | 5350 ..add(_returnType) |
| 5343 ..add(_name) | 5351 ..add(_name) |
| 5344 ..add(_typeParameters) | 5352 ..add(_typeParameters) |
| 5345 ..add(_parameters) | 5353 ..add(_parameters) |
| 5346 ..add(semicolon); | 5354 ..add(semicolon); |
| 5347 | 5355 |
| 5348 @override | 5356 @override |
| 5349 FunctionTypeAliasElement get element => | 5357 FunctionTypeAliasElement get element => |
| 5350 _name?.staticElement as FunctionTypeAliasElement; | 5358 _name?.staticElement as FunctionTypeAliasElement; |
| 5351 | 5359 |
| 5352 @override | 5360 @override |
| 5353 FormalParameterList get parameters => _parameters; | 5361 FormalParameterList get parameters => _parameters; |
| 5354 | 5362 |
| 5355 @override | 5363 @override |
| 5356 void set parameters(FormalParameterList parameters) { | 5364 void set parameters(FormalParameterList parameters) { |
| 5357 _parameters = _becomeParentOf(parameters); | 5365 _parameters = _becomeParentOf(parameters as AstNodeImpl); |
| 5358 } | 5366 } |
| 5359 | 5367 |
| 5360 @override | 5368 @override |
| 5361 TypeName get returnType => _returnType; | 5369 TypeName get returnType => _returnType; |
| 5362 | 5370 |
| 5363 @override | 5371 @override |
| 5364 void set returnType(TypeName typeName) { | 5372 void set returnType(TypeName typeName) { |
| 5365 _returnType = _becomeParentOf(typeName); | 5373 _returnType = _becomeParentOf(typeName as AstNodeImpl); |
| 5366 } | 5374 } |
| 5367 | 5375 |
| 5368 @override | 5376 @override |
| 5369 TypeParameterList get typeParameters => _typeParameters; | 5377 TypeParameterList get typeParameters => _typeParameters; |
| 5370 | 5378 |
| 5371 @override | 5379 @override |
| 5372 void set typeParameters(TypeParameterList typeParameters) { | 5380 void set typeParameters(TypeParameterList typeParameters) { |
| 5373 _typeParameters = _becomeParentOf(typeParameters); | 5381 _typeParameters = _becomeParentOf(typeParameters as AstNodeImpl); |
| 5374 } | 5382 } |
| 5375 | 5383 |
| 5376 @override | 5384 @override |
| 5377 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 5385 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 5378 visitor.visitFunctionTypeAlias(this); | 5386 visitor.visitFunctionTypeAlias(this); |
| 5379 | 5387 |
| 5380 @override | 5388 @override |
| 5381 void visitChildren(AstVisitor visitor) { | 5389 void visitChildren(AstVisitor visitor) { |
| 5382 super.visitChildren(visitor); | 5390 super.visitChildren(visitor); |
| 5383 _returnType?.accept(visitor); | 5391 _returnType?.accept(visitor); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 5412 */ | 5420 */ |
| 5413 FormalParameterList _parameters; | 5421 FormalParameterList _parameters; |
| 5414 | 5422 |
| 5415 /** | 5423 /** |
| 5416 * Initialize a newly created formal parameter. Either or both of the | 5424 * Initialize a newly created formal parameter. Either or both of the |
| 5417 * [comment] and [metadata] can be `null` if the parameter does not have the | 5425 * [comment] and [metadata] can be `null` if the parameter does not have the |
| 5418 * corresponding attribute. The [returnType] can be `null` if no return type | 5426 * corresponding attribute. The [returnType] can be `null` if no return type |
| 5419 * was specified. | 5427 * was specified. |
| 5420 */ | 5428 */ |
| 5421 FunctionTypedFormalParameterImpl( | 5429 FunctionTypedFormalParameterImpl( |
| 5422 Comment comment, | 5430 CommentImpl comment, |
| 5423 List<Annotation> metadata, | 5431 List<Annotation> metadata, |
| 5424 TypeName returnType, | 5432 TypeNameImpl returnType, |
| 5425 SimpleIdentifier identifier, | 5433 SimpleIdentifierImpl identifier, |
| 5426 TypeParameterList typeParameters, | 5434 TypeParameterListImpl typeParameters, |
| 5427 FormalParameterList parameters) | 5435 FormalParameterListImpl parameters) |
| 5428 : super(comment, metadata, identifier) { | 5436 : super(comment, metadata, identifier) { |
| 5429 _returnType = _becomeParentOf(returnType); | 5437 _returnType = _becomeParentOf(returnType); |
| 5430 _typeParameters = _becomeParentOf(typeParameters); | 5438 _typeParameters = _becomeParentOf(typeParameters); |
| 5431 _parameters = _becomeParentOf(parameters); | 5439 _parameters = _becomeParentOf(parameters); |
| 5432 } | 5440 } |
| 5433 | 5441 |
| 5434 @override | 5442 @override |
| 5435 Token get beginToken { | 5443 Token get beginToken { |
| 5436 if (_returnType != null) { | 5444 if (_returnType != null) { |
| 5437 return _returnType.beginToken; | 5445 return _returnType.beginToken; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 5450 bool get isConst => false; | 5458 bool get isConst => false; |
| 5451 | 5459 |
| 5452 @override | 5460 @override |
| 5453 bool get isFinal => false; | 5461 bool get isFinal => false; |
| 5454 | 5462 |
| 5455 @override | 5463 @override |
| 5456 FormalParameterList get parameters => _parameters; | 5464 FormalParameterList get parameters => _parameters; |
| 5457 | 5465 |
| 5458 @override | 5466 @override |
| 5459 void set parameters(FormalParameterList parameters) { | 5467 void set parameters(FormalParameterList parameters) { |
| 5460 _parameters = _becomeParentOf(parameters); | 5468 _parameters = _becomeParentOf(parameters as AstNodeImpl); |
| 5461 } | 5469 } |
| 5462 | 5470 |
| 5463 @override | 5471 @override |
| 5464 TypeName get returnType => _returnType; | 5472 TypeName get returnType => _returnType; |
| 5465 | 5473 |
| 5466 @override | 5474 @override |
| 5467 void set returnType(TypeName type) { | 5475 void set returnType(TypeName type) { |
| 5468 _returnType = _becomeParentOf(type); | 5476 _returnType = _becomeParentOf(type as AstNodeImpl); |
| 5469 } | 5477 } |
| 5470 | 5478 |
| 5471 @override | 5479 @override |
| 5472 TypeParameterList get typeParameters => _typeParameters; | 5480 TypeParameterList get typeParameters => _typeParameters; |
| 5473 | 5481 |
| 5474 @override | 5482 @override |
| 5475 void set typeParameters(TypeParameterList typeParameters) { | 5483 void set typeParameters(TypeParameterList typeParameters) { |
| 5476 _typeParameters = _becomeParentOf(typeParameters); | 5484 _typeParameters = _becomeParentOf(typeParameters as AstNodeImpl); |
| 5477 } | 5485 } |
| 5478 | 5486 |
| 5479 @override | 5487 @override |
| 5480 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 5488 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 5481 visitor.visitFunctionTypedFormalParameter(this); | 5489 visitor.visitFunctionTypedFormalParameter(this); |
| 5482 | 5490 |
| 5483 @override | 5491 @override |
| 5484 void visitChildren(AstVisitor visitor) { | 5492 void visitChildren(AstVisitor visitor) { |
| 5485 super.visitChildren(visitor); | 5493 super.visitChildren(visitor); |
| 5486 _returnType?.accept(visitor); | 5494 _returnType?.accept(visitor); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5601 */ | 5609 */ |
| 5602 Statement _elseStatement; | 5610 Statement _elseStatement; |
| 5603 | 5611 |
| 5604 /** | 5612 /** |
| 5605 * Initialize a newly created if statement. The [elseKeyword] and | 5613 * Initialize a newly created if statement. The [elseKeyword] and |
| 5606 * [elseStatement] can be `null` if there is no else clause. | 5614 * [elseStatement] can be `null` if there is no else clause. |
| 5607 */ | 5615 */ |
| 5608 IfStatementImpl( | 5616 IfStatementImpl( |
| 5609 this.ifKeyword, | 5617 this.ifKeyword, |
| 5610 this.leftParenthesis, | 5618 this.leftParenthesis, |
| 5611 Expression condition, | 5619 ExpressionImpl condition, |
| 5612 this.rightParenthesis, | 5620 this.rightParenthesis, |
| 5613 Statement thenStatement, | 5621 StatementImpl thenStatement, |
| 5614 this.elseKeyword, | 5622 this.elseKeyword, |
| 5615 Statement elseStatement) { | 5623 StatementImpl elseStatement) { |
| 5616 _condition = _becomeParentOf(condition); | 5624 _condition = _becomeParentOf(condition); |
| 5617 _thenStatement = _becomeParentOf(thenStatement); | 5625 _thenStatement = _becomeParentOf(thenStatement); |
| 5618 _elseStatement = _becomeParentOf(elseStatement); | 5626 _elseStatement = _becomeParentOf(elseStatement); |
| 5619 } | 5627 } |
| 5620 | 5628 |
| 5621 @override | 5629 @override |
| 5622 Token get beginToken => ifKeyword; | 5630 Token get beginToken => ifKeyword; |
| 5623 | 5631 |
| 5624 @override | 5632 @override |
| 5625 Iterable get childEntities => new ChildEntities() | 5633 Iterable get childEntities => new ChildEntities() |
| 5626 ..add(ifKeyword) | 5634 ..add(ifKeyword) |
| 5627 ..add(leftParenthesis) | 5635 ..add(leftParenthesis) |
| 5628 ..add(_condition) | 5636 ..add(_condition) |
| 5629 ..add(rightParenthesis) | 5637 ..add(rightParenthesis) |
| 5630 ..add(_thenStatement) | 5638 ..add(_thenStatement) |
| 5631 ..add(elseKeyword) | 5639 ..add(elseKeyword) |
| 5632 ..add(_elseStatement); | 5640 ..add(_elseStatement); |
| 5633 | 5641 |
| 5634 @override | 5642 @override |
| 5635 Expression get condition => _condition; | 5643 Expression get condition => _condition; |
| 5636 | 5644 |
| 5637 @override | 5645 @override |
| 5638 void set condition(Expression expression) { | 5646 void set condition(Expression expression) { |
| 5639 _condition = _becomeParentOf(expression); | 5647 _condition = _becomeParentOf(expression as AstNodeImpl); |
| 5640 } | 5648 } |
| 5641 | 5649 |
| 5642 @override | 5650 @override |
| 5643 Statement get elseStatement => _elseStatement; | 5651 Statement get elseStatement => _elseStatement; |
| 5644 | 5652 |
| 5645 @override | 5653 @override |
| 5646 void set elseStatement(Statement statement) { | 5654 void set elseStatement(Statement statement) { |
| 5647 _elseStatement = _becomeParentOf(statement); | 5655 _elseStatement = _becomeParentOf(statement as AstNodeImpl); |
| 5648 } | 5656 } |
| 5649 | 5657 |
| 5650 @override | 5658 @override |
| 5651 Token get endToken { | 5659 Token get endToken { |
| 5652 if (_elseStatement != null) { | 5660 if (_elseStatement != null) { |
| 5653 return _elseStatement.endToken; | 5661 return _elseStatement.endToken; |
| 5654 } | 5662 } |
| 5655 return _thenStatement.endToken; | 5663 return _thenStatement.endToken; |
| 5656 } | 5664 } |
| 5657 | 5665 |
| 5658 @override | 5666 @override |
| 5659 Statement get thenStatement => _thenStatement; | 5667 Statement get thenStatement => _thenStatement; |
| 5660 | 5668 |
| 5661 @override | 5669 @override |
| 5662 void set thenStatement(Statement statement) { | 5670 void set thenStatement(Statement statement) { |
| 5663 _thenStatement = _becomeParentOf(statement); | 5671 _thenStatement = _becomeParentOf(statement as AstNodeImpl); |
| 5664 } | 5672 } |
| 5665 | 5673 |
| 5666 @override | 5674 @override |
| 5667 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 5675 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 5668 visitor.visitIfStatement(this); | 5676 visitor.visitIfStatement(this); |
| 5669 | 5677 |
| 5670 @override | 5678 @override |
| 5671 void visitChildren(AstVisitor visitor) { | 5679 void visitChildren(AstVisitor visitor) { |
| 5672 _condition?.accept(visitor); | 5680 _condition?.accept(visitor); |
| 5673 _thenStatement?.accept(visitor); | 5681 _thenStatement?.accept(visitor); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5755 | 5763 |
| 5756 /** | 5764 /** |
| 5757 * Initialize a newly created import directive. Either or both of the | 5765 * Initialize a newly created import directive. Either or both of the |
| 5758 * [comment] and [metadata] can be `null` if the function does not have the | 5766 * [comment] and [metadata] can be `null` if the function does not have the |
| 5759 * corresponding attribute. The [deferredKeyword] can be `null` if the import | 5767 * corresponding attribute. The [deferredKeyword] can be `null` if the import |
| 5760 * is not deferred. The [asKeyword] and [prefix] can be `null` if the import | 5768 * is not deferred. The [asKeyword] and [prefix] can be `null` if the import |
| 5761 * does not specify a prefix. The list of [combinators] can be `null` if there | 5769 * does not specify a prefix. The list of [combinators] can be `null` if there |
| 5762 * are no combinators. | 5770 * are no combinators. |
| 5763 */ | 5771 */ |
| 5764 ImportDirectiveImpl( | 5772 ImportDirectiveImpl( |
| 5765 Comment comment, | 5773 CommentImpl comment, |
| 5766 List<Annotation> metadata, | 5774 List<Annotation> metadata, |
| 5767 Token keyword, | 5775 Token keyword, |
| 5768 StringLiteral libraryUri, | 5776 StringLiteralImpl libraryUri, |
| 5769 List<Configuration> configurations, | 5777 List<Configuration> configurations, |
| 5770 this.deferredKeyword, | 5778 this.deferredKeyword, |
| 5771 this.asKeyword, | 5779 this.asKeyword, |
| 5772 SimpleIdentifier prefix, | 5780 SimpleIdentifierImpl prefix, |
| 5773 List<Combinator> combinators, | 5781 List<Combinator> combinators, |
| 5774 Token semicolon) | 5782 Token semicolon) |
| 5775 : super(comment, metadata, keyword, libraryUri, configurations, | 5783 : super(comment, metadata, keyword, libraryUri, configurations, |
| 5776 combinators, semicolon) { | 5784 combinators, semicolon) { |
| 5777 _prefix = _becomeParentOf(prefix); | 5785 _prefix = _becomeParentOf(prefix); |
| 5778 } | 5786 } |
| 5779 | 5787 |
| 5780 @override | 5788 @override |
| 5781 Iterable get childEntities => super._childEntities | 5789 Iterable get childEntities => super._childEntities |
| 5782 ..add(_uri) | 5790 ..add(_uri) |
| 5783 ..add(deferredKeyword) | 5791 ..add(deferredKeyword) |
| 5784 ..add(asKeyword) | 5792 ..add(asKeyword) |
| 5785 ..add(_prefix) | 5793 ..add(_prefix) |
| 5786 ..addAll(combinators) | 5794 ..addAll(combinators) |
| 5787 ..add(semicolon); | 5795 ..add(semicolon); |
| 5788 | 5796 |
| 5789 @override | 5797 @override |
| 5790 ImportElement get element => super.element as ImportElement; | 5798 ImportElement get element => super.element as ImportElement; |
| 5791 | 5799 |
| 5792 @override | 5800 @override |
| 5793 SimpleIdentifier get prefix => _prefix; | 5801 SimpleIdentifier get prefix => _prefix; |
| 5794 | 5802 |
| 5795 @override | 5803 @override |
| 5796 void set prefix(SimpleIdentifier identifier) { | 5804 void set prefix(SimpleIdentifier identifier) { |
| 5797 _prefix = _becomeParentOf(identifier); | 5805 _prefix = _becomeParentOf(identifier as AstNodeImpl); |
| 5798 } | 5806 } |
| 5799 | 5807 |
| 5800 @override | 5808 @override |
| 5801 LibraryElement get uriElement { | 5809 LibraryElement get uriElement { |
| 5802 ImportElement element = this.element; | 5810 ImportElement element = this.element; |
| 5803 if (element == null) { | 5811 if (element == null) { |
| 5804 return null; | 5812 return null; |
| 5805 } | 5813 } |
| 5806 return element.importedLibrary; | 5814 return element.importedLibrary; |
| 5807 } | 5815 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5877 * [AuxiliaryElements] will be set to hold onto the static and propagated | 5885 * [AuxiliaryElements] will be set to hold onto the static and propagated |
| 5878 * information. The auxiliary element will hold onto the elements from the | 5886 * information. The auxiliary element will hold onto the elements from the |
| 5879 * getter context. | 5887 * getter context. |
| 5880 */ | 5888 */ |
| 5881 AuxiliaryElements auxiliaryElements = null; | 5889 AuxiliaryElements auxiliaryElements = null; |
| 5882 | 5890 |
| 5883 /** | 5891 /** |
| 5884 * Initialize a newly created index expression. | 5892 * Initialize a newly created index expression. |
| 5885 */ | 5893 */ |
| 5886 IndexExpressionImpl.forCascade( | 5894 IndexExpressionImpl.forCascade( |
| 5887 this.period, this.leftBracket, Expression index, this.rightBracket) { | 5895 this.period, this.leftBracket, ExpressionImpl index, this.rightBracket) { |
| 5888 _index = _becomeParentOf(index); | 5896 _index = _becomeParentOf(index); |
| 5889 } | 5897 } |
| 5890 | 5898 |
| 5891 /** | 5899 /** |
| 5892 * Initialize a newly created index expression. | 5900 * Initialize a newly created index expression. |
| 5893 */ | 5901 */ |
| 5894 IndexExpressionImpl.forTarget(Expression target, this.leftBracket, | 5902 IndexExpressionImpl.forTarget(ExpressionImpl target, this.leftBracket, |
| 5895 Expression index, this.rightBracket) { | 5903 ExpressionImpl index, this.rightBracket) { |
| 5896 _target = _becomeParentOf(target); | 5904 _target = _becomeParentOf(target); |
| 5897 _index = _becomeParentOf(index); | 5905 _index = _becomeParentOf(index); |
| 5898 } | 5906 } |
| 5899 | 5907 |
| 5900 @override | 5908 @override |
| 5901 Token get beginToken { | 5909 Token get beginToken { |
| 5902 if (_target != null) { | 5910 if (_target != null) { |
| 5903 return _target.beginToken; | 5911 return _target.beginToken; |
| 5904 } | 5912 } |
| 5905 return period; | 5913 return period; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 5923 ..add(rightBracket); | 5931 ..add(rightBracket); |
| 5924 | 5932 |
| 5925 @override | 5933 @override |
| 5926 Token get endToken => rightBracket; | 5934 Token get endToken => rightBracket; |
| 5927 | 5935 |
| 5928 @override | 5936 @override |
| 5929 Expression get index => _index; | 5937 Expression get index => _index; |
| 5930 | 5938 |
| 5931 @override | 5939 @override |
| 5932 void set index(Expression expression) { | 5940 void set index(Expression expression) { |
| 5933 _index = _becomeParentOf(expression); | 5941 _index = _becomeParentOf(expression as AstNodeImpl); |
| 5934 } | 5942 } |
| 5935 | 5943 |
| 5936 @override | 5944 @override |
| 5937 bool get isAssignable => true; | 5945 bool get isAssignable => true; |
| 5938 | 5946 |
| 5939 @override | 5947 @override |
| 5940 bool get isCascaded => period != null; | 5948 bool get isCascaded => period != null; |
| 5941 | 5949 |
| 5942 @override | 5950 @override |
| 5943 int get precedence => 15; | 5951 int get precedence => 15; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 5955 return (ancestor as CascadeExpression).target; | 5963 return (ancestor as CascadeExpression).target; |
| 5956 } | 5964 } |
| 5957 return _target; | 5965 return _target; |
| 5958 } | 5966 } |
| 5959 | 5967 |
| 5960 @override | 5968 @override |
| 5961 Expression get target => _target; | 5969 Expression get target => _target; |
| 5962 | 5970 |
| 5963 @override | 5971 @override |
| 5964 void set target(Expression expression) { | 5972 void set target(Expression expression) { |
| 5965 _target = _becomeParentOf(expression); | 5973 _target = _becomeParentOf(expression as AstNodeImpl); |
| 5966 } | 5974 } |
| 5967 | 5975 |
| 5968 /** | 5976 /** |
| 5969 * If the AST structure has been resolved, and the function being invoked is | 5977 * If the AST structure has been resolved, and the function being invoked is |
| 5970 * known based on propagated type information, then return the parameter | 5978 * known based on propagated type information, then return the parameter |
| 5971 * element representing the parameter to which the value of the index | 5979 * element representing the parameter to which the value of the index |
| 5972 * expression will be bound. Otherwise, return `null`. | 5980 * expression will be bound. Otherwise, return `null`. |
| 5973 */ | 5981 */ |
| 5974 ParameterElement get _propagatedParameterElementForIndex { | 5982 ParameterElement get _propagatedParameterElementForIndex { |
| 5975 if (propagatedElement == null) { | 5983 if (propagatedElement == null) { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6067 * The element associated with the constructor based on static type | 6075 * The element associated with the constructor based on static type |
| 6068 * information, or `null` if the AST structure has not been resolved or if the | 6076 * information, or `null` if the AST structure has not been resolved or if the |
| 6069 * constructor could not be resolved. | 6077 * constructor could not be resolved. |
| 6070 */ | 6078 */ |
| 6071 @override | 6079 @override |
| 6072 ConstructorElement staticElement; | 6080 ConstructorElement staticElement; |
| 6073 | 6081 |
| 6074 /** | 6082 /** |
| 6075 * Initialize a newly created instance creation expression. | 6083 * Initialize a newly created instance creation expression. |
| 6076 */ | 6084 */ |
| 6077 InstanceCreationExpressionImpl(this.keyword, ConstructorName constructorName, | 6085 InstanceCreationExpressionImpl(this.keyword, |
| 6078 ArgumentList argumentList) { | 6086 ConstructorNameImpl constructorName, ArgumentListImpl argumentList) { |
| 6079 _constructorName = _becomeParentOf(constructorName); | 6087 _constructorName = _becomeParentOf(constructorName); |
| 6080 _argumentList = _becomeParentOf(argumentList); | 6088 _argumentList = _becomeParentOf(argumentList); |
| 6081 } | 6089 } |
| 6082 | 6090 |
| 6083 @override | 6091 @override |
| 6084 ArgumentList get argumentList => _argumentList; | 6092 ArgumentList get argumentList => _argumentList; |
| 6085 | 6093 |
| 6086 @override | 6094 @override |
| 6087 void set argumentList(ArgumentList argumentList) { | 6095 void set argumentList(ArgumentList argumentList) { |
| 6088 _argumentList = _becomeParentOf(argumentList); | 6096 _argumentList = _becomeParentOf(argumentList as AstNodeImpl); |
| 6089 } | 6097 } |
| 6090 | 6098 |
| 6091 @override | 6099 @override |
| 6092 Token get beginToken => keyword; | 6100 Token get beginToken => keyword; |
| 6093 | 6101 |
| 6094 @override | 6102 @override |
| 6095 Iterable get childEntities => new ChildEntities() | 6103 Iterable get childEntities => new ChildEntities() |
| 6096 ..add(keyword) | 6104 ..add(keyword) |
| 6097 ..add(_constructorName) | 6105 ..add(_constructorName) |
| 6098 ..add(_argumentList); | 6106 ..add(_argumentList); |
| 6099 | 6107 |
| 6100 @override | 6108 @override |
| 6101 ConstructorName get constructorName => _constructorName; | 6109 ConstructorName get constructorName => _constructorName; |
| 6102 | 6110 |
| 6103 @override | 6111 @override |
| 6104 void set constructorName(ConstructorName name) { | 6112 void set constructorName(ConstructorName name) { |
| 6105 _constructorName = _becomeParentOf(name); | 6113 _constructorName = _becomeParentOf(name as AstNodeImpl); |
| 6106 } | 6114 } |
| 6107 | 6115 |
| 6108 @override | 6116 @override |
| 6109 Token get endToken => _argumentList.endToken; | 6117 Token get endToken => _argumentList.endToken; |
| 6110 | 6118 |
| 6111 @override | 6119 @override |
| 6112 bool get isConst => keyword?.keyword == Keyword.CONST; | 6120 bool get isConst => keyword?.keyword == Keyword.CONST; |
| 6113 | 6121 |
| 6114 @override | 6122 @override |
| 6115 int get precedence => 16; | 6123 int get precedence => 16; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6212 * The right curly bracket, or `null` if the expression is an identifier | 6220 * The right curly bracket, or `null` if the expression is an identifier |
| 6213 * without brackets. | 6221 * without brackets. |
| 6214 */ | 6222 */ |
| 6215 @override | 6223 @override |
| 6216 Token rightBracket; | 6224 Token rightBracket; |
| 6217 | 6225 |
| 6218 /** | 6226 /** |
| 6219 * Initialize a newly created interpolation expression. | 6227 * Initialize a newly created interpolation expression. |
| 6220 */ | 6228 */ |
| 6221 InterpolationExpressionImpl( | 6229 InterpolationExpressionImpl( |
| 6222 this.leftBracket, Expression expression, this.rightBracket) { | 6230 this.leftBracket, ExpressionImpl expression, this.rightBracket) { |
| 6223 _expression = _becomeParentOf(expression); | 6231 _expression = _becomeParentOf(expression); |
| 6224 } | 6232 } |
| 6225 | 6233 |
| 6226 @override | 6234 @override |
| 6227 Token get beginToken => leftBracket; | 6235 Token get beginToken => leftBracket; |
| 6228 | 6236 |
| 6229 @override | 6237 @override |
| 6230 Iterable get childEntities => new ChildEntities() | 6238 Iterable get childEntities => new ChildEntities() |
| 6231 ..add(leftBracket) | 6239 ..add(leftBracket) |
| 6232 ..add(_expression) | 6240 ..add(_expression) |
| 6233 ..add(rightBracket); | 6241 ..add(rightBracket); |
| 6234 | 6242 |
| 6235 @override | 6243 @override |
| 6236 Token get endToken { | 6244 Token get endToken { |
| 6237 if (rightBracket != null) { | 6245 if (rightBracket != null) { |
| 6238 return rightBracket; | 6246 return rightBracket; |
| 6239 } | 6247 } |
| 6240 return _expression.endToken; | 6248 return _expression.endToken; |
| 6241 } | 6249 } |
| 6242 | 6250 |
| 6243 @override | 6251 @override |
| 6244 Expression get expression => _expression; | 6252 Expression get expression => _expression; |
| 6245 | 6253 |
| 6246 @override | 6254 @override |
| 6247 void set expression(Expression expression) { | 6255 void set expression(Expression expression) { |
| 6248 _expression = _becomeParentOf(expression); | 6256 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 6249 } | 6257 } |
| 6250 | 6258 |
| 6251 @override | 6259 @override |
| 6252 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 6260 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 6253 visitor.visitInterpolationExpression(this); | 6261 visitor.visitInterpolationExpression(this); |
| 6254 | 6262 |
| 6255 @override | 6263 @override |
| 6256 void visitChildren(AstVisitor visitor) { | 6264 void visitChildren(AstVisitor visitor) { |
| 6257 _expression?.accept(visitor); | 6265 _expression?.accept(visitor); |
| 6258 } | 6266 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6334 @override | 6342 @override |
| 6335 DartType propagatedInvokeType; | 6343 DartType propagatedInvokeType; |
| 6336 | 6344 |
| 6337 @override | 6345 @override |
| 6338 DartType staticInvokeType; | 6346 DartType staticInvokeType; |
| 6339 | 6347 |
| 6340 /** | 6348 /** |
| 6341 * Initialize a newly created invocation. | 6349 * Initialize a newly created invocation. |
| 6342 */ | 6350 */ |
| 6343 InvocationExpressionImpl( | 6351 InvocationExpressionImpl( |
| 6344 TypeArgumentList typeArguments, ArgumentList argumentList) { | 6352 TypeArgumentListImpl typeArguments, ArgumentListImpl argumentList) { |
| 6345 _typeArguments = _becomeParentOf(typeArguments); | 6353 _typeArguments = _becomeParentOf(typeArguments); |
| 6346 _argumentList = _becomeParentOf(argumentList); | 6354 _argumentList = _becomeParentOf(argumentList); |
| 6347 } | 6355 } |
| 6348 | 6356 |
| 6349 @override | 6357 @override |
| 6350 ArgumentList get argumentList => _argumentList; | 6358 ArgumentList get argumentList => _argumentList; |
| 6351 | 6359 |
| 6352 void set argumentList(ArgumentList argumentList) { | 6360 void set argumentList(ArgumentList argumentList) { |
| 6353 _argumentList = _becomeParentOf(argumentList); | 6361 _argumentList = _becomeParentOf(argumentList as AstNodeImpl); |
| 6354 } | 6362 } |
| 6355 | 6363 |
| 6356 @override | 6364 @override |
| 6357 TypeArgumentList get typeArguments => _typeArguments; | 6365 TypeArgumentList get typeArguments => _typeArguments; |
| 6358 | 6366 |
| 6359 void set typeArguments(TypeArgumentList typeArguments) { | 6367 void set typeArguments(TypeArgumentList typeArguments) { |
| 6360 _typeArguments = _becomeParentOf(typeArguments); | 6368 _typeArguments = _becomeParentOf(typeArguments as AstNodeImpl); |
| 6361 } | 6369 } |
| 6362 } | 6370 } |
| 6363 | 6371 |
| 6364 /** | 6372 /** |
| 6365 * An is expression. | 6373 * An is expression. |
| 6366 * | 6374 * |
| 6367 * isExpression ::= | 6375 * isExpression ::= |
| 6368 * [Expression] 'is' '!'? [TypeName] | 6376 * [Expression] 'is' '!'? [TypeName] |
| 6369 */ | 6377 */ |
| 6370 class IsExpressionImpl extends ExpressionImpl implements IsExpression { | 6378 class IsExpressionImpl extends ExpressionImpl implements IsExpression { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 6387 | 6395 |
| 6388 /** | 6396 /** |
| 6389 * The name of the type being tested for. | 6397 * The name of the type being tested for. |
| 6390 */ | 6398 */ |
| 6391 TypeName _type; | 6399 TypeName _type; |
| 6392 | 6400 |
| 6393 /** | 6401 /** |
| 6394 * Initialize a newly created is expression. The [notOperator] can be `null` | 6402 * Initialize a newly created is expression. The [notOperator] can be `null` |
| 6395 * if the sense of the test is not negated. | 6403 * if the sense of the test is not negated. |
| 6396 */ | 6404 */ |
| 6397 IsExpressionImpl( | 6405 IsExpressionImpl(ExpressionImpl expression, this.isOperator, this.notOperator, |
| 6398 Expression expression, this.isOperator, this.notOperator, TypeName type) { | 6406 TypeNameImpl type) { |
| 6399 _expression = _becomeParentOf(expression); | 6407 _expression = _becomeParentOf(expression); |
| 6400 _type = _becomeParentOf(type); | 6408 _type = _becomeParentOf(type); |
| 6401 } | 6409 } |
| 6402 | 6410 |
| 6403 @override | 6411 @override |
| 6404 Token get beginToken => _expression.beginToken; | 6412 Token get beginToken => _expression.beginToken; |
| 6405 | 6413 |
| 6406 @override | 6414 @override |
| 6407 Iterable get childEntities => new ChildEntities() | 6415 Iterable get childEntities => new ChildEntities() |
| 6408 ..add(_expression) | 6416 ..add(_expression) |
| 6409 ..add(isOperator) | 6417 ..add(isOperator) |
| 6410 ..add(notOperator) | 6418 ..add(notOperator) |
| 6411 ..add(_type); | 6419 ..add(_type); |
| 6412 | 6420 |
| 6413 @override | 6421 @override |
| 6414 Token get endToken => _type.endToken; | 6422 Token get endToken => _type.endToken; |
| 6415 | 6423 |
| 6416 @override | 6424 @override |
| 6417 Expression get expression => _expression; | 6425 Expression get expression => _expression; |
| 6418 | 6426 |
| 6419 @override | 6427 @override |
| 6420 void set expression(Expression expression) { | 6428 void set expression(Expression expression) { |
| 6421 _expression = _becomeParentOf(expression); | 6429 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 6422 } | 6430 } |
| 6423 | 6431 |
| 6424 @override | 6432 @override |
| 6425 int get precedence => 7; | 6433 int get precedence => 7; |
| 6426 | 6434 |
| 6427 @override | 6435 @override |
| 6428 TypeName get type => _type; | 6436 TypeName get type => _type; |
| 6429 | 6437 |
| 6430 @override | 6438 @override |
| 6431 void set type(TypeName name) { | 6439 void set type(TypeName name) { |
| 6432 _type = _becomeParentOf(name); | 6440 _type = _becomeParentOf(name as AstNodeImpl); |
| 6433 } | 6441 } |
| 6434 | 6442 |
| 6435 @override | 6443 @override |
| 6436 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 6444 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 6437 visitor.visitIsExpression(this); | 6445 visitor.visitIsExpression(this); |
| 6438 | 6446 |
| 6439 @override | 6447 @override |
| 6440 void visitChildren(AstVisitor visitor) { | 6448 void visitChildren(AstVisitor visitor) { |
| 6441 _expression?.accept(visitor); | 6449 _expression?.accept(visitor); |
| 6442 _type?.accept(visitor); | 6450 _type?.accept(visitor); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 6456 NodeList<Label> _labels; | 6464 NodeList<Label> _labels; |
| 6457 | 6465 |
| 6458 /** | 6466 /** |
| 6459 * The statement with which the labels are being associated. | 6467 * The statement with which the labels are being associated. |
| 6460 */ | 6468 */ |
| 6461 Statement _statement; | 6469 Statement _statement; |
| 6462 | 6470 |
| 6463 /** | 6471 /** |
| 6464 * Initialize a newly created labeled statement. | 6472 * Initialize a newly created labeled statement. |
| 6465 */ | 6473 */ |
| 6466 LabeledStatementImpl(List<Label> labels, Statement statement) { | 6474 LabeledStatementImpl(List<Label> labels, StatementImpl statement) { |
| 6467 _labels = new NodeListImpl<Label>(this, labels); | 6475 _labels = new NodeListImpl<Label>(this, labels); |
| 6468 _statement = _becomeParentOf(statement); | 6476 _statement = _becomeParentOf(statement); |
| 6469 } | 6477 } |
| 6470 | 6478 |
| 6471 @override | 6479 @override |
| 6472 Token get beginToken { | 6480 Token get beginToken { |
| 6473 if (!_labels.isEmpty) { | 6481 if (!_labels.isEmpty) { |
| 6474 return _labels.beginToken; | 6482 return _labels.beginToken; |
| 6475 } | 6483 } |
| 6476 return _statement.beginToken; | 6484 return _statement.beginToken; |
| 6477 } | 6485 } |
| 6478 | 6486 |
| 6479 @override | 6487 @override |
| 6480 Iterable get childEntities => new ChildEntities() | 6488 Iterable get childEntities => new ChildEntities() |
| 6481 ..addAll(_labels) | 6489 ..addAll(_labels) |
| 6482 ..add(_statement); | 6490 ..add(_statement); |
| 6483 | 6491 |
| 6484 @override | 6492 @override |
| 6485 Token get endToken => _statement.endToken; | 6493 Token get endToken => _statement.endToken; |
| 6486 | 6494 |
| 6487 @override | 6495 @override |
| 6488 NodeList<Label> get labels => _labels; | 6496 NodeList<Label> get labels => _labels; |
| 6489 | 6497 |
| 6490 @override | 6498 @override |
| 6491 Statement get statement => _statement; | 6499 Statement get statement => _statement; |
| 6492 | 6500 |
| 6493 @override | 6501 @override |
| 6494 void set statement(Statement statement) { | 6502 void set statement(Statement statement) { |
| 6495 _statement = _becomeParentOf(statement); | 6503 _statement = _becomeParentOf(statement as AstNodeImpl); |
| 6496 } | 6504 } |
| 6497 | 6505 |
| 6498 @override | 6506 @override |
| 6499 Statement get unlabeled => _statement.unlabeled; | 6507 Statement get unlabeled => _statement.unlabeled; |
| 6500 | 6508 |
| 6501 @override | 6509 @override |
| 6502 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 6510 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 6503 visitor.visitLabeledStatement(this); | 6511 visitor.visitLabeledStatement(this); |
| 6504 | 6512 |
| 6505 @override | 6513 @override |
| (...skipping 17 matching lines...) Expand all Loading... |
| 6523 | 6531 |
| 6524 /** | 6532 /** |
| 6525 * The colon that separates the label from the statement. | 6533 * The colon that separates the label from the statement. |
| 6526 */ | 6534 */ |
| 6527 @override | 6535 @override |
| 6528 Token colon; | 6536 Token colon; |
| 6529 | 6537 |
| 6530 /** | 6538 /** |
| 6531 * Initialize a newly created label. | 6539 * Initialize a newly created label. |
| 6532 */ | 6540 */ |
| 6533 LabelImpl(SimpleIdentifier label, this.colon) { | 6541 LabelImpl(SimpleIdentifierImpl label, this.colon) { |
| 6534 _label = _becomeParentOf(label); | 6542 _label = _becomeParentOf(label); |
| 6535 } | 6543 } |
| 6536 | 6544 |
| 6537 @override | 6545 @override |
| 6538 Token get beginToken => _label.beginToken; | 6546 Token get beginToken => _label.beginToken; |
| 6539 | 6547 |
| 6540 @override | 6548 @override |
| 6541 Iterable get childEntities => new ChildEntities()..add(_label)..add(colon); | 6549 Iterable get childEntities => new ChildEntities()..add(_label)..add(colon); |
| 6542 | 6550 |
| 6543 @override | 6551 @override |
| 6544 Token get endToken => colon; | 6552 Token get endToken => colon; |
| 6545 | 6553 |
| 6546 @override | 6554 @override |
| 6547 SimpleIdentifier get label => _label; | 6555 SimpleIdentifier get label => _label; |
| 6548 | 6556 |
| 6549 @override | 6557 @override |
| 6550 void set label(SimpleIdentifier label) { | 6558 void set label(SimpleIdentifier label) { |
| 6551 _label = _becomeParentOf(label); | 6559 _label = _becomeParentOf(label as AstNodeImpl); |
| 6552 } | 6560 } |
| 6553 | 6561 |
| 6554 @override | 6562 @override |
| 6555 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 6563 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 6556 visitor.visitLabel(this); | 6564 visitor.visitLabel(this); |
| 6557 | 6565 |
| 6558 @override | 6566 @override |
| 6559 void visitChildren(AstVisitor visitor) { | 6567 void visitChildren(AstVisitor visitor) { |
| 6560 _label?.accept(visitor); | 6568 _label?.accept(visitor); |
| 6561 } | 6569 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 6583 * The semicolon terminating the directive. | 6591 * The semicolon terminating the directive. |
| 6584 */ | 6592 */ |
| 6585 @override | 6593 @override |
| 6586 Token semicolon; | 6594 Token semicolon; |
| 6587 | 6595 |
| 6588 /** | 6596 /** |
| 6589 * Initialize a newly created library directive. Either or both of the | 6597 * Initialize a newly created library directive. Either or both of the |
| 6590 * [comment] and [metadata] can be `null` if the directive does not have the | 6598 * [comment] and [metadata] can be `null` if the directive does not have the |
| 6591 * corresponding attribute. | 6599 * corresponding attribute. |
| 6592 */ | 6600 */ |
| 6593 LibraryDirectiveImpl(Comment comment, List<Annotation> metadata, | 6601 LibraryDirectiveImpl(CommentImpl comment, List<Annotation> metadata, |
| 6594 this.libraryKeyword, LibraryIdentifier name, this.semicolon) | 6602 this.libraryKeyword, LibraryIdentifierImpl name, this.semicolon) |
| 6595 : super(comment, metadata) { | 6603 : super(comment, metadata) { |
| 6596 _name = _becomeParentOf(name); | 6604 _name = _becomeParentOf(name); |
| 6597 } | 6605 } |
| 6598 | 6606 |
| 6599 @override | 6607 @override |
| 6600 Iterable get childEntities => | 6608 Iterable get childEntities => |
| 6601 super._childEntities..add(libraryKeyword)..add(_name)..add(semicolon); | 6609 super._childEntities..add(libraryKeyword)..add(_name)..add(semicolon); |
| 6602 | 6610 |
| 6603 @override | 6611 @override |
| 6604 Token get endToken => semicolon; | 6612 Token get endToken => semicolon; |
| 6605 | 6613 |
| 6606 @override | 6614 @override |
| 6607 Token get firstTokenAfterCommentAndMetadata => libraryKeyword; | 6615 Token get firstTokenAfterCommentAndMetadata => libraryKeyword; |
| 6608 | 6616 |
| 6609 @override | 6617 @override |
| 6610 Token get keyword => libraryKeyword; | 6618 Token get keyword => libraryKeyword; |
| 6611 | 6619 |
| 6612 @override | 6620 @override |
| 6613 LibraryIdentifier get name => _name; | 6621 LibraryIdentifier get name => _name; |
| 6614 | 6622 |
| 6615 @override | 6623 @override |
| 6616 void set name(LibraryIdentifier name) { | 6624 void set name(LibraryIdentifier name) { |
| 6617 _name = _becomeParentOf(name); | 6625 _name = _becomeParentOf(name as AstNodeImpl); |
| 6618 } | 6626 } |
| 6619 | 6627 |
| 6620 @override | 6628 @override |
| 6621 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 6629 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 6622 visitor.visitLibraryDirective(this); | 6630 visitor.visitLibraryDirective(this); |
| 6623 | 6631 |
| 6624 @override | 6632 @override |
| 6625 void visitChildren(AstVisitor visitor) { | 6633 void visitChildren(AstVisitor visitor) { |
| 6626 super.visitChildren(visitor); | 6634 super.visitChildren(visitor); |
| 6627 _name?.accept(visitor); | 6635 _name?.accept(visitor); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6826 Token separator; | 6834 Token separator; |
| 6827 | 6835 |
| 6828 /** | 6836 /** |
| 6829 * The expression computing the value that will be associated with the key. | 6837 * The expression computing the value that will be associated with the key. |
| 6830 */ | 6838 */ |
| 6831 Expression _value; | 6839 Expression _value; |
| 6832 | 6840 |
| 6833 /** | 6841 /** |
| 6834 * Initialize a newly created map literal entry. | 6842 * Initialize a newly created map literal entry. |
| 6835 */ | 6843 */ |
| 6836 MapLiteralEntryImpl(Expression key, this.separator, Expression value) { | 6844 MapLiteralEntryImpl( |
| 6845 ExpressionImpl key, this.separator, ExpressionImpl value) { |
| 6837 _key = _becomeParentOf(key); | 6846 _key = _becomeParentOf(key); |
| 6838 _value = _becomeParentOf(value); | 6847 _value = _becomeParentOf(value); |
| 6839 } | 6848 } |
| 6840 | 6849 |
| 6841 @override | 6850 @override |
| 6842 Token get beginToken => _key.beginToken; | 6851 Token get beginToken => _key.beginToken; |
| 6843 | 6852 |
| 6844 @override | 6853 @override |
| 6845 Iterable get childEntities => | 6854 Iterable get childEntities => |
| 6846 new ChildEntities()..add(_key)..add(separator)..add(_value); | 6855 new ChildEntities()..add(_key)..add(separator)..add(_value); |
| 6847 | 6856 |
| 6848 @override | 6857 @override |
| 6849 Token get endToken => _value.endToken; | 6858 Token get endToken => _value.endToken; |
| 6850 | 6859 |
| 6851 @override | 6860 @override |
| 6852 Expression get key => _key; | 6861 Expression get key => _key; |
| 6853 | 6862 |
| 6854 @override | 6863 @override |
| 6855 void set key(Expression string) { | 6864 void set key(Expression string) { |
| 6856 _key = _becomeParentOf(string); | 6865 _key = _becomeParentOf(string as AstNodeImpl); |
| 6857 } | 6866 } |
| 6858 | 6867 |
| 6859 @override | 6868 @override |
| 6860 Expression get value => _value; | 6869 Expression get value => _value; |
| 6861 | 6870 |
| 6862 @override | 6871 @override |
| 6863 void set value(Expression expression) { | 6872 void set value(Expression expression) { |
| 6864 _value = _becomeParentOf(expression); | 6873 _value = _becomeParentOf(expression as AstNodeImpl); |
| 6865 } | 6874 } |
| 6866 | 6875 |
| 6867 @override | 6876 @override |
| 6868 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 6877 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 6869 visitor.visitMapLiteralEntry(this); | 6878 visitor.visitMapLiteralEntry(this); |
| 6870 | 6879 |
| 6871 @override | 6880 @override |
| 6872 void visitChildren(AstVisitor visitor) { | 6881 void visitChildren(AstVisitor visitor) { |
| 6873 _key?.accept(visitor); | 6882 _key?.accept(visitor); |
| 6874 _value?.accept(visitor); | 6883 _value?.accept(visitor); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7023 * [comment] and [metadata] can be `null` if the declaration does not have the | 7032 * [comment] and [metadata] can be `null` if the declaration does not have the |
| 7024 * corresponding attribute. The [externalKeyword] can be `null` if the method | 7033 * corresponding attribute. The [externalKeyword] can be `null` if the method |
| 7025 * is not external. The [modifierKeyword] can be `null` if the method is | 7034 * is not external. The [modifierKeyword] can be `null` if the method is |
| 7026 * neither abstract nor static. The [returnType] can be `null` if no return | 7035 * neither abstract nor static. The [returnType] can be `null` if no return |
| 7027 * type was specified. The [propertyKeyword] can be `null` if the method is | 7036 * type was specified. The [propertyKeyword] can be `null` if the method is |
| 7028 * neither a getter or a setter. The [operatorKeyword] can be `null` if the | 7037 * neither a getter or a setter. The [operatorKeyword] can be `null` if the |
| 7029 * method does not implement an operator. The [parameters] must be `null` if | 7038 * method does not implement an operator. The [parameters] must be `null` if |
| 7030 * this method declares a getter. | 7039 * this method declares a getter. |
| 7031 */ | 7040 */ |
| 7032 MethodDeclarationImpl( | 7041 MethodDeclarationImpl( |
| 7033 Comment comment, | 7042 CommentImpl comment, |
| 7034 List<Annotation> metadata, | 7043 List<Annotation> metadata, |
| 7035 this.externalKeyword, | 7044 this.externalKeyword, |
| 7036 this.modifierKeyword, | 7045 this.modifierKeyword, |
| 7037 TypeName returnType, | 7046 TypeNameImpl returnType, |
| 7038 this.propertyKeyword, | 7047 this.propertyKeyword, |
| 7039 this.operatorKeyword, | 7048 this.operatorKeyword, |
| 7040 SimpleIdentifier name, | 7049 SimpleIdentifierImpl name, |
| 7041 TypeParameterList typeParameters, | 7050 TypeParameterListImpl typeParameters, |
| 7042 FormalParameterList parameters, | 7051 FormalParameterListImpl parameters, |
| 7043 FunctionBody body) | 7052 FunctionBodyImpl body) |
| 7044 : super(comment, metadata) { | 7053 : super(comment, metadata) { |
| 7045 _returnType = _becomeParentOf(returnType); | 7054 _returnType = _becomeParentOf(returnType); |
| 7046 _name = _becomeParentOf(name); | 7055 _name = _becomeParentOf(name); |
| 7047 _typeParameters = _becomeParentOf(typeParameters); | 7056 _typeParameters = _becomeParentOf(typeParameters); |
| 7048 _parameters = _becomeParentOf(parameters); | 7057 _parameters = _becomeParentOf(parameters); |
| 7049 _body = _becomeParentOf(body); | 7058 _body = _becomeParentOf(body); |
| 7050 } | 7059 } |
| 7051 | 7060 |
| 7052 @override | 7061 @override |
| 7053 FunctionBody get body => _body; | 7062 FunctionBody get body => _body; |
| 7054 | 7063 |
| 7055 @override | 7064 @override |
| 7056 void set body(FunctionBody functionBody) { | 7065 void set body(FunctionBody functionBody) { |
| 7057 _body = _becomeParentOf(functionBody); | 7066 _body = _becomeParentOf(functionBody as AstNodeImpl); |
| 7058 } | 7067 } |
| 7059 | 7068 |
| 7060 @override | 7069 @override |
| 7061 Iterable get childEntities => super._childEntities | 7070 Iterable get childEntities => super._childEntities |
| 7062 ..add(externalKeyword) | 7071 ..add(externalKeyword) |
| 7063 ..add(modifierKeyword) | 7072 ..add(modifierKeyword) |
| 7064 ..add(_returnType) | 7073 ..add(_returnType) |
| 7065 ..add(propertyKeyword) | 7074 ..add(propertyKeyword) |
| 7066 ..add(operatorKeyword) | 7075 ..add(operatorKeyword) |
| 7067 ..add(_name) | 7076 ..add(_name) |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7114 bool get isSetter => propertyKeyword?.keyword == Keyword.SET; | 7123 bool get isSetter => propertyKeyword?.keyword == Keyword.SET; |
| 7115 | 7124 |
| 7116 @override | 7125 @override |
| 7117 bool get isStatic => modifierKeyword?.keyword == Keyword.STATIC; | 7126 bool get isStatic => modifierKeyword?.keyword == Keyword.STATIC; |
| 7118 | 7127 |
| 7119 @override | 7128 @override |
| 7120 SimpleIdentifier get name => _name; | 7129 SimpleIdentifier get name => _name; |
| 7121 | 7130 |
| 7122 @override | 7131 @override |
| 7123 void set name(SimpleIdentifier identifier) { | 7132 void set name(SimpleIdentifier identifier) { |
| 7124 _name = _becomeParentOf(identifier); | 7133 _name = _becomeParentOf(identifier as AstNodeImpl); |
| 7125 } | 7134 } |
| 7126 | 7135 |
| 7127 @override | 7136 @override |
| 7128 FormalParameterList get parameters => _parameters; | 7137 FormalParameterList get parameters => _parameters; |
| 7129 | 7138 |
| 7130 @override | 7139 @override |
| 7131 void set parameters(FormalParameterList parameters) { | 7140 void set parameters(FormalParameterList parameters) { |
| 7132 _parameters = _becomeParentOf(parameters); | 7141 _parameters = _becomeParentOf(parameters as AstNodeImpl); |
| 7133 } | 7142 } |
| 7134 | 7143 |
| 7135 @override | 7144 @override |
| 7136 TypeName get returnType => _returnType; | 7145 TypeName get returnType => _returnType; |
| 7137 | 7146 |
| 7138 @override | 7147 @override |
| 7139 void set returnType(TypeName typeName) { | 7148 void set returnType(TypeName typeName) { |
| 7140 _returnType = _becomeParentOf(typeName); | 7149 _returnType = _becomeParentOf(typeName as AstNodeImpl); |
| 7141 } | 7150 } |
| 7142 | 7151 |
| 7143 @override | 7152 @override |
| 7144 TypeParameterList get typeParameters => _typeParameters; | 7153 TypeParameterList get typeParameters => _typeParameters; |
| 7145 | 7154 |
| 7146 @override | 7155 @override |
| 7147 void set typeParameters(TypeParameterList typeParameters) { | 7156 void set typeParameters(TypeParameterList typeParameters) { |
| 7148 _typeParameters = _becomeParentOf(typeParameters); | 7157 _typeParameters = _becomeParentOf(typeParameters as AstNodeImpl); |
| 7149 } | 7158 } |
| 7150 | 7159 |
| 7151 @override | 7160 @override |
| 7152 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 7161 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 7153 visitor.visitMethodDeclaration(this); | 7162 visitor.visitMethodDeclaration(this); |
| 7154 | 7163 |
| 7155 @override | 7164 @override |
| 7156 void visitChildren(AstVisitor visitor) { | 7165 void visitChildren(AstVisitor visitor) { |
| 7157 super.visitChildren(visitor); | 7166 super.visitChildren(visitor); |
| 7158 _returnType?.accept(visitor); | 7167 _returnType?.accept(visitor); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7192 /** | 7201 /** |
| 7193 * The name of the method being invoked. | 7202 * The name of the method being invoked. |
| 7194 */ | 7203 */ |
| 7195 SimpleIdentifier _methodName; | 7204 SimpleIdentifier _methodName; |
| 7196 | 7205 |
| 7197 /** | 7206 /** |
| 7198 * Initialize a newly created method invocation. The [target] and [operator] | 7207 * Initialize a newly created method invocation. The [target] and [operator] |
| 7199 * can be `null` if there is no target. | 7208 * can be `null` if there is no target. |
| 7200 */ | 7209 */ |
| 7201 MethodInvocationImpl( | 7210 MethodInvocationImpl( |
| 7202 Expression target, | 7211 ExpressionImpl target, |
| 7203 this.operator, | 7212 this.operator, |
| 7204 SimpleIdentifier methodName, | 7213 SimpleIdentifierImpl methodName, |
| 7205 TypeArgumentList typeArguments, | 7214 TypeArgumentListImpl typeArguments, |
| 7206 ArgumentList argumentList) | 7215 ArgumentListImpl argumentList) |
| 7207 : super(typeArguments, argumentList) { | 7216 : super(typeArguments, argumentList) { |
| 7208 _target = _becomeParentOf(target); | 7217 _target = _becomeParentOf(target); |
| 7209 _methodName = _becomeParentOf(methodName); | 7218 _methodName = _becomeParentOf(methodName); |
| 7210 } | 7219 } |
| 7211 | 7220 |
| 7212 @override | 7221 @override |
| 7213 Token get beginToken { | 7222 Token get beginToken { |
| 7214 if (_target != null) { | 7223 if (_target != null) { |
| 7215 return _target.beginToken; | 7224 return _target.beginToken; |
| 7216 } else if (operator != null) { | 7225 } else if (operator != null) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 7234 | 7243 |
| 7235 @override | 7244 @override |
| 7236 bool get isCascaded => | 7245 bool get isCascaded => |
| 7237 operator != null && operator.type == TokenType.PERIOD_PERIOD; | 7246 operator != null && operator.type == TokenType.PERIOD_PERIOD; |
| 7238 | 7247 |
| 7239 @override | 7248 @override |
| 7240 SimpleIdentifier get methodName => _methodName; | 7249 SimpleIdentifier get methodName => _methodName; |
| 7241 | 7250 |
| 7242 @override | 7251 @override |
| 7243 void set methodName(SimpleIdentifier identifier) { | 7252 void set methodName(SimpleIdentifier identifier) { |
| 7244 _methodName = _becomeParentOf(identifier); | 7253 _methodName = _becomeParentOf(identifier as AstNodeImpl); |
| 7245 } | 7254 } |
| 7246 | 7255 |
| 7247 @override | 7256 @override |
| 7248 int get precedence => 15; | 7257 int get precedence => 15; |
| 7249 | 7258 |
| 7250 @override | 7259 @override |
| 7251 Expression get realTarget { | 7260 Expression get realTarget { |
| 7252 if (isCascaded) { | 7261 if (isCascaded) { |
| 7253 AstNode ancestor = parent; | 7262 AstNode ancestor = parent; |
| 7254 while (ancestor is! CascadeExpression) { | 7263 while (ancestor is! CascadeExpression) { |
| 7255 if (ancestor == null) { | 7264 if (ancestor == null) { |
| 7256 return _target; | 7265 return _target; |
| 7257 } | 7266 } |
| 7258 ancestor = ancestor.parent; | 7267 ancestor = ancestor.parent; |
| 7259 } | 7268 } |
| 7260 return (ancestor as CascadeExpression).target; | 7269 return (ancestor as CascadeExpression).target; |
| 7261 } | 7270 } |
| 7262 return _target; | 7271 return _target; |
| 7263 } | 7272 } |
| 7264 | 7273 |
| 7265 @override | 7274 @override |
| 7266 Expression get target => _target; | 7275 Expression get target => _target; |
| 7267 | 7276 |
| 7268 @override | 7277 @override |
| 7269 void set target(Expression expression) { | 7278 void set target(Expression expression) { |
| 7270 _target = _becomeParentOf(expression); | 7279 _target = _becomeParentOf(expression as AstNodeImpl); |
| 7271 } | 7280 } |
| 7272 | 7281 |
| 7273 @override | 7282 @override |
| 7274 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 7283 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 7275 visitor.visitMethodInvocation(this); | 7284 visitor.visitMethodInvocation(this); |
| 7276 | 7285 |
| 7277 @override | 7286 @override |
| 7278 void visitChildren(AstVisitor visitor) { | 7287 void visitChildren(AstVisitor visitor) { |
| 7279 _target?.accept(visitor); | 7288 _target?.accept(visitor); |
| 7280 _methodName?.accept(visitor); | 7289 _methodName?.accept(visitor); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 7292 * The name of the member being declared. | 7301 * The name of the member being declared. |
| 7293 */ | 7302 */ |
| 7294 SimpleIdentifier _name; | 7303 SimpleIdentifier _name; |
| 7295 | 7304 |
| 7296 /** | 7305 /** |
| 7297 * Initialize a newly created compilation unit member with the given [name]. | 7306 * Initialize a newly created compilation unit member with the given [name]. |
| 7298 * Either or both of the [comment] and [metadata] can be `null` if the member | 7307 * Either or both of the [comment] and [metadata] can be `null` if the member |
| 7299 * does not have the corresponding attribute. | 7308 * does not have the corresponding attribute. |
| 7300 */ | 7309 */ |
| 7301 NamedCompilationUnitMemberImpl( | 7310 NamedCompilationUnitMemberImpl( |
| 7302 Comment comment, List<Annotation> metadata, SimpleIdentifier name) | 7311 CommentImpl comment, List<Annotation> metadata, SimpleIdentifierImpl name) |
| 7303 : super(comment, metadata) { | 7312 : super(comment, metadata) { |
| 7304 _name = _becomeParentOf(name); | 7313 _name = _becomeParentOf(name); |
| 7305 } | 7314 } |
| 7306 | 7315 |
| 7307 @override | 7316 @override |
| 7308 SimpleIdentifier get name => _name; | 7317 SimpleIdentifier get name => _name; |
| 7309 | 7318 |
| 7310 @override | 7319 @override |
| 7311 void set name(SimpleIdentifier identifier) { | 7320 void set name(SimpleIdentifier identifier) { |
| 7312 _name = _becomeParentOf(identifier); | 7321 _name = _becomeParentOf(identifier as AstNodeImpl); |
| 7313 } | 7322 } |
| 7314 } | 7323 } |
| 7315 | 7324 |
| 7316 /** | 7325 /** |
| 7317 * An expression that has a name associated with it. They are used in method | 7326 * An expression that has a name associated with it. They are used in method |
| 7318 * invocations when there are named parameters. | 7327 * invocations when there are named parameters. |
| 7319 * | 7328 * |
| 7320 * namedExpression ::= | 7329 * namedExpression ::= |
| 7321 * [Label] [Expression] | 7330 * [Label] [Expression] |
| 7322 */ | 7331 */ |
| 7323 class NamedExpressionImpl extends ExpressionImpl implements NamedExpression { | 7332 class NamedExpressionImpl extends ExpressionImpl implements NamedExpression { |
| 7324 /** | 7333 /** |
| 7325 * The name associated with the expression. | 7334 * The name associated with the expression. |
| 7326 */ | 7335 */ |
| 7327 Label _name; | 7336 Label _name; |
| 7328 | 7337 |
| 7329 /** | 7338 /** |
| 7330 * The expression with which the name is associated. | 7339 * The expression with which the name is associated. |
| 7331 */ | 7340 */ |
| 7332 Expression _expression; | 7341 Expression _expression; |
| 7333 | 7342 |
| 7334 /** | 7343 /** |
| 7335 * Initialize a newly created named expression.. | 7344 * Initialize a newly created named expression.. |
| 7336 */ | 7345 */ |
| 7337 NamedExpressionImpl(Label name, Expression expression) { | 7346 NamedExpressionImpl(LabelImpl name, ExpressionImpl expression) { |
| 7338 _name = _becomeParentOf(name); | 7347 _name = _becomeParentOf(name); |
| 7339 _expression = _becomeParentOf(expression); | 7348 _expression = _becomeParentOf(expression); |
| 7340 } | 7349 } |
| 7341 | 7350 |
| 7342 @override | 7351 @override |
| 7343 Token get beginToken => _name.beginToken; | 7352 Token get beginToken => _name.beginToken; |
| 7344 | 7353 |
| 7345 @override | 7354 @override |
| 7346 Iterable get childEntities => | 7355 Iterable get childEntities => |
| 7347 new ChildEntities()..add(_name)..add(_expression); | 7356 new ChildEntities()..add(_name)..add(_expression); |
| 7348 | 7357 |
| 7349 @override | 7358 @override |
| 7350 ParameterElement get element { | 7359 ParameterElement get element { |
| 7351 Element element = _name.label.staticElement; | 7360 Element element = _name.label.staticElement; |
| 7352 if (element is ParameterElement) { | 7361 if (element is ParameterElement) { |
| 7353 return element; | 7362 return element; |
| 7354 } | 7363 } |
| 7355 return null; | 7364 return null; |
| 7356 } | 7365 } |
| 7357 | 7366 |
| 7358 @override | 7367 @override |
| 7359 Token get endToken => _expression.endToken; | 7368 Token get endToken => _expression.endToken; |
| 7360 | 7369 |
| 7361 @override | 7370 @override |
| 7362 Expression get expression => _expression; | 7371 Expression get expression => _expression; |
| 7363 | 7372 |
| 7364 @override | 7373 @override |
| 7365 void set expression(Expression expression) { | 7374 void set expression(Expression expression) { |
| 7366 _expression = _becomeParentOf(expression); | 7375 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 7367 } | 7376 } |
| 7368 | 7377 |
| 7369 @override | 7378 @override |
| 7370 Label get name => _name; | 7379 Label get name => _name; |
| 7371 | 7380 |
| 7372 @override | 7381 @override |
| 7373 void set name(Label identifier) { | 7382 void set name(Label identifier) { |
| 7374 _name = _becomeParentOf(identifier); | 7383 _name = _becomeParentOf(identifier as AstNodeImpl); |
| 7375 } | 7384 } |
| 7376 | 7385 |
| 7377 @override | 7386 @override |
| 7378 int get precedence => 0; | 7387 int get precedence => 0; |
| 7379 | 7388 |
| 7380 @override | 7389 @override |
| 7381 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 7390 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 7382 visitor.visitNamedExpression(this); | 7391 visitor.visitNamedExpression(this); |
| 7383 | 7392 |
| 7384 @override | 7393 @override |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7469 Token nativeKeyword; | 7478 Token nativeKeyword; |
| 7470 | 7479 |
| 7471 /** | 7480 /** |
| 7472 * The name of the native object that implements the class. | 7481 * The name of the native object that implements the class. |
| 7473 */ | 7482 */ |
| 7474 StringLiteral _name; | 7483 StringLiteral _name; |
| 7475 | 7484 |
| 7476 /** | 7485 /** |
| 7477 * Initialize a newly created native clause. | 7486 * Initialize a newly created native clause. |
| 7478 */ | 7487 */ |
| 7479 NativeClauseImpl(this.nativeKeyword, StringLiteral name) { | 7488 NativeClauseImpl(this.nativeKeyword, StringLiteralImpl name) { |
| 7480 _name = _becomeParentOf(name); | 7489 _name = _becomeParentOf(name); |
| 7481 } | 7490 } |
| 7482 | 7491 |
| 7483 @override | 7492 @override |
| 7484 Token get beginToken => nativeKeyword; | 7493 Token get beginToken => nativeKeyword; |
| 7485 | 7494 |
| 7486 @override | 7495 @override |
| 7487 Iterable get childEntities => | 7496 Iterable get childEntities => |
| 7488 new ChildEntities()..add(nativeKeyword)..add(_name); | 7497 new ChildEntities()..add(nativeKeyword)..add(_name); |
| 7489 | 7498 |
| 7490 @override | 7499 @override |
| 7491 Token get endToken => _name.endToken; | 7500 Token get endToken => _name.endToken; |
| 7492 | 7501 |
| 7493 @override | 7502 @override |
| 7494 StringLiteral get name => _name; | 7503 StringLiteral get name => _name; |
| 7495 | 7504 |
| 7496 @override | 7505 @override |
| 7497 void set name(StringLiteral name) { | 7506 void set name(StringLiteral name) { |
| 7498 _name = _becomeParentOf(name); | 7507 _name = _becomeParentOf(name as AstNodeImpl); |
| 7499 } | 7508 } |
| 7500 | 7509 |
| 7501 @override | 7510 @override |
| 7502 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 7511 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 7503 visitor.visitNativeClause(this); | 7512 visitor.visitNativeClause(this); |
| 7504 | 7513 |
| 7505 @override | 7514 @override |
| 7506 void visitChildren(AstVisitor visitor) { | 7515 void visitChildren(AstVisitor visitor) { |
| 7507 _name?.accept(visitor); | 7516 _name?.accept(visitor); |
| 7508 } | 7517 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 7533 * body. | 7542 * body. |
| 7534 */ | 7543 */ |
| 7535 @override | 7544 @override |
| 7536 Token semicolon; | 7545 Token semicolon; |
| 7537 | 7546 |
| 7538 /** | 7547 /** |
| 7539 * Initialize a newly created function body consisting of the 'native' token, | 7548 * Initialize a newly created function body consisting of the 'native' token, |
| 7540 * a string literal, and a semicolon. | 7549 * a string literal, and a semicolon. |
| 7541 */ | 7550 */ |
| 7542 NativeFunctionBodyImpl( | 7551 NativeFunctionBodyImpl( |
| 7543 this.nativeKeyword, StringLiteral stringLiteral, this.semicolon) { | 7552 this.nativeKeyword, StringLiteralImpl stringLiteral, this.semicolon) { |
| 7544 _stringLiteral = _becomeParentOf(stringLiteral); | 7553 _stringLiteral = _becomeParentOf(stringLiteral); |
| 7545 } | 7554 } |
| 7546 | 7555 |
| 7547 @override | 7556 @override |
| 7548 Token get beginToken => nativeKeyword; | 7557 Token get beginToken => nativeKeyword; |
| 7549 | 7558 |
| 7550 @override | 7559 @override |
| 7551 Iterable get childEntities => new ChildEntities() | 7560 Iterable get childEntities => new ChildEntities() |
| 7552 ..add(nativeKeyword) | 7561 ..add(nativeKeyword) |
| 7553 ..add(_stringLiteral) | 7562 ..add(_stringLiteral) |
| 7554 ..add(semicolon); | 7563 ..add(semicolon); |
| 7555 | 7564 |
| 7556 @override | 7565 @override |
| 7557 Token get endToken => semicolon; | 7566 Token get endToken => semicolon; |
| 7558 | 7567 |
| 7559 @override | 7568 @override |
| 7560 StringLiteral get stringLiteral => _stringLiteral; | 7569 StringLiteral get stringLiteral => _stringLiteral; |
| 7561 | 7570 |
| 7562 @override | 7571 @override |
| 7563 void set stringLiteral(StringLiteral stringLiteral) { | 7572 void set stringLiteral(StringLiteral stringLiteral) { |
| 7564 _stringLiteral = _becomeParentOf(stringLiteral); | 7573 _stringLiteral = _becomeParentOf(stringLiteral as AstNodeImpl); |
| 7565 } | 7574 } |
| 7566 | 7575 |
| 7567 @override | 7576 @override |
| 7568 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 7577 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 7569 visitor.visitNativeFunctionBody(this); | 7578 visitor.visitNativeFunctionBody(this); |
| 7570 | 7579 |
| 7571 @override | 7580 @override |
| 7572 void visitChildren(AstVisitor visitor) { | 7581 void visitChildren(AstVisitor visitor) { |
| 7573 _stringLiteral?.accept(visitor); | 7582 _stringLiteral?.accept(visitor); |
| 7574 } | 7583 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7636 if (index < 0 || index >= _elements.length) { | 7645 if (index < 0 || index >= _elements.length) { |
| 7637 throw new RangeError("Index: $index, Size: ${_elements.length}"); | 7646 throw new RangeError("Index: $index, Size: ${_elements.length}"); |
| 7638 } | 7647 } |
| 7639 return _elements[index]; | 7648 return _elements[index]; |
| 7640 } | 7649 } |
| 7641 | 7650 |
| 7642 void operator []=(int index, E node) { | 7651 void operator []=(int index, E node) { |
| 7643 if (index < 0 || index >= _elements.length) { | 7652 if (index < 0 || index >= _elements.length) { |
| 7644 throw new RangeError("Index: $index, Size: ${_elements.length}"); | 7653 throw new RangeError("Index: $index, Size: ${_elements.length}"); |
| 7645 } | 7654 } |
| 7646 _owner._becomeParentOf(node); | 7655 _owner._becomeParentOf(node as AstNodeImpl); |
| 7647 _elements[index] = node; | 7656 _elements[index] = node; |
| 7648 } | 7657 } |
| 7649 | 7658 |
| 7650 @override | 7659 @override |
| 7651 accept(AstVisitor visitor) { | 7660 accept(AstVisitor visitor) { |
| 7652 int length = _elements.length; | 7661 int length = _elements.length; |
| 7653 for (var i = 0; i < length; i++) { | 7662 for (var i = 0; i < length; i++) { |
| 7654 _elements[i].accept(visitor); | 7663 _elements[i].accept(visitor); |
| 7655 } | 7664 } |
| 7656 } | 7665 } |
| 7657 | 7666 |
| 7658 @override | 7667 @override |
| 7659 void add(E node) { | 7668 void add(E node) { |
| 7660 insert(length, node); | 7669 insert(length, node); |
| 7661 } | 7670 } |
| 7662 | 7671 |
| 7663 @override | 7672 @override |
| 7664 bool addAll(Iterable<E> nodes) { | 7673 bool addAll(Iterable<E> nodes) { |
| 7665 if (nodes != null && !nodes.isEmpty) { | 7674 if (nodes != null && !nodes.isEmpty) { |
| 7666 _elements.addAll(nodes); | 7675 _elements.addAll(nodes); |
| 7667 for (E node in nodes) { | 7676 for (E node in nodes) { |
| 7668 _owner._becomeParentOf(node); | 7677 _owner._becomeParentOf(node as AstNodeImpl); |
| 7669 } | 7678 } |
| 7670 return true; | 7679 return true; |
| 7671 } | 7680 } |
| 7672 return false; | 7681 return false; |
| 7673 } | 7682 } |
| 7674 | 7683 |
| 7675 @override | 7684 @override |
| 7676 void clear() { | 7685 void clear() { |
| 7677 _elements = <E>[]; | 7686 _elements = <E>[]; |
| 7678 } | 7687 } |
| 7679 | 7688 |
| 7680 @override | 7689 @override |
| 7681 void insert(int index, E node) { | 7690 void insert(int index, E node) { |
| 7682 int length = _elements.length; | 7691 int length = _elements.length; |
| 7683 if (index < 0 || index > length) { | 7692 if (index < 0 || index > length) { |
| 7684 throw new RangeError("Index: $index, Size: ${_elements.length}"); | 7693 throw new RangeError("Index: $index, Size: ${_elements.length}"); |
| 7685 } | 7694 } |
| 7686 _owner._becomeParentOf(node); | 7695 _owner._becomeParentOf(node as AstNodeImpl); |
| 7687 if (length == 0) { | 7696 if (length == 0) { |
| 7688 _elements.add(node); | 7697 _elements.add(node); |
| 7689 } else { | 7698 } else { |
| 7690 _elements.insert(index, node); | 7699 _elements.insert(index, node); |
| 7691 } | 7700 } |
| 7692 } | 7701 } |
| 7693 | 7702 |
| 7694 @override | 7703 @override |
| 7695 E removeAt(int index) { | 7704 E removeAt(int index) { |
| 7696 if (index < 0 || index >= _elements.length) { | 7705 if (index < 0 || index >= _elements.length) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 7726 /** | 7735 /** |
| 7727 * The name of the parameter being declared. | 7736 * The name of the parameter being declared. |
| 7728 */ | 7737 */ |
| 7729 SimpleIdentifier _identifier; | 7738 SimpleIdentifier _identifier; |
| 7730 | 7739 |
| 7731 /** | 7740 /** |
| 7732 * Initialize a newly created formal parameter. Either or both of the | 7741 * Initialize a newly created formal parameter. Either or both of the |
| 7733 * [comment] and [metadata] can be `null` if the parameter does not have the | 7742 * [comment] and [metadata] can be `null` if the parameter does not have the |
| 7734 * corresponding attribute. | 7743 * corresponding attribute. |
| 7735 */ | 7744 */ |
| 7736 NormalFormalParameterImpl( | 7745 NormalFormalParameterImpl(CommentImpl comment, List<Annotation> metadata, |
| 7737 Comment comment, List<Annotation> metadata, SimpleIdentifier identifier) { | 7746 SimpleIdentifierImpl identifier) { |
| 7738 _comment = _becomeParentOf(comment); | 7747 _comment = _becomeParentOf(comment); |
| 7739 _metadata = new NodeListImpl<Annotation>(this, metadata); | 7748 _metadata = new NodeListImpl<Annotation>(this, metadata); |
| 7740 _identifier = _becomeParentOf(identifier); | 7749 _identifier = _becomeParentOf(identifier); |
| 7741 } | 7750 } |
| 7742 | 7751 |
| 7743 @override | 7752 @override |
| 7744 Comment get documentationComment => _comment; | 7753 Comment get documentationComment => _comment; |
| 7745 | 7754 |
| 7746 @override | 7755 @override |
| 7747 void set documentationComment(Comment comment) { | 7756 void set documentationComment(Comment comment) { |
| 7748 _comment = _becomeParentOf(comment); | 7757 _comment = _becomeParentOf(comment as AstNodeImpl); |
| 7749 } | 7758 } |
| 7750 | 7759 |
| 7751 @override | 7760 @override |
| 7752 SimpleIdentifier get identifier => _identifier; | 7761 SimpleIdentifier get identifier => _identifier; |
| 7753 | 7762 |
| 7754 @override | 7763 @override |
| 7755 void set identifier(SimpleIdentifier identifier) { | 7764 void set identifier(SimpleIdentifier identifier) { |
| 7756 _identifier = _becomeParentOf(identifier); | 7765 _identifier = _becomeParentOf(identifier as AstNodeImpl); |
| 7757 } | 7766 } |
| 7758 | 7767 |
| 7759 @override | 7768 @override |
| 7760 ParameterKind get kind { | 7769 ParameterKind get kind { |
| 7761 AstNode parent = this.parent; | 7770 AstNode parent = this.parent; |
| 7762 if (parent is DefaultFormalParameter) { | 7771 if (parent is DefaultFormalParameter) { |
| 7763 return parent.kind; | 7772 return parent.kind; |
| 7764 } | 7773 } |
| 7765 return ParameterKind.REQUIRED; | 7774 return ParameterKind.REQUIRED; |
| 7766 } | 7775 } |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7878 | 7887 |
| 7879 /** | 7888 /** |
| 7880 * The right parenthesis. | 7889 * The right parenthesis. |
| 7881 */ | 7890 */ |
| 7882 Token rightParenthesis; | 7891 Token rightParenthesis; |
| 7883 | 7892 |
| 7884 /** | 7893 /** |
| 7885 * Initialize a newly created parenthesized expression. | 7894 * Initialize a newly created parenthesized expression. |
| 7886 */ | 7895 */ |
| 7887 ParenthesizedExpressionImpl( | 7896 ParenthesizedExpressionImpl( |
| 7888 this.leftParenthesis, Expression expression, this.rightParenthesis) { | 7897 this.leftParenthesis, ExpressionImpl expression, this.rightParenthesis) { |
| 7889 _expression = _becomeParentOf(expression); | 7898 _expression = _becomeParentOf(expression); |
| 7890 } | 7899 } |
| 7891 | 7900 |
| 7892 @override | 7901 @override |
| 7893 Token get beginToken => leftParenthesis; | 7902 Token get beginToken => leftParenthesis; |
| 7894 | 7903 |
| 7895 @override | 7904 @override |
| 7896 Iterable get childEntities => new ChildEntities() | 7905 Iterable get childEntities => new ChildEntities() |
| 7897 ..add(leftParenthesis) | 7906 ..add(leftParenthesis) |
| 7898 ..add(_expression) | 7907 ..add(_expression) |
| 7899 ..add(rightParenthesis); | 7908 ..add(rightParenthesis); |
| 7900 | 7909 |
| 7901 @override | 7910 @override |
| 7902 Token get endToken => rightParenthesis; | 7911 Token get endToken => rightParenthesis; |
| 7903 | 7912 |
| 7904 @override | 7913 @override |
| 7905 Expression get expression => _expression; | 7914 Expression get expression => _expression; |
| 7906 | 7915 |
| 7907 @override | 7916 @override |
| 7908 void set expression(Expression expression) { | 7917 void set expression(Expression expression) { |
| 7909 _expression = _becomeParentOf(expression); | 7918 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 7910 } | 7919 } |
| 7911 | 7920 |
| 7912 @override | 7921 @override |
| 7913 int get precedence => 15; | 7922 int get precedence => 15; |
| 7914 | 7923 |
| 7915 @override | 7924 @override |
| 7916 Expression get unParenthesized { | 7925 Expression get unParenthesized { |
| 7917 // This is somewhat inefficient, but it avoids a stack overflow in the | 7926 // This is somewhat inefficient, but it avoids a stack overflow in the |
| 7918 // degenerate case. | 7927 // degenerate case. |
| 7919 Expression expression = _expression; | 7928 Expression expression = _expression; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8011 */ | 8020 */ |
| 8012 @override | 8021 @override |
| 8013 Token semicolon; | 8022 Token semicolon; |
| 8014 | 8023 |
| 8015 /** | 8024 /** |
| 8016 * Initialize a newly created part-of directive. Either or both of the | 8025 * Initialize a newly created part-of directive. Either or both of the |
| 8017 * [comment] and [metadata] can be `null` if the directive does not have the | 8026 * [comment] and [metadata] can be `null` if the directive does not have the |
| 8018 * corresponding attribute. | 8027 * corresponding attribute. |
| 8019 */ | 8028 */ |
| 8020 PartOfDirectiveImpl( | 8029 PartOfDirectiveImpl( |
| 8021 Comment comment, | 8030 CommentImpl comment, |
| 8022 List<Annotation> metadata, | 8031 List<Annotation> metadata, |
| 8023 this.partKeyword, | 8032 this.partKeyword, |
| 8024 this.ofKeyword, | 8033 this.ofKeyword, |
| 8025 LibraryIdentifier libraryName, | 8034 LibraryIdentifierImpl libraryName, |
| 8026 this.semicolon) | 8035 this.semicolon) |
| 8027 : super(comment, metadata) { | 8036 : super(comment, metadata) { |
| 8028 _libraryName = _becomeParentOf(libraryName); | 8037 _libraryName = _becomeParentOf(libraryName); |
| 8029 } | 8038 } |
| 8030 | 8039 |
| 8031 @override | 8040 @override |
| 8032 Iterable get childEntities => super._childEntities | 8041 Iterable get childEntities => super._childEntities |
| 8033 ..add(partKeyword) | 8042 ..add(partKeyword) |
| 8034 ..add(ofKeyword) | 8043 ..add(ofKeyword) |
| 8035 ..add(_libraryName) | 8044 ..add(_libraryName) |
| 8036 ..add(semicolon); | 8045 ..add(semicolon); |
| 8037 | 8046 |
| 8038 @override | 8047 @override |
| 8039 Token get endToken => semicolon; | 8048 Token get endToken => semicolon; |
| 8040 | 8049 |
| 8041 @override | 8050 @override |
| 8042 Token get firstTokenAfterCommentAndMetadata => partKeyword; | 8051 Token get firstTokenAfterCommentAndMetadata => partKeyword; |
| 8043 | 8052 |
| 8044 @override | 8053 @override |
| 8045 Token get keyword => partKeyword; | 8054 Token get keyword => partKeyword; |
| 8046 | 8055 |
| 8047 @override | 8056 @override |
| 8048 LibraryIdentifier get libraryName => _libraryName; | 8057 LibraryIdentifier get libraryName => _libraryName; |
| 8049 | 8058 |
| 8050 @override | 8059 @override |
| 8051 void set libraryName(LibraryIdentifier libraryName) { | 8060 void set libraryName(LibraryIdentifier libraryName) { |
| 8052 _libraryName = _becomeParentOf(libraryName); | 8061 _libraryName = _becomeParentOf(libraryName as AstNodeImpl); |
| 8053 } | 8062 } |
| 8054 | 8063 |
| 8055 @override | 8064 @override |
| 8056 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 8065 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 8057 visitor.visitPartOfDirective(this); | 8066 visitor.visitPartOfDirective(this); |
| 8058 | 8067 |
| 8059 @override | 8068 @override |
| 8060 void visitChildren(AstVisitor visitor) { | 8069 void visitChildren(AstVisitor visitor) { |
| 8061 super.visitChildren(visitor); | 8070 super.visitChildren(visitor); |
| 8062 _libraryName?.accept(visitor); | 8071 _libraryName?.accept(visitor); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8095 * The element associated with the operator based on the static type of the | 8104 * The element associated with the operator based on the static type of the |
| 8096 * operand, or `null` if the AST structure has not been resolved, if the | 8105 * operand, or `null` if the AST structure has not been resolved, if the |
| 8097 * operator is not user definable, or if the operator could not be resolved. | 8106 * operator is not user definable, or if the operator could not be resolved. |
| 8098 */ | 8107 */ |
| 8099 @override | 8108 @override |
| 8100 MethodElement staticElement; | 8109 MethodElement staticElement; |
| 8101 | 8110 |
| 8102 /** | 8111 /** |
| 8103 * Initialize a newly created postfix expression. | 8112 * Initialize a newly created postfix expression. |
| 8104 */ | 8113 */ |
| 8105 PostfixExpressionImpl(Expression operand, this.operator) { | 8114 PostfixExpressionImpl(ExpressionImpl operand, this.operator) { |
| 8106 _operand = _becomeParentOf(operand); | 8115 _operand = _becomeParentOf(operand); |
| 8107 } | 8116 } |
| 8108 | 8117 |
| 8109 @override | 8118 @override |
| 8110 Token get beginToken => _operand.beginToken; | 8119 Token get beginToken => _operand.beginToken; |
| 8111 | 8120 |
| 8112 @override | 8121 @override |
| 8113 MethodElement get bestElement { | 8122 MethodElement get bestElement { |
| 8114 MethodElement element = propagatedElement; | 8123 MethodElement element = propagatedElement; |
| 8115 if (element == null) { | 8124 if (element == null) { |
| 8116 element = staticElement; | 8125 element = staticElement; |
| 8117 } | 8126 } |
| 8118 return element; | 8127 return element; |
| 8119 } | 8128 } |
| 8120 | 8129 |
| 8121 @override | 8130 @override |
| 8122 Iterable get childEntities => | 8131 Iterable get childEntities => |
| 8123 new ChildEntities()..add(_operand)..add(operator); | 8132 new ChildEntities()..add(_operand)..add(operator); |
| 8124 | 8133 |
| 8125 @override | 8134 @override |
| 8126 Token get endToken => operator; | 8135 Token get endToken => operator; |
| 8127 | 8136 |
| 8128 @override | 8137 @override |
| 8129 Expression get operand => _operand; | 8138 Expression get operand => _operand; |
| 8130 | 8139 |
| 8131 @override | 8140 @override |
| 8132 void set operand(Expression expression) { | 8141 void set operand(Expression expression) { |
| 8133 _operand = _becomeParentOf(expression); | 8142 _operand = _becomeParentOf(expression as AstNodeImpl); |
| 8134 } | 8143 } |
| 8135 | 8144 |
| 8136 @override | 8145 @override |
| 8137 int get precedence => 15; | 8146 int get precedence => 15; |
| 8138 | 8147 |
| 8139 /** | 8148 /** |
| 8140 * If the AST structure has been resolved, and the function being invoked is | 8149 * If the AST structure has been resolved, and the function being invoked is |
| 8141 * known based on propagated type information, then return the parameter | 8150 * known based on propagated type information, then return the parameter |
| 8142 * element representing the parameter to which the value of the operand will | 8151 * element representing the parameter to which the value of the operand will |
| 8143 * be bound. Otherwise, return `null`. | 8152 * be bound. Otherwise, return `null`. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8200 Token period; | 8209 Token period; |
| 8201 | 8210 |
| 8202 /** | 8211 /** |
| 8203 * The identifier being prefixed. | 8212 * The identifier being prefixed. |
| 8204 */ | 8213 */ |
| 8205 SimpleIdentifier _identifier; | 8214 SimpleIdentifier _identifier; |
| 8206 | 8215 |
| 8207 /** | 8216 /** |
| 8208 * Initialize a newly created prefixed identifier. | 8217 * Initialize a newly created prefixed identifier. |
| 8209 */ | 8218 */ |
| 8210 PrefixedIdentifierImpl( | 8219 PrefixedIdentifierImpl(SimpleIdentifierImpl prefix, this.period, |
| 8211 SimpleIdentifier prefix, this.period, SimpleIdentifier identifier) { | 8220 SimpleIdentifierImpl identifier) { |
| 8212 _prefix = _becomeParentOf(prefix); | 8221 _prefix = _becomeParentOf(prefix); |
| 8213 _identifier = _becomeParentOf(identifier); | 8222 _identifier = _becomeParentOf(identifier); |
| 8214 } | 8223 } |
| 8215 | 8224 |
| 8216 /** | 8225 /** |
| 8217 * Initialize a newly created prefixed identifier that does not take ownership | 8226 * Initialize a newly created prefixed identifier that does not take ownership |
| 8218 * of the components. The resulting node is only for temporary use, such as by | 8227 * of the components. The resulting node is only for temporary use, such as by |
| 8219 * resolution. | 8228 * resolution. |
| 8220 */ | 8229 */ |
| 8221 PrefixedIdentifierImpl.temp(this._prefix, this._identifier) : period = null; | 8230 PrefixedIdentifierImpl.temp(this._prefix, this._identifier) : period = null; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 8236 new ChildEntities()..add(_prefix)..add(period)..add(_identifier); | 8245 new ChildEntities()..add(_prefix)..add(period)..add(_identifier); |
| 8237 | 8246 |
| 8238 @override | 8247 @override |
| 8239 Token get endToken => _identifier.endToken; | 8248 Token get endToken => _identifier.endToken; |
| 8240 | 8249 |
| 8241 @override | 8250 @override |
| 8242 SimpleIdentifier get identifier => _identifier; | 8251 SimpleIdentifier get identifier => _identifier; |
| 8243 | 8252 |
| 8244 @override | 8253 @override |
| 8245 void set identifier(SimpleIdentifier identifier) { | 8254 void set identifier(SimpleIdentifier identifier) { |
| 8246 _identifier = _becomeParentOf(identifier); | 8255 _identifier = _becomeParentOf(identifier as AstNodeImpl); |
| 8247 } | 8256 } |
| 8248 | 8257 |
| 8249 @override | 8258 @override |
| 8250 bool get isDeferred { | 8259 bool get isDeferred { |
| 8251 Element element = _prefix.staticElement; | 8260 Element element = _prefix.staticElement; |
| 8252 if (element is PrefixElement) { | 8261 if (element is PrefixElement) { |
| 8253 List<ImportElement> imports = | 8262 List<ImportElement> imports = |
| 8254 element.enclosingElement.getImportsWithPrefix(element); | 8263 element.enclosingElement.getImportsWithPrefix(element); |
| 8255 if (imports.length != 1) { | 8264 if (imports.length != 1) { |
| 8256 return false; | 8265 return false; |
| 8257 } | 8266 } |
| 8258 return imports[0].isDeferred; | 8267 return imports[0].isDeferred; |
| 8259 } | 8268 } |
| 8260 return false; | 8269 return false; |
| 8261 } | 8270 } |
| 8262 | 8271 |
| 8263 @override | 8272 @override |
| 8264 String get name => "${_prefix.name}.${_identifier.name}"; | 8273 String get name => "${_prefix.name}.${_identifier.name}"; |
| 8265 | 8274 |
| 8266 @override | 8275 @override |
| 8267 int get precedence => 15; | 8276 int get precedence => 15; |
| 8268 | 8277 |
| 8269 @override | 8278 @override |
| 8270 SimpleIdentifier get prefix => _prefix; | 8279 SimpleIdentifier get prefix => _prefix; |
| 8271 | 8280 |
| 8272 @override | 8281 @override |
| 8273 void set prefix(SimpleIdentifier identifier) { | 8282 void set prefix(SimpleIdentifier identifier) { |
| 8274 _prefix = _becomeParentOf(identifier); | 8283 _prefix = _becomeParentOf(identifier as AstNodeImpl); |
| 8275 } | 8284 } |
| 8276 | 8285 |
| 8277 @override | 8286 @override |
| 8278 Element get propagatedElement { | 8287 Element get propagatedElement { |
| 8279 if (_identifier == null) { | 8288 if (_identifier == null) { |
| 8280 return null; | 8289 return null; |
| 8281 } | 8290 } |
| 8282 return _identifier.propagatedElement; | 8291 return _identifier.propagatedElement; |
| 8283 } | 8292 } |
| 8284 | 8293 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8328 /** | 8337 /** |
| 8329 * The element associated with the operator based on the propagated type of | 8338 * The element associated with the operator based on the propagated type of |
| 8330 * the operand, or `null` if the AST structure has not been resolved, if the | 8339 * the operand, or `null` if the AST structure has not been resolved, if the |
| 8331 * operator is not user definable, or if the operator could not be resolved. | 8340 * operator is not user definable, or if the operator could not be resolved. |
| 8332 */ | 8341 */ |
| 8333 MethodElement propagatedElement; | 8342 MethodElement propagatedElement; |
| 8334 | 8343 |
| 8335 /** | 8344 /** |
| 8336 * Initialize a newly created prefix expression. | 8345 * Initialize a newly created prefix expression. |
| 8337 */ | 8346 */ |
| 8338 PrefixExpressionImpl(this.operator, Expression operand) { | 8347 PrefixExpressionImpl(this.operator, ExpressionImpl operand) { |
| 8339 _operand = _becomeParentOf(operand); | 8348 _operand = _becomeParentOf(operand); |
| 8340 } | 8349 } |
| 8341 | 8350 |
| 8342 @override | 8351 @override |
| 8343 Token get beginToken => operator; | 8352 Token get beginToken => operator; |
| 8344 | 8353 |
| 8345 @override | 8354 @override |
| 8346 MethodElement get bestElement { | 8355 MethodElement get bestElement { |
| 8347 MethodElement element = propagatedElement; | 8356 MethodElement element = propagatedElement; |
| 8348 if (element == null) { | 8357 if (element == null) { |
| 8349 element = staticElement; | 8358 element = staticElement; |
| 8350 } | 8359 } |
| 8351 return element; | 8360 return element; |
| 8352 } | 8361 } |
| 8353 | 8362 |
| 8354 @override | 8363 @override |
| 8355 Iterable get childEntities => | 8364 Iterable get childEntities => |
| 8356 new ChildEntities()..add(operator)..add(_operand); | 8365 new ChildEntities()..add(operator)..add(_operand); |
| 8357 | 8366 |
| 8358 @override | 8367 @override |
| 8359 Token get endToken => _operand.endToken; | 8368 Token get endToken => _operand.endToken; |
| 8360 | 8369 |
| 8361 @override | 8370 @override |
| 8362 Expression get operand => _operand; | 8371 Expression get operand => _operand; |
| 8363 | 8372 |
| 8364 @override | 8373 @override |
| 8365 void set operand(Expression expression) { | 8374 void set operand(Expression expression) { |
| 8366 _operand = _becomeParentOf(expression); | 8375 _operand = _becomeParentOf(expression as AstNodeImpl); |
| 8367 } | 8376 } |
| 8368 | 8377 |
| 8369 @override | 8378 @override |
| 8370 int get precedence => 14; | 8379 int get precedence => 14; |
| 8371 | 8380 |
| 8372 /** | 8381 /** |
| 8373 * If the AST structure has been resolved, and the function being invoked is | 8382 * If the AST structure has been resolved, and the function being invoked is |
| 8374 * known based on propagated type information, then return the parameter | 8383 * known based on propagated type information, then return the parameter |
| 8375 * element representing the parameter to which the value of the operand will | 8384 * element representing the parameter to which the value of the operand will |
| 8376 * be bound. Otherwise, return `null`. | 8385 * be bound. Otherwise, return `null`. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8436 | 8445 |
| 8437 /** | 8446 /** |
| 8438 * The name of the property being accessed. | 8447 * The name of the property being accessed. |
| 8439 */ | 8448 */ |
| 8440 SimpleIdentifier _propertyName; | 8449 SimpleIdentifier _propertyName; |
| 8441 | 8450 |
| 8442 /** | 8451 /** |
| 8443 * Initialize a newly created property access expression. | 8452 * Initialize a newly created property access expression. |
| 8444 */ | 8453 */ |
| 8445 PropertyAccessImpl( | 8454 PropertyAccessImpl( |
| 8446 Expression target, this.operator, SimpleIdentifier propertyName) { | 8455 ExpressionImpl target, this.operator, SimpleIdentifierImpl propertyName) { |
| 8447 _target = _becomeParentOf(target); | 8456 _target = _becomeParentOf(target); |
| 8448 _propertyName = _becomeParentOf(propertyName); | 8457 _propertyName = _becomeParentOf(propertyName); |
| 8449 } | 8458 } |
| 8450 | 8459 |
| 8451 @override | 8460 @override |
| 8452 Token get beginToken { | 8461 Token get beginToken { |
| 8453 if (_target != null) { | 8462 if (_target != null) { |
| 8454 return _target.beginToken; | 8463 return _target.beginToken; |
| 8455 } | 8464 } |
| 8456 return operator; | 8465 return operator; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 8471 operator != null && operator.type == TokenType.PERIOD_PERIOD; | 8480 operator != null && operator.type == TokenType.PERIOD_PERIOD; |
| 8472 | 8481 |
| 8473 @override | 8482 @override |
| 8474 int get precedence => 15; | 8483 int get precedence => 15; |
| 8475 | 8484 |
| 8476 @override | 8485 @override |
| 8477 SimpleIdentifier get propertyName => _propertyName; | 8486 SimpleIdentifier get propertyName => _propertyName; |
| 8478 | 8487 |
| 8479 @override | 8488 @override |
| 8480 void set propertyName(SimpleIdentifier identifier) { | 8489 void set propertyName(SimpleIdentifier identifier) { |
| 8481 _propertyName = _becomeParentOf(identifier); | 8490 _propertyName = _becomeParentOf(identifier as AstNodeImpl); |
| 8482 } | 8491 } |
| 8483 | 8492 |
| 8484 @override | 8493 @override |
| 8485 Expression get realTarget { | 8494 Expression get realTarget { |
| 8486 if (isCascaded) { | 8495 if (isCascaded) { |
| 8487 AstNode ancestor = parent; | 8496 AstNode ancestor = parent; |
| 8488 while (ancestor is! CascadeExpression) { | 8497 while (ancestor is! CascadeExpression) { |
| 8489 if (ancestor == null) { | 8498 if (ancestor == null) { |
| 8490 return _target; | 8499 return _target; |
| 8491 } | 8500 } |
| 8492 ancestor = ancestor.parent; | 8501 ancestor = ancestor.parent; |
| 8493 } | 8502 } |
| 8494 return (ancestor as CascadeExpression).target; | 8503 return (ancestor as CascadeExpression).target; |
| 8495 } | 8504 } |
| 8496 return _target; | 8505 return _target; |
| 8497 } | 8506 } |
| 8498 | 8507 |
| 8499 @override | 8508 @override |
| 8500 Expression get target => _target; | 8509 Expression get target => _target; |
| 8501 | 8510 |
| 8502 @override | 8511 @override |
| 8503 void set target(Expression expression) { | 8512 void set target(Expression expression) { |
| 8504 _target = _becomeParentOf(expression); | 8513 _target = _becomeParentOf(expression as AstNodeImpl); |
| 8505 } | 8514 } |
| 8506 | 8515 |
| 8507 @override | 8516 @override |
| 8508 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 8517 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 8509 visitor.visitPropertyAccess(this); | 8518 visitor.visitPropertyAccess(this); |
| 8510 | 8519 |
| 8511 @override | 8520 @override |
| 8512 void visitChildren(AstVisitor visitor) { | 8521 void visitChildren(AstVisitor visitor) { |
| 8513 _target?.accept(visitor); | 8522 _target?.accept(visitor); |
| 8514 _propertyName?.accept(visitor); | 8523 _propertyName?.accept(visitor); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8552 * constructor could not be resolved. | 8561 * constructor could not be resolved. |
| 8553 */ | 8562 */ |
| 8554 ConstructorElement staticElement; | 8563 ConstructorElement staticElement; |
| 8555 | 8564 |
| 8556 /** | 8565 /** |
| 8557 * Initialize a newly created redirecting invocation to invoke the constructor | 8566 * Initialize a newly created redirecting invocation to invoke the constructor |
| 8558 * with the given name with the given arguments. The [constructorName] can be | 8567 * with the given name with the given arguments. The [constructorName] can be |
| 8559 * `null` if the constructor being invoked is the unnamed constructor. | 8568 * `null` if the constructor being invoked is the unnamed constructor. |
| 8560 */ | 8569 */ |
| 8561 RedirectingConstructorInvocationImpl(this.thisKeyword, this.period, | 8570 RedirectingConstructorInvocationImpl(this.thisKeyword, this.period, |
| 8562 SimpleIdentifier constructorName, ArgumentList argumentList) { | 8571 SimpleIdentifierImpl constructorName, ArgumentListImpl argumentList) { |
| 8563 _constructorName = _becomeParentOf(constructorName); | 8572 _constructorName = _becomeParentOf(constructorName); |
| 8564 _argumentList = _becomeParentOf(argumentList); | 8573 _argumentList = _becomeParentOf(argumentList); |
| 8565 } | 8574 } |
| 8566 | 8575 |
| 8567 @override | 8576 @override |
| 8568 ArgumentList get argumentList => _argumentList; | 8577 ArgumentList get argumentList => _argumentList; |
| 8569 | 8578 |
| 8570 @override | 8579 @override |
| 8571 void set argumentList(ArgumentList argumentList) { | 8580 void set argumentList(ArgumentList argumentList) { |
| 8572 _argumentList = _becomeParentOf(argumentList); | 8581 _argumentList = _becomeParentOf(argumentList as AstNodeImpl); |
| 8573 } | 8582 } |
| 8574 | 8583 |
| 8575 @override | 8584 @override |
| 8576 Token get beginToken => thisKeyword; | 8585 Token get beginToken => thisKeyword; |
| 8577 | 8586 |
| 8578 @override | 8587 @override |
| 8579 Iterable get childEntities => new ChildEntities() | 8588 Iterable get childEntities => new ChildEntities() |
| 8580 ..add(thisKeyword) | 8589 ..add(thisKeyword) |
| 8581 ..add(period) | 8590 ..add(period) |
| 8582 ..add(_constructorName) | 8591 ..add(_constructorName) |
| 8583 ..add(_argumentList); | 8592 ..add(_argumentList); |
| 8584 | 8593 |
| 8585 @override | 8594 @override |
| 8586 SimpleIdentifier get constructorName => _constructorName; | 8595 SimpleIdentifier get constructorName => _constructorName; |
| 8587 | 8596 |
| 8588 @override | 8597 @override |
| 8589 void set constructorName(SimpleIdentifier identifier) { | 8598 void set constructorName(SimpleIdentifier identifier) { |
| 8590 _constructorName = _becomeParentOf(identifier); | 8599 _constructorName = _becomeParentOf(identifier as AstNodeImpl); |
| 8591 } | 8600 } |
| 8592 | 8601 |
| 8593 @override | 8602 @override |
| 8594 Token get endToken => _argumentList.endToken; | 8603 Token get endToken => _argumentList.endToken; |
| 8595 | 8604 |
| 8596 @override | 8605 @override |
| 8597 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 8606 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 8598 visitor.visitRedirectingConstructorInvocation(this); | 8607 visitor.visitRedirectingConstructorInvocation(this); |
| 8599 | 8608 |
| 8600 @override | 8609 @override |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8665 /** | 8674 /** |
| 8666 * The semicolon terminating the statement. | 8675 * The semicolon terminating the statement. |
| 8667 */ | 8676 */ |
| 8668 Token semicolon; | 8677 Token semicolon; |
| 8669 | 8678 |
| 8670 /** | 8679 /** |
| 8671 * Initialize a newly created return statement. The [expression] can be `null` | 8680 * Initialize a newly created return statement. The [expression] can be `null` |
| 8672 * if no explicit value was provided. | 8681 * if no explicit value was provided. |
| 8673 */ | 8682 */ |
| 8674 ReturnStatementImpl( | 8683 ReturnStatementImpl( |
| 8675 this.returnKeyword, Expression expression, this.semicolon) { | 8684 this.returnKeyword, ExpressionImpl expression, this.semicolon) { |
| 8676 _expression = _becomeParentOf(expression); | 8685 _expression = _becomeParentOf(expression); |
| 8677 } | 8686 } |
| 8678 | 8687 |
| 8679 @override | 8688 @override |
| 8680 Token get beginToken => returnKeyword; | 8689 Token get beginToken => returnKeyword; |
| 8681 | 8690 |
| 8682 @override | 8691 @override |
| 8683 Iterable get childEntities => | 8692 Iterable get childEntities => |
| 8684 new ChildEntities()..add(returnKeyword)..add(_expression)..add(semicolon); | 8693 new ChildEntities()..add(returnKeyword)..add(_expression)..add(semicolon); |
| 8685 | 8694 |
| 8686 @override | 8695 @override |
| 8687 Token get endToken => semicolon; | 8696 Token get endToken => semicolon; |
| 8688 | 8697 |
| 8689 @override | 8698 @override |
| 8690 Expression get expression => _expression; | 8699 Expression get expression => _expression; |
| 8691 | 8700 |
| 8692 @override | 8701 @override |
| 8693 void set expression(Expression expression) { | 8702 void set expression(Expression expression) { |
| 8694 _expression = _becomeParentOf(expression); | 8703 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 8695 } | 8704 } |
| 8696 | 8705 |
| 8697 @override | 8706 @override |
| 8698 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 8707 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 8699 visitor.visitReturnStatement(this); | 8708 visitor.visitReturnStatement(this); |
| 8700 | 8709 |
| 8701 @override | 8710 @override |
| 8702 void visitChildren(AstVisitor visitor) { | 8711 void visitChildren(AstVisitor visitor) { |
| 8703 _expression?.accept(visitor); | 8712 _expression?.accept(visitor); |
| 8704 } | 8713 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8801 * does not have a declared type. | 8810 * does not have a declared type. |
| 8802 */ | 8811 */ |
| 8803 TypeName _type; | 8812 TypeName _type; |
| 8804 | 8813 |
| 8805 /** | 8814 /** |
| 8806 * Initialize a newly created formal parameter. Either or both of the | 8815 * Initialize a newly created formal parameter. Either or both of the |
| 8807 * [comment] and [metadata] can be `null` if the parameter does not have the | 8816 * [comment] and [metadata] can be `null` if the parameter does not have the |
| 8808 * corresponding attribute. The [keyword] can be `null` if a type was | 8817 * corresponding attribute. The [keyword] can be `null` if a type was |
| 8809 * specified. The [type] must be `null` if the keyword is 'var'. | 8818 * specified. The [type] must be `null` if the keyword is 'var'. |
| 8810 */ | 8819 */ |
| 8811 SimpleFormalParameterImpl(Comment comment, List<Annotation> metadata, | 8820 SimpleFormalParameterImpl(CommentImpl comment, List<Annotation> metadata, |
| 8812 this.keyword, TypeName type, SimpleIdentifier identifier) | 8821 this.keyword, TypeNameImpl type, SimpleIdentifierImpl identifier) |
| 8813 : super(comment, metadata, identifier) { | 8822 : super(comment, metadata, identifier) { |
| 8814 _type = _becomeParentOf(type); | 8823 _type = _becomeParentOf(type); |
| 8815 } | 8824 } |
| 8816 | 8825 |
| 8817 @override | 8826 @override |
| 8818 Token get beginToken { | 8827 Token get beginToken { |
| 8819 NodeList<Annotation> metadata = this.metadata; | 8828 NodeList<Annotation> metadata = this.metadata; |
| 8820 if (!metadata.isEmpty) { | 8829 if (!metadata.isEmpty) { |
| 8821 return metadata.beginToken; | 8830 return metadata.beginToken; |
| 8822 } else if (keyword != null) { | 8831 } else if (keyword != null) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 8838 bool get isConst => keyword?.keyword == Keyword.CONST; | 8847 bool get isConst => keyword?.keyword == Keyword.CONST; |
| 8839 | 8848 |
| 8840 @override | 8849 @override |
| 8841 bool get isFinal => keyword?.keyword == Keyword.FINAL; | 8850 bool get isFinal => keyword?.keyword == Keyword.FINAL; |
| 8842 | 8851 |
| 8843 @override | 8852 @override |
| 8844 TypeName get type => _type; | 8853 TypeName get type => _type; |
| 8845 | 8854 |
| 8846 @override | 8855 @override |
| 8847 void set type(TypeName typeName) { | 8856 void set type(TypeName typeName) { |
| 8848 _type = _becomeParentOf(typeName); | 8857 _type = _becomeParentOf(typeName as AstNodeImpl); |
| 8849 } | 8858 } |
| 8850 | 8859 |
| 8851 @override | 8860 @override |
| 8852 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 8861 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 8853 visitor.visitSimpleFormalParameter(this); | 8862 visitor.visitSimpleFormalParameter(this); |
| 8854 | 8863 |
| 8855 @override | 8864 @override |
| 8856 void visitChildren(AstVisitor visitor) { | 8865 void visitChildren(AstVisitor visitor) { |
| 8857 super.visitChildren(visitor); | 8866 super.visitChildren(visitor); |
| 8858 _type?.accept(visitor); | 8867 _type?.accept(visitor); |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9413 */ | 9422 */ |
| 9414 ConstructorElement staticElement; | 9423 ConstructorElement staticElement; |
| 9415 | 9424 |
| 9416 /** | 9425 /** |
| 9417 * Initialize a newly created super invocation to invoke the inherited | 9426 * Initialize a newly created super invocation to invoke the inherited |
| 9418 * constructor with the given name with the given arguments. The [period] and | 9427 * constructor with the given name with the given arguments. The [period] and |
| 9419 * [constructorName] can be `null` if the constructor being invoked is the | 9428 * [constructorName] can be `null` if the constructor being invoked is the |
| 9420 * unnamed constructor. | 9429 * unnamed constructor. |
| 9421 */ | 9430 */ |
| 9422 SuperConstructorInvocationImpl(this.superKeyword, this.period, | 9431 SuperConstructorInvocationImpl(this.superKeyword, this.period, |
| 9423 SimpleIdentifier constructorName, ArgumentList argumentList) { | 9432 SimpleIdentifierImpl constructorName, ArgumentListImpl argumentList) { |
| 9424 _constructorName = _becomeParentOf(constructorName); | 9433 _constructorName = _becomeParentOf(constructorName); |
| 9425 _argumentList = _becomeParentOf(argumentList); | 9434 _argumentList = _becomeParentOf(argumentList); |
| 9426 } | 9435 } |
| 9427 | 9436 |
| 9428 @override | 9437 @override |
| 9429 ArgumentList get argumentList => _argumentList; | 9438 ArgumentList get argumentList => _argumentList; |
| 9430 | 9439 |
| 9431 @override | 9440 @override |
| 9432 void set argumentList(ArgumentList argumentList) { | 9441 void set argumentList(ArgumentList argumentList) { |
| 9433 _argumentList = _becomeParentOf(argumentList); | 9442 _argumentList = _becomeParentOf(argumentList as AstNodeImpl); |
| 9434 } | 9443 } |
| 9435 | 9444 |
| 9436 @override | 9445 @override |
| 9437 Token get beginToken => superKeyword; | 9446 Token get beginToken => superKeyword; |
| 9438 | 9447 |
| 9439 @override | 9448 @override |
| 9440 Iterable get childEntities => new ChildEntities() | 9449 Iterable get childEntities => new ChildEntities() |
| 9441 ..add(superKeyword) | 9450 ..add(superKeyword) |
| 9442 ..add(period) | 9451 ..add(period) |
| 9443 ..add(_constructorName) | 9452 ..add(_constructorName) |
| 9444 ..add(_argumentList); | 9453 ..add(_argumentList); |
| 9445 | 9454 |
| 9446 @override | 9455 @override |
| 9447 SimpleIdentifier get constructorName => _constructorName; | 9456 SimpleIdentifier get constructorName => _constructorName; |
| 9448 | 9457 |
| 9449 @override | 9458 @override |
| 9450 void set constructorName(SimpleIdentifier identifier) { | 9459 void set constructorName(SimpleIdentifier identifier) { |
| 9451 _constructorName = _becomeParentOf(identifier); | 9460 _constructorName = _becomeParentOf(identifier as AstNodeImpl); |
| 9452 } | 9461 } |
| 9453 | 9462 |
| 9454 @override | 9463 @override |
| 9455 Token get endToken => _argumentList.endToken; | 9464 Token get endToken => _argumentList.endToken; |
| 9456 | 9465 |
| 9457 @override | 9466 @override |
| 9458 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 9467 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 9459 visitor.visitSuperConstructorInvocation(this); | 9468 visitor.visitSuperConstructorInvocation(this); |
| 9460 | 9469 |
| 9461 @override | 9470 @override |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9513 class SwitchCaseImpl extends SwitchMemberImpl implements SwitchCase { | 9522 class SwitchCaseImpl extends SwitchMemberImpl implements SwitchCase { |
| 9514 /** | 9523 /** |
| 9515 * The expression controlling whether the statements will be executed. | 9524 * The expression controlling whether the statements will be executed. |
| 9516 */ | 9525 */ |
| 9517 Expression _expression; | 9526 Expression _expression; |
| 9518 | 9527 |
| 9519 /** | 9528 /** |
| 9520 * Initialize a newly created switch case. The list of [labels] can be `null` | 9529 * Initialize a newly created switch case. The list of [labels] can be `null` |
| 9521 * if there are no labels. | 9530 * if there are no labels. |
| 9522 */ | 9531 */ |
| 9523 SwitchCaseImpl(List<Label> labels, Token keyword, Expression expression, | 9532 SwitchCaseImpl(List<Label> labels, Token keyword, ExpressionImpl expression, |
| 9524 Token colon, List<Statement> statements) | 9533 Token colon, List<Statement> statements) |
| 9525 : super(labels, keyword, colon, statements) { | 9534 : super(labels, keyword, colon, statements) { |
| 9526 _expression = _becomeParentOf(expression); | 9535 _expression = _becomeParentOf(expression); |
| 9527 } | 9536 } |
| 9528 | 9537 |
| 9529 @override | 9538 @override |
| 9530 Iterable get childEntities => new ChildEntities() | 9539 Iterable get childEntities => new ChildEntities() |
| 9531 ..addAll(labels) | 9540 ..addAll(labels) |
| 9532 ..add(keyword) | 9541 ..add(keyword) |
| 9533 ..add(_expression) | 9542 ..add(_expression) |
| 9534 ..add(colon) | 9543 ..add(colon) |
| 9535 ..addAll(statements); | 9544 ..addAll(statements); |
| 9536 | 9545 |
| 9537 @override | 9546 @override |
| 9538 Expression get expression => _expression; | 9547 Expression get expression => _expression; |
| 9539 | 9548 |
| 9540 @override | 9549 @override |
| 9541 void set expression(Expression expression) { | 9550 void set expression(Expression expression) { |
| 9542 _expression = _becomeParentOf(expression); | 9551 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 9543 } | 9552 } |
| 9544 | 9553 |
| 9545 @override | 9554 @override |
| 9546 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 9555 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 9547 visitor.visitSwitchCase(this); | 9556 visitor.visitSwitchCase(this); |
| 9548 | 9557 |
| 9549 @override | 9558 @override |
| 9550 void visitChildren(AstVisitor visitor) { | 9559 void visitChildren(AstVisitor visitor) { |
| 9551 labels.accept(visitor); | 9560 labels.accept(visitor); |
| 9552 _expression?.accept(visitor); | 9561 _expression?.accept(visitor); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9691 */ | 9700 */ |
| 9692 Token rightBracket; | 9701 Token rightBracket; |
| 9693 | 9702 |
| 9694 /** | 9703 /** |
| 9695 * Initialize a newly created switch statement. The list of [members] can be | 9704 * Initialize a newly created switch statement. The list of [members] can be |
| 9696 * `null` if there are no switch members. | 9705 * `null` if there are no switch members. |
| 9697 */ | 9706 */ |
| 9698 SwitchStatementImpl( | 9707 SwitchStatementImpl( |
| 9699 this.switchKeyword, | 9708 this.switchKeyword, |
| 9700 this.leftParenthesis, | 9709 this.leftParenthesis, |
| 9701 Expression expression, | 9710 ExpressionImpl expression, |
| 9702 this.rightParenthesis, | 9711 this.rightParenthesis, |
| 9703 this.leftBracket, | 9712 this.leftBracket, |
| 9704 List<SwitchMember> members, | 9713 List<SwitchMember> members, |
| 9705 this.rightBracket) { | 9714 this.rightBracket) { |
| 9706 _expression = _becomeParentOf(expression); | 9715 _expression = _becomeParentOf(expression); |
| 9707 _members = new NodeListImpl<SwitchMember>(this, members); | 9716 _members = new NodeListImpl<SwitchMember>(this, members); |
| 9708 } | 9717 } |
| 9709 | 9718 |
| 9710 @override | 9719 @override |
| 9711 Token get beginToken => switchKeyword; | 9720 Token get beginToken => switchKeyword; |
| 9712 | 9721 |
| 9713 @override | 9722 @override |
| 9714 Iterable get childEntities => new ChildEntities() | 9723 Iterable get childEntities => new ChildEntities() |
| 9715 ..add(switchKeyword) | 9724 ..add(switchKeyword) |
| 9716 ..add(leftParenthesis) | 9725 ..add(leftParenthesis) |
| 9717 ..add(_expression) | 9726 ..add(_expression) |
| 9718 ..add(rightParenthesis) | 9727 ..add(rightParenthesis) |
| 9719 ..add(leftBracket) | 9728 ..add(leftBracket) |
| 9720 ..addAll(_members) | 9729 ..addAll(_members) |
| 9721 ..add(rightBracket); | 9730 ..add(rightBracket); |
| 9722 | 9731 |
| 9723 @override | 9732 @override |
| 9724 Token get endToken => rightBracket; | 9733 Token get endToken => rightBracket; |
| 9725 | 9734 |
| 9726 @override | 9735 @override |
| 9727 Expression get expression => _expression; | 9736 Expression get expression => _expression; |
| 9728 | 9737 |
| 9729 @override | 9738 @override |
| 9730 void set expression(Expression expression) { | 9739 void set expression(Expression expression) { |
| 9731 _expression = _becomeParentOf(expression); | 9740 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 9732 } | 9741 } |
| 9733 | 9742 |
| 9734 @override | 9743 @override |
| 9735 NodeList<SwitchMember> get members => _members; | 9744 NodeList<SwitchMember> get members => _members; |
| 9736 | 9745 |
| 9737 @override | 9746 @override |
| 9738 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 9747 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 9739 visitor.visitSwitchStatement(this); | 9748 visitor.visitSwitchStatement(this); |
| 9740 | 9749 |
| 9741 @override | 9750 @override |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9841 Token throwKeyword; | 9850 Token throwKeyword; |
| 9842 | 9851 |
| 9843 /** | 9852 /** |
| 9844 * The expression computing the exception to be thrown. | 9853 * The expression computing the exception to be thrown. |
| 9845 */ | 9854 */ |
| 9846 Expression _expression; | 9855 Expression _expression; |
| 9847 | 9856 |
| 9848 /** | 9857 /** |
| 9849 * Initialize a newly created throw expression. | 9858 * Initialize a newly created throw expression. |
| 9850 */ | 9859 */ |
| 9851 ThrowExpressionImpl(this.throwKeyword, Expression expression) { | 9860 ThrowExpressionImpl(this.throwKeyword, ExpressionImpl expression) { |
| 9852 _expression = _becomeParentOf(expression); | 9861 _expression = _becomeParentOf(expression); |
| 9853 } | 9862 } |
| 9854 | 9863 |
| 9855 @override | 9864 @override |
| 9856 Token get beginToken => throwKeyword; | 9865 Token get beginToken => throwKeyword; |
| 9857 | 9866 |
| 9858 @override | 9867 @override |
| 9859 Iterable get childEntities => | 9868 Iterable get childEntities => |
| 9860 new ChildEntities()..add(throwKeyword)..add(_expression); | 9869 new ChildEntities()..add(throwKeyword)..add(_expression); |
| 9861 | 9870 |
| 9862 @override | 9871 @override |
| 9863 Token get endToken { | 9872 Token get endToken { |
| 9864 if (_expression != null) { | 9873 if (_expression != null) { |
| 9865 return _expression.endToken; | 9874 return _expression.endToken; |
| 9866 } | 9875 } |
| 9867 return throwKeyword; | 9876 return throwKeyword; |
| 9868 } | 9877 } |
| 9869 | 9878 |
| 9870 @override | 9879 @override |
| 9871 Expression get expression => _expression; | 9880 Expression get expression => _expression; |
| 9872 | 9881 |
| 9873 @override | 9882 @override |
| 9874 void set expression(Expression expression) { | 9883 void set expression(Expression expression) { |
| 9875 _expression = _becomeParentOf(expression); | 9884 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 9876 } | 9885 } |
| 9877 | 9886 |
| 9878 @override | 9887 @override |
| 9879 int get precedence => 0; | 9888 int get precedence => 0; |
| 9880 | 9889 |
| 9881 @override | 9890 @override |
| 9882 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 9891 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 9883 visitor.visitThrowExpression(this); | 9892 visitor.visitThrowExpression(this); |
| 9884 | 9893 |
| 9885 @override | 9894 @override |
| (...skipping 19 matching lines...) Expand all Loading... |
| 9905 /** | 9914 /** |
| 9906 * The semicolon terminating the declaration. | 9915 * The semicolon terminating the declaration. |
| 9907 */ | 9916 */ |
| 9908 Token semicolon; | 9917 Token semicolon; |
| 9909 | 9918 |
| 9910 /** | 9919 /** |
| 9911 * Initialize a newly created top-level variable declaration. Either or both | 9920 * Initialize a newly created top-level variable declaration. Either or both |
| 9912 * of the [comment] and [metadata] can be `null` if the variable does not have | 9921 * of the [comment] and [metadata] can be `null` if the variable does not have |
| 9913 * the corresponding attribute. | 9922 * the corresponding attribute. |
| 9914 */ | 9923 */ |
| 9915 TopLevelVariableDeclarationImpl(Comment comment, List<Annotation> metadata, | 9924 TopLevelVariableDeclarationImpl( |
| 9916 VariableDeclarationList variableList, this.semicolon) | 9925 CommentImpl comment, |
| 9926 List<Annotation> metadata, |
| 9927 VariableDeclarationListImpl variableList, |
| 9928 this.semicolon) |
| 9917 : super(comment, metadata) { | 9929 : super(comment, metadata) { |
| 9918 _variableList = _becomeParentOf(variableList); | 9930 _variableList = _becomeParentOf(variableList); |
| 9919 } | 9931 } |
| 9920 | 9932 |
| 9921 @override | 9933 @override |
| 9922 Iterable get childEntities => | 9934 Iterable get childEntities => |
| 9923 super._childEntities..add(_variableList)..add(semicolon); | 9935 super._childEntities..add(_variableList)..add(semicolon); |
| 9924 | 9936 |
| 9925 @override | 9937 @override |
| 9926 Element get element => null; | 9938 Element get element => null; |
| 9927 | 9939 |
| 9928 @override | 9940 @override |
| 9929 Token get endToken => semicolon; | 9941 Token get endToken => semicolon; |
| 9930 | 9942 |
| 9931 @override | 9943 @override |
| 9932 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; | 9944 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; |
| 9933 | 9945 |
| 9934 @override | 9946 @override |
| 9935 VariableDeclarationList get variables => _variableList; | 9947 VariableDeclarationList get variables => _variableList; |
| 9936 | 9948 |
| 9937 @override | 9949 @override |
| 9938 void set variables(VariableDeclarationList variables) { | 9950 void set variables(VariableDeclarationList variables) { |
| 9939 _variableList = _becomeParentOf(variables); | 9951 _variableList = _becomeParentOf(variables as AstNodeImpl); |
| 9940 } | 9952 } |
| 9941 | 9953 |
| 9942 @override | 9954 @override |
| 9943 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 9955 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 9944 visitor.visitTopLevelVariableDeclaration(this); | 9956 visitor.visitTopLevelVariableDeclaration(this); |
| 9945 | 9957 |
| 9946 @override | 9958 @override |
| 9947 void visitChildren(AstVisitor visitor) { | 9959 void visitChildren(AstVisitor visitor) { |
| 9948 super.visitChildren(visitor); | 9960 super.visitChildren(visitor); |
| 9949 _variableList?.accept(visitor); | 9961 _variableList?.accept(visitor); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9985 * The finally block contained in the try statement, or `null` if the | 9997 * The finally block contained in the try statement, or `null` if the |
| 9986 * statement does not contain a finally clause. | 9998 * statement does not contain a finally clause. |
| 9987 */ | 9999 */ |
| 9988 Block _finallyBlock; | 10000 Block _finallyBlock; |
| 9989 | 10001 |
| 9990 /** | 10002 /** |
| 9991 * Initialize a newly created try statement. The list of [catchClauses] can be | 10003 * Initialize a newly created try statement. The list of [catchClauses] can be |
| 9992 * `null` if there are no catch clauses. The [finallyKeyword] and | 10004 * `null` if there are no catch clauses. The [finallyKeyword] and |
| 9993 * [finallyBlock] can be `null` if there is no finally clause. | 10005 * [finallyBlock] can be `null` if there is no finally clause. |
| 9994 */ | 10006 */ |
| 9995 TryStatementImpl(this.tryKeyword, Block body, List<CatchClause> catchClauses, | 10007 TryStatementImpl( |
| 9996 this.finallyKeyword, Block finallyBlock) { | 10008 this.tryKeyword, |
| 10009 BlockImpl body, |
| 10010 List<CatchClause> catchClauses, |
| 10011 this.finallyKeyword, |
| 10012 BlockImpl finallyBlock) { |
| 9997 _body = _becomeParentOf(body); | 10013 _body = _becomeParentOf(body); |
| 9998 _catchClauses = new NodeListImpl<CatchClause>(this, catchClauses); | 10014 _catchClauses = new NodeListImpl<CatchClause>(this, catchClauses); |
| 9999 _finallyBlock = _becomeParentOf(finallyBlock); | 10015 _finallyBlock = _becomeParentOf(finallyBlock); |
| 10000 } | 10016 } |
| 10001 | 10017 |
| 10002 @override | 10018 @override |
| 10003 Token get beginToken => tryKeyword; | 10019 Token get beginToken => tryKeyword; |
| 10004 | 10020 |
| 10005 @override | 10021 @override |
| 10006 Block get body => _body; | 10022 Block get body => _body; |
| 10007 | 10023 |
| 10008 @override | 10024 @override |
| 10009 void set body(Block block) { | 10025 void set body(Block block) { |
| 10010 _body = _becomeParentOf(block); | 10026 _body = _becomeParentOf(block as AstNodeImpl); |
| 10011 } | 10027 } |
| 10012 | 10028 |
| 10013 @override | 10029 @override |
| 10014 NodeList<CatchClause> get catchClauses => _catchClauses; | 10030 NodeList<CatchClause> get catchClauses => _catchClauses; |
| 10015 | 10031 |
| 10016 @override | 10032 @override |
| 10017 Iterable get childEntities => new ChildEntities() | 10033 Iterable get childEntities => new ChildEntities() |
| 10018 ..add(tryKeyword) | 10034 ..add(tryKeyword) |
| 10019 ..add(_body) | 10035 ..add(_body) |
| 10020 ..addAll(_catchClauses) | 10036 ..addAll(_catchClauses) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 10031 return _catchClauses.endToken; | 10047 return _catchClauses.endToken; |
| 10032 } | 10048 } |
| 10033 return _body.endToken; | 10049 return _body.endToken; |
| 10034 } | 10050 } |
| 10035 | 10051 |
| 10036 @override | 10052 @override |
| 10037 Block get finallyBlock => _finallyBlock; | 10053 Block get finallyBlock => _finallyBlock; |
| 10038 | 10054 |
| 10039 @override | 10055 @override |
| 10040 void set finallyBlock(Block block) { | 10056 void set finallyBlock(Block block) { |
| 10041 _finallyBlock = _becomeParentOf(block); | 10057 _finallyBlock = _becomeParentOf(block as AstNodeImpl); |
| 10042 } | 10058 } |
| 10043 | 10059 |
| 10044 @override | 10060 @override |
| 10045 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 10061 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 10046 visitor.visitTryStatement(this); | 10062 visitor.visitTryStatement(this); |
| 10047 | 10063 |
| 10048 @override | 10064 @override |
| 10049 void visitChildren(AstVisitor visitor) { | 10065 void visitChildren(AstVisitor visitor) { |
| 10050 _body?.accept(visitor); | 10066 _body?.accept(visitor); |
| 10051 _catchClauses.accept(visitor); | 10067 _catchClauses.accept(visitor); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10165 * The type argument associated with this literal, or `null` if no type | 10181 * The type argument associated with this literal, or `null` if no type |
| 10166 * arguments were declared. | 10182 * arguments were declared. |
| 10167 */ | 10183 */ |
| 10168 TypeArgumentList _typeArguments; | 10184 TypeArgumentList _typeArguments; |
| 10169 | 10185 |
| 10170 /** | 10186 /** |
| 10171 * Initialize a newly created typed literal. The [constKeyword] can be `null`\ | 10187 * Initialize a newly created typed literal. The [constKeyword] can be `null`\ |
| 10172 * if the literal is not a constant. The [typeArguments] can be `null` if no | 10188 * if the literal is not a constant. The [typeArguments] can be `null` if no |
| 10173 * type arguments were declared. | 10189 * type arguments were declared. |
| 10174 */ | 10190 */ |
| 10175 TypedLiteralImpl(this.constKeyword, TypeArgumentList typeArguments) { | 10191 TypedLiteralImpl(this.constKeyword, TypeArgumentListImpl typeArguments) { |
| 10176 _typeArguments = _becomeParentOf(typeArguments); | 10192 _typeArguments = _becomeParentOf(typeArguments); |
| 10177 } | 10193 } |
| 10178 | 10194 |
| 10179 @override | 10195 @override |
| 10180 TypeArgumentList get typeArguments => _typeArguments; | 10196 TypeArgumentList get typeArguments => _typeArguments; |
| 10181 | 10197 |
| 10182 @override | 10198 @override |
| 10183 void set typeArguments(TypeArgumentList typeArguments) { | 10199 void set typeArguments(TypeArgumentList typeArguments) { |
| 10184 _typeArguments = _becomeParentOf(typeArguments); | 10200 _typeArguments = _becomeParentOf(typeArguments as AstNodeImpl); |
| 10185 } | 10201 } |
| 10186 | 10202 |
| 10187 ChildEntities get _childEntities => | 10203 ChildEntities get _childEntities => |
| 10188 new ChildEntities()..add(constKeyword)..add(_typeArguments); | 10204 new ChildEntities()..add(constKeyword)..add(_typeArguments); |
| 10189 | 10205 |
| 10190 @override | 10206 @override |
| 10191 void visitChildren(AstVisitor visitor) { | 10207 void visitChildren(AstVisitor visitor) { |
| 10192 _typeArguments?.accept(visitor); | 10208 _typeArguments?.accept(visitor); |
| 10193 } | 10209 } |
| 10194 } | 10210 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 10213 | 10229 |
| 10214 /** | 10230 /** |
| 10215 * The type being named, or `null` if the AST structure has not been resolved. | 10231 * The type being named, or `null` if the AST structure has not been resolved. |
| 10216 */ | 10232 */ |
| 10217 DartType type; | 10233 DartType type; |
| 10218 | 10234 |
| 10219 /** | 10235 /** |
| 10220 * Initialize a newly created type name. The [typeArguments] can be `null` if | 10236 * Initialize a newly created type name. The [typeArguments] can be `null` if |
| 10221 * there are no type arguments. | 10237 * there are no type arguments. |
| 10222 */ | 10238 */ |
| 10223 TypeNameImpl(Identifier name, TypeArgumentList typeArguments) { | 10239 TypeNameImpl(IdentifierImpl name, TypeArgumentListImpl typeArguments) { |
| 10224 _name = _becomeParentOf(name); | 10240 _name = _becomeParentOf(name); |
| 10225 _typeArguments = _becomeParentOf(typeArguments); | 10241 _typeArguments = _becomeParentOf(typeArguments); |
| 10226 } | 10242 } |
| 10227 | 10243 |
| 10228 @override | 10244 @override |
| 10229 Token get beginToken => _name.beginToken; | 10245 Token get beginToken => _name.beginToken; |
| 10230 | 10246 |
| 10231 @override | 10247 @override |
| 10232 Iterable get childEntities => | 10248 Iterable get childEntities => |
| 10233 new ChildEntities()..add(_name)..add(_typeArguments); | 10249 new ChildEntities()..add(_name)..add(_typeArguments); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 10250 } | 10266 } |
| 10251 | 10267 |
| 10252 @override | 10268 @override |
| 10253 bool get isSynthetic => _name.isSynthetic && _typeArguments == null; | 10269 bool get isSynthetic => _name.isSynthetic && _typeArguments == null; |
| 10254 | 10270 |
| 10255 @override | 10271 @override |
| 10256 Identifier get name => _name; | 10272 Identifier get name => _name; |
| 10257 | 10273 |
| 10258 @override | 10274 @override |
| 10259 void set name(Identifier identifier) { | 10275 void set name(Identifier identifier) { |
| 10260 _name = _becomeParentOf(identifier); | 10276 _name = _becomeParentOf(identifier as AstNodeImpl); |
| 10261 } | 10277 } |
| 10262 | 10278 |
| 10263 @override | 10279 @override |
| 10264 TypeArgumentList get typeArguments => _typeArguments; | 10280 TypeArgumentList get typeArguments => _typeArguments; |
| 10265 | 10281 |
| 10266 @override | 10282 @override |
| 10267 void set typeArguments(TypeArgumentList typeArguments) { | 10283 void set typeArguments(TypeArgumentList typeArguments) { |
| 10268 _typeArguments = _becomeParentOf(typeArguments); | 10284 _typeArguments = _becomeParentOf(typeArguments as AstNodeImpl); |
| 10269 } | 10285 } |
| 10270 | 10286 |
| 10271 @override | 10287 @override |
| 10272 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 10288 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 10273 visitor.visitTypeName(this); | 10289 visitor.visitTypeName(this); |
| 10274 | 10290 |
| 10275 @override | 10291 @override |
| 10276 void visitChildren(AstVisitor visitor) { | 10292 void visitChildren(AstVisitor visitor) { |
| 10277 _name?.accept(visitor); | 10293 _name?.accept(visitor); |
| 10278 _typeArguments?.accept(visitor); | 10294 _typeArguments?.accept(visitor); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 10302 * explicit upper bound. | 10318 * explicit upper bound. |
| 10303 */ | 10319 */ |
| 10304 TypeName _bound; | 10320 TypeName _bound; |
| 10305 | 10321 |
| 10306 /** | 10322 /** |
| 10307 * Initialize a newly created type parameter. Either or both of the [comment] | 10323 * Initialize a newly created type parameter. Either or both of the [comment] |
| 10308 * and [metadata] can be `null` if the parameter does not have the | 10324 * and [metadata] can be `null` if the parameter does not have the |
| 10309 * corresponding attribute. The [extendsKeyword] and [bound] can be `null` if | 10325 * corresponding attribute. The [extendsKeyword] and [bound] can be `null` if |
| 10310 * the parameter does not have an upper bound. | 10326 * the parameter does not have an upper bound. |
| 10311 */ | 10327 */ |
| 10312 TypeParameterImpl(Comment comment, List<Annotation> metadata, | 10328 TypeParameterImpl(CommentImpl comment, List<Annotation> metadata, |
| 10313 SimpleIdentifier name, this.extendsKeyword, TypeName bound) | 10329 SimpleIdentifierImpl name, this.extendsKeyword, TypeNameImpl bound) |
| 10314 : super(comment, metadata) { | 10330 : super(comment, metadata) { |
| 10315 _name = _becomeParentOf(name); | 10331 _name = _becomeParentOf(name); |
| 10316 _bound = _becomeParentOf(bound); | 10332 _bound = _becomeParentOf(bound); |
| 10317 } | 10333 } |
| 10318 | 10334 |
| 10319 @override | 10335 @override |
| 10320 TypeName get bound => _bound; | 10336 TypeName get bound => _bound; |
| 10321 | 10337 |
| 10322 @override | 10338 @override |
| 10323 void set bound(TypeName typeName) { | 10339 void set bound(TypeName typeName) { |
| 10324 _bound = _becomeParentOf(typeName); | 10340 _bound = _becomeParentOf(typeName as AstNodeImpl); |
| 10325 } | 10341 } |
| 10326 | 10342 |
| 10327 @override | 10343 @override |
| 10328 Iterable get childEntities => | 10344 Iterable get childEntities => |
| 10329 super._childEntities..add(_name)..add(extendsKeyword)..add(_bound); | 10345 super._childEntities..add(_name)..add(extendsKeyword)..add(_bound); |
| 10330 | 10346 |
| 10331 @override | 10347 @override |
| 10332 TypeParameterElement get element => | 10348 TypeParameterElement get element => |
| 10333 _name?.staticElement as TypeParameterElement; | 10349 _name?.staticElement as TypeParameterElement; |
| 10334 | 10350 |
| 10335 @override | 10351 @override |
| 10336 Token get endToken { | 10352 Token get endToken { |
| 10337 if (_bound == null) { | 10353 if (_bound == null) { |
| 10338 return _name.endToken; | 10354 return _name.endToken; |
| 10339 } | 10355 } |
| 10340 return _bound.endToken; | 10356 return _bound.endToken; |
| 10341 } | 10357 } |
| 10342 | 10358 |
| 10343 @override | 10359 @override |
| 10344 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; | 10360 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; |
| 10345 | 10361 |
| 10346 @override | 10362 @override |
| 10347 SimpleIdentifier get name => _name; | 10363 SimpleIdentifier get name => _name; |
| 10348 | 10364 |
| 10349 @override | 10365 @override |
| 10350 void set name(SimpleIdentifier identifier) { | 10366 void set name(SimpleIdentifier identifier) { |
| 10351 _name = _becomeParentOf(identifier); | 10367 _name = _becomeParentOf(identifier as AstNodeImpl); |
| 10352 } | 10368 } |
| 10353 | 10369 |
| 10354 @override | 10370 @override |
| 10355 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 10371 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 10356 visitor.visitTypeParameter(this); | 10372 visitor.visitTypeParameter(this); |
| 10357 | 10373 |
| 10358 @override | 10374 @override |
| 10359 void visitChildren(AstVisitor visitor) { | 10375 void visitChildren(AstVisitor visitor) { |
| 10360 super.visitChildren(visitor); | 10376 super.visitChildren(visitor); |
| 10361 _name?.accept(visitor); | 10377 _name?.accept(visitor); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10448 * The source to which the URI was resolved. | 10464 * The source to which the URI was resolved. |
| 10449 */ | 10465 */ |
| 10450 Source source; | 10466 Source source; |
| 10451 | 10467 |
| 10452 /** | 10468 /** |
| 10453 * Initialize a newly create URI-based directive. Either or both of the | 10469 * Initialize a newly create URI-based directive. Either or both of the |
| 10454 * [comment] and [metadata] can be `null` if the directive does not have the | 10470 * [comment] and [metadata] can be `null` if the directive does not have the |
| 10455 * corresponding attribute. | 10471 * corresponding attribute. |
| 10456 */ | 10472 */ |
| 10457 UriBasedDirectiveImpl( | 10473 UriBasedDirectiveImpl( |
| 10458 Comment comment, List<Annotation> metadata, StringLiteral uri) | 10474 CommentImpl comment, List<Annotation> metadata, StringLiteralImpl uri) |
| 10459 : super(comment, metadata) { | 10475 : super(comment, metadata) { |
| 10460 _uri = _becomeParentOf(uri); | 10476 _uri = _becomeParentOf(uri); |
| 10461 } | 10477 } |
| 10462 | 10478 |
| 10463 @override | 10479 @override |
| 10464 StringLiteral get uri => _uri; | 10480 StringLiteral get uri => _uri; |
| 10465 | 10481 |
| 10466 @override | 10482 @override |
| 10467 void set uri(StringLiteral uri) { | 10483 void set uri(StringLiteral uri) { |
| 10468 _uri = _becomeParentOf(uri); | 10484 _uri = _becomeParentOf(uri as AstNodeImpl); |
| 10469 } | 10485 } |
| 10470 | 10486 |
| 10471 @override | 10487 @override |
| 10472 UriValidationCode validate() { | 10488 UriValidationCode validate() { |
| 10473 StringLiteral uriLiteral = uri; | 10489 StringLiteral uriLiteral = uri; |
| 10474 if (uriLiteral is StringInterpolation) { | 10490 if (uriLiteral is StringInterpolation) { |
| 10475 return UriValidationCode.URI_WITH_INTERPOLATION; | 10491 return UriValidationCode.URI_WITH_INTERPOLATION; |
| 10476 } | 10492 } |
| 10477 String uriContent = this.uriContent; | 10493 String uriContent = this.uriContent; |
| 10478 if (uriContent == null) { | 10494 if (uriContent == null) { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10552 * The expression used to compute the initial value for the variable, or | 10568 * The expression used to compute the initial value for the variable, or |
| 10553 * `null` if the initial value was not specified. | 10569 * `null` if the initial value was not specified. |
| 10554 */ | 10570 */ |
| 10555 Expression _initializer; | 10571 Expression _initializer; |
| 10556 | 10572 |
| 10557 /** | 10573 /** |
| 10558 * Initialize a newly created variable declaration. The [equals] and | 10574 * Initialize a newly created variable declaration. The [equals] and |
| 10559 * [initializer] can be `null` if there is no initializer. | 10575 * [initializer] can be `null` if there is no initializer. |
| 10560 */ | 10576 */ |
| 10561 VariableDeclarationImpl( | 10577 VariableDeclarationImpl( |
| 10562 SimpleIdentifier name, this.equals, Expression initializer) | 10578 SimpleIdentifierImpl name, this.equals, ExpressionImpl initializer) |
| 10563 : super(null, null) { | 10579 : super(null, null) { |
| 10564 _name = _becomeParentOf(name); | 10580 _name = _becomeParentOf(name); |
| 10565 _initializer = _becomeParentOf(initializer); | 10581 _initializer = _becomeParentOf(initializer); |
| 10566 } | 10582 } |
| 10567 | 10583 |
| 10568 @override | 10584 @override |
| 10569 Iterable get childEntities => | 10585 Iterable get childEntities => |
| 10570 super._childEntities..add(_name)..add(equals)..add(_initializer); | 10586 super._childEntities..add(_name)..add(equals)..add(_initializer); |
| 10571 | 10587 |
| 10572 /** | 10588 /** |
| (...skipping 25 matching lines...) Expand all Loading... |
| 10598 } | 10614 } |
| 10599 | 10615 |
| 10600 @override | 10616 @override |
| 10601 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; | 10617 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; |
| 10602 | 10618 |
| 10603 @override | 10619 @override |
| 10604 Expression get initializer => _initializer; | 10620 Expression get initializer => _initializer; |
| 10605 | 10621 |
| 10606 @override | 10622 @override |
| 10607 void set initializer(Expression expression) { | 10623 void set initializer(Expression expression) { |
| 10608 _initializer = _becomeParentOf(expression); | 10624 _initializer = _becomeParentOf(expression as AstNodeImpl); |
| 10609 } | 10625 } |
| 10610 | 10626 |
| 10611 @override | 10627 @override |
| 10612 bool get isConst { | 10628 bool get isConst { |
| 10613 AstNode parent = this.parent; | 10629 AstNode parent = this.parent; |
| 10614 return parent is VariableDeclarationList && parent.isConst; | 10630 return parent is VariableDeclarationList && parent.isConst; |
| 10615 } | 10631 } |
| 10616 | 10632 |
| 10617 @override | 10633 @override |
| 10618 bool get isFinal { | 10634 bool get isFinal { |
| 10619 AstNode parent = this.parent; | 10635 AstNode parent = this.parent; |
| 10620 return parent is VariableDeclarationList && parent.isFinal; | 10636 return parent is VariableDeclarationList && parent.isFinal; |
| 10621 } | 10637 } |
| 10622 | 10638 |
| 10623 @override | 10639 @override |
| 10624 SimpleIdentifier get name => _name; | 10640 SimpleIdentifier get name => _name; |
| 10625 | 10641 |
| 10626 @override | 10642 @override |
| 10627 void set name(SimpleIdentifier identifier) { | 10643 void set name(SimpleIdentifier identifier) { |
| 10628 _name = _becomeParentOf(identifier); | 10644 _name = _becomeParentOf(identifier as AstNodeImpl); |
| 10629 } | 10645 } |
| 10630 | 10646 |
| 10631 @override | 10647 @override |
| 10632 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 10648 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 10633 visitor.visitVariableDeclaration(this); | 10649 visitor.visitVariableDeclaration(this); |
| 10634 | 10650 |
| 10635 @override | 10651 @override |
| 10636 void visitChildren(AstVisitor visitor) { | 10652 void visitChildren(AstVisitor visitor) { |
| 10637 super.visitChildren(visitor); | 10653 super.visitChildren(visitor); |
| 10638 _name?.accept(visitor); | 10654 _name?.accept(visitor); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 10669 * A list containing the individual variables being declared. | 10685 * A list containing the individual variables being declared. |
| 10670 */ | 10686 */ |
| 10671 NodeList<VariableDeclaration> _variables; | 10687 NodeList<VariableDeclaration> _variables; |
| 10672 | 10688 |
| 10673 /** | 10689 /** |
| 10674 * Initialize a newly created variable declaration list. Either or both of the | 10690 * Initialize a newly created variable declaration list. Either or both of the |
| 10675 * [comment] and [metadata] can be `null` if the variable list does not have | 10691 * [comment] and [metadata] can be `null` if the variable list does not have |
| 10676 * the corresponding attribute. The [keyword] can be `null` if a type was | 10692 * the corresponding attribute. The [keyword] can be `null` if a type was |
| 10677 * specified. The [type] must be `null` if the keyword is 'var'. | 10693 * specified. The [type] must be `null` if the keyword is 'var'. |
| 10678 */ | 10694 */ |
| 10679 VariableDeclarationListImpl(Comment comment, List<Annotation> metadata, | 10695 VariableDeclarationListImpl(CommentImpl comment, List<Annotation> metadata, |
| 10680 this.keyword, TypeName type, List<VariableDeclaration> variables) | 10696 this.keyword, TypeNameImpl type, List<VariableDeclaration> variables) |
| 10681 : super(comment, metadata) { | 10697 : super(comment, metadata) { |
| 10682 _type = _becomeParentOf(type); | 10698 _type = _becomeParentOf(type); |
| 10683 _variables = new NodeListImpl<VariableDeclaration>(this, variables); | 10699 _variables = new NodeListImpl<VariableDeclaration>(this, variables); |
| 10684 } | 10700 } |
| 10685 | 10701 |
| 10686 @override | 10702 @override |
| 10687 // TODO(paulberry): include commas. | 10703 // TODO(paulberry): include commas. |
| 10688 Iterable get childEntities => super._childEntities | 10704 Iterable get childEntities => super._childEntities |
| 10689 ..add(keyword) | 10705 ..add(keyword) |
| 10690 ..add(_type) | 10706 ..add(_type) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 10707 bool get isConst => keyword?.keyword == Keyword.CONST; | 10723 bool get isConst => keyword?.keyword == Keyword.CONST; |
| 10708 | 10724 |
| 10709 @override | 10725 @override |
| 10710 bool get isFinal => keyword?.keyword == Keyword.FINAL; | 10726 bool get isFinal => keyword?.keyword == Keyword.FINAL; |
| 10711 | 10727 |
| 10712 @override | 10728 @override |
| 10713 TypeName get type => _type; | 10729 TypeName get type => _type; |
| 10714 | 10730 |
| 10715 @override | 10731 @override |
| 10716 void set type(TypeName typeName) { | 10732 void set type(TypeName typeName) { |
| 10717 _type = _becomeParentOf(typeName); | 10733 _type = _becomeParentOf(typeName as AstNodeImpl); |
| 10718 } | 10734 } |
| 10719 | 10735 |
| 10720 @override | 10736 @override |
| 10721 NodeList<VariableDeclaration> get variables => _variables; | 10737 NodeList<VariableDeclaration> get variables => _variables; |
| 10722 | 10738 |
| 10723 @override | 10739 @override |
| 10724 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 10740 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 10725 visitor.visitVariableDeclarationList(this); | 10741 visitor.visitVariableDeclarationList(this); |
| 10726 | 10742 |
| 10727 @override | 10743 @override |
| (...skipping 20 matching lines...) Expand all Loading... |
| 10748 | 10764 |
| 10749 /** | 10765 /** |
| 10750 * The semicolon terminating the statement. | 10766 * The semicolon terminating the statement. |
| 10751 */ | 10767 */ |
| 10752 Token semicolon; | 10768 Token semicolon; |
| 10753 | 10769 |
| 10754 /** | 10770 /** |
| 10755 * Initialize a newly created variable declaration statement. | 10771 * Initialize a newly created variable declaration statement. |
| 10756 */ | 10772 */ |
| 10757 VariableDeclarationStatementImpl( | 10773 VariableDeclarationStatementImpl( |
| 10758 VariableDeclarationList variableList, this.semicolon) { | 10774 VariableDeclarationListImpl variableList, this.semicolon) { |
| 10759 _variableList = _becomeParentOf(variableList); | 10775 _variableList = _becomeParentOf(variableList); |
| 10760 } | 10776 } |
| 10761 | 10777 |
| 10762 @override | 10778 @override |
| 10763 Token get beginToken => _variableList.beginToken; | 10779 Token get beginToken => _variableList.beginToken; |
| 10764 | 10780 |
| 10765 @override | 10781 @override |
| 10766 Iterable get childEntities => | 10782 Iterable get childEntities => |
| 10767 new ChildEntities()..add(_variableList)..add(semicolon); | 10783 new ChildEntities()..add(_variableList)..add(semicolon); |
| 10768 | 10784 |
| 10769 @override | 10785 @override |
| 10770 Token get endToken => semicolon; | 10786 Token get endToken => semicolon; |
| 10771 | 10787 |
| 10772 @override | 10788 @override |
| 10773 VariableDeclarationList get variables => _variableList; | 10789 VariableDeclarationList get variables => _variableList; |
| 10774 | 10790 |
| 10775 @override | 10791 @override |
| 10776 void set variables(VariableDeclarationList variables) { | 10792 void set variables(VariableDeclarationList variables) { |
| 10777 _variableList = _becomeParentOf(variables); | 10793 _variableList = _becomeParentOf(variables as AstNodeImpl); |
| 10778 } | 10794 } |
| 10779 | 10795 |
| 10780 @override | 10796 @override |
| 10781 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 10797 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 10782 visitor.visitVariableDeclarationStatement(this); | 10798 visitor.visitVariableDeclarationStatement(this); |
| 10783 | 10799 |
| 10784 @override | 10800 @override |
| 10785 void visitChildren(AstVisitor visitor) { | 10801 void visitChildren(AstVisitor visitor) { |
| 10786 _variableList?.accept(visitor); | 10802 _variableList?.accept(visitor); |
| 10787 } | 10803 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 10816 | 10832 |
| 10817 /** | 10833 /** |
| 10818 * The body of the loop. | 10834 * The body of the loop. |
| 10819 */ | 10835 */ |
| 10820 Statement _body; | 10836 Statement _body; |
| 10821 | 10837 |
| 10822 /** | 10838 /** |
| 10823 * Initialize a newly created while statement. | 10839 * Initialize a newly created while statement. |
| 10824 */ | 10840 */ |
| 10825 WhileStatementImpl(this.whileKeyword, this.leftParenthesis, | 10841 WhileStatementImpl(this.whileKeyword, this.leftParenthesis, |
| 10826 Expression condition, this.rightParenthesis, Statement body) { | 10842 ExpressionImpl condition, this.rightParenthesis, StatementImpl body) { |
| 10827 _condition = _becomeParentOf(condition); | 10843 _condition = _becomeParentOf(condition); |
| 10828 _body = _becomeParentOf(body); | 10844 _body = _becomeParentOf(body); |
| 10829 } | 10845 } |
| 10830 | 10846 |
| 10831 @override | 10847 @override |
| 10832 Token get beginToken => whileKeyword; | 10848 Token get beginToken => whileKeyword; |
| 10833 | 10849 |
| 10834 @override | 10850 @override |
| 10835 Statement get body => _body; | 10851 Statement get body => _body; |
| 10836 | 10852 |
| 10837 @override | 10853 @override |
| 10838 void set body(Statement statement) { | 10854 void set body(Statement statement) { |
| 10839 _body = _becomeParentOf(statement); | 10855 _body = _becomeParentOf(statement as AstNodeImpl); |
| 10840 } | 10856 } |
| 10841 | 10857 |
| 10842 @override | 10858 @override |
| 10843 Iterable get childEntities => new ChildEntities() | 10859 Iterable get childEntities => new ChildEntities() |
| 10844 ..add(whileKeyword) | 10860 ..add(whileKeyword) |
| 10845 ..add(leftParenthesis) | 10861 ..add(leftParenthesis) |
| 10846 ..add(_condition) | 10862 ..add(_condition) |
| 10847 ..add(rightParenthesis) | 10863 ..add(rightParenthesis) |
| 10848 ..add(_body); | 10864 ..add(_body); |
| 10849 | 10865 |
| 10850 @override | 10866 @override |
| 10851 Expression get condition => _condition; | 10867 Expression get condition => _condition; |
| 10852 | 10868 |
| 10853 @override | 10869 @override |
| 10854 void set condition(Expression expression) { | 10870 void set condition(Expression expression) { |
| 10855 _condition = _becomeParentOf(expression); | 10871 _condition = _becomeParentOf(expression as AstNodeImpl); |
| 10856 } | 10872 } |
| 10857 | 10873 |
| 10858 @override | 10874 @override |
| 10859 Token get endToken => _body.endToken; | 10875 Token get endToken => _body.endToken; |
| 10860 | 10876 |
| 10861 @override | 10877 @override |
| 10862 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 10878 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 10863 visitor.visitWhileStatement(this); | 10879 visitor.visitWhileStatement(this); |
| 10864 | 10880 |
| 10865 @override | 10881 @override |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10943 /** | 10959 /** |
| 10944 * The semicolon following the expression. | 10960 * The semicolon following the expression. |
| 10945 */ | 10961 */ |
| 10946 Token semicolon; | 10962 Token semicolon; |
| 10947 | 10963 |
| 10948 /** | 10964 /** |
| 10949 * Initialize a newly created yield expression. The [star] can be `null` if no | 10965 * Initialize a newly created yield expression. The [star] can be `null` if no |
| 10950 * star was provided. | 10966 * star was provided. |
| 10951 */ | 10967 */ |
| 10952 YieldStatementImpl( | 10968 YieldStatementImpl( |
| 10953 this.yieldKeyword, this.star, Expression expression, this.semicolon) { | 10969 this.yieldKeyword, this.star, ExpressionImpl expression, this.semicolon) { |
| 10954 _expression = _becomeParentOf(expression); | 10970 _expression = _becomeParentOf(expression); |
| 10955 } | 10971 } |
| 10956 | 10972 |
| 10957 @override | 10973 @override |
| 10958 Token get beginToken { | 10974 Token get beginToken { |
| 10959 if (yieldKeyword != null) { | 10975 if (yieldKeyword != null) { |
| 10960 return yieldKeyword; | 10976 return yieldKeyword; |
| 10961 } | 10977 } |
| 10962 return _expression.beginToken; | 10978 return _expression.beginToken; |
| 10963 } | 10979 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 10975 return semicolon; | 10991 return semicolon; |
| 10976 } | 10992 } |
| 10977 return _expression.endToken; | 10993 return _expression.endToken; |
| 10978 } | 10994 } |
| 10979 | 10995 |
| 10980 @override | 10996 @override |
| 10981 Expression get expression => _expression; | 10997 Expression get expression => _expression; |
| 10982 | 10998 |
| 10983 @override | 10999 @override |
| 10984 void set expression(Expression expression) { | 11000 void set expression(Expression expression) { |
| 10985 _expression = _becomeParentOf(expression); | 11001 _expression = _becomeParentOf(expression as AstNodeImpl); |
| 10986 } | 11002 } |
| 10987 | 11003 |
| 10988 @override | 11004 @override |
| 10989 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 11005 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 10990 visitor.visitYieldStatement(this); | 11006 visitor.visitYieldStatement(this); |
| 10991 | 11007 |
| 10992 @override | 11008 @override |
| 10993 void visitChildren(AstVisitor visitor) { | 11009 void visitChildren(AstVisitor visitor) { |
| 10994 _expression?.accept(visitor); | 11010 _expression?.accept(visitor); |
| 10995 } | 11011 } |
| 10996 } | 11012 } |
| OLD | NEW |