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

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

Issue 14050010: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 3
4 library engine.ast; 4 library engine.ast;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'java_core.dart'; 7 import 'java_core.dart';
8 import 'java_engine.dart'; 8 import 'java_engine.dart';
9 import 'error.dart'; 9 import 'error.dart';
10 import 'source.dart' show LineInfo; 10 import 'source.dart' show LineInfo;
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 } 1471 }
1472 /** 1472 /**
1473 * Instances of the class {@code CascadeExpression} represent a sequence of casc aded expressions: 1473 * Instances of the class {@code CascadeExpression} represent a sequence of casc aded expressions:
1474 * expressions that share a common target. There are three kinds of expressions that can be used in 1474 * expressions that share a common target. There are three kinds of expressions that can be used in
1475 * a cascade expression: {@link IndexExpression}, {@link MethodInvocation} and{@ link PropertyAccess}. 1475 * a cascade expression: {@link IndexExpression}, {@link MethodInvocation} and{@ link PropertyAccess}.
1476 * <pre> 1476 * <pre>
1477 * cascadeExpression ::={@link Expression conditionalExpression} cascadeSection 1477 * cascadeExpression ::={@link Expression conditionalExpression} cascadeSection
1478 * cascadeSection ::= 1478 * cascadeSection ::=
1479 * '..' (cascadeSelector arguments*) (assignableSelector arguments*)* (assignme ntOperator expressionWithoutCascade)? 1479 * '..' (cascadeSelector arguments*) (assignableSelector arguments*)* (assignme ntOperator expressionWithoutCascade)?
1480 * cascadeSelector ::= 1480 * cascadeSelector ::=
1481 * '[ ' expression '] ' 1481 * '[[ ' expression ']] '
1482 * | identifier 1482 * | identifier
1483 * </pre> 1483 * </pre>
1484 * @coverage dart.engine.ast 1484 * @coverage dart.engine.ast
1485 */ 1485 */
1486 class CascadeExpression extends Expression { 1486 class CascadeExpression extends Expression {
1487 /** 1487 /**
1488 * The target of the cascade sections. 1488 * The target of the cascade sections.
1489 */ 1489 */
1490 Expression _target; 1490 Expression _target;
1491 /** 1491 /**
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1953 this._typeParameters = typeParameters2; 1953 this._typeParameters = typeParameters2;
1954 } 1954 }
1955 /** 1955 /**
1956 * Set the with clause for the class to the given clause. 1956 * Set the with clause for the class to the given clause.
1957 * @param withClause the with clause for the class 1957 * @param withClause the with clause for the class
1958 */ 1958 */
1959 void set withClause(WithClause withClause2) { 1959 void set withClause(WithClause withClause2) {
1960 this._withClause = becomeParentOf(withClause2); 1960 this._withClause = becomeParentOf(withClause2);
1961 } 1961 }
1962 void visitChildren(ASTVisitor<Object> visitor) { 1962 void visitChildren(ASTVisitor<Object> visitor) {
1963 safelyVisitChild(documentationComment, visitor); 1963 super.visitChildren(visitor);
1964 safelyVisitChild(_name, visitor); 1964 safelyVisitChild(_name, visitor);
1965 safelyVisitChild(_typeParameters, visitor); 1965 safelyVisitChild(_typeParameters, visitor);
1966 safelyVisitChild(_extendsClause, visitor); 1966 safelyVisitChild(_extendsClause, visitor);
1967 safelyVisitChild(_withClause, visitor); 1967 safelyVisitChild(_withClause, visitor);
1968 safelyVisitChild(_implementsClause, visitor); 1968 safelyVisitChild(_implementsClause, visitor);
1969 members.accept(visitor); 1969 members.accept(visitor);
1970 } 1970 }
1971 Token get firstTokenAfterCommentAndMetadata { 1971 Token get firstTokenAfterCommentAndMetadata {
1972 if (_abstractKeyword != null) { 1972 if (_abstractKeyword != null) {
1973 return _abstractKeyword; 1973 return _abstractKeyword;
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
2342 CommentType(this.__name, this.__ordinal) { 2342 CommentType(this.__name, this.__ordinal) {
2343 } 2343 }
2344 int compareTo(CommentType other) => __ordinal - other.__ordinal; 2344 int compareTo(CommentType other) => __ordinal - other.__ordinal;
2345 String toString() => __name; 2345 String toString() => __name;
2346 } 2346 }
2347 /** 2347 /**
2348 * Instances of the class {@code CommentReference} represent a reference to a Da rt element that is 2348 * Instances of the class {@code CommentReference} represent a reference to a Da rt element that is
2349 * found within a documentation comment. 2349 * found within a documentation comment.
2350 * <pre> 2350 * <pre>
2351 * commentReference ::= 2351 * commentReference ::=
2352 * '[' 'new'? {@link Identifier identifier} ']' 2352 * '[[' 'new'? {@link Identifier identifier} ']]'
2353 * </pre> 2353 * </pre>
2354 * @coverage dart.engine.ast 2354 * @coverage dart.engine.ast
2355 */ 2355 */
2356 class CommentReference extends ASTNode { 2356 class CommentReference extends ASTNode {
2357 /** 2357 /**
2358 * The token representing the 'new' keyword, or {@code null} if there was no ' new' keyword. 2358 * The token representing the 'new' keyword, or {@code null} if there was no ' new' keyword.
2359 */ 2359 */
2360 Token _newKeyword; 2360 Token _newKeyword;
2361 /** 2361 /**
2362 * The identifier being referenced. 2362 * The identifier being referenced.
(...skipping 2633 matching lines...) Expand 10 before | Expand all | Expand 10 after
4996 * <pre> 4996 * <pre>
4997 * formalParameterList ::= 4997 * formalParameterList ::=
4998 * '(' ')' 4998 * '(' ')'
4999 * | '(' normalFormalParameters (',' optionalFormalParameters)? ')' 4999 * | '(' normalFormalParameters (',' optionalFormalParameters)? ')'
5000 * | '(' optionalFormalParameters ')' 5000 * | '(' optionalFormalParameters ')'
5001 * normalFormalParameters ::={@link NormalFormalParameter normalFormalParameter} (',' {@link NormalFormalParameter normalFormalParameter}) 5001 * normalFormalParameters ::={@link NormalFormalParameter normalFormalParameter} (',' {@link NormalFormalParameter normalFormalParameter})
5002 * optionalFormalParameters ::= 5002 * optionalFormalParameters ::=
5003 * optionalPositionalFormalParameters 5003 * optionalPositionalFormalParameters
5004 * | namedFormalParameters 5004 * | namedFormalParameters
5005 * optionalPositionalFormalParameters ::= 5005 * optionalPositionalFormalParameters ::=
5006 * '[' {@link DefaultFormalParameter positionalFormalParameter} (',' {@link Defa ultFormalParameter positionalFormalParameter})* ']' 5006 * '[[' {@link DefaultFormalParameter positionalFormalParameter} (',' {@link Def aultFormalParameter positionalFormalParameter})* ']]'
5007 * namedFormalParameters ::= 5007 * namedFormalParameters ::=
5008 * '{' {@link DefaultFormalParameter namedFormalParameter} (',' {@link DefaultFo rmalParameter namedFormalParameter})* '}' 5008 * '{' {@link DefaultFormalParameter namedFormalParameter} (',' {@link DefaultFo rmalParameter namedFormalParameter})* '}'
5009 * </pre> 5009 * </pre>
5010 * @coverage dart.engine.ast 5010 * @coverage dart.engine.ast
5011 */ 5011 */
5012 class FormalParameterList extends ASTNode { 5012 class FormalParameterList extends ASTNode {
5013 /** 5013 /**
5014 * The left parenthesis. 5014 * The left parenthesis.
5015 */ 5015 */
5016 Token _leftParenthesis; 5016 Token _leftParenthesis;
5017 /** 5017 /**
5018 * The parameters associated with the method. 5018 * The parameters associated with the method.
5019 */ 5019 */
5020 NodeList<FormalParameter> _parameters; 5020 NodeList<FormalParameter> _parameters;
5021 /** 5021 /**
5022 * The left square bracket ('[') or left curly brace ('{') introducing the opt ional parameters. 5022 * The left square bracket ('[[') or left curly brace ('{') introducing the op tional parameters.
5023 */ 5023 */
5024 Token _leftDelimiter; 5024 Token _leftDelimiter;
5025 /** 5025 /**
5026 * The right square bracket (']') or right curly brace ('}') introducing the o ptional parameters. 5026 * The right square bracket (']]') or right curly brace ('}') introducing the optional parameters.
5027 */ 5027 */
5028 Token _rightDelimiter; 5028 Token _rightDelimiter;
5029 /** 5029 /**
5030 * The right parenthesis. 5030 * The right parenthesis.
5031 */ 5031 */
5032 Token _rightParenthesis; 5032 Token _rightParenthesis;
5033 /** 5033 /**
5034 * Initialize a newly created parameter list. 5034 * Initialize a newly created parameter list.
5035 * @param leftParenthesis the left parenthesis 5035 * @param leftParenthesis the left parenthesis
5036 * @param parameters the parameters associated with the method 5036 * @param parameters the parameters associated with the method
(...skipping 28 matching lines...) Expand all
5065 List<ParameterElement> get elements { 5065 List<ParameterElement> get elements {
5066 int count = _parameters.length; 5066 int count = _parameters.length;
5067 List<ParameterElement> types = new List<ParameterElement>(count); 5067 List<ParameterElement> types = new List<ParameterElement>(count);
5068 for (int i = 0; i < count; i++) { 5068 for (int i = 0; i < count; i++) {
5069 types[i] = _parameters[i].element; 5069 types[i] = _parameters[i].element;
5070 } 5070 }
5071 return types; 5071 return types;
5072 } 5072 }
5073 Token get endToken => _rightParenthesis; 5073 Token get endToken => _rightParenthesis;
5074 /** 5074 /**
5075 * Return the left square bracket ('[') or left curly brace ('{') introducing the optional 5075 * Return the left square bracket ('[[') or left curly brace ('{') introducing the optional
5076 * parameters. 5076 * parameters.
5077 * @return the left square bracket ('[') or left curly brace ('{') introducing the optional 5077 * @return the left square bracket ('[[') or left curly brace ('{') introducin g the optional
5078 * parameters 5078 * parameters
5079 */ 5079 */
5080 Token get leftDelimiter => _leftDelimiter; 5080 Token get leftDelimiter => _leftDelimiter;
5081 /** 5081 /**
5082 * Return the left parenthesis. 5082 * Return the left parenthesis.
5083 * @return the left parenthesis 5083 * @return the left parenthesis
5084 */ 5084 */
5085 Token get leftParenthesis => _leftParenthesis; 5085 Token get leftParenthesis => _leftParenthesis;
5086 /** 5086 /**
5087 * Return the parameters associated with the method. 5087 * Return the parameters associated with the method.
5088 * @return the parameters associated with the method 5088 * @return the parameters associated with the method
5089 */ 5089 */
5090 NodeList<FormalParameter> get parameters => _parameters; 5090 NodeList<FormalParameter> get parameters => _parameters;
5091 /** 5091 /**
5092 * Return the right square bracket (']') or right curly brace ('}') introducin g the optional 5092 * Return the right square bracket (']]') or right curly brace ('}') introduci ng the optional
5093 * parameters. 5093 * parameters.
5094 * @return the right square bracket (']') or right curly brace ('}') introduci ng the optional 5094 * @return the right square bracket (']]') or right curly brace ('}') introduc ing the optional
5095 * parameters 5095 * parameters
5096 */ 5096 */
5097 Token get rightDelimiter => _rightDelimiter; 5097 Token get rightDelimiter => _rightDelimiter;
5098 /** 5098 /**
5099 * Return the right parenthesis. 5099 * Return the right parenthesis.
5100 * @return the right parenthesis 5100 * @return the right parenthesis
5101 */ 5101 */
5102 Token get rightParenthesis => _rightParenthesis; 5102 Token get rightParenthesis => _rightParenthesis;
5103 /** 5103 /**
5104 * Set the left square bracket ('[') or left curly brace ('{') introducing the optional parameters 5104 * Set the left square bracket ('[[') or left curly brace ('{') introducing th e optional parameters
5105 * to the given token. 5105 * to the given token.
5106 * @param bracket the left delimiter introducing the optional parameters 5106 * @param bracket the left delimiter introducing the optional parameters
5107 */ 5107 */
5108 void set leftDelimiter(Token bracket) { 5108 void set leftDelimiter(Token bracket) {
5109 _leftDelimiter = bracket; 5109 _leftDelimiter = bracket;
5110 } 5110 }
5111 /** 5111 /**
5112 * Set the left parenthesis to the given token. 5112 * Set the left parenthesis to the given token.
5113 * @param parenthesis the left parenthesis 5113 * @param parenthesis the left parenthesis
5114 */ 5114 */
5115 void set leftParenthesis(Token parenthesis) { 5115 void set leftParenthesis(Token parenthesis) {
5116 _leftParenthesis = parenthesis; 5116 _leftParenthesis = parenthesis;
5117 } 5117 }
5118 /** 5118 /**
5119 * Set the right square bracket (']') or right curly brace ('}') introducing t he optional 5119 * Set the right square bracket (']]') or right curly brace ('}') introducing the optional
5120 * parameters to the given token. 5120 * parameters to the given token.
5121 * @param bracket the right delimiter introducing the optional parameters 5121 * @param bracket the right delimiter introducing the optional parameters
5122 */ 5122 */
5123 void set rightDelimiter(Token bracket) { 5123 void set rightDelimiter(Token bracket) {
5124 _rightDelimiter = bracket; 5124 _rightDelimiter = bracket;
5125 } 5125 }
5126 /** 5126 /**
5127 * Set the right parenthesis to the given token. 5127 * Set the right parenthesis to the given token.
5128 * @param parenthesis the right parenthesis 5128 * @param parenthesis the right parenthesis
5129 */ 5129 */
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
5227 * declaration rather than a property declaration. 5227 * declaration rather than a property declaration.
5228 * @return the token representing the 'get' or 'set' keyword 5228 * @return the token representing the 'get' or 'set' keyword
5229 */ 5229 */
5230 Token get propertyKeyword => _propertyKeyword; 5230 Token get propertyKeyword => _propertyKeyword;
5231 /** 5231 /**
5232 * Return the return type of the function, or {@code null} if no return type w as declared. 5232 * Return the return type of the function, or {@code null} if no return type w as declared.
5233 * @return the return type of the function 5233 * @return the return type of the function
5234 */ 5234 */
5235 TypeName get returnType => _returnType; 5235 TypeName get returnType => _returnType;
5236 /** 5236 /**
5237 * Return {@code true} if this function declares a getter.
5238 * @return {@code true} if this function declares a getter
5239 */
5240 bool isGetter() => _propertyKeyword != null && identical(((_propertyKeyword as KeywordToken)).keyword, Keyword.GET);
5241 /**
5242 * Return {@code true} if this function declares a setter.
5243 * @return {@code true} if this function declares a setter
5244 */
5245 bool isSetter() => _propertyKeyword != null && identical(((_propertyKeyword as KeywordToken)).keyword, Keyword.SET);
5246 /**
5237 * Set the token representing the 'external' keyword to the given token. 5247 * Set the token representing the 'external' keyword to the given token.
5238 * @param externalKeyword the token representing the 'external' keyword 5248 * @param externalKeyword the token representing the 'external' keyword
5239 */ 5249 */
5240 void set externalKeyword(Token externalKeyword2) { 5250 void set externalKeyword(Token externalKeyword2) {
5241 this._externalKeyword = externalKeyword2; 5251 this._externalKeyword = externalKeyword2;
5242 } 5252 }
5243 /** 5253 /**
5244 * Set the function expression being wrapped to the given function expression. 5254 * Set the function expression being wrapped to the given function expression.
5245 * @param functionExpression the function expression being wrapped 5255 * @param functionExpression the function expression being wrapped
5246 */ 5256 */
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
6072 } 6082 }
6073 void visitChildren(ASTVisitor<Object> visitor) { 6083 void visitChildren(ASTVisitor<Object> visitor) {
6074 super.visitChildren(visitor); 6084 super.visitChildren(visitor);
6075 safelyVisitChild(_prefix, visitor); 6085 safelyVisitChild(_prefix, visitor);
6076 combinators.accept(visitor); 6086 combinators.accept(visitor);
6077 } 6087 }
6078 } 6088 }
6079 /** 6089 /**
6080 * Instances of the class {@code IndexExpression} represent an index expression. 6090 * Instances of the class {@code IndexExpression} represent an index expression.
6081 * <pre> 6091 * <pre>
6082 * indexExpression ::={@link Expression target} '[' {@link Expression index} ']' 6092 * indexExpression ::={@link Expression target} '[[' {@link Expression index} '] ]'
6083 * </pre> 6093 * </pre>
6084 * @coverage dart.engine.ast 6094 * @coverage dart.engine.ast
6085 */ 6095 */
6086 class IndexExpression extends Expression { 6096 class IndexExpression extends Expression {
6087 /** 6097 /**
6088 * The expression used to compute the object being indexed, or {@code null} if this index 6098 * The expression used to compute the object being indexed, or {@code null} if this index
6089 * expression is part of a cascade expression. 6099 * expression is part of a cascade expression.
6090 */ 6100 */
6091 Expression _target; 6101 Expression _target;
6092 /** 6102 /**
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
6221 /** 6231 /**
6222 * Return the right square bracket. 6232 * Return the right square bracket.
6223 * @return the right square bracket 6233 * @return the right square bracket
6224 */ 6234 */
6225 Token get rightBracket => _rightBracket; 6235 Token get rightBracket => _rightBracket;
6226 /** 6236 /**
6227 * Return {@code true} if this expression is computing a right-hand value. 6237 * Return {@code true} if this expression is computing a right-hand value.
6228 * <p> 6238 * <p>
6229 * Note that {@link #inGetterContext()} and {@link #inSetterContext()} are not opposites, nor are 6239 * Note that {@link #inGetterContext()} and {@link #inSetterContext()} are not opposites, nor are
6230 * they mutually exclusive. In other words, it is possible for both methods to return {@code true}when invoked on the same node. 6240 * they mutually exclusive. In other words, it is possible for both methods to return {@code true}when invoked on the same node.
6231 * @return {@code true} if this expression is in a context where the operator '[]' will be invoked 6241 * @return {@code true} if this expression is in a context where the operator '[[]]' will be invoked
6232 */ 6242 */
6233 bool inGetterContext() { 6243 bool inGetterContext() {
6234 ASTNode parent2 = parent; 6244 ASTNode parent2 = parent;
6235 if (parent2 is AssignmentExpression) { 6245 if (parent2 is AssignmentExpression) {
6236 AssignmentExpression assignment = parent2 as AssignmentExpression; 6246 AssignmentExpression assignment = parent2 as AssignmentExpression;
6237 if (identical(assignment.leftHandSide, this) && identical(assignment.opera tor.type, TokenType.EQ)) { 6247 if (identical(assignment.leftHandSide, this) && identical(assignment.opera tor.type, TokenType.EQ)) {
6238 return false; 6248 return false;
6239 } 6249 }
6240 } 6250 }
6241 return true; 6251 return true;
6242 } 6252 }
6243 /** 6253 /**
6244 * Return {@code true} if this expression is computing a left-hand value. 6254 * Return {@code true} if this expression is computing a left-hand value.
6245 * <p> 6255 * <p>
6246 * Note that {@link #inGetterContext()} and {@link #inSetterContext()} are not opposites, nor are 6256 * Note that {@link #inGetterContext()} and {@link #inSetterContext()} are not opposites, nor are
6247 * they mutually exclusive. In other words, it is possible for both methods to return {@code true}when invoked on the same node. 6257 * they mutually exclusive. In other words, it is possible for both methods to return {@code true}when invoked on the same node.
6248 * @return {@code true} if this expression is in a context where the operator '[]=' will be 6258 * @return {@code true} if this expression is in a context where the operator '[[]]=' will be
6249 * invoked 6259 * invoked
6250 */ 6260 */
6251 bool inSetterContext() { 6261 bool inSetterContext() {
6252 ASTNode parent2 = parent; 6262 ASTNode parent2 = parent;
6253 if (parent2 is PrefixExpression) { 6263 if (parent2 is PrefixExpression) {
6254 return ((parent2 as PrefixExpression)).operator.type.isIncrementOperator() ; 6264 return ((parent2 as PrefixExpression)).operator.type.isIncrementOperator() ;
6255 } else if (parent2 is PostfixExpression) { 6265 } else if (parent2 is PostfixExpression) {
6256 return true; 6266 return true;
6257 } else if (parent2 is AssignmentExpression) { 6267 } else if (parent2 is AssignmentExpression) {
6258 return identical(((parent2 as AssignmentExpression)).leftHandSide, this); 6268 return identical(((parent2 as AssignmentExpression)).leftHandSide, this);
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
7008 return builder.toString(); 7018 return builder.toString();
7009 } 7019 }
7010 void visitChildren(ASTVisitor<Object> visitor) { 7020 void visitChildren(ASTVisitor<Object> visitor) {
7011 _components.accept(visitor); 7021 _components.accept(visitor);
7012 } 7022 }
7013 } 7023 }
7014 /** 7024 /**
7015 * Instances of the class {@code ListLiteral} represent a list literal. 7025 * Instances of the class {@code ListLiteral} represent a list literal.
7016 * <pre> 7026 * <pre>
7017 * listLiteral ::= 7027 * listLiteral ::=
7018 * 'const'? ('<' {@link TypeName type} '>')? '[' ({@link Expression expressionLi st} ','?)? ']' 7028 * 'const'? ('<' {@link TypeName type} '>')? '[[' ({@link Expression expressionL ist} ','?)? ']]'
7019 * </pre> 7029 * </pre>
7020 * @coverage dart.engine.ast 7030 * @coverage dart.engine.ast
7021 */ 7031 */
7022 class ListLiteral extends TypedLiteral { 7032 class ListLiteral extends TypedLiteral {
7023 /** 7033 /**
7024 * The left square bracket. 7034 * The left square bracket.
7025 */ 7035 */
7026 Token _leftBracket; 7036 Token _leftBracket;
7027 /** 7037 /**
7028 * The expressions used to compute the elements of the list. 7038 * The expressions used to compute the elements of the list.
(...skipping 4447 matching lines...) Expand 10 before | Expand all | Expand 10 after
11476 } 11486 }
11477 /** 11487 /**
11478 * Visitor that maps nodes to elements. 11488 * Visitor that maps nodes to elements.
11479 */ 11489 */
11480 class ElementLocator_ElementMapper extends GeneralizingASTVisitor<Element> { 11490 class ElementLocator_ElementMapper extends GeneralizingASTVisitor<Element> {
11481 Element visitBinaryExpression(BinaryExpression node) => node.element; 11491 Element visitBinaryExpression(BinaryExpression node) => node.element;
11482 Element visitClassDeclaration(ClassDeclaration node) => node.element; 11492 Element visitClassDeclaration(ClassDeclaration node) => node.element;
11483 Element visitCompilationUnit(CompilationUnit node) => node.element; 11493 Element visitCompilationUnit(CompilationUnit node) => node.element;
11484 Element visitConstructorDeclaration(ConstructorDeclaration node) => node.eleme nt; 11494 Element visitConstructorDeclaration(ConstructorDeclaration node) => node.eleme nt;
11485 Element visitFunctionDeclaration(FunctionDeclaration node) => node.element; 11495 Element visitFunctionDeclaration(FunctionDeclaration node) => node.element;
11486 Element visitIdentifier(Identifier node) => node.element; 11496 Element visitIdentifier(Identifier node) {
11497 ASTNode parent2 = node.parent;
11498 if (parent2 is ConstructorDeclaration) {
11499 ConstructorDeclaration decl = parent2 as ConstructorDeclaration;
11500 Identifier returnType2 = decl.returnType;
11501 if (identical(returnType2, node)) {
11502 SimpleIdentifier name2 = decl.name;
11503 if (name2 != null) {
11504 return name2.element;
11505 }
11506 Element element2 = node.element;
11507 if (element2 is ClassElement) {
11508 return ((element2 as ClassElement)).unnamedConstructor;
11509 }
11510 }
11511 }
11512 return node.element;
11513 }
11487 Element visitImportDirective(ImportDirective node) => node.element; 11514 Element visitImportDirective(ImportDirective node) => node.element;
11488 Element visitIndexExpression(IndexExpression node) => node.element; 11515 Element visitIndexExpression(IndexExpression node) => node.element;
11489 Element visitInstanceCreationExpression(InstanceCreationExpression node) => no de.element; 11516 Element visitInstanceCreationExpression(InstanceCreationExpression node) => no de.element;
11490 Element visitLibraryDirective(LibraryDirective node) => node.element; 11517 Element visitLibraryDirective(LibraryDirective node) => node.element;
11491 Element visitMethodDeclaration(MethodDeclaration node) => node.element; 11518 Element visitMethodDeclaration(MethodDeclaration node) => node.element;
11492 Element visitMethodInvocation(MethodInvocation node) => node.methodName.elemen t; 11519 Element visitMethodInvocation(MethodInvocation node) => node.methodName.elemen t;
11493 Element visitPostfixExpression(PostfixExpression node) => node.element; 11520 Element visitPostfixExpression(PostfixExpression node) => node.element;
11494 Element visitPrefixedIdentifier(PrefixedIdentifier node) => node.element; 11521 Element visitPrefixedIdentifier(PrefixedIdentifier node) => node.element;
11495 Element visitPrefixExpression(PrefixExpression node) => node.element; 11522 Element visitPrefixExpression(PrefixExpression node) => node.element;
11496 Element visitStringLiteral(StringLiteral node) { 11523 Element visitStringLiteral(StringLiteral node) {
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
13089 } 13116 }
13090 } 13117 }
13091 } 13118 }
13092 } 13119 }
13093 /** 13120 /**
13094 * Instances of the class {@code ASTCloner} implement an object that will clone any AST structure 13121 * Instances of the class {@code ASTCloner} implement an object that will clone any AST structure
13095 * that it visits. The cloner will only clone the structure, it will not preserv e any resolution 13122 * that it visits. The cloner will only clone the structure, it will not preserv e any resolution
13096 * results or properties associated with the nodes. 13123 * results or properties associated with the nodes.
13097 */ 13124 */
13098 class ASTCloner implements ASTVisitor<ASTNode> { 13125 class ASTCloner implements ASTVisitor<ASTNode> {
13099 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri ngs.full(clone2(node.strings)); 13126 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri ngs.full(clone3(node.strings));
13100 Annotation visitAnnotation(Annotation node) => new Annotation.full(node.atSign , clone(node.name), node.period, clone(node.constructorName), clone(node.argumen ts)); 13127 Annotation visitAnnotation(Annotation node) => new Annotation.full(node.atSign , clone2(node.name), node.period, clone2(node.constructorName), clone2(node.argu ments));
13101 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node ) => new ArgumentDefinitionTest.full(node.question, clone(node.identifier)); 13128 ArgumentDefinitionTest visitArgumentDefinitionTest(ArgumentDefinitionTest node ) => new ArgumentDefinitionTest.full(node.question, clone2(node.identifier));
13102 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList.full(nod e.leftParenthesis, clone2(node.arguments), node.rightParenthesis); 13129 ArgumentList visitArgumentList(ArgumentList node) => new ArgumentList.full(nod e.leftParenthesis, clone3(node.arguments), node.rightParenthesis);
13103 AsExpression visitAsExpression(AsExpression node) => new AsExpression.full(clo ne(node.expression), node.asOperator, clone(node.type)); 13130 AsExpression visitAsExpression(AsExpression node) => new AsExpression.full(clo ne2(node.expression), node.asOperator, clone2(node.type));
13104 ASTNode visitAssertStatement(AssertStatement node) => new AssertStatement.full (node.keyword, node.leftParenthesis, clone(node.condition), node.rightParenthesi s, node.semicolon); 13131 ASTNode visitAssertStatement(AssertStatement node) => new AssertStatement.full (node.keyword, node.leftParenthesis, clone2(node.condition), node.rightParenthes is, node.semicolon);
13105 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => n ew AssignmentExpression.full(clone(node.leftHandSide), node.operator, clone(node .rightHandSide)); 13132 AssignmentExpression visitAssignmentExpression(AssignmentExpression node) => n ew AssignmentExpression.full(clone2(node.leftHandSide), node.operator, clone2(no de.rightHandSide));
13106 BinaryExpression visitBinaryExpression(BinaryExpression node) => new BinaryExp ression.full(clone(node.leftOperand), node.operator, clone(node.rightOperand)); 13133 BinaryExpression visitBinaryExpression(BinaryExpression node) => new BinaryExp ression.full(clone2(node.leftOperand), node.operator, clone2(node.rightOperand)) ;
13107 Block visitBlock(Block node) => new Block.full(node.leftBracket, clone2(node.s tatements), node.rightBracket); 13134 Block visitBlock(Block node) => new Block.full(node.leftBracket, clone3(node.s tatements), node.rightBracket);
13108 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockF unctionBody.full(clone(node.block)); 13135 BlockFunctionBody visitBlockFunctionBody(BlockFunctionBody node) => new BlockF unctionBody.full(clone2(node.block));
13109 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) => new BooleanLiteral. full(node.literal, node.value); 13136 BooleanLiteral visitBooleanLiteral(BooleanLiteral node) => new BooleanLiteral. full(node.literal, node.value);
13110 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement. full(node.keyword, clone(node.label), node.semicolon); 13137 BreakStatement visitBreakStatement(BreakStatement node) => new BreakStatement. full(node.keyword, clone2(node.label), node.semicolon);
13111 CascadeExpression visitCascadeExpression(CascadeExpression node) => new Cascad eExpression.full(clone(node.target), clone2(node.cascadeSections)); 13138 CascadeExpression visitCascadeExpression(CascadeExpression node) => new Cascad eExpression.full(clone2(node.target), clone3(node.cascadeSections));
13112 CatchClause visitCatchClause(CatchClause node) => new CatchClause.full(node.on Keyword, clone(node.exceptionType), node.catchKeyword, node.leftParenthesis, clo ne(node.exceptionParameter), node.comma, clone(node.stackTraceParameter), node.r ightParenthesis, clone(node.body)); 13139 CatchClause visitCatchClause(CatchClause node) => new CatchClause.full(node.on Keyword, clone2(node.exceptionType), node.catchKeyword, node.leftParenthesis, cl one2(node.exceptionParameter), node.comma, clone2(node.stackTraceParameter), nod e.rightParenthesis, clone2(node.body));
13113 ClassDeclaration visitClassDeclaration(ClassDeclaration node) => new ClassDecl aration.full(clone(node.documentationComment), clone2(node.metadata), node.abstr actKeyword, node.classKeyword, clone(node.name), clone(node.typeParameters), clo ne(node.extendsClause), clone(node.withClause), clone(node.implementsClause), no de.leftBracket, clone2(node.members), node.rightBracket); 13140 ClassDeclaration visitClassDeclaration(ClassDeclaration node) => new ClassDecl aration.full(clone2(node.documentationComment), clone3(node.metadata), node.abst ractKeyword, node.classKeyword, clone2(node.name), clone2(node.typeParameters), clone2(node.extendsClause), clone2(node.withClause), clone2(node.implementsClaus e), node.leftBracket, clone3(node.members), node.rightBracket);
13114 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias. full(clone(node.documentationComment), clone2(node.metadata), node.keyword, clon e(node.name), clone(node.typeParameters), node.equals, node.abstractKeyword, clo ne(node.superclass), clone(node.withClause), clone(node.implementsClause), node. semicolon); 13141 ClassTypeAlias visitClassTypeAlias(ClassTypeAlias node) => new ClassTypeAlias. full(clone2(node.documentationComment), clone3(node.metadata), node.keyword, clo ne2(node.name), clone2(node.typeParameters), node.equals, node.abstractKeyword, clone2(node.superclass), clone2(node.withClause), clone2(node.implementsClause), node.semicolon);
13115 Comment visitComment(Comment node) { 13142 Comment visitComment(Comment node) {
13116 if (node.isDocumentation()) { 13143 if (node.isDocumentation()) {
13117 return Comment.createDocumentationComment2(node.tokens, clone2(node.refere nces)); 13144 return Comment.createDocumentationComment2(node.tokens, clone3(node.refere nces));
13118 } else if (node.isBlock()) { 13145 } else if (node.isBlock()) {
13119 return Comment.createBlockComment(node.tokens); 13146 return Comment.createBlockComment(node.tokens);
13120 } 13147 }
13121 return Comment.createEndOfLineComment(node.tokens); 13148 return Comment.createEndOfLineComment(node.tokens);
13122 } 13149 }
13123 CommentReference visitCommentReference(CommentReference node) => new CommentRe ference.full(node.newKeyword, clone(node.identifier)); 13150 CommentReference visitCommentReference(CommentReference node) => new CommentRe ference.full(node.newKeyword, clone2(node.identifier));
13124 CompilationUnit visitCompilationUnit(CompilationUnit node) { 13151 CompilationUnit visitCompilationUnit(CompilationUnit node) {
13125 CompilationUnit clone22 = new CompilationUnit.full(node.beginToken, clone(no de.scriptTag), clone2(node.directives), clone2(node.declarations), node.endToken ); 13152 CompilationUnit clone = new CompilationUnit.full(node.beginToken, clone2(nod e.scriptTag), clone3(node.directives), clone3(node.declarations), node.endToken) ;
13126 clone22.lineInfo = node.lineInfo; 13153 clone.lineInfo = node.lineInfo;
13127 clone22.parsingErrors = node.parsingErrors; 13154 clone.parsingErrors = node.parsingErrors;
13128 clone22.resolutionErrors = node.resolutionErrors; 13155 clone.resolutionErrors = node.resolutionErrors;
13129 return clone22; 13156 return clone;
13130 } 13157 }
13131 ConditionalExpression visitConditionalExpression(ConditionalExpression node) = > new ConditionalExpression.full(clone(node.condition), node.question, clone(nod e.thenExpression), node.colon, clone(node.elseExpression)); 13158 ConditionalExpression visitConditionalExpression(ConditionalExpression node) = > new ConditionalExpression.full(clone2(node.condition), node.question, clone2(n ode.thenExpression), node.colon, clone2(node.elseExpression));
13132 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node ) => new ConstructorDeclaration.full(clone(node.documentationComment), clone2(no de.metadata), node.externalKeyword, node.constKeyword, node.factoryKeyword, clon e(node.returnType), node.period, clone(node.name), clone(node.parameters), node. separator, clone2(node.initializers), clone(node.redirectedConstructor), clone(n ode.body)); 13159 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node ) => new ConstructorDeclaration.full(clone2(node.documentationComment), clone3(n ode.metadata), node.externalKeyword, node.constKeyword, node.factoryKeyword, clo ne2(node.returnType), node.period, clone2(node.name), clone2(node.parameters), n ode.separator, clone3(node.initializers), clone2(node.redirectedConstructor), cl one2(node.body));
13133 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI nitializer node) => new ConstructorFieldInitializer.full(node.keyword, node.peri od, clone(node.fieldName), node.equals, clone(node.expression)); 13160 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI nitializer node) => new ConstructorFieldInitializer.full(node.keyword, node.peri od, clone2(node.fieldName), node.equals, clone2(node.expression));
13134 ConstructorName visitConstructorName(ConstructorName node) => new ConstructorN ame.full(clone(node.type), node.period, clone(node.name)); 13161 ConstructorName visitConstructorName(ConstructorName node) => new ConstructorN ame.full(clone2(node.type), node.period, clone2(node.name));
13135 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin ueStatement.full(node.keyword, clone(node.label), node.semicolon); 13162 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin ueStatement.full(node.keyword, clone2(node.label), node.semicolon);
13136 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec laredIdentifier.full(clone(node.documentationComment), clone2(node.metadata), no de.keyword, clone(node.type), clone(node.identifier)); 13163 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec laredIdentifier.full(clone2(node.documentationComment), clone3(node.metadata), n ode.keyword, clone2(node.type), clone2(node.identifier));
13137 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node ) => new DefaultFormalParameter.full(clone(node.parameter), node.kind, node.sepa rator, clone(node.defaultValue)); 13164 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node ) => new DefaultFormalParameter.full(clone2(node.parameter), node.kind, node.sep arator, clone2(node.defaultValue));
13138 DoStatement visitDoStatement(DoStatement node) => new DoStatement.full(node.do Keyword, clone(node.body), node.whileKeyword, node.leftParenthesis, clone(node.c ondition), node.rightParenthesis, node.semicolon); 13165 DoStatement visitDoStatement(DoStatement node) => new DoStatement.full(node.do Keyword, clone2(node.body), node.whileKeyword, node.leftParenthesis, clone2(node .condition), node.rightParenthesis, node.semicolon);
13139 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) => new DoubleLiteral.full (node.literal, node.value); 13166 DoubleLiteral visitDoubleLiteral(DoubleLiteral node) => new DoubleLiteral.full (node.literal, node.value);
13140 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyF unctionBody.full(node.semicolon); 13167 EmptyFunctionBody visitEmptyFunctionBody(EmptyFunctionBody node) => new EmptyF unctionBody.full(node.semicolon);
13141 EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement. full(node.semicolon); 13168 EmptyStatement visitEmptyStatement(EmptyStatement node) => new EmptyStatement. full(node.semicolon);
13142 ExportDirective visitExportDirective(ExportDirective node) => new ExportDirect ive.full(clone(node.documentationComment), clone2(node.metadata), node.keyword, clone(node.uri), clone2(node.combinators), node.semicolon); 13169 ExportDirective visitExportDirective(ExportDirective node) => new ExportDirect ive.full(clone2(node.documentationComment), clone3(node.metadata), node.keyword, clone2(node.uri), clone3(node.combinators), node.semicolon);
13143 ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node ) => new ExpressionFunctionBody.full(node.functionDefinition, clone(node.express ion), node.semicolon); 13170 ExpressionFunctionBody visitExpressionFunctionBody(ExpressionFunctionBody node ) => new ExpressionFunctionBody.full(node.functionDefinition, clone2(node.expres sion), node.semicolon);
13144 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new ExpressionStatement.full(clone(node.expression), node.semicolon); 13171 ExpressionStatement visitExpressionStatement(ExpressionStatement node) => new ExpressionStatement.full(clone2(node.expression), node.semicolon);
13145 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause.full (node.keyword, clone(node.superclass)); 13172 ExtendsClause visitExtendsClause(ExtendsClause node) => new ExtendsClause.full (node.keyword, clone2(node.superclass));
13146 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDecl aration.full(clone(node.documentationComment), clone2(node.metadata), node.keywo rd, clone(node.fields), node.semicolon); 13173 FieldDeclaration visitFieldDeclaration(FieldDeclaration node) => new FieldDecl aration.full(clone2(node.documentationComment), clone3(node.metadata), node.keyw ord, clone2(node.fields), node.semicolon);
13147 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => n ew FieldFormalParameter.full(clone(node.documentationComment), clone2(node.metad ata), node.keyword, clone(node.type), node.thisToken, node.period, clone(node.id entifier)); 13174 FieldFormalParameter visitFieldFormalParameter(FieldFormalParameter node) => n ew FieldFormalParameter.full(clone2(node.documentationComment), clone3(node.meta data), node.keyword, clone2(node.type), node.thisToken, node.period, clone2(node .identifier));
13148 ForEachStatement visitForEachStatement(ForEachStatement node) => new ForEachSt atement.full(node.forKeyword, node.leftParenthesis, clone(node.loopVariable), no de.inKeyword, clone(node.iterator), node.rightParenthesis, clone(node.body)); 13175 ForEachStatement visitForEachStatement(ForEachStatement node) => new ForEachSt atement.full(node.forKeyword, node.leftParenthesis, clone2(node.loopVariable), n ode.inKeyword, clone2(node.iterator), node.rightParenthesis, clone2(node.body));
13149 FormalParameterList visitFormalParameterList(FormalParameterList node) => new FormalParameterList.full(node.leftParenthesis, clone2(node.parameters), node.lef tDelimiter, node.rightDelimiter, node.rightParenthesis); 13176 FormalParameterList visitFormalParameterList(FormalParameterList node) => new FormalParameterList.full(node.leftParenthesis, clone3(node.parameters), node.lef tDelimiter, node.rightDelimiter, node.rightParenthesis);
13150 ForStatement visitForStatement(ForStatement node) => new ForStatement.full(nod e.forKeyword, node.leftParenthesis, clone(node.variables), clone(node.initializa tion), node.leftSeparator, clone(node.condition), node.rightSeparator, clone2(no de.updaters), node.rightParenthesis, clone(node.body)); 13177 ForStatement visitForStatement(ForStatement node) => new ForStatement.full(nod e.forKeyword, node.leftParenthesis, clone2(node.variables), clone2(node.initiali zation), node.leftSeparator, clone2(node.condition), node.rightSeparator, clone3 (node.updaters), node.rightParenthesis, clone2(node.body));
13151 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new FunctionDeclaration.full(clone(node.documentationComment), clone2(node.metadata) , node.externalKeyword, clone(node.returnType), node.propertyKeyword, clone(node .name), clone(node.functionExpression)); 13178 FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) => new FunctionDeclaration.full(clone2(node.documentationComment), clone3(node.metadata ), node.externalKeyword, clone2(node.returnType), node.propertyKeyword, clone2(n ode.name), clone2(node.functionExpression));
13152 FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclara tionStatement node) => new FunctionDeclarationStatement.full(clone(node.function Declaration)); 13179 FunctionDeclarationStatement visitFunctionDeclarationStatement(FunctionDeclara tionStatement node) => new FunctionDeclarationStatement.full(clone2(node.functio nDeclaration));
13153 FunctionExpression visitFunctionExpression(FunctionExpression node) => new Fun ctionExpression.full(clone(node.parameters), clone(node.body)); 13180 FunctionExpression visitFunctionExpression(FunctionExpression node) => new Fun ctionExpression.full(clone2(node.parameters), clone2(node.body));
13154 FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpress ionInvocation node) => new FunctionExpressionInvocation.full(clone(node.function ), clone(node.argumentList)); 13181 FunctionExpressionInvocation visitFunctionExpressionInvocation(FunctionExpress ionInvocation node) => new FunctionExpressionInvocation.full(clone2(node.functio n), clone2(node.argumentList));
13155 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new Functi onTypeAlias.full(clone(node.documentationComment), clone2(node.metadata), node.k eyword, clone(node.returnType), clone(node.name), clone(node.typeParameters), cl one(node.parameters), node.semicolon); 13182 FunctionTypeAlias visitFunctionTypeAlias(FunctionTypeAlias node) => new Functi onTypeAlias.full(clone2(node.documentationComment), clone3(node.metadata), node. keyword, clone2(node.returnType), clone2(node.name), clone2(node.typeParameters) , clone2(node.parameters), node.semicolon);
13156 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFo rmalParameter node) => new FunctionTypedFormalParameter.full(clone(node.document ationComment), clone2(node.metadata), clone(node.returnType), clone(node.identif ier), clone(node.parameters)); 13183 FunctionTypedFormalParameter visitFunctionTypedFormalParameter(FunctionTypedFo rmalParameter node) => new FunctionTypedFormalParameter.full(clone2(node.documen tationComment), clone3(node.metadata), clone2(node.returnType), clone2(node.iden tifier), clone2(node.parameters));
13157 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator. full(node.keyword, clone2(node.hiddenNames)); 13184 HideCombinator visitHideCombinator(HideCombinator node) => new HideCombinator. full(node.keyword, clone3(node.hiddenNames));
13158 IfStatement visitIfStatement(IfStatement node) => new IfStatement.full(node.if Keyword, node.leftParenthesis, clone(node.condition), node.rightParenthesis, clo ne(node.thenStatement), node.elseKeyword, clone(node.elseStatement)); 13185 IfStatement visitIfStatement(IfStatement node) => new IfStatement.full(node.if Keyword, node.leftParenthesis, clone2(node.condition), node.rightParenthesis, cl one2(node.thenStatement), node.elseKeyword, clone2(node.elseStatement));
13159 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement sClause.full(node.keyword, clone2(node.interfaces)); 13186 ImplementsClause visitImplementsClause(ImplementsClause node) => new Implement sClause.full(node.keyword, clone3(node.interfaces));
13160 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect ive.full(clone(node.documentationComment), clone2(node.metadata), node.keyword, clone(node.uri), node.asToken, clone(node.prefix), clone2(node.combinators), nod e.semicolon); 13187 ImportDirective visitImportDirective(ImportDirective node) => new ImportDirect ive.full(clone2(node.documentationComment), clone3(node.metadata), node.keyword, clone2(node.uri), node.asToken, clone2(node.prefix), clone3(node.combinators), node.semicolon);
13161 IndexExpression visitIndexExpression(IndexExpression node) { 13188 IndexExpression visitIndexExpression(IndexExpression node) {
13162 Token period2 = node.period; 13189 Token period2 = node.period;
13163 if (period2 == null) { 13190 if (period2 == null) {
13164 return new IndexExpression.forTarget_full(clone(node.array), node.leftBrac ket, clone(node.index), node.rightBracket); 13191 return new IndexExpression.forTarget_full(clone2(node.array), node.leftBra cket, clone2(node.index), node.rightBracket);
13165 } else { 13192 } else {
13166 return new IndexExpression.forCascade_full(period2, node.leftBracket, clon e(node.index), node.rightBracket); 13193 return new IndexExpression.forCascade_full(period2, node.leftBracket, clon e2(node.index), node.rightBracket);
13167 } 13194 }
13168 } 13195 }
13169 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp ression node) => new InstanceCreationExpression.full(node.keyword, clone(node.co nstructorName), clone(node.argumentList)); 13196 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp ression node) => new InstanceCreationExpression.full(node.keyword, clone2(node.c onstructorName), clone2(node.argumentList));
13170 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) => new IntegerLiteral. full(node.literal, node.value); 13197 IntegerLiteral visitIntegerLiteral(IntegerLiteral node) => new IntegerLiteral. full(node.literal, node.value);
13171 InterpolationExpression visitInterpolationExpression(InterpolationExpression n ode) => new InterpolationExpression.full(node.leftBracket, clone(node.expression ), node.rightBracket); 13198 InterpolationExpression visitInterpolationExpression(InterpolationExpression n ode) => new InterpolationExpression.full(node.leftBracket, clone2(node.expressio n), node.rightBracket);
13172 InterpolationString visitInterpolationString(InterpolationString node) => new InterpolationString.full(node.contents, node.value); 13199 InterpolationString visitInterpolationString(InterpolationString node) => new InterpolationString.full(node.contents, node.value);
13173 IsExpression visitIsExpression(IsExpression node) => new IsExpression.full(clo ne(node.expression), node.isOperator, node.notOperator, clone(node.type)); 13200 IsExpression visitIsExpression(IsExpression node) => new IsExpression.full(clo ne2(node.expression), node.isOperator, node.notOperator, clone2(node.type));
13174 Label visitLabel(Label node) => new Label.full(clone(node.label), node.colon); 13201 Label visitLabel(Label node) => new Label.full(clone2(node.label), node.colon) ;
13175 LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledSt atement.full(clone2(node.labels), clone(node.statement)); 13202 LabeledStatement visitLabeledStatement(LabeledStatement node) => new LabeledSt atement.full(clone3(node.labels), clone2(node.statement));
13176 LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDi rective.full(clone(node.documentationComment), clone2(node.metadata), node.libra ryToken, clone(node.name), node.semicolon); 13203 LibraryDirective visitLibraryDirective(LibraryDirective node) => new LibraryDi rective.full(clone2(node.documentationComment), clone3(node.metadata), node.libr aryToken, clone2(node.name), node.semicolon);
13177 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) => new Librar yIdentifier.full(clone2(node.components)); 13204 LibraryIdentifier visitLibraryIdentifier(LibraryIdentifier node) => new Librar yIdentifier.full(clone3(node.components));
13178 ListLiteral visitListLiteral(ListLiteral node) => new ListLiteral.full(node.mo difier, clone(node.typeArguments), node.leftBracket, clone2(node.elements), node .rightBracket); 13205 ListLiteral visitListLiteral(ListLiteral node) => new ListLiteral.full(node.mo difier, clone2(node.typeArguments), node.leftBracket, clone3(node.elements), nod e.rightBracket);
13179 MapLiteral visitMapLiteral(MapLiteral node) => new MapLiteral.full(node.modifi er, clone(node.typeArguments), node.leftBracket, clone2(node.entries), node.righ tBracket); 13206 MapLiteral visitMapLiteral(MapLiteral node) => new MapLiteral.full(node.modifi er, clone2(node.typeArguments), node.leftBracket, clone3(node.entries), node.rig htBracket);
13180 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEn try.full(clone(node.key), node.separator, clone(node.value)); 13207 MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) => new MapLiteralEn try.full(clone2(node.key), node.separator, clone2(node.value));
13181 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new Method Declaration.full(clone(node.documentationComment), clone2(node.metadata), node.e xternalKeyword, node.modifierKeyword, clone(node.returnType), node.propertyKeywo rd, node.operatorKeyword, clone(node.name), clone(node.parameters), clone(node.b ody)); 13208 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new Method Declaration.full(clone2(node.documentationComment), clone3(node.metadata), node. externalKeyword, node.modifierKeyword, clone2(node.returnType), node.propertyKey word, node.operatorKeyword, clone2(node.name), clone2(node.parameters), clone2(n ode.body));
13182 MethodInvocation visitMethodInvocation(MethodInvocation node) => new MethodInv ocation.full(clone(node.target), node.period, clone(node.methodName), clone(node .argumentList)); 13209 MethodInvocation visitMethodInvocation(MethodInvocation node) => new MethodInv ocation.full(clone2(node.target), node.period, clone2(node.methodName), clone2(n ode.argumentList));
13183 NamedExpression visitNamedExpression(NamedExpression node) => new NamedExpress ion.full(clone(node.name), clone(node.expression)); 13210 NamedExpression visitNamedExpression(NamedExpression node) => new NamedExpress ion.full(clone2(node.name), clone2(node.expression));
13184 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new Nat iveFunctionBody.full(node.nativeToken, clone(node.stringLiteral), node.semicolon ); 13211 NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new Nat iveFunctionBody.full(node.nativeToken, clone2(node.stringLiteral), node.semicolo n);
13185 NullLiteral visitNullLiteral(NullLiteral node) => new NullLiteral.full(node.li teral); 13212 NullLiteral visitNullLiteral(NullLiteral node) => new NullLiteral.full(node.li teral);
13186 ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression n ode) => new ParenthesizedExpression.full(node.leftParenthesis, clone(node.expres sion), node.rightParenthesis); 13213 ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression n ode) => new ParenthesizedExpression.full(node.leftParenthesis, clone2(node.expre ssion), node.rightParenthesis);
13187 PartDirective visitPartDirective(PartDirective node) => new PartDirective.full (clone(node.documentationComment), clone2(node.metadata), node.partToken, clone( node.uri), node.semicolon); 13214 PartDirective visitPartDirective(PartDirective node) => new PartDirective.full (clone2(node.documentationComment), clone3(node.metadata), node.partToken, clone 2(node.uri), node.semicolon);
13188 PartOfDirective visitPartOfDirective(PartOfDirective node) => new PartOfDirect ive.full(clone(node.documentationComment), clone2(node.metadata), node.partToken , node.ofToken, clone(node.libraryName), node.semicolon); 13215 PartOfDirective visitPartOfDirective(PartOfDirective node) => new PartOfDirect ive.full(clone2(node.documentationComment), clone3(node.metadata), node.partToke n, node.ofToken, clone2(node.libraryName), node.semicolon);
13189 PostfixExpression visitPostfixExpression(PostfixExpression node) => new Postfi xExpression.full(clone(node.operand), node.operator); 13216 PostfixExpression visitPostfixExpression(PostfixExpression node) => new Postfi xExpression.full(clone2(node.operand), node.operator);
13190 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => new Pre fixedIdentifier.full(clone(node.prefix), node.period, clone(node.identifier)); 13217 PrefixedIdentifier visitPrefixedIdentifier(PrefixedIdentifier node) => new Pre fixedIdentifier.full(clone2(node.prefix), node.period, clone2(node.identifier));
13191 PrefixExpression visitPrefixExpression(PrefixExpression node) => new PrefixExp ression.full(node.operator, clone(node.operand)); 13218 PrefixExpression visitPrefixExpression(PrefixExpression node) => new PrefixExp ression.full(node.operator, clone2(node.operand));
13192 PropertyAccess visitPropertyAccess(PropertyAccess node) => new PropertyAccess. full(clone(node.target), node.operator, clone(node.propertyName)); 13219 PropertyAccess visitPropertyAccess(PropertyAccess node) => new PropertyAccess. full(clone2(node.target), node.operator, clone2(node.propertyName));
13193 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(Redirec tingConstructorInvocation node) => new RedirectingConstructorInvocation.full(nod e.keyword, node.period, clone(node.constructorName), clone(node.argumentList)); 13220 RedirectingConstructorInvocation visitRedirectingConstructorInvocation(Redirec tingConstructorInvocation node) => new RedirectingConstructorInvocation.full(nod e.keyword, node.period, clone2(node.constructorName), clone2(node.argumentList)) ;
13194 RethrowExpression visitRethrowExpression(RethrowExpression node) => new Rethro wExpression.full(node.keyword); 13221 RethrowExpression visitRethrowExpression(RethrowExpression node) => new Rethro wExpression.full(node.keyword);
13195 ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatem ent.full(node.keyword, clone(node.expression), node.semicolon); 13222 ReturnStatement visitReturnStatement(ReturnStatement node) => new ReturnStatem ent.full(node.keyword, clone2(node.expression), node.semicolon);
13196 ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag.full(node.scriptTag) ; 13223 ScriptTag visitScriptTag(ScriptTag node) => new ScriptTag.full(node.scriptTag) ;
13197 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator. full(node.keyword, clone2(node.shownNames)); 13224 ShowCombinator visitShowCombinator(ShowCombinator node) => new ShowCombinator. full(node.keyword, clone3(node.shownNames));
13198 SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) = > new SimpleFormalParameter.full(clone(node.documentationComment), clone2(node.m etadata), node.keyword, clone(node.type), clone(node.identifier)); 13225 SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) = > new SimpleFormalParameter.full(clone2(node.documentationComment), clone3(node. metadata), node.keyword, clone2(node.type), clone2(node.identifier));
13199 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) => new SimpleIde ntifier.full(node.token); 13226 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) => new SimpleIde ntifier.full(node.token);
13200 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) => new SimpleStringLiteral.full(node.literal, node.value); 13227 SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) => new SimpleStringLiteral.full(node.literal, node.value);
13201 StringInterpolation visitStringInterpolation(StringInterpolation node) => new StringInterpolation.full(clone2(node.elements)); 13228 StringInterpolation visitStringInterpolation(StringInterpolation node) => new StringInterpolation.full(clone3(node.elements));
13202 SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInv ocation node) => new SuperConstructorInvocation.full(node.keyword, node.period, clone(node.constructorName), clone(node.argumentList)); 13229 SuperConstructorInvocation visitSuperConstructorInvocation(SuperConstructorInv ocation node) => new SuperConstructorInvocation.full(node.keyword, node.period, clone2(node.constructorName), clone2(node.argumentList));
13203 SuperExpression visitSuperExpression(SuperExpression node) => new SuperExpress ion.full(node.keyword); 13230 SuperExpression visitSuperExpression(SuperExpression node) => new SuperExpress ion.full(node.keyword);
13204 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase.full(clone2(node .labels), node.keyword, clone(node.expression), node.colon, clone2(node.statemen ts)); 13231 SwitchCase visitSwitchCase(SwitchCase node) => new SwitchCase.full(clone3(node .labels), node.keyword, clone2(node.expression), node.colon, clone3(node.stateme nts));
13205 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault.full (clone2(node.labels), node.keyword, node.colon, clone2(node.statements)); 13232 SwitchDefault visitSwitchDefault(SwitchDefault node) => new SwitchDefault.full (clone3(node.labels), node.keyword, node.colon, clone3(node.statements));
13206 SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatem ent.full(node.keyword, node.leftParenthesis, clone(node.expression), node.rightP arenthesis, node.leftBracket, clone2(node.members), node.rightBracket); 13233 SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatem ent.full(node.keyword, node.leftParenthesis, clone2(node.expression), node.right Parenthesis, node.leftBracket, clone3(node.members), node.rightBracket);
13207 ThisExpression visitThisExpression(ThisExpression node) => new ThisExpression. full(node.keyword); 13234 ThisExpression visitThisExpression(ThisExpression node) => new ThisExpression. full(node.keyword);
13208 ThrowExpression visitThrowExpression(ThrowExpression node) => new ThrowExpress ion.full(node.keyword, clone(node.expression)); 13235 ThrowExpression visitThrowExpression(ThrowExpression node) => new ThrowExpress ion.full(node.keyword, clone2(node.expression));
13209 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableD eclaration node) => new TopLevelVariableDeclaration.full(clone(node.documentatio nComment), clone2(node.metadata), clone(node.variables), node.semicolon); 13236 TopLevelVariableDeclaration visitTopLevelVariableDeclaration(TopLevelVariableD eclaration node) => new TopLevelVariableDeclaration.full(clone2(node.documentati onComment), clone3(node.metadata), clone2(node.variables), node.semicolon);
13210 TryStatement visitTryStatement(TryStatement node) => new TryStatement.full(nod e.tryKeyword, clone(node.body), clone2(node.catchClauses), node.finallyKeyword, clone(node.finallyClause)); 13237 TryStatement visitTryStatement(TryStatement node) => new TryStatement.full(nod e.tryKeyword, clone2(node.body), clone3(node.catchClauses), node.finallyKeyword, clone2(node.finallyClause));
13211 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgum entList.full(node.leftBracket, clone2(node.arguments), node.rightBracket); 13238 TypeArgumentList visitTypeArgumentList(TypeArgumentList node) => new TypeArgum entList.full(node.leftBracket, clone3(node.arguments), node.rightBracket);
13212 TypeName visitTypeName(TypeName node) => new TypeName.full(clone(node.name), c lone(node.typeArguments)); 13239 TypeName visitTypeName(TypeName node) => new TypeName.full(clone2(node.name), clone2(node.typeArguments));
13213 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter.full (clone(node.documentationComment), clone2(node.metadata), clone(node.name), node .keyword, clone(node.bound)); 13240 TypeParameter visitTypeParameter(TypeParameter node) => new TypeParameter.full (clone2(node.documentationComment), clone3(node.metadata), clone2(node.name), no de.keyword, clone2(node.bound));
13214 TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypePa rameterList.full(node.leftBracket, clone2(node.typeParameters), node.rightBracke t); 13241 TypeParameterList visitTypeParameterList(TypeParameterList node) => new TypePa rameterList.full(node.leftBracket, clone3(node.typeParameters), node.rightBracke t);
13215 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new VariableDeclaration.full(clone(node.documentationComment), clone2(node.metadata) , clone(node.name), node.equals, clone(node.initializer)); 13242 VariableDeclaration visitVariableDeclaration(VariableDeclaration node) => new VariableDeclaration.full(clone2(node.documentationComment), clone3(node.metadata ), clone2(node.name), node.equals, clone2(node.initializer));
13216 VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList n ode) => new VariableDeclarationList.full(clone(node.documentationComment), clone 2(node.metadata), node.keyword, clone(node.type), clone2(node.variables)); 13243 VariableDeclarationList visitVariableDeclarationList(VariableDeclarationList n ode) => new VariableDeclarationList.full(clone2(node.documentationComment), clon e3(node.metadata), node.keyword, clone2(node.type), clone3(node.variables));
13217 VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclara tionStatement node) => new VariableDeclarationStatement.full(clone(node.variable s), node.semicolon); 13244 VariableDeclarationStatement visitVariableDeclarationStatement(VariableDeclara tionStatement node) => new VariableDeclarationStatement.full(clone2(node.variabl es), node.semicolon);
13218 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement. full(node.keyword, node.leftParenthesis, clone(node.condition), node.rightParent hesis, clone(node.body)); 13245 WhileStatement visitWhileStatement(WhileStatement node) => new WhileStatement. full(node.keyword, node.leftParenthesis, clone2(node.condition), node.rightParen thesis, clone2(node.body));
13219 WithClause visitWithClause(WithClause node) => new WithClause.full(node.withKe yword, clone2(node.mixinTypes)); 13246 WithClause visitWithClause(WithClause node) => new WithClause.full(node.withKe yword, clone3(node.mixinTypes));
13220 ASTNode clone(ASTNode node) { 13247 ASTNode clone2(ASTNode node) {
13221 if (node == null) { 13248 if (node == null) {
13222 return null; 13249 return null;
13223 } 13250 }
13224 return node.accept(this) as ASTNode; 13251 return node.accept(this) as ASTNode;
13225 } 13252 }
13226 List clone2(NodeList nodes) { 13253 List clone3(NodeList nodes) {
13227 List clonedNodes = new List(); 13254 List clonedNodes = new List();
13228 for (ASTNode node in nodes) { 13255 for (ASTNode node in nodes) {
13229 clonedNodes.add((node.accept(this) as ASTNode)); 13256 clonedNodes.add((node.accept(this) as ASTNode));
13230 } 13257 }
13231 return clonedNodes; 13258 return clonedNodes;
13232 } 13259 }
13233 } 13260 }
13234 /** 13261 /**
13235 * Instances of the class {@code NodeList} represent a list of AST nodes that ha ve a common parent. 13262 * Instances of the class {@code NodeList} represent a list of AST nodes that ha ve a common parent.
13236 */ 13263 */
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
13291 return elements[elements.length - 1].endToken; 13318 return elements[elements.length - 1].endToken;
13292 } 13319 }
13293 /** 13320 /**
13294 * Return the node that is the parent of each of the elements in the list. 13321 * Return the node that is the parent of each of the elements in the list.
13295 * @return the node that is the parent of each of the elements in the list 13322 * @return the node that is the parent of each of the elements in the list
13296 */ 13323 */
13297 ASTNode getOwner() { 13324 ASTNode getOwner() {
13298 return owner; 13325 return owner;
13299 } 13326 }
13300 } 13327 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698