| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.ast; | 8 library engine.ast; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 */ | 587 */ |
| 588 AsExpression(Expression expression, this.asOperator, TypeName type) { | 588 AsExpression(Expression expression, this.asOperator, TypeName type) { |
| 589 _expression = _becomeParentOf(expression); | 589 _expression = _becomeParentOf(expression); |
| 590 _type = _becomeParentOf(type); | 590 _type = _becomeParentOf(type); |
| 591 } | 591 } |
| 592 | 592 |
| 593 @override | 593 @override |
| 594 Token get beginToken => _expression.beginToken; | 594 Token get beginToken => _expression.beginToken; |
| 595 | 595 |
| 596 @override | 596 @override |
| 597 Iterable get childEntities => | 597 Iterable get childEntities => new ChildEntities() |
| 598 new ChildEntities()..add(_expression)..add(asOperator)..add(_type); | 598 ..add(_expression) |
| 599 ..add(asOperator) |
| 600 ..add(_type); |
| 599 | 601 |
| 600 @override | 602 @override |
| 601 Token get endToken => _type.endToken; | 603 Token get endToken => _type.endToken; |
| 602 | 604 |
| 603 /** | 605 /** |
| 604 * Return the expression used to compute the value being cast. | 606 * Return the expression used to compute the value being cast. |
| 605 */ | 607 */ |
| 606 Expression get expression => _expression; | 608 Expression get expression => _expression; |
| 607 | 609 |
| 608 /** | 610 /** |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 new FieldFormalParameter(cloneNode(node.documentationComment), | 1246 new FieldFormalParameter(cloneNode(node.documentationComment), |
| 1245 cloneNodeList(node.metadata), cloneToken(node.keyword), | 1247 cloneNodeList(node.metadata), cloneToken(node.keyword), |
| 1246 cloneNode(node.type), cloneToken(node.thisKeyword), | 1248 cloneNode(node.type), cloneToken(node.thisKeyword), |
| 1247 cloneToken(node.period), cloneNode(node.identifier), | 1249 cloneToken(node.period), cloneNode(node.identifier), |
| 1248 cloneNode(node.parameters)); | 1250 cloneNode(node.parameters)); |
| 1249 | 1251 |
| 1250 @override | 1252 @override |
| 1251 ForEachStatement visitForEachStatement(ForEachStatement node) { | 1253 ForEachStatement visitForEachStatement(ForEachStatement node) { |
| 1252 DeclaredIdentifier loopVariable = node.loopVariable; | 1254 DeclaredIdentifier loopVariable = node.loopVariable; |
| 1253 if (loopVariable == null) { | 1255 if (loopVariable == null) { |
| 1254 return new ForEachStatement.con2(cloneToken(node.awaitKeyword), | 1256 return new ForEachStatement.withReference(cloneToken(node.awaitKeyword), |
| 1255 cloneToken(node.forKeyword), cloneToken(node.leftParenthesis), | 1257 cloneToken(node.forKeyword), cloneToken(node.leftParenthesis), |
| 1256 cloneNode(node.identifier), cloneToken(node.inKeyword), | 1258 cloneNode(node.identifier), cloneToken(node.inKeyword), |
| 1257 cloneNode(node.iterable), cloneToken(node.rightParenthesis), | 1259 cloneNode(node.iterable), cloneToken(node.rightParenthesis), |
| 1258 cloneNode(node.body)); | 1260 cloneNode(node.body)); |
| 1259 } | 1261 } |
| 1260 return new ForEachStatement.con1(cloneToken(node.awaitKeyword), | 1262 return new ForEachStatement.withDeclaration(cloneToken(node.awaitKeyword), |
| 1261 cloneToken(node.forKeyword), cloneToken(node.leftParenthesis), | 1263 cloneToken(node.forKeyword), cloneToken(node.leftParenthesis), |
| 1262 cloneNode(loopVariable), cloneToken(node.inKeyword), | 1264 cloneNode(loopVariable), cloneToken(node.inKeyword), |
| 1263 cloneNode(node.iterable), cloneToken(node.rightParenthesis), | 1265 cloneNode(node.iterable), cloneToken(node.rightParenthesis), |
| 1264 cloneNode(node.body)); | 1266 cloneNode(node.body)); |
| 1265 } | 1267 } |
| 1266 | 1268 |
| 1267 @override | 1269 @override |
| 1268 FormalParameterList visitFormalParameterList(FormalParameterList node) => | 1270 FormalParameterList visitFormalParameterList(FormalParameterList node) => |
| 1269 new FormalParameterList(cloneToken(node.leftParenthesis), | 1271 new FormalParameterList(cloneToken(node.leftParenthesis), |
| 1270 cloneNodeList(node.parameters), cloneToken(node.leftDelimiter), | 1272 cloneNodeList(node.parameters), cloneToken(node.leftDelimiter), |
| (...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3183 | 3185 |
| 3184 @override | 3186 @override |
| 3185 Token get beginToken { | 3187 Token get beginToken { |
| 3186 if (awaitKeyword != null) { | 3188 if (awaitKeyword != null) { |
| 3187 return awaitKeyword; | 3189 return awaitKeyword; |
| 3188 } | 3190 } |
| 3189 return _expression.beginToken; | 3191 return _expression.beginToken; |
| 3190 } | 3192 } |
| 3191 | 3193 |
| 3192 @override | 3194 @override |
| 3193 Iterable get childEntities => | 3195 Iterable get childEntities => new ChildEntities() |
| 3194 new ChildEntities()..add(awaitKeyword)..add(_expression); | 3196 ..add(awaitKeyword) |
| 3197 ..add(_expression); |
| 3195 | 3198 |
| 3196 @override | 3199 @override |
| 3197 Token get endToken => _expression.endToken; | 3200 Token get endToken => _expression.endToken; |
| 3198 | 3201 |
| 3199 /** | 3202 /** |
| 3200 * Return the expression whose value is being waited on. | 3203 * Return the expression whose value is being waited on. |
| 3201 */ | 3204 */ |
| 3202 Expression get expression => _expression; | 3205 Expression get expression => _expression; |
| 3203 | 3206 |
| 3204 /** | 3207 /** |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3278 */ | 3281 */ |
| 3279 MethodElement get bestElement { | 3282 MethodElement get bestElement { |
| 3280 MethodElement element = propagatedElement; | 3283 MethodElement element = propagatedElement; |
| 3281 if (element == null) { | 3284 if (element == null) { |
| 3282 element = staticElement; | 3285 element = staticElement; |
| 3283 } | 3286 } |
| 3284 return element; | 3287 return element; |
| 3285 } | 3288 } |
| 3286 | 3289 |
| 3287 @override | 3290 @override |
| 3288 Iterable get childEntities => | 3291 Iterable get childEntities => new ChildEntities() |
| 3289 new ChildEntities()..add(_leftOperand)..add(operator)..add(_rightOperand); | 3292 ..add(_leftOperand) |
| 3293 ..add(operator) |
| 3294 ..add(_rightOperand); |
| 3290 | 3295 |
| 3291 @override | 3296 @override |
| 3292 Token get endToken => _rightOperand.endToken; | 3297 Token get endToken => _rightOperand.endToken; |
| 3293 | 3298 |
| 3294 /** | 3299 /** |
| 3295 * Return the expression used to compute the left operand. | 3300 * Return the expression used to compute the left operand. |
| 3296 */ | 3301 */ |
| 3297 Expression get leftOperand => _leftOperand; | 3302 Expression get leftOperand => _leftOperand; |
| 3298 | 3303 |
| 3299 /** | 3304 /** |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3484 Block get block => _block; | 3489 Block get block => _block; |
| 3485 | 3490 |
| 3486 /** | 3491 /** |
| 3487 * Set the block representing the body of the function to the given [block]. | 3492 * Set the block representing the body of the function to the given [block]. |
| 3488 */ | 3493 */ |
| 3489 void set block(Block block) { | 3494 void set block(Block block) { |
| 3490 _block = _becomeParentOf(block); | 3495 _block = _becomeParentOf(block); |
| 3491 } | 3496 } |
| 3492 | 3497 |
| 3493 @override | 3498 @override |
| 3494 Iterable get childEntities => | 3499 Iterable get childEntities => new ChildEntities() |
| 3495 new ChildEntities()..add(keyword)..add(star)..add(_block); | 3500 ..add(keyword) |
| 3501 ..add(star) |
| 3502 ..add(_block); |
| 3496 | 3503 |
| 3497 @override | 3504 @override |
| 3498 Token get endToken => _block.endToken; | 3505 Token get endToken => _block.endToken; |
| 3499 | 3506 |
| 3500 @override | 3507 @override |
| 3501 bool get isAsynchronous => keyword != null && keyword.lexeme == Parser.ASYNC; | 3508 bool get isAsynchronous => keyword != null && keyword.lexeme == Parser.ASYNC; |
| 3502 | 3509 |
| 3503 @override | 3510 @override |
| 3504 bool get isGenerator => star != null; | 3511 bool get isGenerator => star != null; |
| 3505 | 3512 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3651 * there is no label associated with the statement. | 3658 * there is no label associated with the statement. |
| 3652 */ | 3659 */ |
| 3653 BreakStatement(this.breakKeyword, SimpleIdentifier label, this.semicolon) { | 3660 BreakStatement(this.breakKeyword, SimpleIdentifier label, this.semicolon) { |
| 3654 _label = _becomeParentOf(label); | 3661 _label = _becomeParentOf(label); |
| 3655 } | 3662 } |
| 3656 | 3663 |
| 3657 @override | 3664 @override |
| 3658 Token get beginToken => breakKeyword; | 3665 Token get beginToken => breakKeyword; |
| 3659 | 3666 |
| 3660 @override | 3667 @override |
| 3661 Iterable get childEntities => | 3668 Iterable get childEntities => new ChildEntities() |
| 3662 new ChildEntities()..add(breakKeyword)..add(_label)..add(semicolon); | 3669 ..add(breakKeyword) |
| 3670 ..add(_label) |
| 3671 ..add(semicolon); |
| 3663 | 3672 |
| 3664 @override | 3673 @override |
| 3665 Token get endToken => semicolon; | 3674 Token get endToken => semicolon; |
| 3666 | 3675 |
| 3667 /** | 3676 /** |
| 3668 * Return the token representing the 'break' keyword. | 3677 * Return the token representing the 'break' keyword. |
| 3669 */ | 3678 */ |
| 3670 @deprecated // Use "this.breakKeyword" | 3679 @deprecated // Use "this.breakKeyword" |
| 3671 Token get keyword => breakKeyword; | 3680 Token get keyword => breakKeyword; |
| 3672 | 3681 |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4559 * can be `null` if the reference is not to a constructor. | 4568 * can be `null` if the reference is not to a constructor. |
| 4560 */ | 4569 */ |
| 4561 CommentReference(this.newKeyword, Identifier identifier) { | 4570 CommentReference(this.newKeyword, Identifier identifier) { |
| 4562 _identifier = _becomeParentOf(identifier); | 4571 _identifier = _becomeParentOf(identifier); |
| 4563 } | 4572 } |
| 4564 | 4573 |
| 4565 @override | 4574 @override |
| 4566 Token get beginToken => _identifier.beginToken; | 4575 Token get beginToken => _identifier.beginToken; |
| 4567 | 4576 |
| 4568 @override | 4577 @override |
| 4569 Iterable get childEntities => | 4578 Iterable get childEntities => new ChildEntities() |
| 4570 new ChildEntities()..add(newKeyword)..add(_identifier); | 4579 ..add(newKeyword) |
| 4580 ..add(_identifier); |
| 4571 | 4581 |
| 4572 @override | 4582 @override |
| 4573 Token get endToken => _identifier.endToken; | 4583 Token get endToken => _identifier.endToken; |
| 4574 | 4584 |
| 4575 /** | 4585 /** |
| 4576 * Return the identifier being referenced. | 4586 * Return the identifier being referenced. |
| 4577 */ | 4587 */ |
| 4578 Identifier get identifier => _identifier; | 4588 Identifier get identifier => _identifier; |
| 4579 | 4589 |
| 4580 /** | 4590 /** |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4701 this.endToken) { | 4711 this.endToken) { |
| 4702 _scriptTag = _becomeParentOf(scriptTag); | 4712 _scriptTag = _becomeParentOf(scriptTag); |
| 4703 _directives = new NodeList<Directive>(this, directives); | 4713 _directives = new NodeList<Directive>(this, directives); |
| 4704 _declarations = new NodeList<CompilationUnitMember>(this, declarations); | 4714 _declarations = new NodeList<CompilationUnitMember>(this, declarations); |
| 4705 } | 4715 } |
| 4706 | 4716 |
| 4707 @override | 4717 @override |
| 4708 Iterable get childEntities { | 4718 Iterable get childEntities { |
| 4709 ChildEntities result = new ChildEntities()..add(_scriptTag); | 4719 ChildEntities result = new ChildEntities()..add(_scriptTag); |
| 4710 if (_directivesAreBeforeDeclarations) { | 4720 if (_directivesAreBeforeDeclarations) { |
| 4711 result..addAll(_directives)..addAll(_declarations); | 4721 result |
| 4722 ..addAll(_directives) |
| 4723 ..addAll(_declarations); |
| 4712 } else { | 4724 } else { |
| 4713 result.addAll(sortedDirectivesAndDeclarations); | 4725 result.addAll(sortedDirectivesAndDeclarations); |
| 4714 } | 4726 } |
| 4715 return result; | 4727 return result; |
| 4716 } | 4728 } |
| 4717 | 4729 |
| 4718 /** | 4730 /** |
| 4719 * Return the declarations contained in this compilation unit. | 4731 * Return the declarations contained in this compilation unit. |
| 4720 */ | 4732 */ |
| 4721 NodeList<CompilationUnitMember> get declarations => _declarations; | 4733 NodeList<CompilationUnitMember> get declarations => _declarations; |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5664 */ | 5676 */ |
| 5665 ConstructorName(TypeName type, this.period, SimpleIdentifier name) { | 5677 ConstructorName(TypeName type, this.period, SimpleIdentifier name) { |
| 5666 _type = _becomeParentOf(type); | 5678 _type = _becomeParentOf(type); |
| 5667 _name = _becomeParentOf(name); | 5679 _name = _becomeParentOf(name); |
| 5668 } | 5680 } |
| 5669 | 5681 |
| 5670 @override | 5682 @override |
| 5671 Token get beginToken => _type.beginToken; | 5683 Token get beginToken => _type.beginToken; |
| 5672 | 5684 |
| 5673 @override | 5685 @override |
| 5674 Iterable get childEntities => | 5686 Iterable get childEntities => new ChildEntities() |
| 5675 new ChildEntities()..add(_type)..add(period)..add(_name); | 5687 ..add(_type) |
| 5688 ..add(period) |
| 5689 ..add(_name); |
| 5676 | 5690 |
| 5677 @override | 5691 @override |
| 5678 Token get endToken { | 5692 Token get endToken { |
| 5679 if (_name != null) { | 5693 if (_name != null) { |
| 5680 return _name.endToken; | 5694 return _name.endToken; |
| 5681 } | 5695 } |
| 5682 return _type.endToken; | 5696 return _type.endToken; |
| 5683 } | 5697 } |
| 5684 | 5698 |
| 5685 /** | 5699 /** |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5755 */ | 5769 */ |
| 5756 ContinueStatement( | 5770 ContinueStatement( |
| 5757 this.continueKeyword, SimpleIdentifier label, this.semicolon) { | 5771 this.continueKeyword, SimpleIdentifier label, this.semicolon) { |
| 5758 _label = _becomeParentOf(label); | 5772 _label = _becomeParentOf(label); |
| 5759 } | 5773 } |
| 5760 | 5774 |
| 5761 @override | 5775 @override |
| 5762 Token get beginToken => continueKeyword; | 5776 Token get beginToken => continueKeyword; |
| 5763 | 5777 |
| 5764 @override | 5778 @override |
| 5765 Iterable get childEntities => | 5779 Iterable get childEntities => new ChildEntities() |
| 5766 new ChildEntities()..add(continueKeyword)..add(_label)..add(semicolon); | 5780 ..add(continueKeyword) |
| 5781 ..add(_label) |
| 5782 ..add(semicolon); |
| 5767 | 5783 |
| 5768 @override | 5784 @override |
| 5769 Token get endToken => semicolon; | 5785 Token get endToken => semicolon; |
| 5770 | 5786 |
| 5771 /** | 5787 /** |
| 5772 * Return the token for the 'continue' keyword, or `null` if there is no | 5788 * Return the token for the 'continue' keyword, or `null` if there is no |
| 5773 * 'continue' keyword. | 5789 * 'continue' keyword. |
| 5774 */ | 5790 */ |
| 5775 @deprecated // Use "this.continueKeyword" | 5791 @deprecated // Use "this.continueKeyword" |
| 5776 Token get keyword => continueKeyword; | 5792 Token get keyword => continueKeyword; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5857 * given. The [type] must be `null` if the keyword is 'var'. | 5873 * given. The [type] must be `null` if the keyword is 'var'. |
| 5858 */ | 5874 */ |
| 5859 DeclaredIdentifier(Comment comment, List<Annotation> metadata, this.keyword, | 5875 DeclaredIdentifier(Comment comment, List<Annotation> metadata, this.keyword, |
| 5860 TypeName type, SimpleIdentifier identifier) | 5876 TypeName type, SimpleIdentifier identifier) |
| 5861 : super(comment, metadata) { | 5877 : super(comment, metadata) { |
| 5862 _type = _becomeParentOf(type); | 5878 _type = _becomeParentOf(type); |
| 5863 _identifier = _becomeParentOf(identifier); | 5879 _identifier = _becomeParentOf(identifier); |
| 5864 } | 5880 } |
| 5865 | 5881 |
| 5866 @override | 5882 @override |
| 5867 Iterable get childEntities => | 5883 Iterable get childEntities => super._childEntities |
| 5868 super._childEntities..add(keyword)..add(_type)..add(_identifier); | 5884 ..add(keyword) |
| 5885 ..add(_type) |
| 5886 ..add(_identifier); |
| 5869 | 5887 |
| 5870 @override | 5888 @override |
| 5871 LocalVariableElement get element { | 5889 LocalVariableElement get element { |
| 5872 if (_identifier == null) { | 5890 if (_identifier == null) { |
| 5873 return null; | 5891 return null; |
| 5874 } | 5892 } |
| 5875 return _identifier.staticElement as LocalVariableElement; | 5893 return _identifier.staticElement as LocalVariableElement; |
| 5876 } | 5894 } |
| 5877 | 5895 |
| 5878 @override | 5896 @override |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5979 DefaultFormalParameter(NormalFormalParameter parameter, this.kind, | 5997 DefaultFormalParameter(NormalFormalParameter parameter, this.kind, |
| 5980 this.separator, Expression defaultValue) { | 5998 this.separator, Expression defaultValue) { |
| 5981 _parameter = _becomeParentOf(parameter); | 5999 _parameter = _becomeParentOf(parameter); |
| 5982 _defaultValue = _becomeParentOf(defaultValue); | 6000 _defaultValue = _becomeParentOf(defaultValue); |
| 5983 } | 6001 } |
| 5984 | 6002 |
| 5985 @override | 6003 @override |
| 5986 Token get beginToken => _parameter.beginToken; | 6004 Token get beginToken => _parameter.beginToken; |
| 5987 | 6005 |
| 5988 @override | 6006 @override |
| 5989 Iterable get childEntities => | 6007 Iterable get childEntities => new ChildEntities() |
| 5990 new ChildEntities()..add(_parameter)..add(separator)..add(_defaultValue); | 6008 ..add(_parameter) |
| 6009 ..add(separator) |
| 6010 ..add(_defaultValue); |
| 5991 | 6011 |
| 5992 /** | 6012 /** |
| 5993 * Return the expression computing the default value for the parameter, or | 6013 * Return the expression computing the default value for the parameter, or |
| 5994 * `null` if there is no default value. | 6014 * `null` if there is no default value. |
| 5995 */ | 6015 */ |
| 5996 Expression get defaultValue => _defaultValue; | 6016 Expression get defaultValue => _defaultValue; |
| 5997 | 6017 |
| 5998 /** | 6018 /** |
| 5999 * Set the expression computing the default value for the parameter to the | 6019 * Set the expression computing the default value for the parameter to the |
| 6000 * given [expression]. | 6020 * given [expression]. |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6933 * Initialize a newly created expression statement. | 6953 * Initialize a newly created expression statement. |
| 6934 */ | 6954 */ |
| 6935 ExpressionStatement(Expression expression, this.semicolon) { | 6955 ExpressionStatement(Expression expression, this.semicolon) { |
| 6936 _expression = _becomeParentOf(expression); | 6956 _expression = _becomeParentOf(expression); |
| 6937 } | 6957 } |
| 6938 | 6958 |
| 6939 @override | 6959 @override |
| 6940 Token get beginToken => _expression.beginToken; | 6960 Token get beginToken => _expression.beginToken; |
| 6941 | 6961 |
| 6942 @override | 6962 @override |
| 6943 Iterable get childEntities => | 6963 Iterable get childEntities => new ChildEntities() |
| 6944 new ChildEntities()..add(_expression)..add(semicolon); | 6964 ..add(_expression) |
| 6965 ..add(semicolon); |
| 6945 | 6966 |
| 6946 @override | 6967 @override |
| 6947 Token get endToken { | 6968 Token get endToken { |
| 6948 if (semicolon != null) { | 6969 if (semicolon != null) { |
| 6949 return semicolon; | 6970 return semicolon; |
| 6950 } | 6971 } |
| 6951 return _expression.endToken; | 6972 return _expression.endToken; |
| 6952 } | 6973 } |
| 6953 | 6974 |
| 6954 /** | 6975 /** |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6996 * Initialize a newly created extends clause. | 7017 * Initialize a newly created extends clause. |
| 6997 */ | 7018 */ |
| 6998 ExtendsClause(this.extendsKeyword, TypeName superclass) { | 7019 ExtendsClause(this.extendsKeyword, TypeName superclass) { |
| 6999 _superclass = _becomeParentOf(superclass); | 7020 _superclass = _becomeParentOf(superclass); |
| 7000 } | 7021 } |
| 7001 | 7022 |
| 7002 @override | 7023 @override |
| 7003 Token get beginToken => extendsKeyword; | 7024 Token get beginToken => extendsKeyword; |
| 7004 | 7025 |
| 7005 @override | 7026 @override |
| 7006 Iterable get childEntities => | 7027 Iterable get childEntities => new ChildEntities() |
| 7007 new ChildEntities()..add(extendsKeyword)..add(_superclass); | 7028 ..add(extendsKeyword) |
| 7029 ..add(_superclass); |
| 7008 | 7030 |
| 7009 @override | 7031 @override |
| 7010 Token get endToken => _superclass.endToken; | 7032 Token get endToken => _superclass.endToken; |
| 7011 | 7033 |
| 7012 /** | 7034 /** |
| 7013 * Return the token for the 'extends' keyword. | 7035 * Return the token for the 'extends' keyword. |
| 7014 */ | 7036 */ |
| 7015 @deprecated // Use "this.extendsKeyword" | 7037 @deprecated // Use "this.extendsKeyword" |
| 7016 Token get keyword => extendsKeyword; | 7038 Token get keyword => extendsKeyword; |
| 7017 | 7039 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7073 * corresponding attribute. The [staticKeyword] can be `null` if the field is | 7095 * corresponding attribute. The [staticKeyword] can be `null` if the field is |
| 7074 * not a static field. | 7096 * not a static field. |
| 7075 */ | 7097 */ |
| 7076 FieldDeclaration(Comment comment, List<Annotation> metadata, | 7098 FieldDeclaration(Comment comment, List<Annotation> metadata, |
| 7077 this.staticKeyword, VariableDeclarationList fieldList, this.semicolon) | 7099 this.staticKeyword, VariableDeclarationList fieldList, this.semicolon) |
| 7078 : super(comment, metadata) { | 7100 : super(comment, metadata) { |
| 7079 _fieldList = _becomeParentOf(fieldList); | 7101 _fieldList = _becomeParentOf(fieldList); |
| 7080 } | 7102 } |
| 7081 | 7103 |
| 7082 @override | 7104 @override |
| 7083 Iterable get childEntities => | 7105 Iterable get childEntities => super._childEntities |
| 7084 super._childEntities..add(staticKeyword)..add(_fieldList)..add(semicolon); | 7106 ..add(staticKeyword) |
| 7107 ..add(_fieldList) |
| 7108 ..add(semicolon); |
| 7085 | 7109 |
| 7086 @override | 7110 @override |
| 7087 Element get element => null; | 7111 Element get element => null; |
| 7088 | 7112 |
| 7089 @override | 7113 @override |
| 7090 Token get endToken => semicolon; | 7114 Token get endToken => semicolon; |
| 7091 | 7115 |
| 7092 /** | 7116 /** |
| 7093 * Return the fields being declared. | 7117 * Return the fields being declared. |
| 7094 */ | 7118 */ |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7319 | 7343 |
| 7320 /** | 7344 /** |
| 7321 * The body of the loop. | 7345 * The body of the loop. |
| 7322 */ | 7346 */ |
| 7323 Statement _body; | 7347 Statement _body; |
| 7324 | 7348 |
| 7325 /** | 7349 /** |
| 7326 * Initialize a newly created for-each statement. The [awaitKeyword] can be | 7350 * Initialize a newly created for-each statement. The [awaitKeyword] can be |
| 7327 * `null` if this is not an asynchronous for loop. | 7351 * `null` if this is not an asynchronous for loop. |
| 7328 */ | 7352 */ |
| 7353 @deprecated // Use new ForEachStatement.withDeclaration(...) |
| 7329 ForEachStatement.con1(this.awaitKeyword, this.forKeyword, | 7354 ForEachStatement.con1(this.awaitKeyword, this.forKeyword, |
| 7330 this.leftParenthesis, DeclaredIdentifier loopVariable, this.inKeyword, | 7355 this.leftParenthesis, DeclaredIdentifier loopVariable, this.inKeyword, |
| 7331 Expression iterator, this.rightParenthesis, Statement body) { | 7356 Expression iterator, this.rightParenthesis, Statement body) { |
| 7332 _loopVariable = _becomeParentOf(loopVariable); | 7357 _loopVariable = _becomeParentOf(loopVariable); |
| 7333 _iterable = _becomeParentOf(iterator); | 7358 _iterable = _becomeParentOf(iterator); |
| 7334 _body = _becomeParentOf(body); | 7359 _body = _becomeParentOf(body); |
| 7335 } | 7360 } |
| 7336 | 7361 |
| 7337 /** | 7362 /** |
| 7338 * Initialize a newly created for-each statement. The [awaitKeyword] can be | 7363 * Initialize a newly created for-each statement. The [awaitKeyword] can be |
| 7339 * `null` if this is not an asynchronous for loop. | 7364 * `null` if this is not an asynchronous for loop. |
| 7340 */ | 7365 */ |
| 7366 @deprecated // Use new ForEachStatement.withReference(...) |
| 7341 ForEachStatement.con2(this.awaitKeyword, this.forKeyword, | 7367 ForEachStatement.con2(this.awaitKeyword, this.forKeyword, |
| 7342 this.leftParenthesis, SimpleIdentifier identifier, this.inKeyword, | 7368 this.leftParenthesis, SimpleIdentifier identifier, this.inKeyword, |
| 7343 Expression iterator, this.rightParenthesis, Statement body) { | 7369 Expression iterator, this.rightParenthesis, Statement body) { |
| 7344 _identifier = _becomeParentOf(identifier); | 7370 _identifier = _becomeParentOf(identifier); |
| 7345 _iterable = _becomeParentOf(iterator); | 7371 _iterable = _becomeParentOf(iterator); |
| 7346 _body = _becomeParentOf(body); | 7372 _body = _becomeParentOf(body); |
| 7347 } | 7373 } |
| 7348 | 7374 |
| 7375 /** |
| 7376 * Initialize a newly created for-each statement whose loop control variable |
| 7377 * is declared internally (in the for-loop part). The [awaitKeyword] can be |
| 7378 * `null` if this is not an asynchronous for loop. |
| 7379 */ |
| 7380 ForEachStatement.withDeclaration(this.awaitKeyword, this.forKeyword, |
| 7381 this.leftParenthesis, DeclaredIdentifier loopVariable, this.inKeyword, |
| 7382 Expression iterator, this.rightParenthesis, Statement body) { |
| 7383 _loopVariable = _becomeParentOf(loopVariable); |
| 7384 _iterable = _becomeParentOf(iterator); |
| 7385 _body = _becomeParentOf(body); |
| 7386 } |
| 7387 |
| 7388 /** |
| 7389 * Initialize a newly created for-each statement whose loop control variable |
| 7390 * is declared outside the for loop. The [awaitKeyword] can be `null` if this |
| 7391 * is not an asynchronous for loop. |
| 7392 */ |
| 7393 ForEachStatement.withReference(this.awaitKeyword, this.forKeyword, |
| 7394 this.leftParenthesis, SimpleIdentifier identifier, this.inKeyword, |
| 7395 Expression iterator, this.rightParenthesis, Statement body) { |
| 7396 _identifier = _becomeParentOf(identifier); |
| 7397 _iterable = _becomeParentOf(iterator); |
| 7398 _body = _becomeParentOf(body); |
| 7399 } |
| 7400 |
| 7349 @override | 7401 @override |
| 7350 Token get beginToken => forKeyword; | 7402 Token get beginToken => forKeyword; |
| 7351 | 7403 |
| 7352 /** | 7404 /** |
| 7353 * Return the body of the loop. | 7405 * Return the body of the loop. |
| 7354 */ | 7406 */ |
| 7355 Statement get body => _body; | 7407 Statement get body => _body; |
| 7356 | 7408 |
| 7357 /** | 7409 /** |
| 7358 * Set the body of the loop to the given [statement]. | 7410 * Set the body of the loop to the given [statement]. |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7550 // TODO(paulberry): include commas. | 7602 // TODO(paulberry): include commas. |
| 7551 ChildEntities result = new ChildEntities()..add(leftParenthesis); | 7603 ChildEntities result = new ChildEntities()..add(leftParenthesis); |
| 7552 bool leftDelimiterNeeded = leftDelimiter != null; | 7604 bool leftDelimiterNeeded = leftDelimiter != null; |
| 7553 for (FormalParameter parameter in _parameters) { | 7605 for (FormalParameter parameter in _parameters) { |
| 7554 if (leftDelimiterNeeded && leftDelimiter.offset < parameter.offset) { | 7606 if (leftDelimiterNeeded && leftDelimiter.offset < parameter.offset) { |
| 7555 result.add(leftDelimiter); | 7607 result.add(leftDelimiter); |
| 7556 leftDelimiterNeeded = false; | 7608 leftDelimiterNeeded = false; |
| 7557 } | 7609 } |
| 7558 result.add(parameter); | 7610 result.add(parameter); |
| 7559 } | 7611 } |
| 7560 return result..add(rightDelimiter)..add(rightParenthesis); | 7612 return result |
| 7613 ..add(rightDelimiter) |
| 7614 ..add(rightParenthesis); |
| 7561 } | 7615 } |
| 7562 | 7616 |
| 7563 @override | 7617 @override |
| 7564 Token get endToken => rightParenthesis; | 7618 Token get endToken => rightParenthesis; |
| 7565 | 7619 |
| 7566 /** | 7620 /** |
| 7567 * Return a list containing the elements representing the parameters in this | 7621 * Return a list containing the elements representing the parameters in this |
| 7568 * list. The list will contain `null`s if the parameters in this list have not | 7622 * list. The list will contain `null`s if the parameters in this list have not |
| 7569 * been resolved. | 7623 * been resolved. |
| 7570 */ | 7624 */ |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8027 FunctionBody get body => _body; | 8081 FunctionBody get body => _body; |
| 8028 | 8082 |
| 8029 /** | 8083 /** |
| 8030 * Set the body of the function to the given [functionBody]. | 8084 * Set the body of the function to the given [functionBody]. |
| 8031 */ | 8085 */ |
| 8032 void set body(FunctionBody functionBody) { | 8086 void set body(FunctionBody functionBody) { |
| 8033 _body = _becomeParentOf(functionBody); | 8087 _body = _becomeParentOf(functionBody); |
| 8034 } | 8088 } |
| 8035 | 8089 |
| 8036 @override | 8090 @override |
| 8037 Iterable get childEntities => | 8091 Iterable get childEntities => new ChildEntities() |
| 8038 new ChildEntities()..add(_parameters)..add(_body); | 8092 ..add(_parameters) |
| 8093 ..add(_body); |
| 8039 | 8094 |
| 8040 @override | 8095 @override |
| 8041 Token get endToken { | 8096 Token get endToken { |
| 8042 if (_body != null) { | 8097 if (_body != null) { |
| 8043 return _body.endToken; | 8098 return _body.endToken; |
| 8044 } else if (_parameters != null) { | 8099 } else if (_parameters != null) { |
| 8045 return _parameters.endToken; | 8100 return _parameters.endToken; |
| 8046 } | 8101 } |
| 8047 // This should never be reached because external functions must be named, | 8102 // This should never be reached because external functions must be named, |
| 8048 // hence either the body or the name should be non-null. | 8103 // hence either the body or the name should be non-null. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8141 */ | 8196 */ |
| 8142 ExecutableElement get bestElement { | 8197 ExecutableElement get bestElement { |
| 8143 ExecutableElement element = propagatedElement; | 8198 ExecutableElement element = propagatedElement; |
| 8144 if (element == null) { | 8199 if (element == null) { |
| 8145 element = staticElement; | 8200 element = staticElement; |
| 8146 } | 8201 } |
| 8147 return element; | 8202 return element; |
| 8148 } | 8203 } |
| 8149 | 8204 |
| 8150 @override | 8205 @override |
| 8151 Iterable get childEntities => | 8206 Iterable get childEntities => new ChildEntities() |
| 8152 new ChildEntities()..add(_function)..add(_argumentList); | 8207 ..add(_function) |
| 8208 ..add(_argumentList); |
| 8153 | 8209 |
| 8154 @override | 8210 @override |
| 8155 Token get endToken => _argumentList.endToken; | 8211 Token get endToken => _argumentList.endToken; |
| 8156 | 8212 |
| 8157 /** | 8213 /** |
| 8158 * Return the expression producing the function being invoked. | 8214 * Return the expression producing the function being invoked. |
| 8159 */ | 8215 */ |
| 8160 Expression get function => _function; | 8216 Expression get function => _function; |
| 8161 | 8217 |
| 8162 /** | 8218 /** |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8325 | 8381 |
| 8326 @override | 8382 @override |
| 8327 Token get beginToken { | 8383 Token get beginToken { |
| 8328 if (_returnType != null) { | 8384 if (_returnType != null) { |
| 8329 return _returnType.beginToken; | 8385 return _returnType.beginToken; |
| 8330 } | 8386 } |
| 8331 return identifier.beginToken; | 8387 return identifier.beginToken; |
| 8332 } | 8388 } |
| 8333 | 8389 |
| 8334 @override | 8390 @override |
| 8335 Iterable get childEntities => | 8391 Iterable get childEntities => super._childEntities |
| 8336 super._childEntities..add(_returnType)..add(identifier)..add(parameters); | 8392 ..add(_returnType) |
| 8393 ..add(identifier) |
| 8394 ..add(parameters); |
| 8337 | 8395 |
| 8338 @override | 8396 @override |
| 8339 Token get endToken => _parameters.endToken; | 8397 Token get endToken => _parameters.endToken; |
| 8340 | 8398 |
| 8341 @override | 8399 @override |
| 8342 bool get isConst => false; | 8400 bool get isConst => false; |
| 8343 | 8401 |
| 8344 @override | 8402 @override |
| 8345 bool get isFinal => false; | 8403 bool get isFinal => false; |
| 8346 | 8404 |
| (...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9622 new FieldFormalParameter(_cloneNode(node.documentationComment), | 9680 new FieldFormalParameter(_cloneNode(node.documentationComment), |
| 9623 _cloneNodeList(node.metadata), _mapToken(node.keyword), | 9681 _cloneNodeList(node.metadata), _mapToken(node.keyword), |
| 9624 _cloneNode(node.type), _mapToken(node.thisKeyword), | 9682 _cloneNode(node.type), _mapToken(node.thisKeyword), |
| 9625 _mapToken(node.period), _cloneNode(node.identifier), | 9683 _mapToken(node.period), _cloneNode(node.identifier), |
| 9626 _cloneNode(node.parameters)); | 9684 _cloneNode(node.parameters)); |
| 9627 | 9685 |
| 9628 @override | 9686 @override |
| 9629 ForEachStatement visitForEachStatement(ForEachStatement node) { | 9687 ForEachStatement visitForEachStatement(ForEachStatement node) { |
| 9630 DeclaredIdentifier loopVariable = node.loopVariable; | 9688 DeclaredIdentifier loopVariable = node.loopVariable; |
| 9631 if (loopVariable == null) { | 9689 if (loopVariable == null) { |
| 9632 return new ForEachStatement.con2(_mapToken(node.awaitKeyword), | 9690 return new ForEachStatement.withReference(_mapToken(node.awaitKeyword), |
| 9633 _mapToken(node.forKeyword), _mapToken(node.leftParenthesis), | 9691 _mapToken(node.forKeyword), _mapToken(node.leftParenthesis), |
| 9634 _cloneNode(node.identifier), _mapToken(node.inKeyword), | 9692 _cloneNode(node.identifier), _mapToken(node.inKeyword), |
| 9635 _cloneNode(node.iterable), _mapToken(node.rightParenthesis), | 9693 _cloneNode(node.iterable), _mapToken(node.rightParenthesis), |
| 9636 _cloneNode(node.body)); | 9694 _cloneNode(node.body)); |
| 9637 } | 9695 } |
| 9638 return new ForEachStatement.con1(_mapToken(node.awaitKeyword), | 9696 return new ForEachStatement.withDeclaration(_mapToken(node.awaitKeyword), |
| 9639 _mapToken(node.forKeyword), _mapToken(node.leftParenthesis), | 9697 _mapToken(node.forKeyword), _mapToken(node.leftParenthesis), |
| 9640 _cloneNode(loopVariable), _mapToken(node.inKeyword), | 9698 _cloneNode(loopVariable), _mapToken(node.inKeyword), |
| 9641 _cloneNode(node.iterable), _mapToken(node.rightParenthesis), | 9699 _cloneNode(node.iterable), _mapToken(node.rightParenthesis), |
| 9642 _cloneNode(node.body)); | 9700 _cloneNode(node.body)); |
| 9643 } | 9701 } |
| 9644 | 9702 |
| 9645 @override | 9703 @override |
| 9646 FormalParameterList visitFormalParameterList(FormalParameterList node) => | 9704 FormalParameterList visitFormalParameterList(FormalParameterList node) => |
| 9647 new FormalParameterList(_mapToken(node.leftParenthesis), | 9705 new FormalParameterList(_mapToken(node.leftParenthesis), |
| 9648 _cloneNodeList(node.parameters), _mapToken(node.leftDelimiter), | 9706 _cloneNodeList(node.parameters), _mapToken(node.leftDelimiter), |
| (...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10880 * Initialize a newly created label. | 10938 * Initialize a newly created label. |
| 10881 */ | 10939 */ |
| 10882 Label(SimpleIdentifier label, this.colon) { | 10940 Label(SimpleIdentifier label, this.colon) { |
| 10883 _label = _becomeParentOf(label); | 10941 _label = _becomeParentOf(label); |
| 10884 } | 10942 } |
| 10885 | 10943 |
| 10886 @override | 10944 @override |
| 10887 Token get beginToken => _label.beginToken; | 10945 Token get beginToken => _label.beginToken; |
| 10888 | 10946 |
| 10889 @override | 10947 @override |
| 10890 Iterable get childEntities => new ChildEntities()..add(_label)..add(colon); | 10948 Iterable get childEntities => new ChildEntities() |
| 10949 ..add(_label) |
| 10950 ..add(colon); |
| 10891 | 10951 |
| 10892 @override | 10952 @override |
| 10893 Token get endToken => colon; | 10953 Token get endToken => colon; |
| 10894 | 10954 |
| 10895 /** | 10955 /** |
| 10896 * Return the label being associated with the statement. | 10956 * Return the label being associated with the statement. |
| 10897 */ | 10957 */ |
| 10898 SimpleIdentifier get label => _label; | 10958 SimpleIdentifier get label => _label; |
| 10899 | 10959 |
| 10900 /** | 10960 /** |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11012 * [comment] and [metadata] can be `null` if the directive does not have the | 11072 * [comment] and [metadata] can be `null` if the directive does not have the |
| 11013 * corresponding attribute. | 11073 * corresponding attribute. |
| 11014 */ | 11074 */ |
| 11015 LibraryDirective(Comment comment, List<Annotation> metadata, | 11075 LibraryDirective(Comment comment, List<Annotation> metadata, |
| 11016 this.libraryKeyword, LibraryIdentifier name, this.semicolon) | 11076 this.libraryKeyword, LibraryIdentifier name, this.semicolon) |
| 11017 : super(comment, metadata) { | 11077 : super(comment, metadata) { |
| 11018 _name = _becomeParentOf(name); | 11078 _name = _becomeParentOf(name); |
| 11019 } | 11079 } |
| 11020 | 11080 |
| 11021 @override | 11081 @override |
| 11022 Iterable get childEntities => | 11082 Iterable get childEntities => super._childEntities |
| 11023 super._childEntities..add(libraryKeyword)..add(_name)..add(semicolon); | 11083 ..add(libraryKeyword) |
| 11084 ..add(_name) |
| 11085 ..add(semicolon); |
| 11024 | 11086 |
| 11025 @override | 11087 @override |
| 11026 Token get endToken => semicolon; | 11088 Token get endToken => semicolon; |
| 11027 | 11089 |
| 11028 @override | 11090 @override |
| 11029 Token get firstTokenAfterCommentAndMetadata => libraryKeyword; | 11091 Token get firstTokenAfterCommentAndMetadata => libraryKeyword; |
| 11030 | 11092 |
| 11031 @override | 11093 @override |
| 11032 Token get keyword => libraryKeyword; | 11094 Token get keyword => libraryKeyword; |
| 11033 | 11095 |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11329 */ | 11391 */ |
| 11330 MapLiteralEntry(Expression key, this.separator, Expression value) { | 11392 MapLiteralEntry(Expression key, this.separator, Expression value) { |
| 11331 _key = _becomeParentOf(key); | 11393 _key = _becomeParentOf(key); |
| 11332 _value = _becomeParentOf(value); | 11394 _value = _becomeParentOf(value); |
| 11333 } | 11395 } |
| 11334 | 11396 |
| 11335 @override | 11397 @override |
| 11336 Token get beginToken => _key.beginToken; | 11398 Token get beginToken => _key.beginToken; |
| 11337 | 11399 |
| 11338 @override | 11400 @override |
| 11339 Iterable get childEntities => | 11401 Iterable get childEntities => new ChildEntities() |
| 11340 new ChildEntities()..add(_key)..add(separator)..add(_value); | 11402 ..add(_key) |
| 11403 ..add(separator) |
| 11404 ..add(_value); |
| 11341 | 11405 |
| 11342 @override | 11406 @override |
| 11343 Token get endToken => _value.endToken; | 11407 Token get endToken => _value.endToken; |
| 11344 | 11408 |
| 11345 /** | 11409 /** |
| 11346 * Return the expression computing the key with which the value will be | 11410 * Return the expression computing the key with which the value will be |
| 11347 * associated. | 11411 * associated. |
| 11348 */ | 11412 */ |
| 11349 Expression get key => _key; | 11413 Expression get key => _key; |
| 11350 | 11414 |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11692 */ | 11756 */ |
| 11693 void set methodName(SimpleIdentifier identifier) { | 11757 void set methodName(SimpleIdentifier identifier) { |
| 11694 _methodName = _becomeParentOf(identifier); | 11758 _methodName = _becomeParentOf(identifier); |
| 11695 } | 11759 } |
| 11696 | 11760 |
| 11697 /** | 11761 /** |
| 11698 * The operator that separates the target from the method name, or `null` | 11762 * The operator that separates the target from the method name, or `null` |
| 11699 * if there is no target. In an ordinary method invocation this will be a | 11763 * if there is no target. In an ordinary method invocation this will be a |
| 11700 * period ('.'). In a cascade section this will be the cascade operator | 11764 * period ('.'). In a cascade section this will be the cascade operator |
| 11701 * ('..'). | 11765 * ('..'). |
| 11702 * | |
| 11703 * Deprecated: use [operator] instead. | |
| 11704 */ | 11766 */ |
| 11705 @deprecated | 11767 @deprecated // Use this.operator |
| 11706 Token get period => operator; | 11768 Token get period => operator; |
| 11707 | 11769 |
| 11708 /** | 11770 /** |
| 11709 * The operator that separates the target from the method name, or `null` | 11771 * The operator that separates the target from the method name, or `null` |
| 11710 * if there is no target. In an ordinary method invocation this will be a | 11772 * if there is no target. In an ordinary method invocation this will be a |
| 11711 * period ('.'). In a cascade section this will be the cascade operator | 11773 * period ('.'). In a cascade section this will be the cascade operator |
| 11712 * ('..'). | 11774 * ('..'). |
| 11713 * | |
| 11714 * Deprecated: use [operator] instead. | |
| 11715 */ | 11775 */ |
| 11716 @deprecated | 11776 @deprecated // Use this.operator |
| 11717 void set period(Token value) { | 11777 void set period(Token value) { |
| 11718 operator = value; | 11778 operator = value; |
| 11719 } | 11779 } |
| 11720 | 11780 |
| 11721 @override | 11781 @override |
| 11722 int get precedence => 15; | 11782 int get precedence => 15; |
| 11723 | 11783 |
| 11724 /** | 11784 /** |
| 11725 * Return the expression used to compute the receiver of the invocation. If | 11785 * Return the expression used to compute the receiver of the invocation. If |
| 11726 * this invocation is not part of a cascade expression, then this is the same | 11786 * this invocation is not part of a cascade expression, then this is the same |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11826 */ | 11886 */ |
| 11827 NamedExpression(Label name, Expression expression) { | 11887 NamedExpression(Label name, Expression expression) { |
| 11828 _name = _becomeParentOf(name); | 11888 _name = _becomeParentOf(name); |
| 11829 _expression = _becomeParentOf(expression); | 11889 _expression = _becomeParentOf(expression); |
| 11830 } | 11890 } |
| 11831 | 11891 |
| 11832 @override | 11892 @override |
| 11833 Token get beginToken => _name.beginToken; | 11893 Token get beginToken => _name.beginToken; |
| 11834 | 11894 |
| 11835 @override | 11895 @override |
| 11836 Iterable get childEntities => | 11896 Iterable get childEntities => new ChildEntities() |
| 11837 new ChildEntities()..add(_name)..add(_expression); | 11897 ..add(_name) |
| 11898 ..add(_expression); |
| 11838 | 11899 |
| 11839 /** | 11900 /** |
| 11840 * Return the element representing the parameter being named by this | 11901 * Return the element representing the parameter being named by this |
| 11841 * expression, or `null` if the AST structure has not been resolved or if | 11902 * expression, or `null` if the AST structure has not been resolved or if |
| 11842 * there is no parameter with the same name as this expression. | 11903 * there is no parameter with the same name as this expression. |
| 11843 */ | 11904 */ |
| 11844 ParameterElement get element { | 11905 ParameterElement get element { |
| 11845 Element element = _name.label.staticElement; | 11906 Element element = _name.label.staticElement; |
| 11846 if (element is ParameterElement) { | 11907 if (element is ParameterElement) { |
| 11847 return element; | 11908 return element; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11961 * Initialize a newly created native clause. | 12022 * Initialize a newly created native clause. |
| 11962 */ | 12023 */ |
| 11963 NativeClause(this.nativeKeyword, StringLiteral name) { | 12024 NativeClause(this.nativeKeyword, StringLiteral name) { |
| 11964 _name = _becomeParentOf(name); | 12025 _name = _becomeParentOf(name); |
| 11965 } | 12026 } |
| 11966 | 12027 |
| 11967 @override | 12028 @override |
| 11968 Token get beginToken => nativeKeyword; | 12029 Token get beginToken => nativeKeyword; |
| 11969 | 12030 |
| 11970 @override | 12031 @override |
| 11971 Iterable get childEntities => | 12032 Iterable get childEntities => new ChildEntities() |
| 11972 new ChildEntities()..add(nativeKeyword)..add(_name); | 12033 ..add(nativeKeyword) |
| 12034 ..add(_name); |
| 11973 | 12035 |
| 11974 @override | 12036 @override |
| 11975 Token get endToken => _name.endToken; | 12037 Token get endToken => _name.endToken; |
| 11976 | 12038 |
| 11977 /** | 12039 /** |
| 11978 * Get the token representing the 'native' keyword. | 12040 * Get the token representing the 'native' keyword. |
| 11979 */ | 12041 */ |
| 11980 @deprecated // Use "this.nativeKeyword" | 12042 @deprecated // Use "this.nativeKeyword" |
| 11981 Token get keyword => nativeKeyword; | 12043 Token get keyword => nativeKeyword; |
| 11982 | 12044 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12242 int _endOffset = 0; | 12304 int _endOffset = 0; |
| 12243 | 12305 |
| 12244 /** | 12306 /** |
| 12245 * The element that was found that corresponds to the given source range, or | 12307 * The element that was found that corresponds to the given source range, or |
| 12246 * `null` if there is no such element. | 12308 * `null` if there is no such element. |
| 12247 */ | 12309 */ |
| 12248 AstNode _foundNode; | 12310 AstNode _foundNode; |
| 12249 | 12311 |
| 12250 /** | 12312 /** |
| 12251 * Initialize a newly created locator to locate an [AstNode] by locating the | 12313 * Initialize a newly created locator to locate an [AstNode] by locating the |
| 12314 * node within an AST structure that corresponds to the given range of |
| 12315 * characters (between the [startOffset] and [endOffset] in the source. |
| 12316 */ |
| 12317 NodeLocator(int startOffset, [int endOffset]) |
| 12318 : this._startOffset = startOffset, |
| 12319 this._endOffset = endOffset == null ? startOffset : endOffset; |
| 12320 |
| 12321 /** |
| 12322 * Initialize a newly created locator to locate an [AstNode] by locating the |
| 12252 * node within an AST structure that corresponds to the given [offset] in the | 12323 * node within an AST structure that corresponds to the given [offset] in the |
| 12253 * source. | 12324 * source. |
| 12254 */ | 12325 */ |
| 12255 NodeLocator.con1(int offset) : this.con2(offset, offset); | 12326 @deprecated // Use new NodeLocator(offset) |
| 12327 NodeLocator.con1(int offset) : this(offset); |
| 12256 | 12328 |
| 12257 /** | 12329 /** |
| 12258 * Initialize a newly created locator to locate an [AstNode] by locating the | 12330 * Initialize a newly created locator to locate an [AstNode] by locating the |
| 12259 * node within an AST structure that corresponds to the given range of | 12331 * node within an AST structure that corresponds to the given range of |
| 12260 * characters (between the [startOffset] and [endOffset] in the source. | 12332 * characters (between the [startOffset] and [endOffset] in the source. |
| 12261 */ | 12333 */ |
| 12334 @deprecated // Use new NodeLocator(startOffset, endOffset) |
| 12262 NodeLocator.con2(this._startOffset, this._endOffset); | 12335 NodeLocator.con2(this._startOffset, this._endOffset); |
| 12263 | 12336 |
| 12264 /** | 12337 /** |
| 12265 * Return the node that was found that corresponds to the given source range | 12338 * Return the node that was found that corresponds to the given source range |
| 12266 * or `null` if there is no such node. | 12339 * or `null` if there is no such node. |
| 12267 */ | 12340 */ |
| 12268 AstNode get foundNode => _foundNode; | 12341 AstNode get foundNode => _foundNode; |
| 12269 | 12342 |
| 12270 /** | 12343 /** |
| 12271 * Search within the given AST [node] for an identifier representing an | 12344 * Search within the given AST [node] for an identifier representing an |
| (...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13752 /** | 13825 /** |
| 13753 * Initialize a newly created part directive. Either or both of the [comment] | 13826 * Initialize a newly created part directive. Either or both of the [comment] |
| 13754 * and [metadata] can be `null` if the directive does not have the | 13827 * and [metadata] can be `null` if the directive does not have the |
| 13755 * corresponding attribute. | 13828 * corresponding attribute. |
| 13756 */ | 13829 */ |
| 13757 PartDirective(Comment comment, List<Annotation> metadata, this.partKeyword, | 13830 PartDirective(Comment comment, List<Annotation> metadata, this.partKeyword, |
| 13758 StringLiteral partUri, this.semicolon) | 13831 StringLiteral partUri, this.semicolon) |
| 13759 : super(comment, metadata, partUri); | 13832 : super(comment, metadata, partUri); |
| 13760 | 13833 |
| 13761 @override | 13834 @override |
| 13762 Iterable get childEntities => | 13835 Iterable get childEntities => super._childEntities |
| 13763 super._childEntities..add(partKeyword)..add(_uri)..add(semicolon); | 13836 ..add(partKeyword) |
| 13837 ..add(_uri) |
| 13838 ..add(semicolon); |
| 13764 | 13839 |
| 13765 @override | 13840 @override |
| 13766 Token get endToken => semicolon; | 13841 Token get endToken => semicolon; |
| 13767 | 13842 |
| 13768 @override | 13843 @override |
| 13769 Token get firstTokenAfterCommentAndMetadata => partKeyword; | 13844 Token get firstTokenAfterCommentAndMetadata => partKeyword; |
| 13770 | 13845 |
| 13771 @override | 13846 @override |
| 13772 Token get keyword => partKeyword; | 13847 Token get keyword => partKeyword; |
| 13773 | 13848 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13949 */ | 14024 */ |
| 13950 MethodElement get bestElement { | 14025 MethodElement get bestElement { |
| 13951 MethodElement element = propagatedElement; | 14026 MethodElement element = propagatedElement; |
| 13952 if (element == null) { | 14027 if (element == null) { |
| 13953 element = staticElement; | 14028 element = staticElement; |
| 13954 } | 14029 } |
| 13955 return element; | 14030 return element; |
| 13956 } | 14031 } |
| 13957 | 14032 |
| 13958 @override | 14033 @override |
| 13959 Iterable get childEntities => | 14034 Iterable get childEntities => new ChildEntities() |
| 13960 new ChildEntities()..add(_operand)..add(operator); | 14035 ..add(_operand) |
| 14036 ..add(operator); |
| 13961 | 14037 |
| 13962 @override | 14038 @override |
| 13963 Token get endToken => operator; | 14039 Token get endToken => operator; |
| 13964 | 14040 |
| 13965 /** | 14041 /** |
| 13966 * Return the expression computing the operand for the operator. | 14042 * Return the expression computing the operand for the operator. |
| 13967 */ | 14043 */ |
| 13968 Expression get operand => _operand; | 14044 Expression get operand => _operand; |
| 13969 | 14045 |
| 13970 /** | 14046 /** |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14080 | 14156 |
| 14081 @override | 14157 @override |
| 14082 Element get bestElement { | 14158 Element get bestElement { |
| 14083 if (_identifier == null) { | 14159 if (_identifier == null) { |
| 14084 return null; | 14160 return null; |
| 14085 } | 14161 } |
| 14086 return _identifier.bestElement; | 14162 return _identifier.bestElement; |
| 14087 } | 14163 } |
| 14088 | 14164 |
| 14089 @override | 14165 @override |
| 14090 Iterable get childEntities => | 14166 Iterable get childEntities => new ChildEntities() |
| 14091 new ChildEntities()..add(_prefix)..add(period)..add(_identifier); | 14167 ..add(_prefix) |
| 14168 ..add(period) |
| 14169 ..add(_identifier); |
| 14092 | 14170 |
| 14093 @override | 14171 @override |
| 14094 Token get endToken => _identifier.endToken; | 14172 Token get endToken => _identifier.endToken; |
| 14095 | 14173 |
| 14096 /** | 14174 /** |
| 14097 * Return the identifier being prefixed. | 14175 * Return the identifier being prefixed. |
| 14098 */ | 14176 */ |
| 14099 SimpleIdentifier get identifier => _identifier; | 14177 SimpleIdentifier get identifier => _identifier; |
| 14100 | 14178 |
| 14101 /** | 14179 /** |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14222 */ | 14300 */ |
| 14223 MethodElement get bestElement { | 14301 MethodElement get bestElement { |
| 14224 MethodElement element = propagatedElement; | 14302 MethodElement element = propagatedElement; |
| 14225 if (element == null) { | 14303 if (element == null) { |
| 14226 element = staticElement; | 14304 element = staticElement; |
| 14227 } | 14305 } |
| 14228 return element; | 14306 return element; |
| 14229 } | 14307 } |
| 14230 | 14308 |
| 14231 @override | 14309 @override |
| 14232 Iterable get childEntities => | 14310 Iterable get childEntities => new ChildEntities() |
| 14233 new ChildEntities()..add(operator)..add(_operand); | 14311 ..add(operator) |
| 14312 ..add(_operand); |
| 14234 | 14313 |
| 14235 @override | 14314 @override |
| 14236 Token get endToken => _operand.endToken; | 14315 Token get endToken => _operand.endToken; |
| 14237 | 14316 |
| 14238 /** | 14317 /** |
| 14239 * Return the expression computing the operand for the operator. | 14318 * Return the expression computing the operand for the operator. |
| 14240 */ | 14319 */ |
| 14241 Expression get operand => _operand; | 14320 Expression get operand => _operand; |
| 14242 | 14321 |
| 14243 /** | 14322 /** |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14353 | 14432 |
| 14354 @override | 14433 @override |
| 14355 Token get beginToken { | 14434 Token get beginToken { |
| 14356 if (_target != null) { | 14435 if (_target != null) { |
| 14357 return _target.beginToken; | 14436 return _target.beginToken; |
| 14358 } | 14437 } |
| 14359 return operator; | 14438 return operator; |
| 14360 } | 14439 } |
| 14361 | 14440 |
| 14362 @override | 14441 @override |
| 14363 Iterable get childEntities => | 14442 Iterable get childEntities => new ChildEntities() |
| 14364 new ChildEntities()..add(_target)..add(operator)..add(_propertyName); | 14443 ..add(_target) |
| 14444 ..add(operator) |
| 14445 ..add(_propertyName); |
| 14365 | 14446 |
| 14366 @override | 14447 @override |
| 14367 Token get endToken => _propertyName.endToken; | 14448 Token get endToken => _propertyName.endToken; |
| 14368 | 14449 |
| 14369 @override | 14450 @override |
| 14370 bool get isAssignable => true; | 14451 bool get isAssignable => true; |
| 14371 | 14452 |
| 14372 /** | 14453 /** |
| 14373 * Return `true` if this expression is cascaded. If it is, then the target of | 14454 * Return `true` if this expression is cascaded. If it is, then the target of |
| 14374 * this expression is not stored locally but is stored in the nearest ancestor | 14455 * this expression is not stored locally but is stored in the nearest ancestor |
| (...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15280 * if no explicit value was provided. | 15361 * if no explicit value was provided. |
| 15281 */ | 15362 */ |
| 15282 ReturnStatement(this.returnKeyword, Expression expression, this.semicolon) { | 15363 ReturnStatement(this.returnKeyword, Expression expression, this.semicolon) { |
| 15283 _expression = _becomeParentOf(expression); | 15364 _expression = _becomeParentOf(expression); |
| 15284 } | 15365 } |
| 15285 | 15366 |
| 15286 @override | 15367 @override |
| 15287 Token get beginToken => returnKeyword; | 15368 Token get beginToken => returnKeyword; |
| 15288 | 15369 |
| 15289 @override | 15370 @override |
| 15290 Iterable get childEntities => | 15371 Iterable get childEntities => new ChildEntities() |
| 15291 new ChildEntities()..add(returnKeyword)..add(_expression)..add(semicolon); | 15372 ..add(returnKeyword) |
| 15373 ..add(_expression) |
| 15374 ..add(semicolon); |
| 15292 | 15375 |
| 15293 @override | 15376 @override |
| 15294 Token get endToken => semicolon; | 15377 Token get endToken => semicolon; |
| 15295 | 15378 |
| 15296 /** | 15379 /** |
| 15297 * Return the expression computing the value to be returned, or `null` if no | 15380 * Return the expression computing the value to be returned, or `null` if no |
| 15298 * explicit value was provided. | 15381 * explicit value was provided. |
| 15299 */ | 15382 */ |
| 15300 Expression get expression => _expression; | 15383 Expression get expression => _expression; |
| 15301 | 15384 |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15965 return metadata.beginToken; | 16048 return metadata.beginToken; |
| 15966 } else if (keyword != null) { | 16049 } else if (keyword != null) { |
| 15967 return keyword; | 16050 return keyword; |
| 15968 } else if (_type != null) { | 16051 } else if (_type != null) { |
| 15969 return _type.beginToken; | 16052 return _type.beginToken; |
| 15970 } | 16053 } |
| 15971 return identifier.beginToken; | 16054 return identifier.beginToken; |
| 15972 } | 16055 } |
| 15973 | 16056 |
| 15974 @override | 16057 @override |
| 15975 Iterable get childEntities => | 16058 Iterable get childEntities => super._childEntities |
| 15976 super._childEntities..add(keyword)..add(_type)..add(identifier); | 16059 ..add(keyword) |
| 16060 ..add(_type) |
| 16061 ..add(identifier); |
| 15977 | 16062 |
| 15978 @override | 16063 @override |
| 15979 Token get endToken => identifier.endToken; | 16064 Token get endToken => identifier.endToken; |
| 15980 | 16065 |
| 15981 @override | 16066 @override |
| 15982 bool get isConst => (keyword is KeywordToken) && | 16067 bool get isConst => (keyword is KeywordToken) && |
| 15983 (keyword as KeywordToken).keyword == Keyword.CONST; | 16068 (keyword as KeywordToken).keyword == Keyword.CONST; |
| 15984 | 16069 |
| 15985 @override | 16070 @override |
| 15986 bool get isFinal => (keyword is KeywordToken) && | 16071 bool get isFinal => (keyword is KeywordToken) && |
| (...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17244 * Initialize a newly created throw expression. | 17329 * Initialize a newly created throw expression. |
| 17245 */ | 17330 */ |
| 17246 ThrowExpression(this.throwKeyword, Expression expression) { | 17331 ThrowExpression(this.throwKeyword, Expression expression) { |
| 17247 _expression = _becomeParentOf(expression); | 17332 _expression = _becomeParentOf(expression); |
| 17248 } | 17333 } |
| 17249 | 17334 |
| 17250 @override | 17335 @override |
| 17251 Token get beginToken => throwKeyword; | 17336 Token get beginToken => throwKeyword; |
| 17252 | 17337 |
| 17253 @override | 17338 @override |
| 17254 Iterable get childEntities => | 17339 Iterable get childEntities => new ChildEntities() |
| 17255 new ChildEntities()..add(throwKeyword)..add(_expression); | 17340 ..add(throwKeyword) |
| 17341 ..add(_expression); |
| 17256 | 17342 |
| 17257 @override | 17343 @override |
| 17258 Token get endToken { | 17344 Token get endToken { |
| 17259 if (_expression != null) { | 17345 if (_expression != null) { |
| 17260 return _expression.endToken; | 17346 return _expression.endToken; |
| 17261 } | 17347 } |
| 17262 return throwKeyword; | 17348 return throwKeyword; |
| 17263 } | 17349 } |
| 17264 | 17350 |
| 17265 /** | 17351 /** |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17324 * of the [comment] and [metadata] can be `null` if the variable does not have | 17410 * of the [comment] and [metadata] can be `null` if the variable does not have |
| 17325 * the corresponding attribute. | 17411 * the corresponding attribute. |
| 17326 */ | 17412 */ |
| 17327 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata, | 17413 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata, |
| 17328 VariableDeclarationList variableList, this.semicolon) | 17414 VariableDeclarationList variableList, this.semicolon) |
| 17329 : super(comment, metadata) { | 17415 : super(comment, metadata) { |
| 17330 _variableList = _becomeParentOf(variableList); | 17416 _variableList = _becomeParentOf(variableList); |
| 17331 } | 17417 } |
| 17332 | 17418 |
| 17333 @override | 17419 @override |
| 17334 Iterable get childEntities => | 17420 Iterable get childEntities => super._childEntities |
| 17335 super._childEntities..add(_variableList)..add(semicolon); | 17421 ..add(_variableList) |
| 17422 ..add(semicolon); |
| 17336 | 17423 |
| 17337 @override | 17424 @override |
| 17338 Element get element => null; | 17425 Element get element => null; |
| 17339 | 17426 |
| 17340 @override | 17427 @override |
| 17341 Token get endToken => semicolon; | 17428 Token get endToken => semicolon; |
| 17342 | 17429 |
| 17343 @override | 17430 @override |
| 17344 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; | 17431 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; |
| 17345 | 17432 |
| (...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18737 TypeArgumentList get typeArguments => _typeArguments; | 18824 TypeArgumentList get typeArguments => _typeArguments; |
| 18738 | 18825 |
| 18739 /** | 18826 /** |
| 18740 * Set the type argument associated with this literal to the given | 18827 * Set the type argument associated with this literal to the given |
| 18741 * [typeArguments]. | 18828 * [typeArguments]. |
| 18742 */ | 18829 */ |
| 18743 void set typeArguments(TypeArgumentList typeArguments) { | 18830 void set typeArguments(TypeArgumentList typeArguments) { |
| 18744 _typeArguments = _becomeParentOf(typeArguments); | 18831 _typeArguments = _becomeParentOf(typeArguments); |
| 18745 } | 18832 } |
| 18746 | 18833 |
| 18747 ChildEntities get _childEntities => | 18834 ChildEntities get _childEntities => new ChildEntities() |
| 18748 new ChildEntities()..add(constKeyword)..add(_typeArguments); | 18835 ..add(constKeyword) |
| 18836 ..add(_typeArguments); |
| 18749 | 18837 |
| 18750 @override | 18838 @override |
| 18751 void visitChildren(AstVisitor visitor) { | 18839 void visitChildren(AstVisitor visitor) { |
| 18752 _safelyVisitChild(_typeArguments, visitor); | 18840 _safelyVisitChild(_typeArguments, visitor); |
| 18753 } | 18841 } |
| 18754 } | 18842 } |
| 18755 | 18843 |
| 18756 /** | 18844 /** |
| 18757 * The name of a type, which can optionally include type arguments. | 18845 * The name of a type, which can optionally include type arguments. |
| 18758 * | 18846 * |
| (...skipping 23 matching lines...) Expand all Loading... |
| 18782 */ | 18870 */ |
| 18783 TypeName(Identifier name, TypeArgumentList typeArguments) { | 18871 TypeName(Identifier name, TypeArgumentList typeArguments) { |
| 18784 _name = _becomeParentOf(name); | 18872 _name = _becomeParentOf(name); |
| 18785 _typeArguments = _becomeParentOf(typeArguments); | 18873 _typeArguments = _becomeParentOf(typeArguments); |
| 18786 } | 18874 } |
| 18787 | 18875 |
| 18788 @override | 18876 @override |
| 18789 Token get beginToken => _name.beginToken; | 18877 Token get beginToken => _name.beginToken; |
| 18790 | 18878 |
| 18791 @override | 18879 @override |
| 18792 Iterable get childEntities => | 18880 Iterable get childEntities => new ChildEntities() |
| 18793 new ChildEntities()..add(_name)..add(_typeArguments); | 18881 ..add(_name) |
| 18882 ..add(_typeArguments); |
| 18794 | 18883 |
| 18795 @override | 18884 @override |
| 18796 Token get endToken { | 18885 Token get endToken { |
| 18797 if (_typeArguments != null) { | 18886 if (_typeArguments != null) { |
| 18798 return _typeArguments.endToken; | 18887 return _typeArguments.endToken; |
| 18799 } | 18888 } |
| 18800 return _name.endToken; | 18889 return _name.endToken; |
| 18801 } | 18890 } |
| 18802 | 18891 |
| 18803 /** | 18892 /** |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18898 | 18987 |
| 18899 /** | 18988 /** |
| 18900 * Set the name of the upper bound for legal arguments to the given | 18989 * Set the name of the upper bound for legal arguments to the given |
| 18901 * [typeName]. | 18990 * [typeName]. |
| 18902 */ | 18991 */ |
| 18903 void set bound(TypeName typeName) { | 18992 void set bound(TypeName typeName) { |
| 18904 _bound = _becomeParentOf(typeName); | 18993 _bound = _becomeParentOf(typeName); |
| 18905 } | 18994 } |
| 18906 | 18995 |
| 18907 @override | 18996 @override |
| 18908 Iterable get childEntities => | 18997 Iterable get childEntities => super._childEntities |
| 18909 super._childEntities..add(_name)..add(extendsKeyword)..add(_bound); | 18998 ..add(_name) |
| 18999 ..add(extendsKeyword) |
| 19000 ..add(_bound); |
| 18910 | 19001 |
| 18911 @override | 19002 @override |
| 18912 TypeParameterElement get element => | 19003 TypeParameterElement get element => |
| 18913 _name != null ? (_name.staticElement as TypeParameterElement) : null; | 19004 _name != null ? (_name.staticElement as TypeParameterElement) : null; |
| 18914 | 19005 |
| 18915 @override | 19006 @override |
| 18916 Token get endToken { | 19007 Token get endToken { |
| 18917 if (_bound == null) { | 19008 if (_bound == null) { |
| 18918 return _name.endToken; | 19009 return _name.endToken; |
| 18919 } | 19010 } |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19519 * [initializer] can be `null` if there is no initializer. | 19610 * [initializer] can be `null` if there is no initializer. |
| 19520 */ | 19611 */ |
| 19521 VariableDeclaration( | 19612 VariableDeclaration( |
| 19522 SimpleIdentifier name, this.equals, Expression initializer) | 19613 SimpleIdentifier name, this.equals, Expression initializer) |
| 19523 : super(null, null) { | 19614 : super(null, null) { |
| 19524 _name = _becomeParentOf(name); | 19615 _name = _becomeParentOf(name); |
| 19525 _initializer = _becomeParentOf(initializer); | 19616 _initializer = _becomeParentOf(initializer); |
| 19526 } | 19617 } |
| 19527 | 19618 |
| 19528 @override | 19619 @override |
| 19529 Iterable get childEntities => | 19620 Iterable get childEntities => super._childEntities |
| 19530 super._childEntities..add(_name)..add(equals)..add(_initializer); | 19621 ..add(_name) |
| 19622 ..add(equals) |
| 19623 ..add(_initializer); |
| 19531 | 19624 |
| 19532 /** | 19625 /** |
| 19533 * This overridden implementation of getDocumentationComment() looks in the | 19626 * This overridden implementation of getDocumentationComment() looks in the |
| 19534 * grandparent node for dartdoc comments if no documentation is specifically | 19627 * grandparent node for dartdoc comments if no documentation is specifically |
| 19535 * available on the node. | 19628 * available on the node. |
| 19536 */ | 19629 */ |
| 19537 @override | 19630 @override |
| 19538 Comment get documentationComment { | 19631 Comment get documentationComment { |
| 19539 Comment comment = super.documentationComment; | 19632 Comment comment = super.documentationComment; |
| 19540 if (comment == null) { | 19633 if (comment == null) { |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19750 */ | 19843 */ |
| 19751 VariableDeclarationStatement( | 19844 VariableDeclarationStatement( |
| 19752 VariableDeclarationList variableList, this.semicolon) { | 19845 VariableDeclarationList variableList, this.semicolon) { |
| 19753 _variableList = _becomeParentOf(variableList); | 19846 _variableList = _becomeParentOf(variableList); |
| 19754 } | 19847 } |
| 19755 | 19848 |
| 19756 @override | 19849 @override |
| 19757 Token get beginToken => _variableList.beginToken; | 19850 Token get beginToken => _variableList.beginToken; |
| 19758 | 19851 |
| 19759 @override | 19852 @override |
| 19760 Iterable get childEntities => | 19853 Iterable get childEntities => new ChildEntities() |
| 19761 new ChildEntities()..add(_variableList)..add(semicolon); | 19854 ..add(_variableList) |
| 19855 ..add(semicolon); |
| 19762 | 19856 |
| 19763 @override | 19857 @override |
| 19764 Token get endToken => semicolon; | 19858 Token get endToken => semicolon; |
| 19765 | 19859 |
| 19766 /** | 19860 /** |
| 19767 * Return the variables being declared. | 19861 * Return the variables being declared. |
| 19768 */ | 19862 */ |
| 19769 VariableDeclarationList get variables => _variableList; | 19863 VariableDeclarationList get variables => _variableList; |
| 19770 | 19864 |
| 19771 /** | 19865 /** |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20021 } | 20115 } |
| 20022 | 20116 |
| 20023 @override | 20117 @override |
| 20024 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); | 20118 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); |
| 20025 | 20119 |
| 20026 @override | 20120 @override |
| 20027 void visitChildren(AstVisitor visitor) { | 20121 void visitChildren(AstVisitor visitor) { |
| 20028 _safelyVisitChild(_expression, visitor); | 20122 _safelyVisitChild(_expression, visitor); |
| 20029 } | 20123 } |
| 20030 } | 20124 } |
| OLD | NEW |