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 => new ChildEntities() | 597 Iterable get childEntities => |
598 ..add(_expression) | 598 new ChildEntities()..add(_expression)..add(asOperator)..add(_type); |
599 ..add(asOperator) | |
600 ..add(_type); | |
601 | 599 |
602 @override | 600 @override |
603 Token get endToken => _type.endToken; | 601 Token get endToken => _type.endToken; |
604 | 602 |
605 /** | 603 /** |
606 * Return the expression used to compute the value being cast. | 604 * Return the expression used to compute the value being cast. |
607 */ | 605 */ |
608 Expression get expression => _expression; | 606 Expression get expression => _expression; |
609 | 607 |
610 /** | 608 /** |
(...skipping 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3185 | 3183 |
3186 @override | 3184 @override |
3187 Token get beginToken { | 3185 Token get beginToken { |
3188 if (awaitKeyword != null) { | 3186 if (awaitKeyword != null) { |
3189 return awaitKeyword; | 3187 return awaitKeyword; |
3190 } | 3188 } |
3191 return _expression.beginToken; | 3189 return _expression.beginToken; |
3192 } | 3190 } |
3193 | 3191 |
3194 @override | 3192 @override |
3195 Iterable get childEntities => new ChildEntities() | 3193 Iterable get childEntities => |
3196 ..add(awaitKeyword) | 3194 new ChildEntities()..add(awaitKeyword)..add(_expression); |
3197 ..add(_expression); | |
3198 | 3195 |
3199 @override | 3196 @override |
3200 Token get endToken => _expression.endToken; | 3197 Token get endToken => _expression.endToken; |
3201 | 3198 |
3202 /** | 3199 /** |
3203 * Return the expression whose value is being waited on. | 3200 * Return the expression whose value is being waited on. |
3204 */ | 3201 */ |
3205 Expression get expression => _expression; | 3202 Expression get expression => _expression; |
3206 | 3203 |
3207 /** | 3204 /** |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3281 */ | 3278 */ |
3282 MethodElement get bestElement { | 3279 MethodElement get bestElement { |
3283 MethodElement element = propagatedElement; | 3280 MethodElement element = propagatedElement; |
3284 if (element == null) { | 3281 if (element == null) { |
3285 element = staticElement; | 3282 element = staticElement; |
3286 } | 3283 } |
3287 return element; | 3284 return element; |
3288 } | 3285 } |
3289 | 3286 |
3290 @override | 3287 @override |
3291 Iterable get childEntities => new ChildEntities() | 3288 Iterable get childEntities => |
3292 ..add(_leftOperand) | 3289 new ChildEntities()..add(_leftOperand)..add(operator)..add(_rightOperand); |
3293 ..add(operator) | |
3294 ..add(_rightOperand); | |
3295 | 3290 |
3296 @override | 3291 @override |
3297 Token get endToken => _rightOperand.endToken; | 3292 Token get endToken => _rightOperand.endToken; |
3298 | 3293 |
3299 /** | 3294 /** |
3300 * Return the expression used to compute the left operand. | 3295 * Return the expression used to compute the left operand. |
3301 */ | 3296 */ |
3302 Expression get leftOperand => _leftOperand; | 3297 Expression get leftOperand => _leftOperand; |
3303 | 3298 |
3304 /** | 3299 /** |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3489 Block get block => _block; | 3484 Block get block => _block; |
3490 | 3485 |
3491 /** | 3486 /** |
3492 * Set the block representing the body of the function to the given [block]. | 3487 * Set the block representing the body of the function to the given [block]. |
3493 */ | 3488 */ |
3494 void set block(Block block) { | 3489 void set block(Block block) { |
3495 _block = _becomeParentOf(block); | 3490 _block = _becomeParentOf(block); |
3496 } | 3491 } |
3497 | 3492 |
3498 @override | 3493 @override |
3499 Iterable get childEntities => new ChildEntities() | 3494 Iterable get childEntities => |
3500 ..add(keyword) | 3495 new ChildEntities()..add(keyword)..add(star)..add(_block); |
3501 ..add(star) | |
3502 ..add(_block); | |
3503 | 3496 |
3504 @override | 3497 @override |
3505 Token get endToken => _block.endToken; | 3498 Token get endToken => _block.endToken; |
3506 | 3499 |
3507 @override | 3500 @override |
3508 bool get isAsynchronous => keyword != null && keyword.lexeme == Parser.ASYNC; | 3501 bool get isAsynchronous => keyword != null && keyword.lexeme == Parser.ASYNC; |
3509 | 3502 |
3510 @override | 3503 @override |
3511 bool get isGenerator => star != null; | 3504 bool get isGenerator => star != null; |
3512 | 3505 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3658 * there is no label associated with the statement. | 3651 * there is no label associated with the statement. |
3659 */ | 3652 */ |
3660 BreakStatement(this.breakKeyword, SimpleIdentifier label, this.semicolon) { | 3653 BreakStatement(this.breakKeyword, SimpleIdentifier label, this.semicolon) { |
3661 _label = _becomeParentOf(label); | 3654 _label = _becomeParentOf(label); |
3662 } | 3655 } |
3663 | 3656 |
3664 @override | 3657 @override |
3665 Token get beginToken => breakKeyword; | 3658 Token get beginToken => breakKeyword; |
3666 | 3659 |
3667 @override | 3660 @override |
3668 Iterable get childEntities => new ChildEntities() | 3661 Iterable get childEntities => |
3669 ..add(breakKeyword) | 3662 new ChildEntities()..add(breakKeyword)..add(_label)..add(semicolon); |
3670 ..add(_label) | |
3671 ..add(semicolon); | |
3672 | 3663 |
3673 @override | 3664 @override |
3674 Token get endToken => semicolon; | 3665 Token get endToken => semicolon; |
3675 | 3666 |
3676 /** | 3667 /** |
3677 * Return the token representing the 'break' keyword. | 3668 * Return the token representing the 'break' keyword. |
3678 */ | 3669 */ |
3679 @deprecated // Use "this.breakKeyword" | 3670 @deprecated // Use "this.breakKeyword" |
3680 Token get keyword => breakKeyword; | 3671 Token get keyword => breakKeyword; |
3681 | 3672 |
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4568 * can be `null` if the reference is not to a constructor. | 4559 * can be `null` if the reference is not to a constructor. |
4569 */ | 4560 */ |
4570 CommentReference(this.newKeyword, Identifier identifier) { | 4561 CommentReference(this.newKeyword, Identifier identifier) { |
4571 _identifier = _becomeParentOf(identifier); | 4562 _identifier = _becomeParentOf(identifier); |
4572 } | 4563 } |
4573 | 4564 |
4574 @override | 4565 @override |
4575 Token get beginToken => _identifier.beginToken; | 4566 Token get beginToken => _identifier.beginToken; |
4576 | 4567 |
4577 @override | 4568 @override |
4578 Iterable get childEntities => new ChildEntities() | 4569 Iterable get childEntities => |
4579 ..add(newKeyword) | 4570 new ChildEntities()..add(newKeyword)..add(_identifier); |
4580 ..add(_identifier); | |
4581 | 4571 |
4582 @override | 4572 @override |
4583 Token get endToken => _identifier.endToken; | 4573 Token get endToken => _identifier.endToken; |
4584 | 4574 |
4585 /** | 4575 /** |
4586 * Return the identifier being referenced. | 4576 * Return the identifier being referenced. |
4587 */ | 4577 */ |
4588 Identifier get identifier => _identifier; | 4578 Identifier get identifier => _identifier; |
4589 | 4579 |
4590 /** | 4580 /** |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4711 this.endToken) { | 4701 this.endToken) { |
4712 _scriptTag = _becomeParentOf(scriptTag); | 4702 _scriptTag = _becomeParentOf(scriptTag); |
4713 _directives = new NodeList<Directive>(this, directives); | 4703 _directives = new NodeList<Directive>(this, directives); |
4714 _declarations = new NodeList<CompilationUnitMember>(this, declarations); | 4704 _declarations = new NodeList<CompilationUnitMember>(this, declarations); |
4715 } | 4705 } |
4716 | 4706 |
4717 @override | 4707 @override |
4718 Iterable get childEntities { | 4708 Iterable get childEntities { |
4719 ChildEntities result = new ChildEntities()..add(_scriptTag); | 4709 ChildEntities result = new ChildEntities()..add(_scriptTag); |
4720 if (_directivesAreBeforeDeclarations) { | 4710 if (_directivesAreBeforeDeclarations) { |
4721 result | 4711 result..addAll(_directives)..addAll(_declarations); |
4722 ..addAll(_directives) | |
4723 ..addAll(_declarations); | |
4724 } else { | 4712 } else { |
4725 result.addAll(sortedDirectivesAndDeclarations); | 4713 result.addAll(sortedDirectivesAndDeclarations); |
4726 } | 4714 } |
4727 return result; | 4715 return result; |
4728 } | 4716 } |
4729 | 4717 |
4730 /** | 4718 /** |
4731 * Return the declarations contained in this compilation unit. | 4719 * Return the declarations contained in this compilation unit. |
4732 */ | 4720 */ |
4733 NodeList<CompilationUnitMember> get declarations => _declarations; | 4721 NodeList<CompilationUnitMember> get declarations => _declarations; |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5676 */ | 5664 */ |
5677 ConstructorName(TypeName type, this.period, SimpleIdentifier name) { | 5665 ConstructorName(TypeName type, this.period, SimpleIdentifier name) { |
5678 _type = _becomeParentOf(type); | 5666 _type = _becomeParentOf(type); |
5679 _name = _becomeParentOf(name); | 5667 _name = _becomeParentOf(name); |
5680 } | 5668 } |
5681 | 5669 |
5682 @override | 5670 @override |
5683 Token get beginToken => _type.beginToken; | 5671 Token get beginToken => _type.beginToken; |
5684 | 5672 |
5685 @override | 5673 @override |
5686 Iterable get childEntities => new ChildEntities() | 5674 Iterable get childEntities => |
5687 ..add(_type) | 5675 new ChildEntities()..add(_type)..add(period)..add(_name); |
5688 ..add(period) | |
5689 ..add(_name); | |
5690 | 5676 |
5691 @override | 5677 @override |
5692 Token get endToken { | 5678 Token get endToken { |
5693 if (_name != null) { | 5679 if (_name != null) { |
5694 return _name.endToken; | 5680 return _name.endToken; |
5695 } | 5681 } |
5696 return _type.endToken; | 5682 return _type.endToken; |
5697 } | 5683 } |
5698 | 5684 |
5699 /** | 5685 /** |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5769 */ | 5755 */ |
5770 ContinueStatement( | 5756 ContinueStatement( |
5771 this.continueKeyword, SimpleIdentifier label, this.semicolon) { | 5757 this.continueKeyword, SimpleIdentifier label, this.semicolon) { |
5772 _label = _becomeParentOf(label); | 5758 _label = _becomeParentOf(label); |
5773 } | 5759 } |
5774 | 5760 |
5775 @override | 5761 @override |
5776 Token get beginToken => continueKeyword; | 5762 Token get beginToken => continueKeyword; |
5777 | 5763 |
5778 @override | 5764 @override |
5779 Iterable get childEntities => new ChildEntities() | 5765 Iterable get childEntities => |
5780 ..add(continueKeyword) | 5766 new ChildEntities()..add(continueKeyword)..add(_label)..add(semicolon); |
5781 ..add(_label) | |
5782 ..add(semicolon); | |
5783 | 5767 |
5784 @override | 5768 @override |
5785 Token get endToken => semicolon; | 5769 Token get endToken => semicolon; |
5786 | 5770 |
5787 /** | 5771 /** |
5788 * Return the token for the 'continue' keyword, or `null` if there is no | 5772 * Return the token for the 'continue' keyword, or `null` if there is no |
5789 * 'continue' keyword. | 5773 * 'continue' keyword. |
5790 */ | 5774 */ |
5791 @deprecated // Use "this.continueKeyword" | 5775 @deprecated // Use "this.continueKeyword" |
5792 Token get keyword => continueKeyword; | 5776 Token get keyword => continueKeyword; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5873 * given. The [type] must be `null` if the keyword is 'var'. | 5857 * given. The [type] must be `null` if the keyword is 'var'. |
5874 */ | 5858 */ |
5875 DeclaredIdentifier(Comment comment, List<Annotation> metadata, this.keyword, | 5859 DeclaredIdentifier(Comment comment, List<Annotation> metadata, this.keyword, |
5876 TypeName type, SimpleIdentifier identifier) | 5860 TypeName type, SimpleIdentifier identifier) |
5877 : super(comment, metadata) { | 5861 : super(comment, metadata) { |
5878 _type = _becomeParentOf(type); | 5862 _type = _becomeParentOf(type); |
5879 _identifier = _becomeParentOf(identifier); | 5863 _identifier = _becomeParentOf(identifier); |
5880 } | 5864 } |
5881 | 5865 |
5882 @override | 5866 @override |
5883 Iterable get childEntities => super._childEntities | 5867 Iterable get childEntities => |
5884 ..add(keyword) | 5868 super._childEntities..add(keyword)..add(_type)..add(_identifier); |
5885 ..add(_type) | |
5886 ..add(_identifier); | |
5887 | 5869 |
5888 @override | 5870 @override |
5889 LocalVariableElement get element { | 5871 LocalVariableElement get element { |
5890 if (_identifier == null) { | 5872 if (_identifier == null) { |
5891 return null; | 5873 return null; |
5892 } | 5874 } |
5893 return _identifier.staticElement as LocalVariableElement; | 5875 return _identifier.staticElement as LocalVariableElement; |
5894 } | 5876 } |
5895 | 5877 |
5896 @override | 5878 @override |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5997 DefaultFormalParameter(NormalFormalParameter parameter, this.kind, | 5979 DefaultFormalParameter(NormalFormalParameter parameter, this.kind, |
5998 this.separator, Expression defaultValue) { | 5980 this.separator, Expression defaultValue) { |
5999 _parameter = _becomeParentOf(parameter); | 5981 _parameter = _becomeParentOf(parameter); |
6000 _defaultValue = _becomeParentOf(defaultValue); | 5982 _defaultValue = _becomeParentOf(defaultValue); |
6001 } | 5983 } |
6002 | 5984 |
6003 @override | 5985 @override |
6004 Token get beginToken => _parameter.beginToken; | 5986 Token get beginToken => _parameter.beginToken; |
6005 | 5987 |
6006 @override | 5988 @override |
6007 Iterable get childEntities => new ChildEntities() | 5989 Iterable get childEntities => |
6008 ..add(_parameter) | 5990 new ChildEntities()..add(_parameter)..add(separator)..add(_defaultValue); |
6009 ..add(separator) | |
6010 ..add(_defaultValue); | |
6011 | 5991 |
6012 /** | 5992 /** |
6013 * Return the expression computing the default value for the parameter, or | 5993 * Return the expression computing the default value for the parameter, or |
6014 * `null` if there is no default value. | 5994 * `null` if there is no default value. |
6015 */ | 5995 */ |
6016 Expression get defaultValue => _defaultValue; | 5996 Expression get defaultValue => _defaultValue; |
6017 | 5997 |
6018 /** | 5998 /** |
6019 * Set the expression computing the default value for the parameter to the | 5999 * Set the expression computing the default value for the parameter to the |
6020 * given [expression]. | 6000 * given [expression]. |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6953 * Initialize a newly created expression statement. | 6933 * Initialize a newly created expression statement. |
6954 */ | 6934 */ |
6955 ExpressionStatement(Expression expression, this.semicolon) { | 6935 ExpressionStatement(Expression expression, this.semicolon) { |
6956 _expression = _becomeParentOf(expression); | 6936 _expression = _becomeParentOf(expression); |
6957 } | 6937 } |
6958 | 6938 |
6959 @override | 6939 @override |
6960 Token get beginToken => _expression.beginToken; | 6940 Token get beginToken => _expression.beginToken; |
6961 | 6941 |
6962 @override | 6942 @override |
6963 Iterable get childEntities => new ChildEntities() | 6943 Iterable get childEntities => |
6964 ..add(_expression) | 6944 new ChildEntities()..add(_expression)..add(semicolon); |
6965 ..add(semicolon); | |
6966 | 6945 |
6967 @override | 6946 @override |
6968 Token get endToken { | 6947 Token get endToken { |
6969 if (semicolon != null) { | 6948 if (semicolon != null) { |
6970 return semicolon; | 6949 return semicolon; |
6971 } | 6950 } |
6972 return _expression.endToken; | 6951 return _expression.endToken; |
6973 } | 6952 } |
6974 | 6953 |
6975 /** | 6954 /** |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7017 * Initialize a newly created extends clause. | 6996 * Initialize a newly created extends clause. |
7018 */ | 6997 */ |
7019 ExtendsClause(this.extendsKeyword, TypeName superclass) { | 6998 ExtendsClause(this.extendsKeyword, TypeName superclass) { |
7020 _superclass = _becomeParentOf(superclass); | 6999 _superclass = _becomeParentOf(superclass); |
7021 } | 7000 } |
7022 | 7001 |
7023 @override | 7002 @override |
7024 Token get beginToken => extendsKeyword; | 7003 Token get beginToken => extendsKeyword; |
7025 | 7004 |
7026 @override | 7005 @override |
7027 Iterable get childEntities => new ChildEntities() | 7006 Iterable get childEntities => |
7028 ..add(extendsKeyword) | 7007 new ChildEntities()..add(extendsKeyword)..add(_superclass); |
7029 ..add(_superclass); | |
7030 | 7008 |
7031 @override | 7009 @override |
7032 Token get endToken => _superclass.endToken; | 7010 Token get endToken => _superclass.endToken; |
7033 | 7011 |
7034 /** | 7012 /** |
7035 * Return the token for the 'extends' keyword. | 7013 * Return the token for the 'extends' keyword. |
7036 */ | 7014 */ |
7037 @deprecated // Use "this.extendsKeyword" | 7015 @deprecated // Use "this.extendsKeyword" |
7038 Token get keyword => extendsKeyword; | 7016 Token get keyword => extendsKeyword; |
7039 | 7017 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7095 * corresponding attribute. The [staticKeyword] can be `null` if the field is | 7073 * corresponding attribute. The [staticKeyword] can be `null` if the field is |
7096 * not a static field. | 7074 * not a static field. |
7097 */ | 7075 */ |
7098 FieldDeclaration(Comment comment, List<Annotation> metadata, | 7076 FieldDeclaration(Comment comment, List<Annotation> metadata, |
7099 this.staticKeyword, VariableDeclarationList fieldList, this.semicolon) | 7077 this.staticKeyword, VariableDeclarationList fieldList, this.semicolon) |
7100 : super(comment, metadata) { | 7078 : super(comment, metadata) { |
7101 _fieldList = _becomeParentOf(fieldList); | 7079 _fieldList = _becomeParentOf(fieldList); |
7102 } | 7080 } |
7103 | 7081 |
7104 @override | 7082 @override |
7105 Iterable get childEntities => super._childEntities | 7083 Iterable get childEntities => |
7106 ..add(staticKeyword) | 7084 super._childEntities..add(staticKeyword)..add(_fieldList)..add(semicolon); |
7107 ..add(_fieldList) | |
7108 ..add(semicolon); | |
7109 | 7085 |
7110 @override | 7086 @override |
7111 Element get element => null; | 7087 Element get element => null; |
7112 | 7088 |
7113 @override | 7089 @override |
7114 Token get endToken => semicolon; | 7090 Token get endToken => semicolon; |
7115 | 7091 |
7116 /** | 7092 /** |
7117 * Return the fields being declared. | 7093 * Return the fields being declared. |
7118 */ | 7094 */ |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7602 // TODO(paulberry): include commas. | 7578 // TODO(paulberry): include commas. |
7603 ChildEntities result = new ChildEntities()..add(leftParenthesis); | 7579 ChildEntities result = new ChildEntities()..add(leftParenthesis); |
7604 bool leftDelimiterNeeded = leftDelimiter != null; | 7580 bool leftDelimiterNeeded = leftDelimiter != null; |
7605 for (FormalParameter parameter in _parameters) { | 7581 for (FormalParameter parameter in _parameters) { |
7606 if (leftDelimiterNeeded && leftDelimiter.offset < parameter.offset) { | 7582 if (leftDelimiterNeeded && leftDelimiter.offset < parameter.offset) { |
7607 result.add(leftDelimiter); | 7583 result.add(leftDelimiter); |
7608 leftDelimiterNeeded = false; | 7584 leftDelimiterNeeded = false; |
7609 } | 7585 } |
7610 result.add(parameter); | 7586 result.add(parameter); |
7611 } | 7587 } |
7612 return result | 7588 return result..add(rightDelimiter)..add(rightParenthesis); |
7613 ..add(rightDelimiter) | |
7614 ..add(rightParenthesis); | |
7615 } | 7589 } |
7616 | 7590 |
7617 @override | 7591 @override |
7618 Token get endToken => rightParenthesis; | 7592 Token get endToken => rightParenthesis; |
7619 | 7593 |
7620 /** | 7594 /** |
7621 * Return a list containing the elements representing the parameters in this | 7595 * Return a list containing the elements representing the parameters in this |
7622 * list. The list will contain `null`s if the parameters in this list have not | 7596 * list. The list will contain `null`s if the parameters in this list have not |
7623 * been resolved. | 7597 * been resolved. |
7624 */ | 7598 */ |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8081 FunctionBody get body => _body; | 8055 FunctionBody get body => _body; |
8082 | 8056 |
8083 /** | 8057 /** |
8084 * Set the body of the function to the given [functionBody]. | 8058 * Set the body of the function to the given [functionBody]. |
8085 */ | 8059 */ |
8086 void set body(FunctionBody functionBody) { | 8060 void set body(FunctionBody functionBody) { |
8087 _body = _becomeParentOf(functionBody); | 8061 _body = _becomeParentOf(functionBody); |
8088 } | 8062 } |
8089 | 8063 |
8090 @override | 8064 @override |
8091 Iterable get childEntities => new ChildEntities() | 8065 Iterable get childEntities => |
8092 ..add(_parameters) | 8066 new ChildEntities()..add(_parameters)..add(_body); |
8093 ..add(_body); | |
8094 | 8067 |
8095 @override | 8068 @override |
8096 Token get endToken { | 8069 Token get endToken { |
8097 if (_body != null) { | 8070 if (_body != null) { |
8098 return _body.endToken; | 8071 return _body.endToken; |
8099 } else if (_parameters != null) { | 8072 } else if (_parameters != null) { |
8100 return _parameters.endToken; | 8073 return _parameters.endToken; |
8101 } | 8074 } |
8102 // This should never be reached because external functions must be named, | 8075 // This should never be reached because external functions must be named, |
8103 // hence either the body or the name should be non-null. | 8076 // hence either the body or the name should be non-null. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8196 */ | 8169 */ |
8197 ExecutableElement get bestElement { | 8170 ExecutableElement get bestElement { |
8198 ExecutableElement element = propagatedElement; | 8171 ExecutableElement element = propagatedElement; |
8199 if (element == null) { | 8172 if (element == null) { |
8200 element = staticElement; | 8173 element = staticElement; |
8201 } | 8174 } |
8202 return element; | 8175 return element; |
8203 } | 8176 } |
8204 | 8177 |
8205 @override | 8178 @override |
8206 Iterable get childEntities => new ChildEntities() | 8179 Iterable get childEntities => |
8207 ..add(_function) | 8180 new ChildEntities()..add(_function)..add(_argumentList); |
8208 ..add(_argumentList); | |
8209 | 8181 |
8210 @override | 8182 @override |
8211 Token get endToken => _argumentList.endToken; | 8183 Token get endToken => _argumentList.endToken; |
8212 | 8184 |
8213 /** | 8185 /** |
8214 * Return the expression producing the function being invoked. | 8186 * Return the expression producing the function being invoked. |
8215 */ | 8187 */ |
8216 Expression get function => _function; | 8188 Expression get function => _function; |
8217 | 8189 |
8218 /** | 8190 /** |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8381 | 8353 |
8382 @override | 8354 @override |
8383 Token get beginToken { | 8355 Token get beginToken { |
8384 if (_returnType != null) { | 8356 if (_returnType != null) { |
8385 return _returnType.beginToken; | 8357 return _returnType.beginToken; |
8386 } | 8358 } |
8387 return identifier.beginToken; | 8359 return identifier.beginToken; |
8388 } | 8360 } |
8389 | 8361 |
8390 @override | 8362 @override |
8391 Iterable get childEntities => super._childEntities | 8363 Iterable get childEntities => |
8392 ..add(_returnType) | 8364 super._childEntities..add(_returnType)..add(identifier)..add(parameters); |
8393 ..add(identifier) | |
8394 ..add(parameters); | |
8395 | 8365 |
8396 @override | 8366 @override |
8397 Token get endToken => _parameters.endToken; | 8367 Token get endToken => _parameters.endToken; |
8398 | 8368 |
8399 @override | 8369 @override |
8400 bool get isConst => false; | 8370 bool get isConst => false; |
8401 | 8371 |
8402 @override | 8372 @override |
8403 bool get isFinal => false; | 8373 bool get isFinal => false; |
8404 | 8374 |
(...skipping 2533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10938 * Initialize a newly created label. | 10908 * Initialize a newly created label. |
10939 */ | 10909 */ |
10940 Label(SimpleIdentifier label, this.colon) { | 10910 Label(SimpleIdentifier label, this.colon) { |
10941 _label = _becomeParentOf(label); | 10911 _label = _becomeParentOf(label); |
10942 } | 10912 } |
10943 | 10913 |
10944 @override | 10914 @override |
10945 Token get beginToken => _label.beginToken; | 10915 Token get beginToken => _label.beginToken; |
10946 | 10916 |
10947 @override | 10917 @override |
10948 Iterable get childEntities => new ChildEntities() | 10918 Iterable get childEntities => new ChildEntities()..add(_label)..add(colon); |
10949 ..add(_label) | |
10950 ..add(colon); | |
10951 | 10919 |
10952 @override | 10920 @override |
10953 Token get endToken => colon; | 10921 Token get endToken => colon; |
10954 | 10922 |
10955 /** | 10923 /** |
10956 * Return the label being associated with the statement. | 10924 * Return the label being associated with the statement. |
10957 */ | 10925 */ |
10958 SimpleIdentifier get label => _label; | 10926 SimpleIdentifier get label => _label; |
10959 | 10927 |
10960 /** | 10928 /** |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11072 * [comment] and [metadata] can be `null` if the directive does not have the | 11040 * [comment] and [metadata] can be `null` if the directive does not have the |
11073 * corresponding attribute. | 11041 * corresponding attribute. |
11074 */ | 11042 */ |
11075 LibraryDirective(Comment comment, List<Annotation> metadata, | 11043 LibraryDirective(Comment comment, List<Annotation> metadata, |
11076 this.libraryKeyword, LibraryIdentifier name, this.semicolon) | 11044 this.libraryKeyword, LibraryIdentifier name, this.semicolon) |
11077 : super(comment, metadata) { | 11045 : super(comment, metadata) { |
11078 _name = _becomeParentOf(name); | 11046 _name = _becomeParentOf(name); |
11079 } | 11047 } |
11080 | 11048 |
11081 @override | 11049 @override |
11082 Iterable get childEntities => super._childEntities | 11050 Iterable get childEntities => |
11083 ..add(libraryKeyword) | 11051 super._childEntities..add(libraryKeyword)..add(_name)..add(semicolon); |
11084 ..add(_name) | |
11085 ..add(semicolon); | |
11086 | 11052 |
11087 @override | 11053 @override |
11088 Token get endToken => semicolon; | 11054 Token get endToken => semicolon; |
11089 | 11055 |
11090 @override | 11056 @override |
11091 Token get firstTokenAfterCommentAndMetadata => libraryKeyword; | 11057 Token get firstTokenAfterCommentAndMetadata => libraryKeyword; |
11092 | 11058 |
11093 @override | 11059 @override |
11094 Token get keyword => libraryKeyword; | 11060 Token get keyword => libraryKeyword; |
11095 | 11061 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11391 */ | 11357 */ |
11392 MapLiteralEntry(Expression key, this.separator, Expression value) { | 11358 MapLiteralEntry(Expression key, this.separator, Expression value) { |
11393 _key = _becomeParentOf(key); | 11359 _key = _becomeParentOf(key); |
11394 _value = _becomeParentOf(value); | 11360 _value = _becomeParentOf(value); |
11395 } | 11361 } |
11396 | 11362 |
11397 @override | 11363 @override |
11398 Token get beginToken => _key.beginToken; | 11364 Token get beginToken => _key.beginToken; |
11399 | 11365 |
11400 @override | 11366 @override |
11401 Iterable get childEntities => new ChildEntities() | 11367 Iterable get childEntities => |
11402 ..add(_key) | 11368 new ChildEntities()..add(_key)..add(separator)..add(_value); |
11403 ..add(separator) | |
11404 ..add(_value); | |
11405 | 11369 |
11406 @override | 11370 @override |
11407 Token get endToken => _value.endToken; | 11371 Token get endToken => _value.endToken; |
11408 | 11372 |
11409 /** | 11373 /** |
11410 * Return the expression computing the key with which the value will be | 11374 * Return the expression computing the key with which the value will be |
11411 * associated. | 11375 * associated. |
11412 */ | 11376 */ |
11413 Expression get key => _key; | 11377 Expression get key => _key; |
11414 | 11378 |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11886 */ | 11850 */ |
11887 NamedExpression(Label name, Expression expression) { | 11851 NamedExpression(Label name, Expression expression) { |
11888 _name = _becomeParentOf(name); | 11852 _name = _becomeParentOf(name); |
11889 _expression = _becomeParentOf(expression); | 11853 _expression = _becomeParentOf(expression); |
11890 } | 11854 } |
11891 | 11855 |
11892 @override | 11856 @override |
11893 Token get beginToken => _name.beginToken; | 11857 Token get beginToken => _name.beginToken; |
11894 | 11858 |
11895 @override | 11859 @override |
11896 Iterable get childEntities => new ChildEntities() | 11860 Iterable get childEntities => |
11897 ..add(_name) | 11861 new ChildEntities()..add(_name)..add(_expression); |
11898 ..add(_expression); | |
11899 | 11862 |
11900 /** | 11863 /** |
11901 * Return the element representing the parameter being named by this | 11864 * Return the element representing the parameter being named by this |
11902 * expression, or `null` if the AST structure has not been resolved or if | 11865 * expression, or `null` if the AST structure has not been resolved or if |
11903 * there is no parameter with the same name as this expression. | 11866 * there is no parameter with the same name as this expression. |
11904 */ | 11867 */ |
11905 ParameterElement get element { | 11868 ParameterElement get element { |
11906 Element element = _name.label.staticElement; | 11869 Element element = _name.label.staticElement; |
11907 if (element is ParameterElement) { | 11870 if (element is ParameterElement) { |
11908 return element; | 11871 return element; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12022 * Initialize a newly created native clause. | 11985 * Initialize a newly created native clause. |
12023 */ | 11986 */ |
12024 NativeClause(this.nativeKeyword, StringLiteral name) { | 11987 NativeClause(this.nativeKeyword, StringLiteral name) { |
12025 _name = _becomeParentOf(name); | 11988 _name = _becomeParentOf(name); |
12026 } | 11989 } |
12027 | 11990 |
12028 @override | 11991 @override |
12029 Token get beginToken => nativeKeyword; | 11992 Token get beginToken => nativeKeyword; |
12030 | 11993 |
12031 @override | 11994 @override |
12032 Iterable get childEntities => new ChildEntities() | 11995 Iterable get childEntities => |
12033 ..add(nativeKeyword) | 11996 new ChildEntities()..add(nativeKeyword)..add(_name); |
12034 ..add(_name); | |
12035 | 11997 |
12036 @override | 11998 @override |
12037 Token get endToken => _name.endToken; | 11999 Token get endToken => _name.endToken; |
12038 | 12000 |
12039 /** | 12001 /** |
12040 * Get the token representing the 'native' keyword. | 12002 * Get the token representing the 'native' keyword. |
12041 */ | 12003 */ |
12042 @deprecated // Use "this.nativeKeyword" | 12004 @deprecated // Use "this.nativeKeyword" |
12043 Token get keyword => nativeKeyword; | 12005 Token get keyword => nativeKeyword; |
12044 | 12006 |
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13825 /** | 13787 /** |
13826 * Initialize a newly created part directive. Either or both of the [comment] | 13788 * Initialize a newly created part directive. Either or both of the [comment] |
13827 * and [metadata] can be `null` if the directive does not have the | 13789 * and [metadata] can be `null` if the directive does not have the |
13828 * corresponding attribute. | 13790 * corresponding attribute. |
13829 */ | 13791 */ |
13830 PartDirective(Comment comment, List<Annotation> metadata, this.partKeyword, | 13792 PartDirective(Comment comment, List<Annotation> metadata, this.partKeyword, |
13831 StringLiteral partUri, this.semicolon) | 13793 StringLiteral partUri, this.semicolon) |
13832 : super(comment, metadata, partUri); | 13794 : super(comment, metadata, partUri); |
13833 | 13795 |
13834 @override | 13796 @override |
13835 Iterable get childEntities => super._childEntities | 13797 Iterable get childEntities => |
13836 ..add(partKeyword) | 13798 super._childEntities..add(partKeyword)..add(_uri)..add(semicolon); |
13837 ..add(_uri) | |
13838 ..add(semicolon); | |
13839 | 13799 |
13840 @override | 13800 @override |
13841 Token get endToken => semicolon; | 13801 Token get endToken => semicolon; |
13842 | 13802 |
13843 @override | 13803 @override |
13844 Token get firstTokenAfterCommentAndMetadata => partKeyword; | 13804 Token get firstTokenAfterCommentAndMetadata => partKeyword; |
13845 | 13805 |
13846 @override | 13806 @override |
13847 Token get keyword => partKeyword; | 13807 Token get keyword => partKeyword; |
13848 | 13808 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14024 */ | 13984 */ |
14025 MethodElement get bestElement { | 13985 MethodElement get bestElement { |
14026 MethodElement element = propagatedElement; | 13986 MethodElement element = propagatedElement; |
14027 if (element == null) { | 13987 if (element == null) { |
14028 element = staticElement; | 13988 element = staticElement; |
14029 } | 13989 } |
14030 return element; | 13990 return element; |
14031 } | 13991 } |
14032 | 13992 |
14033 @override | 13993 @override |
14034 Iterable get childEntities => new ChildEntities() | 13994 Iterable get childEntities => |
14035 ..add(_operand) | 13995 new ChildEntities()..add(_operand)..add(operator); |
14036 ..add(operator); | |
14037 | 13996 |
14038 @override | 13997 @override |
14039 Token get endToken => operator; | 13998 Token get endToken => operator; |
14040 | 13999 |
14041 /** | 14000 /** |
14042 * Return the expression computing the operand for the operator. | 14001 * Return the expression computing the operand for the operator. |
14043 */ | 14002 */ |
14044 Expression get operand => _operand; | 14003 Expression get operand => _operand; |
14045 | 14004 |
14046 /** | 14005 /** |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14156 | 14115 |
14157 @override | 14116 @override |
14158 Element get bestElement { | 14117 Element get bestElement { |
14159 if (_identifier == null) { | 14118 if (_identifier == null) { |
14160 return null; | 14119 return null; |
14161 } | 14120 } |
14162 return _identifier.bestElement; | 14121 return _identifier.bestElement; |
14163 } | 14122 } |
14164 | 14123 |
14165 @override | 14124 @override |
14166 Iterable get childEntities => new ChildEntities() | 14125 Iterable get childEntities => |
14167 ..add(_prefix) | 14126 new ChildEntities()..add(_prefix)..add(period)..add(_identifier); |
14168 ..add(period) | |
14169 ..add(_identifier); | |
14170 | 14127 |
14171 @override | 14128 @override |
14172 Token get endToken => _identifier.endToken; | 14129 Token get endToken => _identifier.endToken; |
14173 | 14130 |
14174 /** | 14131 /** |
14175 * Return the identifier being prefixed. | 14132 * Return the identifier being prefixed. |
14176 */ | 14133 */ |
14177 SimpleIdentifier get identifier => _identifier; | 14134 SimpleIdentifier get identifier => _identifier; |
14178 | 14135 |
14179 /** | 14136 /** |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14300 */ | 14257 */ |
14301 MethodElement get bestElement { | 14258 MethodElement get bestElement { |
14302 MethodElement element = propagatedElement; | 14259 MethodElement element = propagatedElement; |
14303 if (element == null) { | 14260 if (element == null) { |
14304 element = staticElement; | 14261 element = staticElement; |
14305 } | 14262 } |
14306 return element; | 14263 return element; |
14307 } | 14264 } |
14308 | 14265 |
14309 @override | 14266 @override |
14310 Iterable get childEntities => new ChildEntities() | 14267 Iterable get childEntities => |
14311 ..add(operator) | 14268 new ChildEntities()..add(operator)..add(_operand); |
14312 ..add(_operand); | |
14313 | 14269 |
14314 @override | 14270 @override |
14315 Token get endToken => _operand.endToken; | 14271 Token get endToken => _operand.endToken; |
14316 | 14272 |
14317 /** | 14273 /** |
14318 * Return the expression computing the operand for the operator. | 14274 * Return the expression computing the operand for the operator. |
14319 */ | 14275 */ |
14320 Expression get operand => _operand; | 14276 Expression get operand => _operand; |
14321 | 14277 |
14322 /** | 14278 /** |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14432 | 14388 |
14433 @override | 14389 @override |
14434 Token get beginToken { | 14390 Token get beginToken { |
14435 if (_target != null) { | 14391 if (_target != null) { |
14436 return _target.beginToken; | 14392 return _target.beginToken; |
14437 } | 14393 } |
14438 return operator; | 14394 return operator; |
14439 } | 14395 } |
14440 | 14396 |
14441 @override | 14397 @override |
14442 Iterable get childEntities => new ChildEntities() | 14398 Iterable get childEntities => |
14443 ..add(_target) | 14399 new ChildEntities()..add(_target)..add(operator)..add(_propertyName); |
14444 ..add(operator) | |
14445 ..add(_propertyName); | |
14446 | 14400 |
14447 @override | 14401 @override |
14448 Token get endToken => _propertyName.endToken; | 14402 Token get endToken => _propertyName.endToken; |
14449 | 14403 |
14450 @override | 14404 @override |
14451 bool get isAssignable => true; | 14405 bool get isAssignable => true; |
14452 | 14406 |
14453 /** | 14407 /** |
14454 * Return `true` if this expression is cascaded. If it is, then the target of | 14408 * Return `true` if this expression is cascaded. If it is, then the target of |
14455 * this expression is not stored locally but is stored in the nearest ancestor | 14409 * 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... |
15361 * if no explicit value was provided. | 15315 * if no explicit value was provided. |
15362 */ | 15316 */ |
15363 ReturnStatement(this.returnKeyword, Expression expression, this.semicolon) { | 15317 ReturnStatement(this.returnKeyword, Expression expression, this.semicolon) { |
15364 _expression = _becomeParentOf(expression); | 15318 _expression = _becomeParentOf(expression); |
15365 } | 15319 } |
15366 | 15320 |
15367 @override | 15321 @override |
15368 Token get beginToken => returnKeyword; | 15322 Token get beginToken => returnKeyword; |
15369 | 15323 |
15370 @override | 15324 @override |
15371 Iterable get childEntities => new ChildEntities() | 15325 Iterable get childEntities => |
15372 ..add(returnKeyword) | 15326 new ChildEntities()..add(returnKeyword)..add(_expression)..add(semicolon); |
15373 ..add(_expression) | |
15374 ..add(semicolon); | |
15375 | 15327 |
15376 @override | 15328 @override |
15377 Token get endToken => semicolon; | 15329 Token get endToken => semicolon; |
15378 | 15330 |
15379 /** | 15331 /** |
15380 * Return the expression computing the value to be returned, or `null` if no | 15332 * Return the expression computing the value to be returned, or `null` if no |
15381 * explicit value was provided. | 15333 * explicit value was provided. |
15382 */ | 15334 */ |
15383 Expression get expression => _expression; | 15335 Expression get expression => _expression; |
15384 | 15336 |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16048 return metadata.beginToken; | 16000 return metadata.beginToken; |
16049 } else if (keyword != null) { | 16001 } else if (keyword != null) { |
16050 return keyword; | 16002 return keyword; |
16051 } else if (_type != null) { | 16003 } else if (_type != null) { |
16052 return _type.beginToken; | 16004 return _type.beginToken; |
16053 } | 16005 } |
16054 return identifier.beginToken; | 16006 return identifier.beginToken; |
16055 } | 16007 } |
16056 | 16008 |
16057 @override | 16009 @override |
16058 Iterable get childEntities => super._childEntities | 16010 Iterable get childEntities => |
16059 ..add(keyword) | 16011 super._childEntities..add(keyword)..add(_type)..add(identifier); |
16060 ..add(_type) | |
16061 ..add(identifier); | |
16062 | 16012 |
16063 @override | 16013 @override |
16064 Token get endToken => identifier.endToken; | 16014 Token get endToken => identifier.endToken; |
16065 | 16015 |
16066 @override | 16016 @override |
16067 bool get isConst => (keyword is KeywordToken) && | 16017 bool get isConst => (keyword is KeywordToken) && |
16068 (keyword as KeywordToken).keyword == Keyword.CONST; | 16018 (keyword as KeywordToken).keyword == Keyword.CONST; |
16069 | 16019 |
16070 @override | 16020 @override |
16071 bool get isFinal => (keyword is KeywordToken) && | 16021 bool get isFinal => (keyword is KeywordToken) && |
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17329 * Initialize a newly created throw expression. | 17279 * Initialize a newly created throw expression. |
17330 */ | 17280 */ |
17331 ThrowExpression(this.throwKeyword, Expression expression) { | 17281 ThrowExpression(this.throwKeyword, Expression expression) { |
17332 _expression = _becomeParentOf(expression); | 17282 _expression = _becomeParentOf(expression); |
17333 } | 17283 } |
17334 | 17284 |
17335 @override | 17285 @override |
17336 Token get beginToken => throwKeyword; | 17286 Token get beginToken => throwKeyword; |
17337 | 17287 |
17338 @override | 17288 @override |
17339 Iterable get childEntities => new ChildEntities() | 17289 Iterable get childEntities => |
17340 ..add(throwKeyword) | 17290 new ChildEntities()..add(throwKeyword)..add(_expression); |
17341 ..add(_expression); | |
17342 | 17291 |
17343 @override | 17292 @override |
17344 Token get endToken { | 17293 Token get endToken { |
17345 if (_expression != null) { | 17294 if (_expression != null) { |
17346 return _expression.endToken; | 17295 return _expression.endToken; |
17347 } | 17296 } |
17348 return throwKeyword; | 17297 return throwKeyword; |
17349 } | 17298 } |
17350 | 17299 |
17351 /** | 17300 /** |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17410 * of the [comment] and [metadata] can be `null` if the variable does not have | 17359 * of the [comment] and [metadata] can be `null` if the variable does not have |
17411 * the corresponding attribute. | 17360 * the corresponding attribute. |
17412 */ | 17361 */ |
17413 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata, | 17362 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata, |
17414 VariableDeclarationList variableList, this.semicolon) | 17363 VariableDeclarationList variableList, this.semicolon) |
17415 : super(comment, metadata) { | 17364 : super(comment, metadata) { |
17416 _variableList = _becomeParentOf(variableList); | 17365 _variableList = _becomeParentOf(variableList); |
17417 } | 17366 } |
17418 | 17367 |
17419 @override | 17368 @override |
17420 Iterable get childEntities => super._childEntities | 17369 Iterable get childEntities => |
17421 ..add(_variableList) | 17370 super._childEntities..add(_variableList)..add(semicolon); |
17422 ..add(semicolon); | |
17423 | 17371 |
17424 @override | 17372 @override |
17425 Element get element => null; | 17373 Element get element => null; |
17426 | 17374 |
17427 @override | 17375 @override |
17428 Token get endToken => semicolon; | 17376 Token get endToken => semicolon; |
17429 | 17377 |
17430 @override | 17378 @override |
17431 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; | 17379 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; |
17432 | 17380 |
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18824 TypeArgumentList get typeArguments => _typeArguments; | 18772 TypeArgumentList get typeArguments => _typeArguments; |
18825 | 18773 |
18826 /** | 18774 /** |
18827 * Set the type argument associated with this literal to the given | 18775 * Set the type argument associated with this literal to the given |
18828 * [typeArguments]. | 18776 * [typeArguments]. |
18829 */ | 18777 */ |
18830 void set typeArguments(TypeArgumentList typeArguments) { | 18778 void set typeArguments(TypeArgumentList typeArguments) { |
18831 _typeArguments = _becomeParentOf(typeArguments); | 18779 _typeArguments = _becomeParentOf(typeArguments); |
18832 } | 18780 } |
18833 | 18781 |
18834 ChildEntities get _childEntities => new ChildEntities() | 18782 ChildEntities get _childEntities => |
18835 ..add(constKeyword) | 18783 new ChildEntities()..add(constKeyword)..add(_typeArguments); |
18836 ..add(_typeArguments); | |
18837 | 18784 |
18838 @override | 18785 @override |
18839 void visitChildren(AstVisitor visitor) { | 18786 void visitChildren(AstVisitor visitor) { |
18840 _safelyVisitChild(_typeArguments, visitor); | 18787 _safelyVisitChild(_typeArguments, visitor); |
18841 } | 18788 } |
18842 } | 18789 } |
18843 | 18790 |
18844 /** | 18791 /** |
18845 * The name of a type, which can optionally include type arguments. | 18792 * The name of a type, which can optionally include type arguments. |
18846 * | 18793 * |
(...skipping 23 matching lines...) Expand all Loading... |
18870 */ | 18817 */ |
18871 TypeName(Identifier name, TypeArgumentList typeArguments) { | 18818 TypeName(Identifier name, TypeArgumentList typeArguments) { |
18872 _name = _becomeParentOf(name); | 18819 _name = _becomeParentOf(name); |
18873 _typeArguments = _becomeParentOf(typeArguments); | 18820 _typeArguments = _becomeParentOf(typeArguments); |
18874 } | 18821 } |
18875 | 18822 |
18876 @override | 18823 @override |
18877 Token get beginToken => _name.beginToken; | 18824 Token get beginToken => _name.beginToken; |
18878 | 18825 |
18879 @override | 18826 @override |
18880 Iterable get childEntities => new ChildEntities() | 18827 Iterable get childEntities => |
18881 ..add(_name) | 18828 new ChildEntities()..add(_name)..add(_typeArguments); |
18882 ..add(_typeArguments); | |
18883 | 18829 |
18884 @override | 18830 @override |
18885 Token get endToken { | 18831 Token get endToken { |
18886 if (_typeArguments != null) { | 18832 if (_typeArguments != null) { |
18887 return _typeArguments.endToken; | 18833 return _typeArguments.endToken; |
18888 } | 18834 } |
18889 return _name.endToken; | 18835 return _name.endToken; |
18890 } | 18836 } |
18891 | 18837 |
18892 /** | 18838 /** |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18987 | 18933 |
18988 /** | 18934 /** |
18989 * Set the name of the upper bound for legal arguments to the given | 18935 * Set the name of the upper bound for legal arguments to the given |
18990 * [typeName]. | 18936 * [typeName]. |
18991 */ | 18937 */ |
18992 void set bound(TypeName typeName) { | 18938 void set bound(TypeName typeName) { |
18993 _bound = _becomeParentOf(typeName); | 18939 _bound = _becomeParentOf(typeName); |
18994 } | 18940 } |
18995 | 18941 |
18996 @override | 18942 @override |
18997 Iterable get childEntities => super._childEntities | 18943 Iterable get childEntities => |
18998 ..add(_name) | 18944 super._childEntities..add(_name)..add(extendsKeyword)..add(_bound); |
18999 ..add(extendsKeyword) | |
19000 ..add(_bound); | |
19001 | 18945 |
19002 @override | 18946 @override |
19003 TypeParameterElement get element => | 18947 TypeParameterElement get element => |
19004 _name != null ? (_name.staticElement as TypeParameterElement) : null; | 18948 _name != null ? (_name.staticElement as TypeParameterElement) : null; |
19005 | 18949 |
19006 @override | 18950 @override |
19007 Token get endToken { | 18951 Token get endToken { |
19008 if (_bound == null) { | 18952 if (_bound == null) { |
19009 return _name.endToken; | 18953 return _name.endToken; |
19010 } | 18954 } |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19610 * [initializer] can be `null` if there is no initializer. | 19554 * [initializer] can be `null` if there is no initializer. |
19611 */ | 19555 */ |
19612 VariableDeclaration( | 19556 VariableDeclaration( |
19613 SimpleIdentifier name, this.equals, Expression initializer) | 19557 SimpleIdentifier name, this.equals, Expression initializer) |
19614 : super(null, null) { | 19558 : super(null, null) { |
19615 _name = _becomeParentOf(name); | 19559 _name = _becomeParentOf(name); |
19616 _initializer = _becomeParentOf(initializer); | 19560 _initializer = _becomeParentOf(initializer); |
19617 } | 19561 } |
19618 | 19562 |
19619 @override | 19563 @override |
19620 Iterable get childEntities => super._childEntities | 19564 Iterable get childEntities => |
19621 ..add(_name) | 19565 super._childEntities..add(_name)..add(equals)..add(_initializer); |
19622 ..add(equals) | |
19623 ..add(_initializer); | |
19624 | 19566 |
19625 /** | 19567 /** |
19626 * This overridden implementation of getDocumentationComment() looks in the | 19568 * This overridden implementation of getDocumentationComment() looks in the |
19627 * grandparent node for dartdoc comments if no documentation is specifically | 19569 * grandparent node for dartdoc comments if no documentation is specifically |
19628 * available on the node. | 19570 * available on the node. |
19629 */ | 19571 */ |
19630 @override | 19572 @override |
19631 Comment get documentationComment { | 19573 Comment get documentationComment { |
19632 Comment comment = super.documentationComment; | 19574 Comment comment = super.documentationComment; |
19633 if (comment == null) { | 19575 if (comment == null) { |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19843 */ | 19785 */ |
19844 VariableDeclarationStatement( | 19786 VariableDeclarationStatement( |
19845 VariableDeclarationList variableList, this.semicolon) { | 19787 VariableDeclarationList variableList, this.semicolon) { |
19846 _variableList = _becomeParentOf(variableList); | 19788 _variableList = _becomeParentOf(variableList); |
19847 } | 19789 } |
19848 | 19790 |
19849 @override | 19791 @override |
19850 Token get beginToken => _variableList.beginToken; | 19792 Token get beginToken => _variableList.beginToken; |
19851 | 19793 |
19852 @override | 19794 @override |
19853 Iterable get childEntities => new ChildEntities() | 19795 Iterable get childEntities => |
19854 ..add(_variableList) | 19796 new ChildEntities()..add(_variableList)..add(semicolon); |
19855 ..add(semicolon); | |
19856 | 19797 |
19857 @override | 19798 @override |
19858 Token get endToken => semicolon; | 19799 Token get endToken => semicolon; |
19859 | 19800 |
19860 /** | 19801 /** |
19861 * Return the variables being declared. | 19802 * Return the variables being declared. |
19862 */ | 19803 */ |
19863 VariableDeclarationList get variables => _variableList; | 19804 VariableDeclarationList get variables => _variableList; |
19864 | 19805 |
19865 /** | 19806 /** |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20115 } | 20056 } |
20116 | 20057 |
20117 @override | 20058 @override |
20118 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); | 20059 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); |
20119 | 20060 |
20120 @override | 20061 @override |
20121 void visitChildren(AstVisitor visitor) { | 20062 void visitChildren(AstVisitor visitor) { |
20122 _safelyVisitChild(_expression, visitor); | 20063 _safelyVisitChild(_expression, visitor); |
20123 } | 20064 } |
20124 } | 20065 } |
OLD | NEW |