Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: pkg/analyzer/lib/src/generated/ast.dart

Issue 1117183002: Ignore synthetic tokens when search for AstNode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 */ 588 */
589 AsExpression(Expression expression, this.asOperator, TypeName type) { 589 AsExpression(Expression expression, this.asOperator, TypeName type) {
590 _expression = _becomeParentOf(expression); 590 _expression = _becomeParentOf(expression);
591 _type = _becomeParentOf(type); 591 _type = _becomeParentOf(type);
592 } 592 }
593 593
594 @override 594 @override
595 Token get beginToken => _expression.beginToken; 595 Token get beginToken => _expression.beginToken;
596 596
597 @override 597 @override
598 Iterable get childEntities => new ChildEntities() 598 Iterable get childEntities =>
599 ..add(_expression) 599 new ChildEntities()..add(_expression)..add(asOperator)..add(_type);
600 ..add(asOperator)
601 ..add(_type);
602 600
603 @override 601 @override
604 Token get endToken => _type.endToken; 602 Token get endToken => _type.endToken;
605 603
606 /** 604 /**
607 * Return the expression used to compute the value being cast. 605 * Return the expression used to compute the value being cast.
608 */ 606 */
609 Expression get expression => _expression; 607 Expression get expression => _expression;
610 608
611 /** 609 /**
(...skipping 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after
3186 3184
3187 @override 3185 @override
3188 Token get beginToken { 3186 Token get beginToken {
3189 if (awaitKeyword != null) { 3187 if (awaitKeyword != null) {
3190 return awaitKeyword; 3188 return awaitKeyword;
3191 } 3189 }
3192 return _expression.beginToken; 3190 return _expression.beginToken;
3193 } 3191 }
3194 3192
3195 @override 3193 @override
3196 Iterable get childEntities => new ChildEntities() 3194 Iterable get childEntities =>
3197 ..add(awaitKeyword) 3195 new ChildEntities()..add(awaitKeyword)..add(_expression);
3198 ..add(_expression);
3199 3196
3200 @override 3197 @override
3201 Token get endToken => _expression.endToken; 3198 Token get endToken => _expression.endToken;
3202 3199
3203 /** 3200 /**
3204 * Return the expression whose value is being waited on. 3201 * Return the expression whose value is being waited on.
3205 */ 3202 */
3206 Expression get expression => _expression; 3203 Expression get expression => _expression;
3207 3204
3208 /** 3205 /**
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
3282 */ 3279 */
3283 MethodElement get bestElement { 3280 MethodElement get bestElement {
3284 MethodElement element = propagatedElement; 3281 MethodElement element = propagatedElement;
3285 if (element == null) { 3282 if (element == null) {
3286 element = staticElement; 3283 element = staticElement;
3287 } 3284 }
3288 return element; 3285 return element;
3289 } 3286 }
3290 3287
3291 @override 3288 @override
3292 Iterable get childEntities => new ChildEntities() 3289 Iterable get childEntities =>
3293 ..add(_leftOperand) 3290 new ChildEntities()..add(_leftOperand)..add(operator)..add(_rightOperand);
3294 ..add(operator)
3295 ..add(_rightOperand);
3296 3291
3297 @override 3292 @override
3298 Token get endToken => _rightOperand.endToken; 3293 Token get endToken => _rightOperand.endToken;
3299 3294
3300 /** 3295 /**
3301 * Return the expression used to compute the left operand. 3296 * Return the expression used to compute the left operand.
3302 */ 3297 */
3303 Expression get leftOperand => _leftOperand; 3298 Expression get leftOperand => _leftOperand;
3304 3299
3305 /** 3300 /**
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
3490 Block get block => _block; 3485 Block get block => _block;
3491 3486
3492 /** 3487 /**
3493 * Set the block representing the body of the function to the given [block]. 3488 * Set the block representing the body of the function to the given [block].
3494 */ 3489 */
3495 void set block(Block block) { 3490 void set block(Block block) {
3496 _block = _becomeParentOf(block); 3491 _block = _becomeParentOf(block);
3497 } 3492 }
3498 3493
3499 @override 3494 @override
3500 Iterable get childEntities => new ChildEntities() 3495 Iterable get childEntities =>
3501 ..add(keyword) 3496 new ChildEntities()..add(keyword)..add(star)..add(_block);
3502 ..add(star)
3503 ..add(_block);
3504 3497
3505 @override 3498 @override
3506 Token get endToken => _block.endToken; 3499 Token get endToken => _block.endToken;
3507 3500
3508 @override 3501 @override
3509 bool get isAsynchronous => keyword != null && keyword.lexeme == Parser.ASYNC; 3502 bool get isAsynchronous => keyword != null && keyword.lexeme == Parser.ASYNC;
3510 3503
3511 @override 3504 @override
3512 bool get isGenerator => star != null; 3505 bool get isGenerator => star != null;
3513 3506
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
3659 * there is no label associated with the statement. 3652 * there is no label associated with the statement.
3660 */ 3653 */
3661 BreakStatement(this.breakKeyword, SimpleIdentifier label, this.semicolon) { 3654 BreakStatement(this.breakKeyword, SimpleIdentifier label, this.semicolon) {
3662 _label = _becomeParentOf(label); 3655 _label = _becomeParentOf(label);
3663 } 3656 }
3664 3657
3665 @override 3658 @override
3666 Token get beginToken => breakKeyword; 3659 Token get beginToken => breakKeyword;
3667 3660
3668 @override 3661 @override
3669 Iterable get childEntities => new ChildEntities() 3662 Iterable get childEntities =>
3670 ..add(breakKeyword) 3663 new ChildEntities()..add(breakKeyword)..add(_label)..add(semicolon);
3671 ..add(_label)
3672 ..add(semicolon);
3673 3664
3674 @override 3665 @override
3675 Token get endToken => semicolon; 3666 Token get endToken => semicolon;
3676 3667
3677 /** 3668 /**
3678 * Return the token representing the 'break' keyword. 3669 * Return the token representing the 'break' keyword.
3679 */ 3670 */
3680 @deprecated // Use "this.breakKeyword" 3671 @deprecated // Use "this.breakKeyword"
3681 Token get keyword => breakKeyword; 3672 Token get keyword => breakKeyword;
3682 3673
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
4569 * can be `null` if the reference is not to a constructor. 4560 * can be `null` if the reference is not to a constructor.
4570 */ 4561 */
4571 CommentReference(this.newKeyword, Identifier identifier) { 4562 CommentReference(this.newKeyword, Identifier identifier) {
4572 _identifier = _becomeParentOf(identifier); 4563 _identifier = _becomeParentOf(identifier);
4573 } 4564 }
4574 4565
4575 @override 4566 @override
4576 Token get beginToken => _identifier.beginToken; 4567 Token get beginToken => _identifier.beginToken;
4577 4568
4578 @override 4569 @override
4579 Iterable get childEntities => new ChildEntities() 4570 Iterable get childEntities =>
4580 ..add(newKeyword) 4571 new ChildEntities()..add(newKeyword)..add(_identifier);
4581 ..add(_identifier);
4582 4572
4583 @override 4573 @override
4584 Token get endToken => _identifier.endToken; 4574 Token get endToken => _identifier.endToken;
4585 4575
4586 /** 4576 /**
4587 * Return the identifier being referenced. 4577 * Return the identifier being referenced.
4588 */ 4578 */
4589 Identifier get identifier => _identifier; 4579 Identifier get identifier => _identifier;
4590 4580
4591 /** 4581 /**
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
4712 this.endToken) { 4702 this.endToken) {
4713 _scriptTag = _becomeParentOf(scriptTag); 4703 _scriptTag = _becomeParentOf(scriptTag);
4714 _directives = new NodeList<Directive>(this, directives); 4704 _directives = new NodeList<Directive>(this, directives);
4715 _declarations = new NodeList<CompilationUnitMember>(this, declarations); 4705 _declarations = new NodeList<CompilationUnitMember>(this, declarations);
4716 } 4706 }
4717 4707
4718 @override 4708 @override
4719 Iterable get childEntities { 4709 Iterable get childEntities {
4720 ChildEntities result = new ChildEntities()..add(_scriptTag); 4710 ChildEntities result = new ChildEntities()..add(_scriptTag);
4721 if (_directivesAreBeforeDeclarations) { 4711 if (_directivesAreBeforeDeclarations) {
4722 result 4712 result..addAll(_directives)..addAll(_declarations);
4723 ..addAll(_directives)
4724 ..addAll(_declarations);
4725 } else { 4713 } else {
4726 result.addAll(sortedDirectivesAndDeclarations); 4714 result.addAll(sortedDirectivesAndDeclarations);
4727 } 4715 }
4728 return result; 4716 return result;
4729 } 4717 }
4730 4718
4731 /** 4719 /**
4732 * Return the declarations contained in this compilation unit. 4720 * Return the declarations contained in this compilation unit.
4733 */ 4721 */
4734 NodeList<CompilationUnitMember> get declarations => _declarations; 4722 NodeList<CompilationUnitMember> get declarations => _declarations;
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
5689 */ 5677 */
5690 ConstructorName(TypeName type, this.period, SimpleIdentifier name) { 5678 ConstructorName(TypeName type, this.period, SimpleIdentifier name) {
5691 _type = _becomeParentOf(type); 5679 _type = _becomeParentOf(type);
5692 _name = _becomeParentOf(name); 5680 _name = _becomeParentOf(name);
5693 } 5681 }
5694 5682
5695 @override 5683 @override
5696 Token get beginToken => _type.beginToken; 5684 Token get beginToken => _type.beginToken;
5697 5685
5698 @override 5686 @override
5699 Iterable get childEntities => new ChildEntities() 5687 Iterable get childEntities =>
5700 ..add(_type) 5688 new ChildEntities()..add(_type)..add(period)..add(_name);
5701 ..add(period)
5702 ..add(_name);
5703 5689
5704 @override 5690 @override
5705 Token get endToken { 5691 Token get endToken {
5706 if (_name != null) { 5692 if (_name != null) {
5707 return _name.endToken; 5693 return _name.endToken;
5708 } 5694 }
5709 return _type.endToken; 5695 return _type.endToken;
5710 } 5696 }
5711 5697
5712 /** 5698 /**
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
5782 */ 5768 */
5783 ContinueStatement( 5769 ContinueStatement(
5784 this.continueKeyword, SimpleIdentifier label, this.semicolon) { 5770 this.continueKeyword, SimpleIdentifier label, this.semicolon) {
5785 _label = _becomeParentOf(label); 5771 _label = _becomeParentOf(label);
5786 } 5772 }
5787 5773
5788 @override 5774 @override
5789 Token get beginToken => continueKeyword; 5775 Token get beginToken => continueKeyword;
5790 5776
5791 @override 5777 @override
5792 Iterable get childEntities => new ChildEntities() 5778 Iterable get childEntities =>
5793 ..add(continueKeyword) 5779 new ChildEntities()..add(continueKeyword)..add(_label)..add(semicolon);
5794 ..add(_label)
5795 ..add(semicolon);
5796 5780
5797 @override 5781 @override
5798 Token get endToken => semicolon; 5782 Token get endToken => semicolon;
5799 5783
5800 /** 5784 /**
5801 * Return the token for the 'continue' keyword, or `null` if there is no 5785 * Return the token for the 'continue' keyword, or `null` if there is no
5802 * 'continue' keyword. 5786 * 'continue' keyword.
5803 */ 5787 */
5804 @deprecated // Use "this.continueKeyword" 5788 @deprecated // Use "this.continueKeyword"
5805 Token get keyword => continueKeyword; 5789 Token get keyword => continueKeyword;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
5886 * given. The [type] must be `null` if the keyword is 'var'. 5870 * given. The [type] must be `null` if the keyword is 'var'.
5887 */ 5871 */
5888 DeclaredIdentifier(Comment comment, List<Annotation> metadata, this.keyword, 5872 DeclaredIdentifier(Comment comment, List<Annotation> metadata, this.keyword,
5889 TypeName type, SimpleIdentifier identifier) 5873 TypeName type, SimpleIdentifier identifier)
5890 : super(comment, metadata) { 5874 : super(comment, metadata) {
5891 _type = _becomeParentOf(type); 5875 _type = _becomeParentOf(type);
5892 _identifier = _becomeParentOf(identifier); 5876 _identifier = _becomeParentOf(identifier);
5893 } 5877 }
5894 5878
5895 @override 5879 @override
5896 Iterable get childEntities => super._childEntities 5880 Iterable get childEntities =>
5897 ..add(keyword) 5881 super._childEntities..add(keyword)..add(_type)..add(_identifier);
5898 ..add(_type)
5899 ..add(_identifier);
5900 5882
5901 @override 5883 @override
5902 LocalVariableElement get element { 5884 LocalVariableElement get element {
5903 if (_identifier == null) { 5885 if (_identifier == null) {
5904 return null; 5886 return null;
5905 } 5887 }
5906 return _identifier.staticElement as LocalVariableElement; 5888 return _identifier.staticElement as LocalVariableElement;
5907 } 5889 }
5908 5890
5909 @override 5891 @override
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
6010 DefaultFormalParameter(NormalFormalParameter parameter, this.kind, 5992 DefaultFormalParameter(NormalFormalParameter parameter, this.kind,
6011 this.separator, Expression defaultValue) { 5993 this.separator, Expression defaultValue) {
6012 _parameter = _becomeParentOf(parameter); 5994 _parameter = _becomeParentOf(parameter);
6013 _defaultValue = _becomeParentOf(defaultValue); 5995 _defaultValue = _becomeParentOf(defaultValue);
6014 } 5996 }
6015 5997
6016 @override 5998 @override
6017 Token get beginToken => _parameter.beginToken; 5999 Token get beginToken => _parameter.beginToken;
6018 6000
6019 @override 6001 @override
6020 Iterable get childEntities => new ChildEntities() 6002 Iterable get childEntities =>
6021 ..add(_parameter) 6003 new ChildEntities()..add(_parameter)..add(separator)..add(_defaultValue);
6022 ..add(separator)
6023 ..add(_defaultValue);
6024 6004
6025 /** 6005 /**
6026 * Return the expression computing the default value for the parameter, or 6006 * Return the expression computing the default value for the parameter, or
6027 * `null` if there is no default value. 6007 * `null` if there is no default value.
6028 */ 6008 */
6029 Expression get defaultValue => _defaultValue; 6009 Expression get defaultValue => _defaultValue;
6030 6010
6031 /** 6011 /**
6032 * Set the expression computing the default value for the parameter to the 6012 * Set the expression computing the default value for the parameter to the
6033 * given [expression]. 6013 * given [expression].
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
6966 * Initialize a newly created expression statement. 6946 * Initialize a newly created expression statement.
6967 */ 6947 */
6968 ExpressionStatement(Expression expression, this.semicolon) { 6948 ExpressionStatement(Expression expression, this.semicolon) {
6969 _expression = _becomeParentOf(expression); 6949 _expression = _becomeParentOf(expression);
6970 } 6950 }
6971 6951
6972 @override 6952 @override
6973 Token get beginToken => _expression.beginToken; 6953 Token get beginToken => _expression.beginToken;
6974 6954
6975 @override 6955 @override
6976 Iterable get childEntities => new ChildEntities() 6956 Iterable get childEntities =>
6977 ..add(_expression) 6957 new ChildEntities()..add(_expression)..add(semicolon);
6978 ..add(semicolon);
6979 6958
6980 @override 6959 @override
6981 Token get endToken { 6960 Token get endToken {
6982 if (semicolon != null) { 6961 if (semicolon != null) {
6983 return semicolon; 6962 return semicolon;
6984 } 6963 }
6985 return _expression.endToken; 6964 return _expression.endToken;
6986 } 6965 }
6987 6966
6988 /** 6967 /**
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
7030 * Initialize a newly created extends clause. 7009 * Initialize a newly created extends clause.
7031 */ 7010 */
7032 ExtendsClause(this.extendsKeyword, TypeName superclass) { 7011 ExtendsClause(this.extendsKeyword, TypeName superclass) {
7033 _superclass = _becomeParentOf(superclass); 7012 _superclass = _becomeParentOf(superclass);
7034 } 7013 }
7035 7014
7036 @override 7015 @override
7037 Token get beginToken => extendsKeyword; 7016 Token get beginToken => extendsKeyword;
7038 7017
7039 @override 7018 @override
7040 Iterable get childEntities => new ChildEntities() 7019 Iterable get childEntities =>
7041 ..add(extendsKeyword) 7020 new ChildEntities()..add(extendsKeyword)..add(_superclass);
7042 ..add(_superclass);
7043 7021
7044 @override 7022 @override
7045 Token get endToken => _superclass.endToken; 7023 Token get endToken => _superclass.endToken;
7046 7024
7047 /** 7025 /**
7048 * Return the token for the 'extends' keyword. 7026 * Return the token for the 'extends' keyword.
7049 */ 7027 */
7050 @deprecated // Use "this.extendsKeyword" 7028 @deprecated // Use "this.extendsKeyword"
7051 Token get keyword => extendsKeyword; 7029 Token get keyword => extendsKeyword;
7052 7030
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
7108 * corresponding attribute. The [staticKeyword] can be `null` if the field is 7086 * corresponding attribute. The [staticKeyword] can be `null` if the field is
7109 * not a static field. 7087 * not a static field.
7110 */ 7088 */
7111 FieldDeclaration(Comment comment, List<Annotation> metadata, 7089 FieldDeclaration(Comment comment, List<Annotation> metadata,
7112 this.staticKeyword, VariableDeclarationList fieldList, this.semicolon) 7090 this.staticKeyword, VariableDeclarationList fieldList, this.semicolon)
7113 : super(comment, metadata) { 7091 : super(comment, metadata) {
7114 _fieldList = _becomeParentOf(fieldList); 7092 _fieldList = _becomeParentOf(fieldList);
7115 } 7093 }
7116 7094
7117 @override 7095 @override
7118 Iterable get childEntities => super._childEntities 7096 Iterable get childEntities =>
7119 ..add(staticKeyword) 7097 super._childEntities..add(staticKeyword)..add(_fieldList)..add(semicolon);
7120 ..add(_fieldList)
7121 ..add(semicolon);
7122 7098
7123 @override 7099 @override
7124 Element get element => null; 7100 Element get element => null;
7125 7101
7126 @override 7102 @override
7127 Token get endToken => semicolon; 7103 Token get endToken => semicolon;
7128 7104
7129 /** 7105 /**
7130 * Return the fields being declared. 7106 * Return the fields being declared.
7131 */ 7107 */
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
7587 // TODO(paulberry): include commas. 7563 // TODO(paulberry): include commas.
7588 ChildEntities result = new ChildEntities()..add(leftParenthesis); 7564 ChildEntities result = new ChildEntities()..add(leftParenthesis);
7589 bool leftDelimiterNeeded = leftDelimiter != null; 7565 bool leftDelimiterNeeded = leftDelimiter != null;
7590 for (FormalParameter parameter in _parameters) { 7566 for (FormalParameter parameter in _parameters) {
7591 if (leftDelimiterNeeded && leftDelimiter.offset < parameter.offset) { 7567 if (leftDelimiterNeeded && leftDelimiter.offset < parameter.offset) {
7592 result.add(leftDelimiter); 7568 result.add(leftDelimiter);
7593 leftDelimiterNeeded = false; 7569 leftDelimiterNeeded = false;
7594 } 7570 }
7595 result.add(parameter); 7571 result.add(parameter);
7596 } 7572 }
7597 return result 7573 return result..add(rightDelimiter)..add(rightParenthesis);
7598 ..add(rightDelimiter)
7599 ..add(rightParenthesis);
7600 } 7574 }
7601 7575
7602 @override 7576 @override
7603 Token get endToken => rightParenthesis; 7577 Token get endToken => rightParenthesis;
7604 7578
7605 /** 7579 /**
7606 * Return a list containing the elements representing the parameters in this 7580 * Return a list containing the elements representing the parameters in this
7607 * list. The list will contain `null`s if the parameters in this list have not 7581 * list. The list will contain `null`s if the parameters in this list have not
7608 * been resolved. 7582 * been resolved.
7609 */ 7583 */
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
8066 FunctionBody get body => _body; 8040 FunctionBody get body => _body;
8067 8041
8068 /** 8042 /**
8069 * Set the body of the function to the given [functionBody]. 8043 * Set the body of the function to the given [functionBody].
8070 */ 8044 */
8071 void set body(FunctionBody functionBody) { 8045 void set body(FunctionBody functionBody) {
8072 _body = _becomeParentOf(functionBody); 8046 _body = _becomeParentOf(functionBody);
8073 } 8047 }
8074 8048
8075 @override 8049 @override
8076 Iterable get childEntities => new ChildEntities() 8050 Iterable get childEntities =>
8077 ..add(_parameters) 8051 new ChildEntities()..add(_parameters)..add(_body);
8078 ..add(_body);
8079 8052
8080 @override 8053 @override
8081 Token get endToken { 8054 Token get endToken {
8082 if (_body != null) { 8055 if (_body != null) {
8083 return _body.endToken; 8056 return _body.endToken;
8084 } else if (_parameters != null) { 8057 } else if (_parameters != null) {
8085 return _parameters.endToken; 8058 return _parameters.endToken;
8086 } 8059 }
8087 // This should never be reached because external functions must be named, 8060 // This should never be reached because external functions must be named,
8088 // hence either the body or the name should be non-null. 8061 // hence either the body or the name should be non-null.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
8181 */ 8154 */
8182 ExecutableElement get bestElement { 8155 ExecutableElement get bestElement {
8183 ExecutableElement element = propagatedElement; 8156 ExecutableElement element = propagatedElement;
8184 if (element == null) { 8157 if (element == null) {
8185 element = staticElement; 8158 element = staticElement;
8186 } 8159 }
8187 return element; 8160 return element;
8188 } 8161 }
8189 8162
8190 @override 8163 @override
8191 Iterable get childEntities => new ChildEntities() 8164 Iterable get childEntities =>
8192 ..add(_function) 8165 new ChildEntities()..add(_function)..add(_argumentList);
8193 ..add(_argumentList);
8194 8166
8195 @override 8167 @override
8196 Token get endToken => _argumentList.endToken; 8168 Token get endToken => _argumentList.endToken;
8197 8169
8198 /** 8170 /**
8199 * Return the expression producing the function being invoked. 8171 * Return the expression producing the function being invoked.
8200 */ 8172 */
8201 Expression get function => _function; 8173 Expression get function => _function;
8202 8174
8203 /** 8175 /**
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
8366 8338
8367 @override 8339 @override
8368 Token get beginToken { 8340 Token get beginToken {
8369 if (_returnType != null) { 8341 if (_returnType != null) {
8370 return _returnType.beginToken; 8342 return _returnType.beginToken;
8371 } 8343 }
8372 return identifier.beginToken; 8344 return identifier.beginToken;
8373 } 8345 }
8374 8346
8375 @override 8347 @override
8376 Iterable get childEntities => super._childEntities 8348 Iterable get childEntities =>
8377 ..add(_returnType) 8349 super._childEntities..add(_returnType)..add(identifier)..add(parameters);
8378 ..add(identifier)
8379 ..add(parameters);
8380 8350
8381 @override 8351 @override
8382 Token get endToken => _parameters.endToken; 8352 Token get endToken => _parameters.endToken;
8383 8353
8384 @override 8354 @override
8385 bool get isConst => false; 8355 bool get isConst => false;
8386 8356
8387 @override 8357 @override
8388 bool get isFinal => false; 8358 bool get isFinal => false;
8389 8359
(...skipping 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after
10939 * Initialize a newly created label. 10909 * Initialize a newly created label.
10940 */ 10910 */
10941 Label(SimpleIdentifier label, this.colon) { 10911 Label(SimpleIdentifier label, this.colon) {
10942 _label = _becomeParentOf(label); 10912 _label = _becomeParentOf(label);
10943 } 10913 }
10944 10914
10945 @override 10915 @override
10946 Token get beginToken => _label.beginToken; 10916 Token get beginToken => _label.beginToken;
10947 10917
10948 @override 10918 @override
10949 Iterable get childEntities => new ChildEntities() 10919 Iterable get childEntities => new ChildEntities()..add(_label)..add(colon);
10950 ..add(_label)
10951 ..add(colon);
10952 10920
10953 @override 10921 @override
10954 Token get endToken => colon; 10922 Token get endToken => colon;
10955 10923
10956 /** 10924 /**
10957 * Return the label being associated with the statement. 10925 * Return the label being associated with the statement.
10958 */ 10926 */
10959 SimpleIdentifier get label => _label; 10927 SimpleIdentifier get label => _label;
10960 10928
10961 /** 10929 /**
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
11073 * [comment] and [metadata] can be `null` if the directive does not have the 11041 * [comment] and [metadata] can be `null` if the directive does not have the
11074 * corresponding attribute. 11042 * corresponding attribute.
11075 */ 11043 */
11076 LibraryDirective(Comment comment, List<Annotation> metadata, 11044 LibraryDirective(Comment comment, List<Annotation> metadata,
11077 this.libraryKeyword, LibraryIdentifier name, this.semicolon) 11045 this.libraryKeyword, LibraryIdentifier name, this.semicolon)
11078 : super(comment, metadata) { 11046 : super(comment, metadata) {
11079 _name = _becomeParentOf(name); 11047 _name = _becomeParentOf(name);
11080 } 11048 }
11081 11049
11082 @override 11050 @override
11083 Iterable get childEntities => super._childEntities 11051 Iterable get childEntities =>
11084 ..add(libraryKeyword) 11052 super._childEntities..add(libraryKeyword)..add(_name)..add(semicolon);
11085 ..add(_name)
11086 ..add(semicolon);
11087 11053
11088 @override 11054 @override
11089 Token get endToken => semicolon; 11055 Token get endToken => semicolon;
11090 11056
11091 @override 11057 @override
11092 Token get firstTokenAfterCommentAndMetadata => libraryKeyword; 11058 Token get firstTokenAfterCommentAndMetadata => libraryKeyword;
11093 11059
11094 @override 11060 @override
11095 Token get keyword => libraryKeyword; 11061 Token get keyword => libraryKeyword;
11096 11062
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
11392 */ 11358 */
11393 MapLiteralEntry(Expression key, this.separator, Expression value) { 11359 MapLiteralEntry(Expression key, this.separator, Expression value) {
11394 _key = _becomeParentOf(key); 11360 _key = _becomeParentOf(key);
11395 _value = _becomeParentOf(value); 11361 _value = _becomeParentOf(value);
11396 } 11362 }
11397 11363
11398 @override 11364 @override
11399 Token get beginToken => _key.beginToken; 11365 Token get beginToken => _key.beginToken;
11400 11366
11401 @override 11367 @override
11402 Iterable get childEntities => new ChildEntities() 11368 Iterable get childEntities =>
11403 ..add(_key) 11369 new ChildEntities()..add(_key)..add(separator)..add(_value);
11404 ..add(separator)
11405 ..add(_value);
11406 11370
11407 @override 11371 @override
11408 Token get endToken => _value.endToken; 11372 Token get endToken => _value.endToken;
11409 11373
11410 /** 11374 /**
11411 * Return the expression computing the key with which the value will be 11375 * Return the expression computing the key with which the value will be
11412 * associated. 11376 * associated.
11413 */ 11377 */
11414 Expression get key => _key; 11378 Expression get key => _key;
11415 11379
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
11891 */ 11855 */
11892 NamedExpression(Label name, Expression expression) { 11856 NamedExpression(Label name, Expression expression) {
11893 _name = _becomeParentOf(name); 11857 _name = _becomeParentOf(name);
11894 _expression = _becomeParentOf(expression); 11858 _expression = _becomeParentOf(expression);
11895 } 11859 }
11896 11860
11897 @override 11861 @override
11898 Token get beginToken => _name.beginToken; 11862 Token get beginToken => _name.beginToken;
11899 11863
11900 @override 11864 @override
11901 Iterable get childEntities => new ChildEntities() 11865 Iterable get childEntities =>
11902 ..add(_name) 11866 new ChildEntities()..add(_name)..add(_expression);
11903 ..add(_expression);
11904 11867
11905 /** 11868 /**
11906 * Return the element representing the parameter being named by this 11869 * Return the element representing the parameter being named by this
11907 * expression, or `null` if the AST structure has not been resolved or if 11870 * expression, or `null` if the AST structure has not been resolved or if
11908 * there is no parameter with the same name as this expression. 11871 * there is no parameter with the same name as this expression.
11909 */ 11872 */
11910 ParameterElement get element { 11873 ParameterElement get element {
11911 Element element = _name.label.staticElement; 11874 Element element = _name.label.staticElement;
11912 if (element is ParameterElement) { 11875 if (element is ParameterElement) {
11913 return element; 11876 return element;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
12027 * Initialize a newly created native clause. 11990 * Initialize a newly created native clause.
12028 */ 11991 */
12029 NativeClause(this.nativeKeyword, StringLiteral name) { 11992 NativeClause(this.nativeKeyword, StringLiteral name) {
12030 _name = _becomeParentOf(name); 11993 _name = _becomeParentOf(name);
12031 } 11994 }
12032 11995
12033 @override 11996 @override
12034 Token get beginToken => nativeKeyword; 11997 Token get beginToken => nativeKeyword;
12035 11998
12036 @override 11999 @override
12037 Iterable get childEntities => new ChildEntities() 12000 Iterable get childEntities =>
12038 ..add(nativeKeyword) 12001 new ChildEntities()..add(nativeKeyword)..add(_name);
12039 ..add(_name);
12040 12002
12041 @override 12003 @override
12042 Token get endToken => _name.endToken; 12004 Token get endToken => _name.endToken;
12043 12005
12044 /** 12006 /**
12045 * Get the token representing the 'native' keyword. 12007 * Get the token representing the 'native' keyword.
12046 */ 12008 */
12047 @deprecated // Use "this.nativeKeyword" 12009 @deprecated // Use "this.nativeKeyword"
12048 Token get keyword => nativeKeyword; 12010 Token get keyword => nativeKeyword;
12049 12011
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
12351 AnalysisEngine.instance.logger.logInformation( 12313 AnalysisEngine.instance.logger.logInformation(
12352 "Unable to locate element at offset ($_startOffset - $_endOffset)", 12314 "Unable to locate element at offset ($_startOffset - $_endOffset)",
12353 new CaughtException(exception, stackTrace)); 12315 new CaughtException(exception, stackTrace));
12354 return null; 12316 return null;
12355 } 12317 }
12356 return _foundNode; 12318 return _foundNode;
12357 } 12319 }
12358 12320
12359 @override 12321 @override
12360 Object visitNode(AstNode node) { 12322 Object visitNode(AstNode node) {
12323 Token beginToken = node.beginToken;
12324 Token endToken = node.endToken;
12325 // Don't include synthetic tokens.
12326 while (endToken != beginToken) {
12327 if (endToken.type == TokenType.EOF || !endToken.isSynthetic) {
12328 break;
12329 }
12330 endToken = endToken.previous;
12331 }
12332 int end = endToken.end;
12361 int start = node.offset; 12333 int start = node.offset;
12362 int end = start + node.length;
12363 if (end < _startOffset) { 12334 if (end < _startOffset) {
12364 return null; 12335 return null;
12365 } 12336 }
12366 if (start > _endOffset) { 12337 if (start > _endOffset) {
12367 return null; 12338 return null;
12368 } 12339 }
12369 try { 12340 try {
12370 node.visitChildren(this); 12341 node.visitChildren(this);
12371 } on NodeLocator_NodeFoundException { 12342 } on NodeLocator_NodeFoundException {
12372 rethrow; 12343 rethrow;
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
13810 /** 13781 /**
13811 * Initialize a newly created part directive. Either or both of the [comment] 13782 * Initialize a newly created part directive. Either or both of the [comment]
13812 * and [metadata] can be `null` if the directive does not have the 13783 * and [metadata] can be `null` if the directive does not have the
13813 * corresponding attribute. 13784 * corresponding attribute.
13814 */ 13785 */
13815 PartDirective(Comment comment, List<Annotation> metadata, this.partKeyword, 13786 PartDirective(Comment comment, List<Annotation> metadata, this.partKeyword,
13816 StringLiteral partUri, this.semicolon) 13787 StringLiteral partUri, this.semicolon)
13817 : super(comment, metadata, partUri); 13788 : super(comment, metadata, partUri);
13818 13789
13819 @override 13790 @override
13820 Iterable get childEntities => super._childEntities 13791 Iterable get childEntities =>
13821 ..add(partKeyword) 13792 super._childEntities..add(partKeyword)..add(_uri)..add(semicolon);
13822 ..add(_uri)
13823 ..add(semicolon);
13824 13793
13825 @override 13794 @override
13826 Token get endToken => semicolon; 13795 Token get endToken => semicolon;
13827 13796
13828 @override 13797 @override
13829 Token get firstTokenAfterCommentAndMetadata => partKeyword; 13798 Token get firstTokenAfterCommentAndMetadata => partKeyword;
13830 13799
13831 @override 13800 @override
13832 Token get keyword => partKeyword; 13801 Token get keyword => partKeyword;
13833 13802
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
14009 */ 13978 */
14010 MethodElement get bestElement { 13979 MethodElement get bestElement {
14011 MethodElement element = propagatedElement; 13980 MethodElement element = propagatedElement;
14012 if (element == null) { 13981 if (element == null) {
14013 element = staticElement; 13982 element = staticElement;
14014 } 13983 }
14015 return element; 13984 return element;
14016 } 13985 }
14017 13986
14018 @override 13987 @override
14019 Iterable get childEntities => new ChildEntities() 13988 Iterable get childEntities =>
14020 ..add(_operand) 13989 new ChildEntities()..add(_operand)..add(operator);
14021 ..add(operator);
14022 13990
14023 @override 13991 @override
14024 Token get endToken => operator; 13992 Token get endToken => operator;
14025 13993
14026 /** 13994 /**
14027 * Return the expression computing the operand for the operator. 13995 * Return the expression computing the operand for the operator.
14028 */ 13996 */
14029 Expression get operand => _operand; 13997 Expression get operand => _operand;
14030 13998
14031 /** 13999 /**
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
14141 14109
14142 @override 14110 @override
14143 Element get bestElement { 14111 Element get bestElement {
14144 if (_identifier == null) { 14112 if (_identifier == null) {
14145 return null; 14113 return null;
14146 } 14114 }
14147 return _identifier.bestElement; 14115 return _identifier.bestElement;
14148 } 14116 }
14149 14117
14150 @override 14118 @override
14151 Iterable get childEntities => new ChildEntities() 14119 Iterable get childEntities =>
14152 ..add(_prefix) 14120 new ChildEntities()..add(_prefix)..add(period)..add(_identifier);
14153 ..add(period)
14154 ..add(_identifier);
14155 14121
14156 @override 14122 @override
14157 Token get endToken => _identifier.endToken; 14123 Token get endToken => _identifier.endToken;
14158 14124
14159 /** 14125 /**
14160 * Return the identifier being prefixed. 14126 * Return the identifier being prefixed.
14161 */ 14127 */
14162 SimpleIdentifier get identifier => _identifier; 14128 SimpleIdentifier get identifier => _identifier;
14163 14129
14164 /** 14130 /**
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
14285 */ 14251 */
14286 MethodElement get bestElement { 14252 MethodElement get bestElement {
14287 MethodElement element = propagatedElement; 14253 MethodElement element = propagatedElement;
14288 if (element == null) { 14254 if (element == null) {
14289 element = staticElement; 14255 element = staticElement;
14290 } 14256 }
14291 return element; 14257 return element;
14292 } 14258 }
14293 14259
14294 @override 14260 @override
14295 Iterable get childEntities => new ChildEntities() 14261 Iterable get childEntities =>
14296 ..add(operator) 14262 new ChildEntities()..add(operator)..add(_operand);
14297 ..add(_operand);
14298 14263
14299 @override 14264 @override
14300 Token get endToken => _operand.endToken; 14265 Token get endToken => _operand.endToken;
14301 14266
14302 /** 14267 /**
14303 * Return the expression computing the operand for the operator. 14268 * Return the expression computing the operand for the operator.
14304 */ 14269 */
14305 Expression get operand => _operand; 14270 Expression get operand => _operand;
14306 14271
14307 /** 14272 /**
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
14417 14382
14418 @override 14383 @override
14419 Token get beginToken { 14384 Token get beginToken {
14420 if (_target != null) { 14385 if (_target != null) {
14421 return _target.beginToken; 14386 return _target.beginToken;
14422 } 14387 }
14423 return operator; 14388 return operator;
14424 } 14389 }
14425 14390
14426 @override 14391 @override
14427 Iterable get childEntities => new ChildEntities() 14392 Iterable get childEntities =>
14428 ..add(_target) 14393 new ChildEntities()..add(_target)..add(operator)..add(_propertyName);
14429 ..add(operator)
14430 ..add(_propertyName);
14431 14394
14432 @override 14395 @override
14433 Token get endToken => _propertyName.endToken; 14396 Token get endToken => _propertyName.endToken;
14434 14397
14435 @override 14398 @override
14436 bool get isAssignable => true; 14399 bool get isAssignable => true;
14437 14400
14438 /** 14401 /**
14439 * Return `true` if this expression is cascaded. If it is, then the target of 14402 * Return `true` if this expression is cascaded. If it is, then the target of
14440 * this expression is not stored locally but is stored in the nearest ancestor 14403 * 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
15346 * if no explicit value was provided. 15309 * if no explicit value was provided.
15347 */ 15310 */
15348 ReturnStatement(this.returnKeyword, Expression expression, this.semicolon) { 15311 ReturnStatement(this.returnKeyword, Expression expression, this.semicolon) {
15349 _expression = _becomeParentOf(expression); 15312 _expression = _becomeParentOf(expression);
15350 } 15313 }
15351 15314
15352 @override 15315 @override
15353 Token get beginToken => returnKeyword; 15316 Token get beginToken => returnKeyword;
15354 15317
15355 @override 15318 @override
15356 Iterable get childEntities => new ChildEntities() 15319 Iterable get childEntities =>
15357 ..add(returnKeyword) 15320 new ChildEntities()..add(returnKeyword)..add(_expression)..add(semicolon);
15358 ..add(_expression)
15359 ..add(semicolon);
15360 15321
15361 @override 15322 @override
15362 Token get endToken => semicolon; 15323 Token get endToken => semicolon;
15363 15324
15364 /** 15325 /**
15365 * Return the expression computing the value to be returned, or `null` if no 15326 * Return the expression computing the value to be returned, or `null` if no
15366 * explicit value was provided. 15327 * explicit value was provided.
15367 */ 15328 */
15368 Expression get expression => _expression; 15329 Expression get expression => _expression;
15369 15330
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
16033 return metadata.beginToken; 15994 return metadata.beginToken;
16034 } else if (keyword != null) { 15995 } else if (keyword != null) {
16035 return keyword; 15996 return keyword;
16036 } else if (_type != null) { 15997 } else if (_type != null) {
16037 return _type.beginToken; 15998 return _type.beginToken;
16038 } 15999 }
16039 return identifier.beginToken; 16000 return identifier.beginToken;
16040 } 16001 }
16041 16002
16042 @override 16003 @override
16043 Iterable get childEntities => super._childEntities 16004 Iterable get childEntities =>
16044 ..add(keyword) 16005 super._childEntities..add(keyword)..add(_type)..add(identifier);
16045 ..add(_type)
16046 ..add(identifier);
16047 16006
16048 @override 16007 @override
16049 Token get endToken => identifier.endToken; 16008 Token get endToken => identifier.endToken;
16050 16009
16051 @override 16010 @override
16052 bool get isConst => (keyword is KeywordToken) && 16011 bool get isConst => (keyword is KeywordToken) &&
16053 (keyword as KeywordToken).keyword == Keyword.CONST; 16012 (keyword as KeywordToken).keyword == Keyword.CONST;
16054 16013
16055 @override 16014 @override
16056 bool get isFinal => (keyword is KeywordToken) && 16015 bool get isFinal => (keyword is KeywordToken) &&
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
17314 * Initialize a newly created throw expression. 17273 * Initialize a newly created throw expression.
17315 */ 17274 */
17316 ThrowExpression(this.throwKeyword, Expression expression) { 17275 ThrowExpression(this.throwKeyword, Expression expression) {
17317 _expression = _becomeParentOf(expression); 17276 _expression = _becomeParentOf(expression);
17318 } 17277 }
17319 17278
17320 @override 17279 @override
17321 Token get beginToken => throwKeyword; 17280 Token get beginToken => throwKeyword;
17322 17281
17323 @override 17282 @override
17324 Iterable get childEntities => new ChildEntities() 17283 Iterable get childEntities =>
17325 ..add(throwKeyword) 17284 new ChildEntities()..add(throwKeyword)..add(_expression);
17326 ..add(_expression);
17327 17285
17328 @override 17286 @override
17329 Token get endToken { 17287 Token get endToken {
17330 if (_expression != null) { 17288 if (_expression != null) {
17331 return _expression.endToken; 17289 return _expression.endToken;
17332 } 17290 }
17333 return throwKeyword; 17291 return throwKeyword;
17334 } 17292 }
17335 17293
17336 /** 17294 /**
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
17395 * of the [comment] and [metadata] can be `null` if the variable does not have 17353 * of the [comment] and [metadata] can be `null` if the variable does not have
17396 * the corresponding attribute. 17354 * the corresponding attribute.
17397 */ 17355 */
17398 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata, 17356 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata,
17399 VariableDeclarationList variableList, this.semicolon) 17357 VariableDeclarationList variableList, this.semicolon)
17400 : super(comment, metadata) { 17358 : super(comment, metadata) {
17401 _variableList = _becomeParentOf(variableList); 17359 _variableList = _becomeParentOf(variableList);
17402 } 17360 }
17403 17361
17404 @override 17362 @override
17405 Iterable get childEntities => super._childEntities 17363 Iterable get childEntities =>
17406 ..add(_variableList) 17364 super._childEntities..add(_variableList)..add(semicolon);
17407 ..add(semicolon);
17408 17365
17409 @override 17366 @override
17410 Element get element => null; 17367 Element get element => null;
17411 17368
17412 @override 17369 @override
17413 Token get endToken => semicolon; 17370 Token get endToken => semicolon;
17414 17371
17415 @override 17372 @override
17416 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; 17373 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken;
17417 17374
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
18809 TypeArgumentList get typeArguments => _typeArguments; 18766 TypeArgumentList get typeArguments => _typeArguments;
18810 18767
18811 /** 18768 /**
18812 * Set the type argument associated with this literal to the given 18769 * Set the type argument associated with this literal to the given
18813 * [typeArguments]. 18770 * [typeArguments].
18814 */ 18771 */
18815 void set typeArguments(TypeArgumentList typeArguments) { 18772 void set typeArguments(TypeArgumentList typeArguments) {
18816 _typeArguments = _becomeParentOf(typeArguments); 18773 _typeArguments = _becomeParentOf(typeArguments);
18817 } 18774 }
18818 18775
18819 ChildEntities get _childEntities => new ChildEntities() 18776 ChildEntities get _childEntities =>
18820 ..add(constKeyword) 18777 new ChildEntities()..add(constKeyword)..add(_typeArguments);
18821 ..add(_typeArguments);
18822 18778
18823 @override 18779 @override
18824 void visitChildren(AstVisitor visitor) { 18780 void visitChildren(AstVisitor visitor) {
18825 _safelyVisitChild(_typeArguments, visitor); 18781 _safelyVisitChild(_typeArguments, visitor);
18826 } 18782 }
18827 } 18783 }
18828 18784
18829 /** 18785 /**
18830 * The name of a type, which can optionally include type arguments. 18786 * The name of a type, which can optionally include type arguments.
18831 * 18787 *
(...skipping 23 matching lines...) Expand all
18855 */ 18811 */
18856 TypeName(Identifier name, TypeArgumentList typeArguments) { 18812 TypeName(Identifier name, TypeArgumentList typeArguments) {
18857 _name = _becomeParentOf(name); 18813 _name = _becomeParentOf(name);
18858 _typeArguments = _becomeParentOf(typeArguments); 18814 _typeArguments = _becomeParentOf(typeArguments);
18859 } 18815 }
18860 18816
18861 @override 18817 @override
18862 Token get beginToken => _name.beginToken; 18818 Token get beginToken => _name.beginToken;
18863 18819
18864 @override 18820 @override
18865 Iterable get childEntities => new ChildEntities() 18821 Iterable get childEntities =>
18866 ..add(_name) 18822 new ChildEntities()..add(_name)..add(_typeArguments);
18867 ..add(_typeArguments);
18868 18823
18869 @override 18824 @override
18870 Token get endToken { 18825 Token get endToken {
18871 if (_typeArguments != null) { 18826 if (_typeArguments != null) {
18872 return _typeArguments.endToken; 18827 return _typeArguments.endToken;
18873 } 18828 }
18874 return _name.endToken; 18829 return _name.endToken;
18875 } 18830 }
18876 18831
18877 /** 18832 /**
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
18972 18927
18973 /** 18928 /**
18974 * Set the name of the upper bound for legal arguments to the given 18929 * Set the name of the upper bound for legal arguments to the given
18975 * [typeName]. 18930 * [typeName].
18976 */ 18931 */
18977 void set bound(TypeName typeName) { 18932 void set bound(TypeName typeName) {
18978 _bound = _becomeParentOf(typeName); 18933 _bound = _becomeParentOf(typeName);
18979 } 18934 }
18980 18935
18981 @override 18936 @override
18982 Iterable get childEntities => super._childEntities 18937 Iterable get childEntities =>
18983 ..add(_name) 18938 super._childEntities..add(_name)..add(extendsKeyword)..add(_bound);
18984 ..add(extendsKeyword)
18985 ..add(_bound);
18986 18939
18987 @override 18940 @override
18988 TypeParameterElement get element => 18941 TypeParameterElement get element =>
18989 _name != null ? (_name.staticElement as TypeParameterElement) : null; 18942 _name != null ? (_name.staticElement as TypeParameterElement) : null;
18990 18943
18991 @override 18944 @override
18992 Token get endToken { 18945 Token get endToken {
18993 if (_bound == null) { 18946 if (_bound == null) {
18994 return _name.endToken; 18947 return _name.endToken;
18995 } 18948 }
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
19595 * [initializer] can be `null` if there is no initializer. 19548 * [initializer] can be `null` if there is no initializer.
19596 */ 19549 */
19597 VariableDeclaration( 19550 VariableDeclaration(
19598 SimpleIdentifier name, this.equals, Expression initializer) 19551 SimpleIdentifier name, this.equals, Expression initializer)
19599 : super(null, null) { 19552 : super(null, null) {
19600 _name = _becomeParentOf(name); 19553 _name = _becomeParentOf(name);
19601 _initializer = _becomeParentOf(initializer); 19554 _initializer = _becomeParentOf(initializer);
19602 } 19555 }
19603 19556
19604 @override 19557 @override
19605 Iterable get childEntities => super._childEntities 19558 Iterable get childEntities =>
19606 ..add(_name) 19559 super._childEntities..add(_name)..add(equals)..add(_initializer);
19607 ..add(equals)
19608 ..add(_initializer);
19609 19560
19610 /** 19561 /**
19611 * This overridden implementation of getDocumentationComment() looks in the 19562 * This overridden implementation of getDocumentationComment() looks in the
19612 * grandparent node for dartdoc comments if no documentation is specifically 19563 * grandparent node for dartdoc comments if no documentation is specifically
19613 * available on the node. 19564 * available on the node.
19614 */ 19565 */
19615 @override 19566 @override
19616 Comment get documentationComment { 19567 Comment get documentationComment {
19617 Comment comment = super.documentationComment; 19568 Comment comment = super.documentationComment;
19618 if (comment == null) { 19569 if (comment == null) {
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
19828 */ 19779 */
19829 VariableDeclarationStatement( 19780 VariableDeclarationStatement(
19830 VariableDeclarationList variableList, this.semicolon) { 19781 VariableDeclarationList variableList, this.semicolon) {
19831 _variableList = _becomeParentOf(variableList); 19782 _variableList = _becomeParentOf(variableList);
19832 } 19783 }
19833 19784
19834 @override 19785 @override
19835 Token get beginToken => _variableList.beginToken; 19786 Token get beginToken => _variableList.beginToken;
19836 19787
19837 @override 19788 @override
19838 Iterable get childEntities => new ChildEntities() 19789 Iterable get childEntities =>
19839 ..add(_variableList) 19790 new ChildEntities()..add(_variableList)..add(semicolon);
19840 ..add(semicolon);
19841 19791
19842 @override 19792 @override
19843 Token get endToken => semicolon; 19793 Token get endToken => semicolon;
19844 19794
19845 /** 19795 /**
19846 * Return the variables being declared. 19796 * Return the variables being declared.
19847 */ 19797 */
19848 VariableDeclarationList get variables => _variableList; 19798 VariableDeclarationList get variables => _variableList;
19849 19799
19850 /** 19800 /**
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
20100 } 20050 }
20101 20051
20102 @override 20052 @override
20103 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); 20053 accept(AstVisitor visitor) => visitor.visitYieldStatement(this);
20104 20054
20105 @override 20055 @override
20106 void visitChildren(AstVisitor visitor) { 20056 void visitChildren(AstVisitor visitor) {
20107 _safelyVisitChild(_expression, visitor); 20057 _safelyVisitChild(_expression, visitor);
20108 } 20058 }
20109 } 20059 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/refactoring/extract_local_test.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698