Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/ast.dart |
| diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart |
| index ce856753a3114e3f3dc6a3cfc9f029307e1d08fd..45a598b0d3ed36f761195aabc85ece9340f8123a 100644 |
| --- a/pkg/analyzer/lib/src/generated/ast.dart |
| +++ b/pkg/analyzer/lib/src/generated/ast.dart |
| @@ -485,7 +485,7 @@ class AdjacentStrings extends StringLiteral { |
| /** |
| * The strings that are implicitly concatenated. |
| */ |
| - NodeList<StringLiteral> strings; |
| + NodeList<StringLiteral> _strings; |
| /** |
| * Initialize a newly created list of adjacent strings. |
| @@ -493,8 +493,8 @@ class AdjacentStrings extends StringLiteral { |
| * @param strings the strings that are implicitly concatenated |
| */ |
| AdjacentStrings.full(List<StringLiteral> strings) { |
| - this.strings = new NodeList<StringLiteral>(this); |
| - this.strings.addAll(strings); |
| + this._strings = new NodeList<StringLiteral>(this); |
| + this._strings.addAll(strings); |
| } |
| /** |
| @@ -506,12 +506,19 @@ class AdjacentStrings extends StringLiteral { |
| accept(ASTVisitor visitor) => visitor.visitAdjacentStrings(this); |
| - Token get beginToken => strings.beginToken; |
| + Token get beginToken => _strings.beginToken; |
| - Token get endToken => strings.endToken; |
| + Token get endToken => _strings.endToken; |
| + |
| + /** |
| + * Return the strings that are implicitly concatenated. |
| + * |
| + * @return the strings that are implicitly concatenated |
| + */ |
| + NodeList<StringLiteral> get strings => _strings; |
|
Brian Wilkerson
2013/12/10 14:57:41
Does this mean that what we were generating before
scheglov
2013/12/10 18:21:09
It was generated wrongly before.
In Java property
|
| void visitChildren(ASTVisitor visitor) { |
| - strings.accept(visitor); |
| + _strings.accept(visitor); |
| } |
| void appendStringValue(JavaStringBuilder builder) { |
| @@ -722,10 +729,8 @@ class Annotation extends ASTNode { |
| * @param arguments the arguments to the constructor being invoked, or `null` if this |
| * annotation is not the invocation of a constructor |
| */ |
| - Annotation.full(Token atSign, Identifier name, Token period, SimpleIdentifier constructorName, ArgumentList arguments) { |
| - this.atSign = atSign; |
| + Annotation.full(this.atSign, Identifier name, this.period, SimpleIdentifier constructorName, ArgumentList arguments) { |
| this._name = becomeParentOf(name); |
| - this.period = period; |
| this._constructorName = becomeParentOf(constructorName); |
| this._arguments = becomeParentOf(arguments); |
| } |
| @@ -869,8 +874,7 @@ class ArgumentDefinitionTest extends Expression { |
| * @param question the token representing the question mark |
| * @param identifier the identifier representing the argument being tested |
| */ |
| - ArgumentDefinitionTest.full(Token question, SimpleIdentifier identifier) { |
| - this.question = question; |
| + ArgumentDefinitionTest.full(this.question, SimpleIdentifier identifier) { |
| this._identifier = becomeParentOf(identifier); |
| } |
| @@ -935,7 +939,7 @@ class ArgumentList extends ASTNode { |
| /** |
| * The expressions producing the values of the arguments. |
| */ |
| - NodeList<Expression> arguments; |
| + NodeList<Expression> _arguments; |
| /** |
| * The right parenthesis. |
| @@ -968,9 +972,9 @@ class ArgumentList extends ASTNode { |
| * @param rightParenthesis the right parenthesis |
| */ |
| ArgumentList.full(Token leftParenthesis, List<Expression> arguments, Token rightParenthesis) { |
| - this.arguments = new NodeList<Expression>(this); |
| + this._arguments = new NodeList<Expression>(this); |
| this._leftParenthesis = leftParenthesis; |
| - this.arguments.addAll(arguments); |
| + this._arguments.addAll(arguments); |
| this._rightParenthesis = rightParenthesis; |
| } |
| @@ -985,6 +989,15 @@ class ArgumentList extends ASTNode { |
| accept(ASTVisitor visitor) => visitor.visitArgumentList(this); |
| + /** |
| + * Return the expressions producing the values of the arguments. Although the language requires |
| + * that positional arguments appear before named arguments, this class allows them to be |
| + * intermixed. |
| + * |
| + * @return the expressions producing the values of the arguments |
| + */ |
| + NodeList<Expression> get arguments => _arguments; |
| + |
| Token get beginToken => _leftParenthesis; |
| Token get endToken => _rightParenthesis; |
| @@ -1012,8 +1025,8 @@ class ArgumentList extends ASTNode { |
| * @param parameters the parameter elements corresponding to the arguments |
| */ |
| void set correspondingPropagatedParameters(List<ParameterElement> parameters) { |
| - if (parameters.length != arguments.length) { |
| - throw new IllegalArgumentException("Expected ${arguments.length} parameters, not ${parameters.length}"); |
| + if (parameters.length != _arguments.length) { |
| + throw new IllegalArgumentException("Expected ${_arguments.length} parameters, not ${parameters.length}"); |
| } |
| _correspondingPropagatedParameters = parameters; |
| } |
| @@ -1027,8 +1040,8 @@ class ArgumentList extends ASTNode { |
| * @param parameters the parameter elements corresponding to the arguments |
| */ |
| void set correspondingStaticParameters(List<ParameterElement> parameters) { |
| - if (parameters.length != arguments.length) { |
| - throw new IllegalArgumentException("Expected ${arguments.length} parameters, not ${parameters.length}"); |
| + if (parameters.length != _arguments.length) { |
| + throw new IllegalArgumentException("Expected ${_arguments.length} parameters, not ${parameters.length}"); |
| } |
| _correspondingStaticParameters = parameters; |
| } |
| @@ -1052,7 +1065,7 @@ class ArgumentList extends ASTNode { |
| } |
| void visitChildren(ASTVisitor visitor) { |
| - arguments.accept(visitor); |
| + _arguments.accept(visitor); |
| } |
| /** |
| @@ -1072,7 +1085,7 @@ class ArgumentList extends ASTNode { |
| if (_correspondingPropagatedParameters == null) { |
| return null; |
| } |
| - int index = arguments.indexOf(expression); |
| + int index = _arguments.indexOf(expression); |
| if (index < 0) { |
| return null; |
| } |
| @@ -1096,7 +1109,7 @@ class ArgumentList extends ASTNode { |
| if (_correspondingStaticParameters == null) { |
| return null; |
| } |
| - int index = arguments.indexOf(expression); |
| + int index = _arguments.indexOf(expression); |
| if (index < 0) { |
| return null; |
| } |
| @@ -1243,12 +1256,8 @@ class AssertStatement extends Statement { |
| * @param rightParenthesis the right parenthesis |
| * @param semicolon the semicolon terminating the statement |
| */ |
| - AssertStatement.full(Token keyword, Token leftParenthesis, Expression condition, Token rightParenthesis, Token semicolon) { |
| - this.keyword = keyword; |
| - this.leftParenthesis = leftParenthesis; |
| + AssertStatement.full(this.keyword, this.leftParenthesis, Expression condition, this.rightParenthesis, this.semicolon) { |
| this._condition = becomeParentOf(condition); |
| - this.rightParenthesis = rightParenthesis; |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -1336,9 +1345,8 @@ class AssignmentExpression extends Expression { |
| * @param operator the assignment operator being applied |
| * @param rightHandSide the expression used to compute the right hand side |
| */ |
| - AssignmentExpression.full(Expression leftHandSide, Token operator, Expression rightHandSide) { |
| + AssignmentExpression.full(Expression leftHandSide, this.operator, Expression rightHandSide) { |
| this._leftHandSide = becomeParentOf(leftHandSide); |
| - this.operator = operator; |
| this._rightHandSide = becomeParentOf(rightHandSide); |
| } |
| @@ -1542,9 +1550,8 @@ class BinaryExpression extends Expression { |
| * @param operator the binary operator being applied |
| * @param rightOperand the expression used to compute the right operand |
| */ |
| - BinaryExpression.full(Expression leftOperand, Token operator, Expression rightOperand) { |
| + BinaryExpression.full(Expression leftOperand, this.operator, Expression rightOperand) { |
| this._leftOperand = becomeParentOf(leftOperand); |
| - this.operator = operator; |
| this._rightOperand = becomeParentOf(rightOperand); |
| } |
| @@ -1720,7 +1727,7 @@ class Block extends Statement { |
| /** |
| * The statements contained in the block. |
| */ |
| - NodeList<Statement> statements; |
| + NodeList<Statement> _statements; |
| /** |
| * The right curly bracket. |
| @@ -1734,11 +1741,9 @@ class Block extends Statement { |
| * @param statements the statements contained in the block |
| * @param rightBracket the right curly bracket |
| */ |
| - Block.full(Token leftBracket, List<Statement> statements, Token rightBracket) { |
| - this.statements = new NodeList<Statement>(this); |
| - this.leftBracket = leftBracket; |
| - this.statements.addAll(statements); |
| - this.rightBracket = rightBracket; |
| + Block.full(this.leftBracket, List<Statement> statements, this.rightBracket) { |
| + this._statements = new NodeList<Statement>(this); |
| + this._statements.addAll(statements); |
| } |
| /** |
| @@ -1756,8 +1761,15 @@ class Block extends Statement { |
| Token get endToken => rightBracket; |
| + /** |
| + * Return the statements contained in the block. |
| + * |
| + * @return the statements contained in the block |
| + */ |
| + NodeList<Statement> get statements => _statements; |
| + |
| void visitChildren(ASTVisitor visitor) { |
| - statements.accept(visitor); |
| + _statements.accept(visitor); |
| } |
| } |
| @@ -1848,10 +1860,7 @@ class BooleanLiteral extends Literal { |
| * @param literal the token representing the literal |
| * @param value the value of the literal |
| */ |
| - BooleanLiteral.full(Token literal, bool value) { |
| - this.literal = literal; |
| - this.value = value; |
| - } |
| + BooleanLiteral.full(this.literal, this.value); |
| /** |
| * Initialize a newly created boolean literal. |
| @@ -1906,10 +1915,8 @@ class BreakStatement extends Statement { |
| * @param label the label associated with the statement |
| * @param semicolon the semicolon terminating the statement |
| */ |
| - BreakStatement.full(Token keyword, SimpleIdentifier label, Token semicolon) { |
| - this.keyword = keyword; |
| + BreakStatement.full(this.keyword, SimpleIdentifier label, this.semicolon) { |
| this._label = becomeParentOf(label); |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -1977,7 +1984,7 @@ class CascadeExpression extends Expression { |
| /** |
| * The cascade sections sharing the common target. |
| */ |
| - NodeList<Expression> cascadeSections; |
| + NodeList<Expression> _cascadeSections; |
| /** |
| * Initialize a newly created cascade expression. |
| @@ -1986,9 +1993,9 @@ class CascadeExpression extends Expression { |
| * @param cascadeSections the cascade sections sharing the common target |
| */ |
| CascadeExpression.full(Expression target, List<Expression> cascadeSections) { |
| - this.cascadeSections = new NodeList<Expression>(this); |
| + this._cascadeSections = new NodeList<Expression>(this); |
| this._target = becomeParentOf(target); |
| - this.cascadeSections.addAll(cascadeSections); |
| + this._cascadeSections.addAll(cascadeSections); |
| } |
| /** |
| @@ -2003,7 +2010,14 @@ class CascadeExpression extends Expression { |
| Token get beginToken => _target.beginToken; |
| - Token get endToken => cascadeSections.endToken; |
| + /** |
| + * Return the cascade sections sharing the common target. |
| + * |
| + * @return the cascade sections sharing the common target |
| + */ |
| + NodeList<Expression> get cascadeSections => _cascadeSections; |
| + |
| + Token get endToken => _cascadeSections.endToken; |
| int get precedence => 2; |
| @@ -2025,7 +2039,7 @@ class CascadeExpression extends Expression { |
| void visitChildren(ASTVisitor visitor) { |
| safelyVisitChild(_target, visitor); |
| - cascadeSections.accept(visitor); |
| + _cascadeSections.accept(visitor); |
| } |
| } |
| @@ -2105,13 +2119,10 @@ class CatchClause extends ASTNode { |
| * @param rightParenthesis the right parenthesis |
| * @param body the body of the catch block |
| */ |
| - CatchClause.full(Token onKeyword, TypeName exceptionType, Token catchKeyword, Token leftParenthesis, SimpleIdentifier exceptionParameter, Token comma, SimpleIdentifier stackTraceParameter, Token rightParenthesis, Block body) { |
| - this.onKeyword = onKeyword; |
| + CatchClause.full(this.onKeyword, TypeName exceptionType, this.catchKeyword, Token leftParenthesis, SimpleIdentifier exceptionParameter, this.comma, SimpleIdentifier stackTraceParameter, Token rightParenthesis, Block body) { |
| this.exceptionType = becomeParentOf(exceptionType); |
| - this.catchKeyword = catchKeyword; |
| this._leftParenthesis = leftParenthesis; |
| this._exceptionParameter = becomeParentOf(exceptionParameter); |
| - this.comma = comma; |
| this._stackTraceParameter = becomeParentOf(stackTraceParameter); |
| this._rightParenthesis = rightParenthesis; |
| this._body = becomeParentOf(body); |
| @@ -2298,7 +2309,7 @@ class ClassDeclaration extends CompilationUnitMember { |
| /** |
| * The members defined by the class. |
| */ |
| - NodeList<ClassMember> members; |
| + NodeList<ClassMember> _members; |
| /** |
| * The right curly bracket. |
| @@ -2321,18 +2332,14 @@ class ClassDeclaration extends CompilationUnitMember { |
| * @param members the members defined by the class |
| * @param rightBracket the right curly bracket |
| */ |
| - ClassDeclaration.full(Comment comment, List<Annotation> metadata, Token abstractKeyword, Token classKeyword, SimpleIdentifier name, TypeParameterList typeParameters, ExtendsClause extendsClause, WithClause withClause, ImplementsClause implementsClause, Token leftBracket, List<ClassMember> members, Token rightBracket) : super.full(comment, metadata) { |
| - this.members = new NodeList<ClassMember>(this); |
| - this.abstractKeyword = abstractKeyword; |
| - this.classKeyword = classKeyword; |
| + ClassDeclaration.full(Comment comment, List<Annotation> metadata, this.abstractKeyword, this.classKeyword, SimpleIdentifier name, TypeParameterList typeParameters, ExtendsClause extendsClause, WithClause withClause, ImplementsClause implementsClause, this.leftBracket, List<ClassMember> members, this.rightBracket) : super.full(comment, metadata) { |
| + this._members = new NodeList<ClassMember>(this); |
| this._name = becomeParentOf(name); |
| this.typeParameters = becomeParentOf(typeParameters); |
| this._extendsClause = becomeParentOf(extendsClause); |
| this._withClause = becomeParentOf(withClause); |
| this._implementsClause = becomeParentOf(implementsClause); |
| - this.leftBracket = leftBracket; |
| - this.members.addAll(members); |
| - this.rightBracket = rightBracket; |
| + this._members.addAll(members); |
| } |
| /** |
| @@ -2376,6 +2383,13 @@ class ClassDeclaration extends CompilationUnitMember { |
| ImplementsClause get implementsClause => _implementsClause; |
| /** |
| + * Return the members defined by the class. |
| + * |
| + * @return the members defined by the class |
| + */ |
| + NodeList<ClassMember> get members => _members; |
| + |
| + /** |
| * Return the name of the class being declared. |
| * |
| * @return the name of the class being declared |
| @@ -2534,11 +2548,9 @@ class ClassTypeAlias extends TypeAlias { |
| * @param implementsClause the implements clause for this class |
| * @param semicolon the semicolon terminating the declaration |
| */ |
| - ClassTypeAlias.full(Comment comment, List<Annotation> metadata, Token keyword, SimpleIdentifier name, TypeParameterList typeParameters, Token equals, Token abstractKeyword, TypeName superclass, WithClause withClause, ImplementsClause implementsClause, Token semicolon) : super.full(comment, metadata, keyword, semicolon) { |
| + ClassTypeAlias.full(Comment comment, List<Annotation> metadata, Token keyword, SimpleIdentifier name, TypeParameterList typeParameters, this.equals, this.abstractKeyword, TypeName superclass, WithClause withClause, ImplementsClause implementsClause, Token semicolon) : super.full(comment, metadata, keyword, semicolon) { |
| this._name = becomeParentOf(name); |
| this._typeParameters = becomeParentOf(typeParameters); |
| - this.equals = equals; |
| - this.abstractKeyword = abstractKeyword; |
| this._superclass = becomeParentOf(superclass); |
| this._withClause = becomeParentOf(withClause); |
| this._implementsClause = becomeParentOf(implementsClause); |
| @@ -2680,9 +2692,7 @@ abstract class Combinator extends ASTNode { |
| * @param keyword the keyword specifying what kind of processing is to be done on the imported |
| * names |
| */ |
| - Combinator.full(Token keyword) { |
| - this.keyword = keyword; |
| - } |
| + Combinator.full(this.keyword); |
| /** |
| * Initialize a newly created import combinator. |
| @@ -2754,7 +2764,7 @@ class Comment extends ASTNode { |
| /** |
| * The tokens representing the comment. |
| */ |
| - List<Token> tokens; |
| + final List<Token> tokens; |
| /** |
| * The type of the comment. |
| @@ -2765,7 +2775,7 @@ class Comment extends ASTNode { |
| * The references embedded within the documentation comment. This list will be empty unless this |
| * is a documentation comment that has references embedded within it. |
| */ |
| - NodeList<CommentReference> references; |
| + NodeList<CommentReference> _references; |
| /** |
| * Initialize a newly created comment. |
| @@ -2774,11 +2784,10 @@ class Comment extends ASTNode { |
| * @param type the type of the comment |
| * @param references the references embedded within the documentation comment |
| */ |
| - Comment.full(List<Token> tokens, CommentType type, List<CommentReference> references) { |
| - this.references = new NodeList<CommentReference>(this); |
| - this.tokens = tokens; |
| + Comment.full(this.tokens, CommentType type, List<CommentReference> references) { |
| + this._references = new NodeList<CommentReference>(this); |
| this._type = type; |
| - this.references.addAll(references); |
| + this._references.addAll(references); |
| } |
| /** |
| @@ -2797,6 +2806,13 @@ class Comment extends ASTNode { |
| Token get endToken => tokens[tokens.length - 1]; |
| /** |
| + * Return the references embedded within the documentation comment. |
| + * |
| + * @return the references embedded within the documentation comment |
| + */ |
| + NodeList<CommentReference> get references => _references; |
| + |
| + /** |
| * Return `true` if this is a block comment. |
| * |
| * @return `true` if this is a block comment |
| @@ -2818,7 +2834,7 @@ class Comment extends ASTNode { |
| bool get isEndOfLine => identical(_type, CommentType.END_OF_LINE); |
| void visitChildren(ASTVisitor visitor) { |
| - references.accept(visitor); |
| + _references.accept(visitor); |
| } |
| } |
| @@ -2875,8 +2891,7 @@ class CommentReference extends ASTNode { |
| * @param newKeyword the token representing the 'new' keyword |
| * @param identifier the identifier being referenced |
| */ |
| - CommentReference.full(Token newKeyword, Identifier identifier) { |
| - this.newKeyword = newKeyword; |
| + CommentReference.full(this.newKeyword, Identifier identifier) { |
| this._identifier = becomeParentOf(identifier); |
| } |
| @@ -2945,7 +2960,7 @@ class CompilationUnit extends ASTNode { |
| /** |
| * The first token in the token stream that was parsed to form this compilation unit. |
| */ |
| - Token _beginToken; |
| + final Token beginToken; |
| /** |
| * The script tag at the beginning of the compilation unit, or `null` if there is no script |
| @@ -2956,18 +2971,18 @@ class CompilationUnit extends ASTNode { |
| /** |
| * The directives contained in this compilation unit. |
| */ |
| - NodeList<Directive> directives; |
| + NodeList<Directive> _directives; |
| /** |
| * The declarations contained in this compilation unit. |
| */ |
| - NodeList<CompilationUnitMember> declarations; |
| + NodeList<CompilationUnitMember> _declarations; |
| /** |
| * The last token in the token stream that was parsed to form this compilation unit. This token |
| * should always have a type of [TokenType.EOF]. |
| */ |
| - Token _endToken; |
| + final Token endToken; |
| /** |
| * The element associated with this compilation unit, or `null` if the AST structure has not |
| @@ -2989,14 +3004,12 @@ class CompilationUnit extends ASTNode { |
| * @param declarations the declarations contained in this compilation unit |
| * @param endToken the last token in the token stream |
| */ |
| - CompilationUnit.full(Token beginToken, ScriptTag scriptTag, List<Directive> directives, List<CompilationUnitMember> declarations, Token endToken) { |
| - this.directives = new NodeList<Directive>(this); |
| - this.declarations = new NodeList<CompilationUnitMember>(this); |
| - this._beginToken = beginToken; |
| + CompilationUnit.full(this.beginToken, ScriptTag scriptTag, List<Directive> directives, List<CompilationUnitMember> declarations, this.endToken) { |
| + this._directives = new NodeList<Directive>(this); |
| + this._declarations = new NodeList<CompilationUnitMember>(this); |
| this._scriptTag = becomeParentOf(scriptTag); |
| - this.directives.addAll(directives); |
| - this.declarations.addAll(declarations); |
| - this._endToken = endToken; |
| + this._directives.addAll(directives); |
| + this._declarations.addAll(declarations); |
| } |
| /** |
| @@ -3012,9 +3025,19 @@ class CompilationUnit extends ASTNode { |
| accept(ASTVisitor visitor) => visitor.visitCompilationUnit(this); |
| - Token get beginToken => _beginToken; |
| + /** |
| + * Return the declarations contained in this compilation unit. |
| + * |
| + * @return the declarations contained in this compilation unit |
| + */ |
| + NodeList<CompilationUnitMember> get declarations => _declarations; |
| - Token get endToken => _endToken; |
| + /** |
| + * Return the directives contained in this compilation unit. |
| + * |
| + * @return the directives contained in this compilation unit |
| + */ |
| + NodeList<Directive> get directives => _directives; |
| int get length { |
| Token endToken = this.endToken; |
| @@ -3046,8 +3069,8 @@ class CompilationUnit extends ASTNode { |
| void visitChildren(ASTVisitor visitor) { |
| safelyVisitChild(_scriptTag, visitor); |
| if (directivesAreBeforeDeclarations()) { |
| - directives.accept(visitor); |
| - declarations.accept(visitor); |
| + _directives.accept(visitor); |
| + _declarations.accept(visitor); |
| } else { |
| for (ASTNode child in sortedDirectivesAndDeclarations) { |
| child.accept(visitor); |
| @@ -3061,11 +3084,11 @@ class CompilationUnit extends ASTNode { |
| * @return `true` if all of the directives are lexically before any declarations |
| */ |
| bool directivesAreBeforeDeclarations() { |
| - if (directives.isEmpty || declarations.isEmpty) { |
| + if (_directives.isEmpty || _declarations.isEmpty) { |
| return true; |
| } |
| - Directive lastDirective = directives[directives.length - 1]; |
| - CompilationUnitMember firstDeclaration = declarations[0]; |
| + Directive lastDirective = _directives[_directives.length - 1]; |
| + CompilationUnitMember firstDeclaration = _declarations[0]; |
| return lastDirective.offset < firstDeclaration.offset; |
| } |
| @@ -3078,8 +3101,8 @@ class CompilationUnit extends ASTNode { |
| */ |
| List<ASTNode> get sortedDirectivesAndDeclarations { |
| List<ASTNode> childList = new List<ASTNode>(); |
| - childList.addAll(directives); |
| - childList.addAll(declarations); |
| + childList.addAll(_directives); |
| + childList.addAll(_declarations); |
| List<ASTNode> children = new List.from(childList); |
| children.sort(ASTNode.LEXICAL_ORDER); |
| return children; |
| @@ -3167,11 +3190,9 @@ class ConditionalExpression extends Expression { |
| * @param elseExpression the expression that is executed if the condition evaluates to |
| * `false` |
| */ |
| - ConditionalExpression.full(Expression condition, Token question, Expression thenExpression, Token colon, Expression elseExpression) { |
| + ConditionalExpression.full(Expression condition, this.question, Expression thenExpression, this.colon, Expression elseExpression) { |
| this._condition = becomeParentOf(condition); |
| - this.question = question; |
| this._thenExpression = becomeParentOf(thenExpression); |
| - this.colon = colon; |
| this._elseExpression = becomeParentOf(elseExpression); |
| } |
| @@ -3328,7 +3349,7 @@ class ConstructorDeclaration extends ClassMember { |
| /** |
| * The initializers associated with the constructor. |
| */ |
| - NodeList<ConstructorInitializer> initializers; |
| + NodeList<ConstructorInitializer> _initializers; |
| /** |
| * The name of the constructor to which this constructor will be redirected, or `null` if |
| @@ -3345,7 +3366,7 @@ class ConstructorDeclaration extends ClassMember { |
| * The element associated with this constructor, or `null` if the AST structure has not been |
| * resolved or if this constructor could not be resolved. |
| */ |
| - ConstructorElement _element; |
| + ConstructorElement element; |
| /** |
| * Initialize a newly created constructor declaration. |
| @@ -3365,17 +3386,12 @@ class ConstructorDeclaration extends ClassMember { |
| * redirected |
| * @param body the body of the constructor |
| */ |
| - ConstructorDeclaration.full(Comment comment, List<Annotation> metadata, Token externalKeyword, Token constKeyword, Token factoryKeyword, Identifier returnType, Token period, SimpleIdentifier name, FormalParameterList parameters, Token separator, List<ConstructorInitializer> initializers, ConstructorName redirectedConstructor, FunctionBody body) : super.full(comment, metadata) { |
| - this.initializers = new NodeList<ConstructorInitializer>(this); |
| - this.externalKeyword = externalKeyword; |
| - this.constKeyword = constKeyword; |
| - this.factoryKeyword = factoryKeyword; |
| + ConstructorDeclaration.full(Comment comment, List<Annotation> metadata, this.externalKeyword, this.constKeyword, this.factoryKeyword, Identifier returnType, this.period, SimpleIdentifier name, FormalParameterList parameters, this.separator, List<ConstructorInitializer> initializers, ConstructorName redirectedConstructor, FunctionBody body) : super.full(comment, metadata) { |
| + this._initializers = new NodeList<ConstructorInitializer>(this); |
| this._returnType = becomeParentOf(returnType); |
| - this.period = period; |
| this._name = becomeParentOf(name); |
| this._parameters = becomeParentOf(parameters); |
| - this.separator = separator; |
| - this.initializers.addAll(initializers); |
| + this._initializers.addAll(initializers); |
| this._redirectedConstructor = becomeParentOf(redirectedConstructor); |
| this._body = becomeParentOf(body); |
| } |
| @@ -3409,18 +3425,23 @@ class ConstructorDeclaration extends ClassMember { |
| */ |
| FunctionBody get body => _body; |
| - ConstructorElement get element => _element; |
| - |
| Token get endToken { |
| if (_body != null) { |
| return _body.endToken; |
| - } else if (!initializers.isEmpty) { |
| - return initializers.endToken; |
| + } else if (!_initializers.isEmpty) { |
| + return _initializers.endToken; |
| } |
| return _parameters.endToken; |
| } |
| /** |
| + * Return the initializers associated with the constructor. |
| + * |
| + * @return the initializers associated with the constructor |
| + */ |
| + NodeList<ConstructorInitializer> get initializers => _initializers; |
| + |
| + /** |
| * Return the name of the constructor, or `null` if the constructor being declared is |
| * unnamed. |
| * |
| @@ -3462,15 +3483,6 @@ class ConstructorDeclaration extends ClassMember { |
| } |
| /** |
| - * Set the element associated with this constructor to the given element. |
| - * |
| - * @param element the element associated with this constructor |
| - */ |
| - void set element(ConstructorElement element) { |
| - this._element = element; |
| - } |
| - |
| - /** |
| * Set the name of the constructor to the given identifier. |
| * |
| * @param identifier the name of the constructor |
| @@ -3513,7 +3525,7 @@ class ConstructorDeclaration extends ClassMember { |
| safelyVisitChild(_returnType, visitor); |
| safelyVisitChild(_name, visitor); |
| safelyVisitChild(_parameters, visitor); |
| - initializers.accept(visitor); |
| + _initializers.accept(visitor); |
| safelyVisitChild(_redirectedConstructor, visitor); |
| safelyVisitChild(_body, visitor); |
| } |
| @@ -3593,11 +3605,8 @@ class ConstructorFieldInitializer extends ConstructorInitializer { |
| * @param equals the token for the equal sign between the field name and the expression |
| * @param expression the expression computing the value to which the field will be initialized |
| */ |
| - ConstructorFieldInitializer.full(Token keyword, Token period, SimpleIdentifier fieldName, Token equals, Expression expression) { |
| - this.keyword = keyword; |
| - this.period = period; |
| + ConstructorFieldInitializer.full(this.keyword, this.period, SimpleIdentifier fieldName, this.equals, Expression expression) { |
| this._fieldName = becomeParentOf(fieldName); |
| - this.equals = equals; |
| this._expression = becomeParentOf(expression); |
| } |
| @@ -3720,9 +3729,8 @@ class ConstructorName extends ASTNode { |
| * @param period the token for the period before the constructor name |
| * @param name the name of the constructor |
| */ |
| - ConstructorName.full(TypeName type, Token period, SimpleIdentifier name) { |
| + ConstructorName.full(TypeName type, this.period, SimpleIdentifier name) { |
| this._type = becomeParentOf(type); |
| - this.period = period; |
| this._name = becomeParentOf(name); |
| } |
| @@ -3837,10 +3845,8 @@ class ContinueStatement extends Statement { |
| * @param label the label associated with the statement |
| * @param semicolon the semicolon terminating the statement |
| */ |
| - ContinueStatement.full(Token keyword, SimpleIdentifier label, Token semicolon) { |
| - this.keyword = keyword; |
| + ContinueStatement.full(this.keyword, SimpleIdentifier label, this.semicolon) { |
| this._label = becomeParentOf(label); |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -3938,7 +3944,7 @@ class DeclaredIdentifier extends Declaration { |
| /** |
| * The name of the variable being declared. |
| */ |
| - SimpleIdentifier identifier; |
| + SimpleIdentifier _identifier; |
| /** |
| * Initialize a newly created formal parameter. |
| @@ -3949,10 +3955,9 @@ class DeclaredIdentifier extends Declaration { |
| * @param type the name of the declared type of the parameter |
| * @param identifier the name of the parameter being declared |
| */ |
| - DeclaredIdentifier.full(Comment comment, List<Annotation> metadata, Token keyword, TypeName type, SimpleIdentifier identifier) : super.full(comment, metadata) { |
| - this.keyword = keyword; |
| + DeclaredIdentifier.full(Comment comment, List<Annotation> metadata, this.keyword, TypeName type, SimpleIdentifier identifier) : super.full(comment, metadata) { |
| this._type = becomeParentOf(type); |
| - this.identifier = becomeParentOf(identifier); |
| + this._identifier = becomeParentOf(identifier); |
| } |
| /** |
| @@ -3976,7 +3981,14 @@ class DeclaredIdentifier extends Declaration { |
| return identifier.staticElement as LocalVariableElement; |
| } |
| - Token get endToken => identifier.endToken; |
| + Token get endToken => _identifier.endToken; |
| + |
| + /** |
| + * Return the name of the variable being declared. |
| + * |
| + * @return the name of the variable being declared |
| + */ |
| + SimpleIdentifier get identifier => _identifier; |
| /** |
| * Return the name of the declared type of the parameter, or `null` if the parameter does |
| @@ -4014,7 +4026,7 @@ class DeclaredIdentifier extends Declaration { |
| void visitChildren(ASTVisitor visitor) { |
| super.visitChildren(visitor); |
| safelyVisitChild(_type, visitor); |
| - safelyVisitChild(identifier, visitor); |
| + safelyVisitChild(_identifier, visitor); |
| } |
| Token get firstTokenAfterCommentAndMetadata { |
| @@ -4023,7 +4035,7 @@ class DeclaredIdentifier extends Declaration { |
| } else if (_type != null) { |
| return _type.beginToken; |
| } |
| - return identifier.beginToken; |
| + return _identifier.beginToken; |
| } |
| } |
| @@ -4051,7 +4063,7 @@ class DefaultFormalParameter extends FormalParameter { |
| /** |
| * The kind of this parameter. |
| */ |
| - ParameterKind _kind; |
| + ParameterKind kind; |
| /** |
| * The token separating the parameter from the default value, or `null` if there is no |
| @@ -4073,10 +4085,8 @@ class DefaultFormalParameter extends FormalParameter { |
| * @param separator the token separating the parameter from the default value |
| * @param defaultValue the expression computing the default value for the parameter |
| */ |
| - DefaultFormalParameter.full(NormalFormalParameter parameter, ParameterKind kind, Token separator, Expression defaultValue) { |
| + DefaultFormalParameter.full(NormalFormalParameter parameter, this.kind, this.separator, Expression defaultValue) { |
| this._parameter = becomeParentOf(parameter); |
| - this._kind = kind; |
| - this.separator = separator; |
| this._defaultValue = becomeParentOf(defaultValue); |
| } |
| @@ -4111,8 +4121,6 @@ class DefaultFormalParameter extends FormalParameter { |
| SimpleIdentifier get identifier => _parameter.identifier; |
| - ParameterKind get kind => _kind; |
| - |
| /** |
| * Return the formal parameter with which the default value is associated. |
| * |
| @@ -4134,15 +4142,6 @@ class DefaultFormalParameter extends FormalParameter { |
| } |
| /** |
| - * Set the kind of this parameter to the given kind. |
| - * |
| - * @param kind the kind of this parameter |
| - */ |
| - void set kind(ParameterKind kind) { |
| - this._kind = kind; |
| - } |
| - |
| - /** |
| * Set the formal parameter with which the default value is associated to the given parameter. |
| * |
| * @param formalParameter the formal parameter with which the default value is associated |
| @@ -4279,14 +4278,11 @@ class DoStatement extends Statement { |
| * @param rightParenthesis the right parenthesis |
| * @param semicolon the semicolon terminating the statement |
| */ |
| - DoStatement.full(Token doKeyword, Statement body, Token whileKeyword, Token leftParenthesis, Expression condition, Token rightParenthesis, Token semicolon) { |
| - this.doKeyword = doKeyword; |
| + DoStatement.full(this.doKeyword, Statement body, this.whileKeyword, Token leftParenthesis, Expression condition, Token rightParenthesis, this.semicolon) { |
| this._body = becomeParentOf(body); |
| - this.whileKeyword = whileKeyword; |
| this._leftParenthesis = leftParenthesis; |
| this._condition = becomeParentOf(condition); |
| this._rightParenthesis = rightParenthesis; |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -4409,10 +4405,7 @@ class DoubleLiteral extends Literal { |
| * @param literal the token representing the literal |
| * @param value the value of the literal |
| */ |
| - DoubleLiteral.full(Token literal, double value) { |
| - this.literal = literal; |
| - this.value = value; |
| - } |
| + DoubleLiteral.full(this.literal, this.value); |
| /** |
| * Initialize a newly created floating point literal. |
| @@ -4454,9 +4447,7 @@ class EmptyFunctionBody extends FunctionBody { |
| * |
| * @param semicolon the token representing the semicolon that marks the end of the function body |
| */ |
| - EmptyFunctionBody.full(Token semicolon) { |
| - this.semicolon = semicolon; |
| - } |
| + EmptyFunctionBody.full(this.semicolon); |
| /** |
| * Initialize a newly created function body. |
| @@ -4496,9 +4487,7 @@ class EmptyStatement extends Statement { |
| * |
| * @param semicolon the semicolon terminating the statement |
| */ |
| - EmptyStatement.full(Token semicolon) { |
| - this.semicolon = semicolon; |
| - } |
| + EmptyStatement.full(this.semicolon); |
| /** |
| * Initialize a newly created empty statement. |
| @@ -4770,10 +4759,8 @@ class ExpressionFunctionBody extends FunctionBody { |
| * @param expression the expression representing the body of the function |
| * @param semicolon the semicolon terminating the statement |
| */ |
| - ExpressionFunctionBody.full(Token functionDefinition, Expression expression, Token semicolon) { |
| - this.functionDefinition = functionDefinition; |
| + ExpressionFunctionBody.full(this.functionDefinition, Expression expression, this.semicolon) { |
| this._expression = becomeParentOf(expression); |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -4846,9 +4833,8 @@ class ExpressionStatement extends Statement { |
| * @param expression the expression that comprises the statement |
| * @param semicolon the semicolon terminating the statement |
| */ |
| - ExpressionStatement.full(Expression expression, Token semicolon) { |
| + ExpressionStatement.full(Expression expression, this.semicolon) { |
| this._expression = becomeParentOf(expression); |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -4921,8 +4907,7 @@ class ExtendsClause extends ASTNode { |
| * @param keyword the token representing the 'extends' keyword |
| * @param superclass the name of the class that is being extended |
| */ |
| - ExtendsClause.full(Token keyword, TypeName superclass) { |
| - this.keyword = keyword; |
| + ExtendsClause.full(this.keyword, TypeName superclass) { |
| this._superclass = becomeParentOf(superclass); |
| } |
| @@ -4997,10 +4982,8 @@ class FieldDeclaration extends ClassMember { |
| * @param fieldList the fields being declared |
| * @param semicolon the semicolon terminating the declaration |
| */ |
| - FieldDeclaration.full(Comment comment, List<Annotation> metadata, Token staticKeyword, VariableDeclarationList fieldList, Token semicolon) : super.full(comment, metadata) { |
| - this.staticKeyword = staticKeyword; |
| + FieldDeclaration.full(Comment comment, List<Annotation> metadata, this.staticKeyword, VariableDeclarationList fieldList, this.semicolon) : super.full(comment, metadata) { |
| this._fieldList = becomeParentOf(fieldList); |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -5108,11 +5091,8 @@ class FieldFormalParameter extends NormalFormalParameter { |
| * @param parameters the parameters of the function-typed parameter, or `null` if this is |
| * not a function-typed field formal parameter |
| */ |
| - FieldFormalParameter.full(Comment comment, List<Annotation> metadata, Token keyword, TypeName type, Token thisToken, Token period, SimpleIdentifier identifier, FormalParameterList parameters) : super.full(comment, metadata, identifier) { |
| - this.keyword = keyword; |
| + FieldFormalParameter.full(Comment comment, List<Annotation> metadata, this.keyword, TypeName type, this.thisToken, this.period, SimpleIdentifier identifier, FormalParameterList parameters) : super.full(comment, metadata, identifier) { |
| this._type = becomeParentOf(type); |
| - this.thisToken = thisToken; |
| - this.period = period; |
| this._parameters = becomeParentOf(parameters); |
| } |
| @@ -5254,13 +5234,9 @@ class ForEachStatement extends Statement { |
| * @param rightParenthesis the right parenthesis |
| * @param body the body of the loop |
| */ |
| - ForEachStatement.con1_full(Token forKeyword, Token leftParenthesis, DeclaredIdentifier loopVariable, Token inKeyword, Expression iterator, Token rightParenthesis, Statement body) { |
| - this.forKeyword = forKeyword; |
| - this.leftParenthesis = leftParenthesis; |
| + ForEachStatement.con1_full(this.forKeyword, this.leftParenthesis, DeclaredIdentifier loopVariable, this.inKeyword, Expression iterator, this.rightParenthesis, Statement body) { |
| this._loopVariable = becomeParentOf(loopVariable); |
| - this.inKeyword = inKeyword; |
| this._iterator = becomeParentOf(iterator); |
| - this.rightParenthesis = rightParenthesis; |
| this._body = becomeParentOf(body); |
| } |
| @@ -5286,13 +5262,9 @@ class ForEachStatement extends Statement { |
| * @param rightParenthesis the right parenthesis |
| * @param body the body of the loop |
| */ |
| - ForEachStatement.con2_full(Token forKeyword, Token leftParenthesis, SimpleIdentifier identifier, Token inKeyword, Expression iterator, Token rightParenthesis, Statement body) { |
| - this.forKeyword = forKeyword; |
| - this.leftParenthesis = leftParenthesis; |
| + ForEachStatement.con2_full(this.forKeyword, this.leftParenthesis, SimpleIdentifier identifier, this.inKeyword, Expression iterator, this.rightParenthesis, Statement body) { |
| this._identifier = becomeParentOf(identifier); |
| - this.inKeyword = inKeyword; |
| this._iterator = becomeParentOf(iterator); |
| - this.rightParenthesis = rightParenthesis; |
| this._body = becomeParentOf(body); |
| } |
| @@ -5448,7 +5420,7 @@ class ForStatement extends Statement { |
| /** |
| * The list of expressions run after each execution of the loop body. |
| */ |
| - NodeList<Expression> updaters; |
| + NodeList<Expression> _updaters; |
| /** |
| * The right parenthesis. |
| @@ -5474,17 +5446,12 @@ class ForStatement extends Statement { |
| * @param rightParenthesis the right parenthesis |
| * @param body the body of the loop |
| */ |
| - ForStatement.full(Token forKeyword, Token leftParenthesis, VariableDeclarationList variableList, Expression initialization, Token leftSeparator, Expression condition, Token rightSeparator, List<Expression> updaters, Token rightParenthesis, Statement body) { |
| - this.updaters = new NodeList<Expression>(this); |
| - this.forKeyword = forKeyword; |
| - this.leftParenthesis = leftParenthesis; |
| + ForStatement.full(this.forKeyword, this.leftParenthesis, VariableDeclarationList variableList, Expression initialization, this.leftSeparator, Expression condition, this.rightSeparator, List<Expression> updaters, this.rightParenthesis, Statement body) { |
| + this._updaters = new NodeList<Expression>(this); |
| this._variableList = becomeParentOf(variableList); |
| this._initialization = becomeParentOf(initialization); |
| - this.leftSeparator = leftSeparator; |
| this._condition = becomeParentOf(condition); |
| - this.rightSeparator = rightSeparator; |
| - this.updaters.addAll(updaters); |
| - this.rightParenthesis = rightParenthesis; |
| + this._updaters.addAll(updaters); |
| this._body = becomeParentOf(body); |
| } |
| @@ -5533,6 +5500,13 @@ class ForStatement extends Statement { |
| Expression get initialization => _initialization; |
| /** |
| + * Return the list of expressions run after each execution of the loop body. |
| + * |
| + * @return the list of expressions run after each execution of the loop body |
| + */ |
| + NodeList<Expression> get updaters => _updaters; |
| + |
| + /** |
| * Return the declaration of the loop variables, or `null` if there are no variables. |
| * |
| * @return the declaration of the loop variables, or `null` if there are no variables |
| @@ -5579,7 +5553,7 @@ class ForStatement extends Statement { |
| safelyVisitChild(_variableList, visitor); |
| safelyVisitChild(_initialization, visitor); |
| safelyVisitChild(_condition, visitor); |
| - updaters.accept(visitor); |
| + _updaters.accept(visitor); |
| safelyVisitChild(_body, visitor); |
| } |
| } |
| @@ -5683,7 +5657,7 @@ class FormalParameterList extends ASTNode { |
| /** |
| * The parameters associated with the method. |
| */ |
| - NodeList<FormalParameter> parameters; |
| + NodeList<FormalParameter> _parameters; |
| /** |
| * The left square bracket ('[') or left curly brace ('{') introducing the optional parameters, or |
| @@ -5712,9 +5686,9 @@ class FormalParameterList extends ASTNode { |
| * @param rightParenthesis the right parenthesis |
| */ |
| FormalParameterList.full(Token leftParenthesis, List<FormalParameter> parameters, Token leftDelimiter, Token rightDelimiter, Token rightParenthesis) { |
| - this.parameters = new NodeList<FormalParameter>(this); |
| + this._parameters = new NodeList<FormalParameter>(this); |
| this._leftParenthesis = leftParenthesis; |
| - this.parameters.addAll(parameters); |
| + this._parameters.addAll(parameters); |
| this._leftDelimiter = leftDelimiter; |
| this._rightDelimiter = rightDelimiter; |
| this._rightParenthesis = rightParenthesis; |
| @@ -5760,15 +5734,22 @@ class FormalParameterList extends ASTNode { |
| * @return the elements representing the parameters in this list |
| */ |
| List<ParameterElement> get parameterElements { |
| - int count = parameters.length; |
| + int count = _parameters.length; |
| List<ParameterElement> types = new List<ParameterElement>(count); |
| for (int i = 0; i < count; i++) { |
| - types[i] = parameters[i].element; |
| + types[i] = _parameters[i].element; |
| } |
| return types; |
| } |
| /** |
| + * Return the parameters associated with the method. |
| + * |
| + * @return the parameters associated with the method |
| + */ |
| + NodeList<FormalParameter> get parameters => _parameters; |
| + |
| + /** |
| * Return the right square bracket (']') or right curly brace ('}') introducing the optional |
| * parameters, or `null` if there are no optional parameters. |
| * |
| @@ -5823,7 +5804,7 @@ class FormalParameterList extends ASTNode { |
| } |
| void visitChildren(ASTVisitor visitor) { |
| - parameters.accept(visitor); |
| + _parameters.accept(visitor); |
| } |
| } |
| @@ -5896,10 +5877,8 @@ class FunctionDeclaration extends CompilationUnitMember { |
| * @param name the name of the function |
| * @param functionExpression the function expression being wrapped |
| */ |
| - FunctionDeclaration.full(Comment comment, List<Annotation> metadata, Token externalKeyword, TypeName returnType, Token propertyKeyword, SimpleIdentifier name, FunctionExpression functionExpression) : super.full(comment, metadata) { |
| - this.externalKeyword = externalKeyword; |
| + FunctionDeclaration.full(Comment comment, List<Annotation> metadata, this.externalKeyword, TypeName returnType, this.propertyKeyword, SimpleIdentifier name, FunctionExpression functionExpression) : super.full(comment, metadata) { |
| this._returnType = becomeParentOf(returnType); |
| - this.propertyKeyword = propertyKeyword; |
| this._name = becomeParentOf(name); |
| this._functionExpression = becomeParentOf(functionExpression); |
| } |
| @@ -6017,7 +5996,7 @@ class FunctionDeclarationStatement extends Statement { |
| /** |
| * The function declaration being wrapped. |
| */ |
| - FunctionDeclaration functionDeclaration; |
| + FunctionDeclaration _functionDeclaration; |
| /** |
| * Initialize a newly created function declaration statement. |
| @@ -6025,7 +6004,7 @@ class FunctionDeclarationStatement extends Statement { |
| * @param functionDeclaration the the function declaration being wrapped |
| */ |
| FunctionDeclarationStatement.full(FunctionDeclaration functionDeclaration) { |
| - this.functionDeclaration = becomeParentOf(functionDeclaration); |
| + this._functionDeclaration = becomeParentOf(functionDeclaration); |
| } |
| /** |
| @@ -6037,9 +6016,16 @@ class FunctionDeclarationStatement extends Statement { |
| accept(ASTVisitor visitor) => visitor.visitFunctionDeclarationStatement(this); |
| - Token get beginToken => functionDeclaration.beginToken; |
| + Token get beginToken => _functionDeclaration.beginToken; |
| - Token get endToken => functionDeclaration.endToken; |
| + Token get endToken => _functionDeclaration.endToken; |
| + |
| + /** |
| + * Return the function declaration being wrapped. |
| + * |
| + * @return the function declaration being wrapped |
| + */ |
| + FunctionDeclaration get functionDeclaration => _functionDeclaration; |
| /** |
| * Set the function declaration being wrapped to the given function declaration. |
| @@ -6047,11 +6033,11 @@ class FunctionDeclarationStatement extends Statement { |
| * @param functionDeclaration the function declaration being wrapped |
| */ |
| void set functionExpression(FunctionDeclaration functionDeclaration) { |
| - this.functionDeclaration = becomeParentOf(functionDeclaration); |
| + this._functionDeclaration = becomeParentOf(functionDeclaration); |
| } |
| void visitChildren(ASTVisitor visitor) { |
| - safelyVisitChild(functionDeclaration, visitor); |
| + safelyVisitChild(_functionDeclaration, visitor); |
| } |
| } |
| @@ -6567,7 +6553,7 @@ class HideCombinator extends Combinator { |
| /** |
| * The list of names from the library that are hidden by this combinator. |
| */ |
| - NodeList<SimpleIdentifier> hiddenNames; |
| + NodeList<SimpleIdentifier> _hiddenNames; |
| /** |
| * Initialize a newly created import show combinator. |
| @@ -6576,8 +6562,8 @@ class HideCombinator extends Combinator { |
| * @param hiddenNames the list of names from the library that are hidden by this combinator |
| */ |
| HideCombinator.full(Token keyword, List<SimpleIdentifier> hiddenNames) : super.full(keyword) { |
| - this.hiddenNames = new NodeList<SimpleIdentifier>(this); |
| - this.hiddenNames.addAll(hiddenNames); |
| + this._hiddenNames = new NodeList<SimpleIdentifier>(this); |
| + this._hiddenNames.addAll(hiddenNames); |
| } |
| /** |
| @@ -6590,10 +6576,17 @@ class HideCombinator extends Combinator { |
| accept(ASTVisitor visitor) => visitor.visitHideCombinator(this); |
| - Token get endToken => hiddenNames.endToken; |
| + Token get endToken => _hiddenNames.endToken; |
| + |
| + /** |
| + * Return the list of names from the library that are hidden by this combinator. |
| + * |
| + * @return the list of names from the library that are hidden by this combinator |
| + */ |
| + NodeList<SimpleIdentifier> get hiddenNames => _hiddenNames; |
| void visitChildren(ASTVisitor visitor) { |
| - hiddenNames.accept(visitor); |
| + _hiddenNames.accept(visitor); |
| } |
| } |
| @@ -6717,13 +6710,9 @@ class IfStatement extends Statement { |
| * @param elseKeyword the token representing the 'else' keyword |
| * @param elseStatement the statement that is executed if the condition evaluates to `false` |
| */ |
| - IfStatement.full(Token ifKeyword, Token leftParenthesis, Expression condition, Token rightParenthesis, Statement thenStatement, Token elseKeyword, Statement elseStatement) { |
| - this.ifKeyword = ifKeyword; |
| - this.leftParenthesis = leftParenthesis; |
| + IfStatement.full(this.ifKeyword, this.leftParenthesis, Expression condition, this.rightParenthesis, Statement thenStatement, this.elseKeyword, Statement elseStatement) { |
| this._condition = becomeParentOf(condition); |
| - this.rightParenthesis = rightParenthesis; |
| this._thenStatement = becomeParentOf(thenStatement); |
| - this.elseKeyword = elseKeyword; |
| this._elseStatement = becomeParentOf(elseStatement); |
| } |
| @@ -6830,7 +6819,7 @@ class ImplementsClause extends ASTNode { |
| /** |
| * The interfaces that are being implemented. |
| */ |
| - NodeList<TypeName> interfaces; |
| + NodeList<TypeName> _interfaces; |
| /** |
| * Initialize a newly created implements clause. |
| @@ -6838,10 +6827,9 @@ class ImplementsClause extends ASTNode { |
| * @param keyword the token representing the 'implements' keyword |
| * @param interfaces the interfaces that are being implemented |
| */ |
| - ImplementsClause.full(Token keyword, List<TypeName> interfaces) { |
| - this.interfaces = new NodeList<TypeName>(this); |
| - this.keyword = keyword; |
| - this.interfaces.addAll(interfaces); |
| + ImplementsClause.full(this.keyword, List<TypeName> interfaces) { |
| + this._interfaces = new NodeList<TypeName>(this); |
| + this._interfaces.addAll(interfaces); |
| } |
| /** |
| @@ -6856,10 +6844,17 @@ class ImplementsClause extends ASTNode { |
| Token get beginToken => keyword; |
| - Token get endToken => interfaces.endToken; |
| + Token get endToken => _interfaces.endToken; |
| + |
| + /** |
| + * Return the list of the interfaces that are being implemented. |
| + * |
| + * @return the list of the interfaces that are being implemented |
| + */ |
| + NodeList<TypeName> get interfaces => _interfaces; |
| void visitChildren(ASTVisitor visitor) { |
| - interfaces.accept(visitor); |
| + _interfaces.accept(visitor); |
| } |
| } |
| @@ -6977,8 +6972,7 @@ class ImportDirective extends NamespaceDirective { |
| * @param combinators the combinators used to control how names are imported |
| * @param semicolon the semicolon terminating the directive |
| */ |
| - ImportDirective.full(Comment comment, List<Annotation> metadata, Token keyword, StringLiteral libraryUri, Token asToken, SimpleIdentifier prefix, List<Combinator> combinators, Token semicolon) : super.full(comment, metadata, keyword, libraryUri, combinators, semicolon) { |
| - this.asToken = asToken; |
| + ImportDirective.full(Comment comment, List<Annotation> metadata, Token keyword, StringLiteral libraryUri, this.asToken, SimpleIdentifier prefix, List<Combinator> combinators, Token semicolon) : super.full(comment, metadata, keyword, libraryUri, combinators, semicolon) { |
| this._prefix = becomeParentOf(prefix); |
| } |
| @@ -7124,8 +7118,7 @@ class IndexExpression extends Expression { |
| * @param index the expression used to compute the index |
| * @param rightBracket the right square bracket |
| */ |
| - IndexExpression.forCascade_full(Token period, Token leftBracket, Expression index, Token rightBracket) { |
| - this.period = period; |
| + IndexExpression.forCascade_full(this.period, Token leftBracket, Expression index, Token rightBracket) { |
| this._leftBracket = leftBracket; |
| this._index = becomeParentOf(index); |
| this._rightBracket = rightBracket; |
| @@ -7440,8 +7433,7 @@ class InstanceCreationExpression extends Expression { |
| * @param constructorName the name of the constructor to be invoked |
| * @param argumentList the list of arguments to the constructor |
| */ |
| - InstanceCreationExpression.full(Token keyword, ConstructorName constructorName, ArgumentList argumentList) { |
| - this.keyword = keyword; |
| + InstanceCreationExpression.full(this.keyword, ConstructorName constructorName, ArgumentList argumentList) { |
| this.constructorName = becomeParentOf(constructorName); |
| this._argumentList = becomeParentOf(argumentList); |
| } |
| @@ -7527,10 +7519,7 @@ class IntegerLiteral extends Literal { |
| * @param literal the token representing the literal |
| * @param value the value of the literal |
| */ |
| - IntegerLiteral.full(Token literal, int value) { |
| - this.literal = literal; |
| - this.value = value; |
| - } |
| + IntegerLiteral.full(this.literal, this.value); |
| /** |
| * Initialize a newly created integer literal. |
| @@ -7601,10 +7590,8 @@ class InterpolationExpression extends InterpolationElement { |
| * @param expression the expression to be evaluated for the value to be converted into a string |
| * @param rightBracket the right curly bracket |
| */ |
| - InterpolationExpression.full(Token leftBracket, Expression expression, Token rightBracket) { |
| - this.leftBracket = leftBracket; |
| + InterpolationExpression.full(this.leftBracket, Expression expression, this.rightBracket) { |
| this._expression = becomeParentOf(expression); |
| - this.rightBracket = rightBracket; |
| } |
| /** |
| @@ -7771,10 +7758,8 @@ class IsExpression extends Expression { |
| * @param notOperator the not operator, or `null` if the sense of the test is not negated |
| * @param type the name of the type being tested for |
| */ |
| - IsExpression.full(Expression expression, Token isOperator, Token notOperator, TypeName type) { |
| + IsExpression.full(Expression expression, this.isOperator, this.notOperator, TypeName type) { |
| this._expression = becomeParentOf(expression); |
| - this.isOperator = isOperator; |
| - this.notOperator = notOperator; |
| this._type = becomeParentOf(type); |
| } |
| @@ -7862,9 +7847,8 @@ class Label extends ASTNode { |
| * @param label the label being applied |
| * @param colon the colon that separates the label from whatever follows |
| */ |
| - Label.full(SimpleIdentifier label, Token colon) { |
| + Label.full(SimpleIdentifier label, this.colon) { |
| this._label = becomeParentOf(label); |
| - this.colon = colon; |
| } |
| /** |
| @@ -7917,7 +7901,7 @@ class LabeledStatement extends Statement { |
| /** |
| * The labels being associated with the statement. |
| */ |
| - NodeList<Label> labels; |
| + NodeList<Label> _labels; |
| /** |
| * The statement with which the labels are being associated. |
| @@ -7931,8 +7915,8 @@ class LabeledStatement extends Statement { |
| * @param statement the statement with which the labels are being associated |
| */ |
| LabeledStatement.full(List<Label> labels, Statement statement) { |
| - this.labels = new NodeList<Label>(this); |
| - this.labels.addAll(labels); |
| + this._labels = new NodeList<Label>(this); |
| + this._labels.addAll(labels); |
| this._statement = becomeParentOf(statement); |
| } |
| @@ -7947,8 +7931,8 @@ class LabeledStatement extends Statement { |
| accept(ASTVisitor visitor) => visitor.visitLabeledStatement(this); |
| Token get beginToken { |
| - if (!labels.isEmpty) { |
| - return labels.beginToken; |
| + if (!_labels.isEmpty) { |
| + return _labels.beginToken; |
| } |
| return _statement.beginToken; |
| } |
| @@ -7956,6 +7940,13 @@ class LabeledStatement extends Statement { |
| Token get endToken => _statement.endToken; |
| /** |
| + * Return the labels being associated with the statement. |
| + * |
| + * @return the labels being associated with the statement |
| + */ |
| + NodeList<Label> get labels => _labels; |
| + |
| + /** |
| * Return the statement with which the labels are being associated. |
| * |
| * @return the statement with which the labels are being associated |
| @@ -7972,7 +7963,7 @@ class LabeledStatement extends Statement { |
| } |
| void visitChildren(ASTVisitor visitor) { |
| - labels.accept(visitor); |
| + _labels.accept(visitor); |
| safelyVisitChild(_statement, visitor); |
| } |
| } |
| @@ -8012,10 +8003,8 @@ class LibraryDirective extends Directive { |
| * @param name the name of the library being defined |
| * @param semicolon the semicolon terminating the directive |
| */ |
| - LibraryDirective.full(Comment comment, List<Annotation> metadata, Token libraryToken, LibraryIdentifier name, Token semicolon) : super.full(comment, metadata) { |
| - this.libraryToken = libraryToken; |
| + LibraryDirective.full(Comment comment, List<Annotation> metadata, this.libraryToken, LibraryIdentifier name, this.semicolon) : super.full(comment, metadata) { |
| this._name = becomeParentOf(name); |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -8073,7 +8062,7 @@ class LibraryIdentifier extends Identifier { |
| /** |
| * The components of the identifier. |
| */ |
| - NodeList<SimpleIdentifier> components; |
| + NodeList<SimpleIdentifier> _components; |
| /** |
| * Initialize a newly created prefixed identifier. |
| @@ -8081,8 +8070,8 @@ class LibraryIdentifier extends Identifier { |
| * @param components the components of the identifier |
| */ |
| LibraryIdentifier.full(List<SimpleIdentifier> components) { |
| - this.components = new NodeList<SimpleIdentifier>(this); |
| - this.components.addAll(components); |
| + this._components = new NodeList<SimpleIdentifier>(this); |
| + this._components.addAll(components); |
| } |
| /** |
| @@ -8094,16 +8083,23 @@ class LibraryIdentifier extends Identifier { |
| accept(ASTVisitor visitor) => visitor.visitLibraryIdentifier(this); |
| - Token get beginToken => components.beginToken; |
| + Token get beginToken => _components.beginToken; |
| Element get bestElement => staticElement; |
| - Token get endToken => components.endToken; |
| + /** |
| + * Return the components of the identifier. |
| + * |
| + * @return the components of the identifier |
| + */ |
| + NodeList<SimpleIdentifier> get components => _components; |
| + |
| + Token get endToken => _components.endToken; |
| String get name { |
| JavaStringBuilder builder = new JavaStringBuilder(); |
| bool needsPeriod = false; |
| - for (SimpleIdentifier identifier in components) { |
| + for (SimpleIdentifier identifier in _components) { |
| if (needsPeriod) { |
| builder.append("."); |
| } else { |
| @@ -8121,7 +8117,7 @@ class LibraryIdentifier extends Identifier { |
| Element get staticElement => null; |
| void visitChildren(ASTVisitor visitor) { |
| - components.accept(visitor); |
| + _components.accept(visitor); |
| } |
| } |
| @@ -8144,7 +8140,7 @@ class ListLiteral extends TypedLiteral { |
| /** |
| * The expressions used to compute the elements of the list. |
| */ |
| - NodeList<Expression> elements; |
| + NodeList<Expression> _elements; |
| /** |
| * The right square bracket. |
| @@ -8162,9 +8158,9 @@ class ListLiteral extends TypedLiteral { |
| * @param rightBracket the right square bracket |
| */ |
| ListLiteral.full(Token constKeyword, TypeArgumentList typeArguments, Token leftBracket, List<Expression> elements, Token rightBracket) : super.full(constKeyword, typeArguments) { |
| - this.elements = new NodeList<Expression>(this); |
| + this._elements = new NodeList<Expression>(this); |
| this._leftBracket = leftBracket; |
| - this.elements.addAll(elements); |
| + this._elements.addAll(elements); |
| this._rightBracket = rightBracket; |
| } |
| @@ -8194,6 +8190,13 @@ class ListLiteral extends TypedLiteral { |
| return _leftBracket; |
| } |
| + /** |
| + * Return the expressions used to compute the elements of the list. |
| + * |
| + * @return the expressions used to compute the elements of the list |
| + */ |
| + NodeList<Expression> get elements => _elements; |
| + |
| Token get endToken => _rightBracket; |
| /** |
| @@ -8230,7 +8233,7 @@ class ListLiteral extends TypedLiteral { |
| void visitChildren(ASTVisitor visitor) { |
| super.visitChildren(visitor); |
| - elements.accept(visitor); |
| + _elements.accept(visitor); |
| } |
| } |
| @@ -8274,7 +8277,7 @@ class MapLiteral extends TypedLiteral { |
| /** |
| * The entries in the map. |
| */ |
| - NodeList<MapLiteralEntry> entries; |
| + NodeList<MapLiteralEntry> _entries; |
| /** |
| * The right curly bracket. |
| @@ -8292,9 +8295,9 @@ class MapLiteral extends TypedLiteral { |
| * @param rightBracket the right curly bracket |
| */ |
| MapLiteral.full(Token constKeyword, TypeArgumentList typeArguments, Token leftBracket, List<MapLiteralEntry> entries, Token rightBracket) : super.full(constKeyword, typeArguments) { |
| - this.entries = new NodeList<MapLiteralEntry>(this); |
| + this._entries = new NodeList<MapLiteralEntry>(this); |
| this._leftBracket = leftBracket; |
| - this.entries.addAll(entries); |
| + this._entries.addAll(entries); |
| this._rightBracket = rightBracket; |
| } |
| @@ -8327,6 +8330,13 @@ class MapLiteral extends TypedLiteral { |
| Token get endToken => _rightBracket; |
| /** |
| + * Return the entries in the map. |
| + * |
| + * @return the entries in the map |
| + */ |
| + NodeList<MapLiteralEntry> get entries => _entries; |
| + |
| + /** |
| * Return the left curly bracket. |
| * |
| * @return the left curly bracket |
| @@ -8360,7 +8370,7 @@ class MapLiteral extends TypedLiteral { |
| void visitChildren(ASTVisitor visitor) { |
| super.visitChildren(visitor); |
| - entries.accept(visitor); |
| + _entries.accept(visitor); |
| } |
| } |
| @@ -8398,9 +8408,8 @@ class MapLiteralEntry extends ASTNode { |
| * @param separator the colon that separates the key from the value |
| * @param value the expression computing the value that will be associated with the key |
| */ |
| - MapLiteralEntry.full(Expression key, Token separator, Expression value) { |
| + MapLiteralEntry.full(Expression key, this.separator, Expression value) { |
| this._key = becomeParentOf(key); |
| - this.separator = separator; |
| this._value = becomeParentOf(value); |
| } |
| @@ -8536,12 +8545,8 @@ class MethodDeclaration extends ClassMember { |
| * declares a getter |
| * @param body the body of the method |
| */ |
| - MethodDeclaration.full(Comment comment, List<Annotation> metadata, Token externalKeyword, Token modifierKeyword, TypeName returnType, Token propertyKeyword, Token operatorKeyword, SimpleIdentifier name, FormalParameterList parameters, FunctionBody body) : super.full(comment, metadata) { |
| - this.externalKeyword = externalKeyword; |
| - this.modifierKeyword = modifierKeyword; |
| + MethodDeclaration.full(Comment comment, List<Annotation> metadata, this.externalKeyword, this.modifierKeyword, TypeName returnType, this.propertyKeyword, this.operatorKeyword, SimpleIdentifier name, FormalParameterList parameters, FunctionBody body) : super.full(comment, metadata) { |
| this._returnType = becomeParentOf(returnType); |
| - this.propertyKeyword = propertyKeyword; |
| - this.operatorKeyword = operatorKeyword; |
| this._name = becomeParentOf(name); |
| this._parameters = becomeParentOf(parameters); |
| this._body = becomeParentOf(body); |
| @@ -8745,9 +8750,8 @@ class MethodInvocation extends Expression { |
| * @param methodName the name of the method being invoked |
| * @param argumentList the list of arguments to the method |
| */ |
| - MethodInvocation.full(Expression target, Token period, SimpleIdentifier methodName, ArgumentList argumentList) { |
| + MethodInvocation.full(Expression target, this.period, SimpleIdentifier methodName, ArgumentList argumentList) { |
| this._target = becomeParentOf(target); |
| - this.period = period; |
| this._methodName = becomeParentOf(methodName); |
| this._argumentList = becomeParentOf(argumentList); |
| } |
| @@ -8985,12 +8989,12 @@ abstract class NamespaceDirective extends UriBasedDirective { |
| /** |
| * The token representing the 'import' or 'export' keyword. |
| */ |
| - Token _keyword; |
| + Token keyword; |
| /** |
| * The combinators used to control which names are imported or exported. |
| */ |
| - NodeList<Combinator> combinators; |
| + NodeList<Combinator> _combinators; |
| /** |
| * The semicolon terminating the directive. |
| @@ -9007,11 +9011,9 @@ abstract class NamespaceDirective extends UriBasedDirective { |
| * @param combinators the combinators used to control which names are imported or exported |
| * @param semicolon the semicolon terminating the directive |
| */ |
| - NamespaceDirective.full(Comment comment, List<Annotation> metadata, Token keyword, StringLiteral libraryUri, List<Combinator> combinators, Token semicolon) : super.full(comment, metadata, libraryUri) { |
| - this.combinators = new NodeList<Combinator>(this); |
| - this._keyword = keyword; |
| - this.combinators.addAll(combinators); |
| - this.semicolon = semicolon; |
| + NamespaceDirective.full(Comment comment, List<Annotation> metadata, this.keyword, StringLiteral libraryUri, List<Combinator> combinators, this.semicolon) : super.full(comment, metadata, libraryUri) { |
| + this._combinators = new NodeList<Combinator>(this); |
| + this._combinators.addAll(combinators); |
| } |
| /** |
| @@ -9026,22 +9028,18 @@ abstract class NamespaceDirective extends UriBasedDirective { |
| */ |
| NamespaceDirective({Comment comment, List<Annotation> metadata, Token keyword, StringLiteral libraryUri, List<Combinator> combinators, Token semicolon}) : this.full(comment, metadata, keyword, libraryUri, combinators, semicolon); |
| - Token get endToken => semicolon; |
| - |
| - Token get keyword => _keyword; |
| - |
| - LibraryElement get uriElement; |
| - |
| /** |
| - * Set the token representing the 'import' or 'export' keyword to the given token. |
| + * Return the combinators used to control how names are imported or exported. |
| * |
| - * @param exportToken the token representing the 'import' or 'export' keyword |
| + * @return the combinators used to control how names are imported or exported |
| */ |
| - void set keyword(Token exportToken) { |
| - this._keyword = exportToken; |
| - } |
| + NodeList<Combinator> get combinators => _combinators; |
| + |
| + Token get endToken => semicolon; |
| - Token get firstTokenAfterCommentAndMetadata => _keyword; |
| + LibraryElement get uriElement; |
| + |
| + Token get firstTokenAfterCommentAndMetadata => keyword; |
| } |
| /** |
| @@ -9072,10 +9070,7 @@ class NativeClause extends ASTNode { |
| * @param keyword the token representing the 'native' keyword |
| * @param name the name of the native object that implements the class. |
| */ |
| - NativeClause.full(Token keyword, StringLiteral name) { |
| - this.keyword = keyword; |
| - this.name = name; |
| - } |
| + NativeClause.full(this.keyword, this.name); |
| /** |
| * Initialize a newly created native clause. |
| @@ -9111,17 +9106,17 @@ class NativeFunctionBody extends FunctionBody { |
| /** |
| * The token representing 'native' that marks the start of the function body. |
| */ |
| - Token nativeToken; |
| + final Token nativeToken; |
| /** |
| * The string literal, after the 'native' token. |
| */ |
| - StringLiteral stringLiteral; |
| + StringLiteral _stringLiteral; |
| /** |
| * The token representing the semicolon that marks the end of the function body. |
| */ |
| - Token semicolon; |
| + final Token semicolon; |
| /** |
| * Initialize a newly created function body consisting of the 'native' token, a string literal, |
| @@ -9131,10 +9126,8 @@ class NativeFunctionBody extends FunctionBody { |
| * @param stringLiteral the string literal |
| * @param semicolon the token representing the semicolon that marks the end of the function body |
| */ |
| - NativeFunctionBody.full(Token nativeToken, StringLiteral stringLiteral, Token semicolon) { |
| - this.nativeToken = nativeToken; |
| - this.stringLiteral = becomeParentOf(stringLiteral); |
| - this.semicolon = semicolon; |
| + NativeFunctionBody.full(this.nativeToken, StringLiteral stringLiteral, this.semicolon) { |
| + this._stringLiteral = becomeParentOf(stringLiteral); |
| } |
| /** |
| @@ -9153,8 +9146,15 @@ class NativeFunctionBody extends FunctionBody { |
| Token get endToken => semicolon; |
| + /** |
| + * Return the string literal representing the string after the 'native' token. |
| + * |
| + * @return the string literal representing the string after the 'native' token |
| + */ |
| + StringLiteral get stringLiteral => _stringLiteral; |
| + |
| void visitChildren(ASTVisitor visitor) { |
| - safelyVisitChild(stringLiteral, visitor); |
| + safelyVisitChild(_stringLiteral, visitor); |
| } |
| } |
| @@ -9181,7 +9181,7 @@ abstract class NormalFormalParameter extends FormalParameter { |
| /** |
| * The annotations associated with this parameter. |
| */ |
| - NodeList<Annotation> metadata; |
| + NodeList<Annotation> _metadata; |
| /** |
| * The name of the parameter being declared. |
| @@ -9196,9 +9196,9 @@ abstract class NormalFormalParameter extends FormalParameter { |
| * @param identifier the name of the parameter being declared |
| */ |
| NormalFormalParameter.full(Comment comment, List<Annotation> metadata, SimpleIdentifier identifier) { |
| - this.metadata = new NodeList<Annotation>(this); |
| + this._metadata = new NodeList<Annotation>(this); |
| this._comment = becomeParentOf(comment); |
| - this.metadata.addAll(metadata); |
| + this._metadata.addAll(metadata); |
| this._identifier = becomeParentOf(identifier); |
| } |
| @@ -9230,6 +9230,13 @@ abstract class NormalFormalParameter extends FormalParameter { |
| } |
| /** |
| + * Return the annotations associated with this parameter. |
| + * |
| + * @return the annotations associated with this parameter |
| + */ |
| + NodeList<Annotation> get metadata => _metadata; |
| + |
| + /** |
| * Set the documentation comment associated with this parameter to the given comment |
| * |
| * @param comment the documentation comment to be associated with this parameter |
| @@ -9250,7 +9257,7 @@ abstract class NormalFormalParameter extends FormalParameter { |
| void visitChildren(ASTVisitor visitor) { |
| if (commentIsBeforeAnnotations()) { |
| safelyVisitChild(_comment, visitor); |
| - metadata.accept(visitor); |
| + _metadata.accept(visitor); |
| } else { |
| for (ASTNode child in sortedCommentAndAnnotations) { |
| child.accept(visitor); |
| @@ -9264,10 +9271,10 @@ abstract class NormalFormalParameter extends FormalParameter { |
| * @return `true` if the comment is lexically before any annotations |
| */ |
| bool commentIsBeforeAnnotations() { |
| - if (_comment == null || metadata.isEmpty) { |
| + if (_comment == null || _metadata.isEmpty) { |
| return true; |
| } |
| - Annotation firstAnnotation = metadata[0]; |
| + Annotation firstAnnotation = _metadata[0]; |
| return _comment.offset < firstAnnotation.offset; |
| } |
| @@ -9281,7 +9288,7 @@ abstract class NormalFormalParameter extends FormalParameter { |
| List<ASTNode> get sortedCommentAndAnnotations { |
| List<ASTNode> childList = new List<ASTNode>(); |
| childList.add(_comment); |
| - childList.addAll(metadata); |
| + childList.addAll(_metadata); |
| List<ASTNode> children = new List.from(childList); |
| children.sort(ASTNode.LEXICAL_ORDER); |
| return children; |
| @@ -9469,10 +9476,7 @@ class PartDirective extends UriBasedDirective { |
| * @param partUri the URI of the part being included |
| * @param semicolon the semicolon terminating the directive |
| */ |
| - PartDirective.full(Comment comment, List<Annotation> metadata, Token partToken, StringLiteral partUri, Token semicolon) : super.full(comment, metadata, partUri) { |
| - this.partToken = partToken; |
| - this.semicolon = semicolon; |
| - } |
| + PartDirective.full(Comment comment, List<Annotation> metadata, this.partToken, StringLiteral partUri, this.semicolon) : super.full(comment, metadata, partUri); |
| /** |
| * Initialize a newly created part directive. |
| @@ -9537,11 +9541,8 @@ class PartOfDirective extends Directive { |
| * @param libraryName the name of the library that the containing compilation unit is part of |
| * @param semicolon the semicolon terminating the directive |
| */ |
| - PartOfDirective.full(Comment comment, List<Annotation> metadata, Token partToken, Token ofToken, LibraryIdentifier libraryName, Token semicolon) : super.full(comment, metadata) { |
| - this.partToken = partToken; |
| - this.ofToken = ofToken; |
| + PartOfDirective.full(Comment comment, List<Annotation> metadata, this.partToken, this.ofToken, LibraryIdentifier libraryName, this.semicolon) : super.full(comment, metadata) { |
| this._libraryName = becomeParentOf(libraryName); |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -9627,9 +9628,8 @@ class PostfixExpression extends Expression { |
| * @param operand the expression computing the operand for the operator |
| * @param operator the postfix operator being applied to the operand |
| */ |
| - PostfixExpression.full(Expression operand, Token operator) { |
| + PostfixExpression.full(Expression operand, this.operator) { |
| this._operand = becomeParentOf(operand); |
| - this.operator = operator; |
| } |
| /** |
| @@ -9808,8 +9808,7 @@ class PrefixExpression extends Expression { |
| * @param operator the prefix operator being applied to the operand |
| * @param operand the expression computing the operand for the operator |
| */ |
| - PrefixExpression.full(Token operator, Expression operand) { |
| - this.operator = operator; |
| + PrefixExpression.full(this.operator, Expression operand) { |
| this._operand = becomeParentOf(operand); |
| } |
| @@ -9983,9 +9982,8 @@ class PrefixedIdentifier extends Identifier { |
| * @param period the period used to separate the prefix from the identifier |
| * @param identifier the prefix associated with the library in which the identifier is defined |
| */ |
| - PrefixedIdentifier.full(SimpleIdentifier prefix, Token period, SimpleIdentifier identifier) { |
| + PrefixedIdentifier.full(SimpleIdentifier prefix, this.period, SimpleIdentifier identifier) { |
| this._prefix = becomeParentOf(prefix); |
| - this.period = period; |
| this._identifier = becomeParentOf(identifier); |
| } |
| @@ -10105,9 +10103,8 @@ class PropertyAccess extends Expression { |
| * @param operator the property access operator |
| * @param propertyName the name of the property being accessed |
| */ |
| - PropertyAccess.full(Expression target, Token operator, SimpleIdentifier propertyName) { |
| + PropertyAccess.full(Expression target, this.operator, SimpleIdentifier propertyName) { |
| this._target = becomeParentOf(target); |
| - this.operator = operator; |
| this._propertyName = becomeParentOf(propertyName); |
| } |
| @@ -10257,9 +10254,7 @@ class RedirectingConstructorInvocation extends ConstructorInitializer { |
| * @param constructorName the name of the constructor that is being invoked |
| * @param argumentList the list of arguments to the constructor |
| */ |
| - RedirectingConstructorInvocation.full(Token keyword, Token period, SimpleIdentifier constructorName, ArgumentList argumentList) { |
| - this.keyword = keyword; |
| - this.period = period; |
| + RedirectingConstructorInvocation.full(this.keyword, this.period, SimpleIdentifier constructorName, ArgumentList argumentList) { |
| this._constructorName = becomeParentOf(constructorName); |
| this._argumentList = becomeParentOf(argumentList); |
| } |
| @@ -10341,9 +10336,7 @@ class RethrowExpression extends Expression { |
| * |
| * @param keyword the token representing the 'rethrow' keyword |
| */ |
| - RethrowExpression.full(Token keyword) { |
| - this.keyword = keyword; |
| - } |
| + RethrowExpression.full(this.keyword); |
| /** |
| * Initialize a newly created rethrow expression. |
| @@ -10398,10 +10391,8 @@ class ReturnStatement extends Statement { |
| * @param expression the expression computing the value to be returned |
| * @param semicolon the semicolon terminating the statement |
| */ |
| - ReturnStatement.full(Token keyword, Expression expression, Token semicolon) { |
| - this.keyword = keyword; |
| + ReturnStatement.full(this.keyword, Expression expression, this.semicolon) { |
| this._expression = becomeParentOf(expression); |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -10463,9 +10454,7 @@ class ScriptTag extends ASTNode { |
| * |
| * @param scriptTag the token representing this script tag |
| */ |
| - ScriptTag.full(Token scriptTag) { |
| - this.scriptTag = scriptTag; |
| - } |
| + ScriptTag.full(this.scriptTag); |
| /** |
| * Initialize a newly created script tag. |
| @@ -10499,7 +10488,7 @@ class ShowCombinator extends Combinator { |
| /** |
| * The list of names from the library that are made visible by this combinator. |
| */ |
| - NodeList<SimpleIdentifier> shownNames; |
| + NodeList<SimpleIdentifier> _shownNames; |
| /** |
| * Initialize a newly created import show combinator. |
| @@ -10508,8 +10497,8 @@ class ShowCombinator extends Combinator { |
| * @param shownNames the list of names from the library that are made visible by this combinator |
| */ |
| ShowCombinator.full(Token keyword, List<SimpleIdentifier> shownNames) : super.full(keyword) { |
| - this.shownNames = new NodeList<SimpleIdentifier>(this); |
| - this.shownNames.addAll(shownNames); |
| + this._shownNames = new NodeList<SimpleIdentifier>(this); |
| + this._shownNames.addAll(shownNames); |
| } |
| /** |
| @@ -10522,10 +10511,17 @@ class ShowCombinator extends Combinator { |
| accept(ASTVisitor visitor) => visitor.visitShowCombinator(this); |
| - Token get endToken => shownNames.endToken; |
| + Token get endToken => _shownNames.endToken; |
| + |
| + /** |
| + * Return the list of names from the library that are made visible by this combinator. |
| + * |
| + * @return the list of names from the library that are made visible by this combinator |
| + */ |
| + NodeList<SimpleIdentifier> get shownNames => _shownNames; |
| void visitChildren(ASTVisitor visitor) { |
| - shownNames.accept(visitor); |
| + _shownNames.accept(visitor); |
| } |
| } |
| @@ -10561,8 +10557,7 @@ class SimpleFormalParameter extends NormalFormalParameter { |
| * @param type the name of the declared type of the parameter |
| * @param identifier the name of the parameter being declared |
| */ |
| - SimpleFormalParameter.full(Comment comment, List<Annotation> metadata, Token keyword, TypeName type, SimpleIdentifier identifier) : super.full(comment, metadata, identifier) { |
| - this.keyword = keyword; |
| + SimpleFormalParameter.full(Comment comment, List<Annotation> metadata, this.keyword, TypeName type, SimpleIdentifier identifier) : super.full(comment, metadata, identifier) { |
| this._type = becomeParentOf(type); |
| } |
| @@ -10663,9 +10658,7 @@ class SimpleIdentifier extends Identifier { |
| * |
| * @param token the token representing the identifier |
| */ |
| - SimpleIdentifier.full(Token token) { |
| - this.token = token; |
| - } |
| + SimpleIdentifier.full(this.token); |
| /** |
| * Initialize a newly created identifier. |
| @@ -10926,8 +10919,7 @@ class SimpleStringLiteral extends StringLiteral { |
| * @param literal the token representing the literal |
| * @param value the value of the literal |
| */ |
| - SimpleStringLiteral.full(Token literal, String value) { |
| - this.literal = literal; |
| + SimpleStringLiteral.full(this.literal, String value) { |
| this._value = StringUtilities.intern(value); |
| } |
| @@ -11032,7 +11024,7 @@ class StringInterpolation extends StringLiteral { |
| /** |
| * The elements that will be composed to produce the resulting string. |
| */ |
| - NodeList<InterpolationElement> elements; |
| + NodeList<InterpolationElement> _elements; |
| /** |
| * Initialize a newly created string interpolation expression. |
| @@ -11040,8 +11032,8 @@ class StringInterpolation extends StringLiteral { |
| * @param elements the elements that will be composed to produce the resulting string |
| */ |
| StringInterpolation.full(List<InterpolationElement> elements) { |
| - this.elements = new NodeList<InterpolationElement>(this); |
| - this.elements.addAll(elements); |
| + this._elements = new NodeList<InterpolationElement>(this); |
| + this._elements.addAll(elements); |
| } |
| /** |
| @@ -11053,12 +11045,19 @@ class StringInterpolation extends StringLiteral { |
| accept(ASTVisitor visitor) => visitor.visitStringInterpolation(this); |
| - Token get beginToken => elements.beginToken; |
| + Token get beginToken => _elements.beginToken; |
| + |
| + /** |
| + * Return the elements that will be composed to produce the resulting string. |
| + * |
| + * @return the elements that will be composed to produce the resulting string |
| + */ |
| + NodeList<InterpolationElement> get elements => _elements; |
| - Token get endToken => elements.endToken; |
| + Token get endToken => _elements.endToken; |
| void visitChildren(ASTVisitor visitor) { |
| - elements.accept(visitor); |
| + _elements.accept(visitor); |
| } |
| void appendStringValue(JavaStringBuilder builder) { |
| @@ -11154,9 +11153,7 @@ class SuperConstructorInvocation extends ConstructorInitializer { |
| * @param constructorName the name of the constructor that is being invoked |
| * @param argumentList the list of arguments to the constructor |
| */ |
| - SuperConstructorInvocation.full(Token keyword, Token period, SimpleIdentifier constructorName, ArgumentList argumentList) { |
| - this.keyword = keyword; |
| - this.period = period; |
| + SuperConstructorInvocation.full(this.keyword, this.period, SimpleIdentifier constructorName, ArgumentList argumentList) { |
| this._constructorName = becomeParentOf(constructorName); |
| this._argumentList = becomeParentOf(argumentList); |
| } |
| @@ -11238,9 +11235,7 @@ class SuperExpression extends Expression { |
| * |
| * @param keyword the token representing the keyword |
| */ |
| - SuperExpression.full(Token keyword) { |
| - this.keyword = keyword; |
| - } |
| + SuperExpression.full(this.keyword); |
| /** |
| * Initialize a newly created super expression. |
| @@ -11381,7 +11376,7 @@ abstract class SwitchMember extends ASTNode { |
| /** |
| * The labels associated with the switch member. |
| */ |
| - NodeList<Label> labels; |
| + NodeList<Label> _labels; |
| /** |
| * The token representing the 'case' or 'default' keyword. |
| @@ -11396,7 +11391,7 @@ abstract class SwitchMember extends ASTNode { |
| /** |
| * The statements that will be executed if this switch member is selected. |
| */ |
| - NodeList<Statement> statements; |
| + NodeList<Statement> _statements; |
| /** |
| * Initialize a newly created switch member. |
| @@ -11406,13 +11401,11 @@ abstract class SwitchMember extends ASTNode { |
| * @param colon the colon separating the keyword or the expression from the statements |
| * @param statements the statements that will be executed if this switch member is selected |
| */ |
| - SwitchMember.full(List<Label> labels, Token keyword, Token colon, List<Statement> statements) { |
| - this.labels = new NodeList<Label>(this); |
| - this.statements = new NodeList<Statement>(this); |
| - this.labels.addAll(labels); |
| - this.keyword = keyword; |
| - this.colon = colon; |
| - this.statements.addAll(statements); |
| + SwitchMember.full(List<Label> labels, this.keyword, this.colon, List<Statement> statements) { |
| + this._labels = new NodeList<Label>(this); |
| + this._statements = new NodeList<Statement>(this); |
| + this._labels.addAll(labels); |
| + this._statements.addAll(statements); |
| } |
| /** |
| @@ -11426,18 +11419,32 @@ abstract class SwitchMember extends ASTNode { |
| SwitchMember({List<Label> labels, Token keyword, Token colon, List<Statement> statements}) : this.full(labels, keyword, colon, statements); |
| Token get beginToken { |
| - if (!labels.isEmpty) { |
| - return labels.beginToken; |
| + if (!_labels.isEmpty) { |
| + return _labels.beginToken; |
| } |
| return keyword; |
| } |
| Token get endToken { |
| - if (!statements.isEmpty) { |
| - return statements.endToken; |
| + if (!_statements.isEmpty) { |
| + return _statements.endToken; |
| } |
| return colon; |
| } |
| + |
| + /** |
| + * Return the labels associated with the switch member. |
| + * |
| + * @return the labels associated with the switch member |
| + */ |
| + NodeList<Label> get labels => _labels; |
| + |
| + /** |
| + * Return the statements that will be executed if this switch member is selected. |
| + * |
| + * @return the statements that will be executed if this switch member is selected |
| + */ |
| + NodeList<Statement> get statements => _statements; |
| } |
| /** |
| @@ -11479,7 +11486,7 @@ class SwitchStatement extends Statement { |
| /** |
| * The switch members that can be selected by the expression. |
| */ |
| - NodeList<SwitchMember> members; |
| + NodeList<SwitchMember> _members; |
| /** |
| * The right curly bracket. |
| @@ -11497,15 +11504,10 @@ class SwitchStatement extends Statement { |
| * @param members the switch members that can be selected by the expression |
| * @param rightBracket the right curly bracket |
| */ |
| - SwitchStatement.full(Token keyword, Token leftParenthesis, Expression expression, Token rightParenthesis, Token leftBracket, List<SwitchMember> members, Token rightBracket) { |
| - this.members = new NodeList<SwitchMember>(this); |
| - this.keyword = keyword; |
| - this.leftParenthesis = leftParenthesis; |
| + SwitchStatement.full(this.keyword, this.leftParenthesis, Expression expression, this.rightParenthesis, this.leftBracket, List<SwitchMember> members, this.rightBracket) { |
| + this._members = new NodeList<SwitchMember>(this); |
| this._expression = becomeParentOf(expression); |
| - this.rightParenthesis = rightParenthesis; |
| - this.leftBracket = leftBracket; |
| - this.members.addAll(members); |
| - this.rightBracket = rightBracket; |
| + this._members.addAll(members); |
| } |
| /** |
| @@ -11535,6 +11537,13 @@ class SwitchStatement extends Statement { |
| Expression get expression => _expression; |
| /** |
| + * Return the switch members that can be selected by the expression. |
| + * |
| + * @return the switch members that can be selected by the expression |
| + */ |
| + NodeList<SwitchMember> get members => _members; |
| + |
| + /** |
| * Set the expression used to determine which of the switch members will be selected to the given |
| * expression. |
| * |
| @@ -11546,7 +11555,7 @@ class SwitchStatement extends Statement { |
| void visitChildren(ASTVisitor visitor) { |
| safelyVisitChild(_expression, visitor); |
| - members.accept(visitor); |
| + _members.accept(visitor); |
| } |
| } |
| @@ -11569,7 +11578,7 @@ class SymbolLiteral extends Literal { |
| /** |
| * The components of the literal. |
| */ |
| - List<Token> components; |
| + final List<Token> components; |
| /** |
| * Initialize a newly created symbol literal. |
| @@ -11577,10 +11586,7 @@ class SymbolLiteral extends Literal { |
| * @param poundSign the token introducing the literal |
| * @param components the components of the literal |
| */ |
| - SymbolLiteral.full(Token poundSign, List<Token> components) { |
| - this.poundSign = poundSign; |
| - this.components = components; |
| - } |
| + SymbolLiteral.full(this.poundSign, this.components); |
| /** |
| * Initialize a newly created symbol literal. |
| @@ -11621,9 +11627,7 @@ class ThisExpression extends Expression { |
| * |
| * @param keyword the token representing the keyword |
| */ |
| - ThisExpression.full(Token keyword) { |
| - this.keyword = keyword; |
| - } |
| + ThisExpression.full(this.keyword); |
| /** |
| * Initialize a newly created this expression. |
| @@ -11671,8 +11675,7 @@ class ThrowExpression extends Expression { |
| * @param keyword the token representing the 'throw' keyword |
| * @param expression the expression computing the exception to be thrown |
| */ |
| - ThrowExpression.full(Token keyword, Expression expression) { |
| - this.keyword = keyword; |
| + ThrowExpression.full(this.keyword, Expression expression) { |
| this._expression = becomeParentOf(expression); |
| } |
| @@ -11749,9 +11752,8 @@ class TopLevelVariableDeclaration extends CompilationUnitMember { |
| * @param variableList the top-level variables being declared |
| * @param semicolon the semicolon terminating the declaration |
| */ |
| - TopLevelVariableDeclaration.full(Comment comment, List<Annotation> metadata, VariableDeclarationList variableList, Token semicolon) : super.full(comment, metadata) { |
| + TopLevelVariableDeclaration.full(Comment comment, List<Annotation> metadata, VariableDeclarationList variableList, this.semicolon) : super.full(comment, metadata) { |
| this._variableList = becomeParentOf(variableList); |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -11821,7 +11823,7 @@ class TryStatement extends Statement { |
| /** |
| * The catch clauses contained in the try statement. |
| */ |
| - NodeList<CatchClause> catchClauses; |
| + NodeList<CatchClause> _catchClauses; |
| /** |
| * The token representing the 'finally' keyword, or `null` if the statement does not contain |
| @@ -11844,12 +11846,10 @@ class TryStatement extends Statement { |
| * @param finallyKeyword the token representing the 'finally' keyword |
| * @param finallyBlock the finally block contained in the try statement |
| */ |
| - TryStatement.full(Token tryKeyword, Block body, List<CatchClause> catchClauses, Token finallyKeyword, Block finallyBlock) { |
| - this.catchClauses = new NodeList<CatchClause>(this); |
| - this.tryKeyword = tryKeyword; |
| + TryStatement.full(this.tryKeyword, Block body, List<CatchClause> catchClauses, this.finallyKeyword, Block finallyBlock) { |
| + this._catchClauses = new NodeList<CatchClause>(this); |
| this._body = becomeParentOf(body); |
| - this.catchClauses.addAll(catchClauses); |
| - this.finallyKeyword = finallyKeyword; |
| + this._catchClauses.addAll(catchClauses); |
| this._finallyBlock = becomeParentOf(finallyBlock); |
| } |
| @@ -11875,13 +11875,20 @@ class TryStatement extends Statement { |
| */ |
| Block get body => _body; |
| + /** |
| + * Return the catch clauses contained in the try statement. |
| + * |
| + * @return the catch clauses contained in the try statement |
| + */ |
| + NodeList<CatchClause> get catchClauses => _catchClauses; |
| + |
| Token get endToken { |
| if (_finallyBlock != null) { |
| return _finallyBlock.endToken; |
| } else if (finallyKeyword != null) { |
| return finallyKeyword; |
| - } else if (!catchClauses.isEmpty) { |
| - return catchClauses.endToken; |
| + } else if (!_catchClauses.isEmpty) { |
| + return _catchClauses.endToken; |
| } |
| return _body.endToken; |
| } |
| @@ -11914,7 +11921,7 @@ class TryStatement extends Statement { |
| void visitChildren(ASTVisitor visitor) { |
| safelyVisitChild(_body, visitor); |
| - catchClauses.accept(visitor); |
| + _catchClauses.accept(visitor); |
| safelyVisitChild(_finallyBlock, visitor); |
| } |
| } |
| @@ -11952,10 +11959,7 @@ abstract class TypeAlias extends CompilationUnitMember { |
| * @param keyword the token representing the 'typedef' keyword |
| * @param semicolon the semicolon terminating the declaration |
| */ |
| - TypeAlias.full(Comment comment, List<Annotation> metadata, Token keyword, Token semicolon) : super.full(comment, metadata) { |
| - this.keyword = keyword; |
| - this.semicolon = semicolon; |
| - } |
| + TypeAlias.full(Comment comment, List<Annotation> metadata, this.keyword, this.semicolon) : super.full(comment, metadata); |
| /** |
| * Initialize a newly created type alias. |
| @@ -11991,7 +11995,7 @@ class TypeArgumentList extends ASTNode { |
| /** |
| * The type arguments associated with the type. |
| */ |
| - NodeList<TypeName> arguments; |
| + NodeList<TypeName> _arguments; |
| /** |
| * The right bracket. |
| @@ -12005,11 +12009,9 @@ class TypeArgumentList extends ASTNode { |
| * @param arguments the type arguments associated with the type |
| * @param rightBracket the right bracket |
| */ |
| - TypeArgumentList.full(Token leftBracket, List<TypeName> arguments, Token rightBracket) { |
| - this.arguments = new NodeList<TypeName>(this); |
| - this.leftBracket = leftBracket; |
| - this.arguments.addAll(arguments); |
| - this.rightBracket = rightBracket; |
| + TypeArgumentList.full(this.leftBracket, List<TypeName> arguments, this.rightBracket) { |
| + this._arguments = new NodeList<TypeName>(this); |
| + this._arguments.addAll(arguments); |
| } |
| /** |
| @@ -12023,12 +12025,19 @@ class TypeArgumentList extends ASTNode { |
| accept(ASTVisitor visitor) => visitor.visitTypeArgumentList(this); |
| + /** |
| + * Return the type arguments associated with the type. |
| + * |
| + * @return the type arguments associated with the type |
| + */ |
| + NodeList<TypeName> get arguments => _arguments; |
| + |
| Token get beginToken => leftBracket; |
| Token get endToken => rightBracket; |
| void visitChildren(ASTVisitor visitor) { |
| - arguments.accept(visitor); |
| + _arguments.accept(visitor); |
| } |
| } |
| @@ -12169,9 +12178,8 @@ class TypeParameter extends Declaration { |
| * @param keyword the token representing the 'extends' keyword |
| * @param bound the name of the upper bound for legal arguments |
| */ |
| - TypeParameter.full(Comment comment, List<Annotation> metadata, SimpleIdentifier name, Token keyword, TypeName bound) : super.full(comment, metadata) { |
| + TypeParameter.full(Comment comment, List<Annotation> metadata, SimpleIdentifier name, this.keyword, TypeName bound) : super.full(comment, metadata) { |
| this._name = becomeParentOf(name); |
| - this.keyword = keyword; |
| this._bound = becomeParentOf(bound); |
| } |
| @@ -12253,17 +12261,17 @@ class TypeParameterList extends ASTNode { |
| /** |
| * The left angle bracket. |
| */ |
| - Token leftBracket; |
| + final Token leftBracket; |
| /** |
| * The type parameters in the list. |
| */ |
| - NodeList<TypeParameter> typeParameters; |
| + NodeList<TypeParameter> _typeParameters; |
| /** |
| * The right angle bracket. |
| */ |
| - Token rightBracket; |
| + final Token rightBracket; |
| /** |
| * Initialize a newly created list of type parameters. |
| @@ -12272,11 +12280,9 @@ class TypeParameterList extends ASTNode { |
| * @param typeParameters the type parameters in the list |
| * @param rightBracket the right angle bracket |
| */ |
| - TypeParameterList.full(Token leftBracket, List<TypeParameter> typeParameters, Token rightBracket) { |
| - this.typeParameters = new NodeList<TypeParameter>(this); |
| - this.leftBracket = leftBracket; |
| - this.typeParameters.addAll(typeParameters); |
| - this.rightBracket = rightBracket; |
| + TypeParameterList.full(this.leftBracket, List<TypeParameter> typeParameters, this.rightBracket) { |
| + this._typeParameters = new NodeList<TypeParameter>(this); |
| + this._typeParameters.addAll(typeParameters); |
| } |
| /** |
| @@ -12294,8 +12300,15 @@ class TypeParameterList extends ASTNode { |
| Token get endToken => rightBracket; |
| + /** |
| + * Return the type parameters for the type. |
| + * |
| + * @return the type parameters for the type |
| + */ |
| + NodeList<TypeParameter> get typeParameters => _typeParameters; |
| + |
| void visitChildren(ASTVisitor visitor) { |
| - typeParameters.accept(visitor); |
| + _typeParameters.accept(visitor); |
| } |
| } |
| @@ -12330,8 +12343,7 @@ abstract class TypedLiteral extends Literal { |
| * @param typeArguments the type argument associated with this literal, or `null` if no type |
| * arguments were declared |
| */ |
| - TypedLiteral.full(Token constKeyword, TypeArgumentList typeArguments) { |
| - this.constKeyword = constKeyword; |
| + TypedLiteral.full(this.constKeyword, TypeArgumentList typeArguments) { |
| this.typeArguments = becomeParentOf(typeArguments); |
| } |
| @@ -12458,9 +12470,8 @@ class VariableDeclaration extends Declaration { |
| * @param equals the equal sign separating the variable name from the initial value |
| * @param initializer the expression used to compute the initial value for the variable |
| */ |
| - VariableDeclaration.full(Comment comment, List<Annotation> metadata, SimpleIdentifier name, Token equals, Expression initializer) : super.full(comment, metadata) { |
| + VariableDeclaration.full(Comment comment, List<Annotation> metadata, SimpleIdentifier name, this.equals, Expression initializer) : super.full(comment, metadata) { |
| this._name = becomeParentOf(name); |
| - this.equals = equals; |
| this._initializer = becomeParentOf(initializer); |
| } |
| @@ -12599,7 +12610,7 @@ class VariableDeclarationList extends AnnotatedNode { |
| /** |
| * A list containing the individual variables being declared. |
| */ |
| - NodeList<VariableDeclaration> variables; |
| + NodeList<VariableDeclaration> _variables; |
| /** |
| * Initialize a newly created variable declaration list. |
| @@ -12610,11 +12621,10 @@ class VariableDeclarationList extends AnnotatedNode { |
| * @param type the type of the variables being declared |
| * @param variables a list containing the individual variables being declared |
| */ |
| - VariableDeclarationList.full(Comment comment, List<Annotation> metadata, Token keyword, TypeName type, List<VariableDeclaration> variables) : super.full(comment, metadata) { |
| - this.variables = new NodeList<VariableDeclaration>(this); |
| - this.keyword = keyword; |
| + VariableDeclarationList.full(Comment comment, List<Annotation> metadata, this.keyword, TypeName type, List<VariableDeclaration> variables) : super.full(comment, metadata) { |
| + this._variables = new NodeList<VariableDeclaration>(this); |
| this._type = becomeParentOf(type); |
| - this.variables.addAll(variables); |
| + this._variables.addAll(variables); |
| } |
| /** |
| @@ -12630,7 +12640,7 @@ class VariableDeclarationList extends AnnotatedNode { |
| accept(ASTVisitor visitor) => visitor.visitVariableDeclarationList(this); |
| - Token get endToken => variables.endToken; |
| + Token get endToken => _variables.endToken; |
| /** |
| * Return the type of the variables being declared, or `null` if no type was provided. |
| @@ -12640,6 +12650,13 @@ class VariableDeclarationList extends AnnotatedNode { |
| TypeName get type => _type; |
| /** |
| + * Return a list containing the individual variables being declared. |
| + * |
| + * @return a list containing the individual variables being declared |
| + */ |
| + NodeList<VariableDeclaration> get variables => _variables; |
| + |
| + /** |
| * Return `true` if the variables in this list were declared with the 'const' modifier. |
| * |
| * @return `true` if the variables in this list were declared with the 'const' modifier |
| @@ -12666,7 +12683,7 @@ class VariableDeclarationList extends AnnotatedNode { |
| void visitChildren(ASTVisitor visitor) { |
| safelyVisitChild(_type, visitor); |
| - variables.accept(visitor); |
| + _variables.accept(visitor); |
| } |
| Token get firstTokenAfterCommentAndMetadata { |
| @@ -12675,7 +12692,7 @@ class VariableDeclarationList extends AnnotatedNode { |
| } else if (_type != null) { |
| return _type.beginToken; |
| } |
| - return variables.beginToken; |
| + return _variables.beginToken; |
| } |
| } |
| @@ -12707,9 +12724,8 @@ class VariableDeclarationStatement extends Statement { |
| * @param variableList the fields being declared |
| * @param semicolon the semicolon terminating the statement |
| */ |
| - VariableDeclarationStatement.full(VariableDeclarationList variableList, Token semicolon) { |
| + VariableDeclarationStatement.full(VariableDeclarationList variableList, this.semicolon) { |
| this._variableList = becomeParentOf(variableList); |
| - this.semicolon = semicolon; |
| } |
| /** |
| @@ -12792,11 +12808,8 @@ class WhileStatement extends Statement { |
| * @param rightParenthesis the right parenthesis |
| * @param body the body of the loop |
| */ |
| - WhileStatement.full(Token keyword, Token leftParenthesis, Expression condition, Token rightParenthesis, Statement body) { |
| - this.keyword = keyword; |
| - this.leftParenthesis = leftParenthesis; |
| + WhileStatement.full(this.keyword, this.leftParenthesis, Expression condition, this.rightParenthesis, Statement body) { |
| this._condition = becomeParentOf(condition); |
| - this.rightParenthesis = rightParenthesis; |
| this._body = becomeParentOf(body); |
| } |
| @@ -12870,12 +12883,12 @@ class WithClause extends ASTNode { |
| /** |
| * The token representing the 'with' keyword. |
| */ |
| - Token withKeyword; |
| + Token _withKeyword; |
| /** |
| * The names of the mixins that were specified. |
| */ |
| - NodeList<TypeName> mixinTypes; |
| + NodeList<TypeName> _mixinTypes; |
| /** |
| * Initialize a newly created with clause. |
| @@ -12884,9 +12897,9 @@ class WithClause extends ASTNode { |
| * @param mixinTypes the names of the mixins that were specified |
| */ |
| WithClause.full(Token withKeyword, List<TypeName> mixinTypes) { |
| - this.mixinTypes = new NodeList<TypeName>(this); |
| - this.withKeyword = withKeyword; |
| - this.mixinTypes.addAll(mixinTypes); |
| + this._mixinTypes = new NodeList<TypeName>(this); |
| + this._withKeyword = withKeyword; |
| + this._mixinTypes.addAll(mixinTypes); |
| } |
| /** |
| @@ -12899,9 +12912,23 @@ class WithClause extends ASTNode { |
| accept(ASTVisitor visitor) => visitor.visitWithClause(this); |
| - Token get beginToken => withKeyword; |
| + Token get beginToken => _withKeyword; |
| - Token get endToken => mixinTypes.endToken; |
| + Token get endToken => _mixinTypes.endToken; |
| + |
| + /** |
| + * Return the names of the mixins that were specified. |
| + * |
| + * @return the names of the mixins that were specified |
| + */ |
| + NodeList<TypeName> get mixinTypes => _mixinTypes; |
| + |
| + /** |
| + * Return the token representing the 'with' keyword. |
| + * |
| + * @return the token representing the 'with' keyword |
| + */ |
| + Token get withKeyword => _withKeyword; |
| /** |
| * Set the token representing the 'with' keyword to the given token. |
| @@ -12909,11 +12936,11 @@ class WithClause extends ASTNode { |
| * @param withKeyword the token representing the 'with' keyword |
| */ |
| void set mixinKeyword(Token withKeyword) { |
| - this.withKeyword = withKeyword; |
| + this._withKeyword = withKeyword; |
| } |
| void visitChildren(ASTVisitor visitor) { |
| - mixinTypes.accept(visitor); |
| + _mixinTypes.accept(visitor); |
| } |
| } |
| @@ -13691,7 +13718,7 @@ class NodeLocator extends UnifyingASTVisitor<Object> { |
| * The element that was found that corresponds to the given source range, or `null` if there |
| * is no such element. |
| */ |
| - ASTNode foundNode; |
| + ASTNode _foundNode; |
| /** |
| * Initialize a newly created locator to locate one or more [ASTNode] by locating |
| @@ -13715,6 +13742,14 @@ class NodeLocator extends UnifyingASTVisitor<Object> { |
| } |
| /** |
| + * Return the node that was found that corresponds to the given source range, or `null` if |
| + * there is no such node. |
| + * |
| + * @return the node that was found |
| + */ |
| + ASTNode get foundNode => _foundNode; |
| + |
| + /** |
| * Search within the given AST node for an identifier representing a [DartElement] in the specified source range. Return the element that was found, or `null` if |
| * no element was found. |
| * |
| @@ -13732,7 +13767,7 @@ class NodeLocator extends UnifyingASTVisitor<Object> { |
| AnalysisEngine.instance.logger.logInformation2("Unable to locate element at offset (${_startOffset} - ${_endOffset})", exception); |
| return null; |
| } |
| - return foundNode; |
| + return _foundNode; |
| } |
| Object visitNode(ASTNode node) { |
| @@ -13752,7 +13787,7 @@ class NodeLocator extends UnifyingASTVisitor<Object> { |
| AnalysisEngine.instance.logger.logInformation2("Exception caught while traversing an AST structure.", exception); |
| } |
| if (start <= _startOffset && _endOffset <= end) { |
| - foundNode = node; |
| + _foundNode = node; |
| throw new NodeLocator_NodeFoundException(); |
| } |
| return null; |
| @@ -16982,7 +17017,11 @@ class IncrementalASTCloner implements ASTVisitor<ASTNode> { |
| SimpleFormalParameter visitSimpleFormalParameter(SimpleFormalParameter node) => new SimpleFormalParameter.full(clone4(node.documentationComment), clone5(node.metadata), map(node.keyword), clone4(node.type), clone4(node.identifier)); |
| SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) { |
| - SimpleIdentifier copy = new SimpleIdentifier.full(map(node.token)); |
| + Token mappedToken = map(node.token); |
| + if (mappedToken == null) { |
| + mappedToken = node.token; |
| + } |
| + SimpleIdentifier copy = new SimpleIdentifier.full(mappedToken); |
| copy.auxiliaryElements = node.auxiliaryElements; |
| copy.propagatedElement = node.propagatedElement; |
| copy.propagatedType = node.propagatedType; |
| @@ -17116,11 +17155,11 @@ class IncrementalASTCloner implements ASTVisitor<ASTNode> { |
| * @coverage com.google.dart.engine.services.completion |
| */ |
| class ScopedNameFinder extends GeneralizingASTVisitor<Object> { |
| - Declaration declaration; |
| + Declaration _declarationNode; |
| ASTNode _immediateChild; |
| - final Map<String, SimpleIdentifier> locals = new Map<String, SimpleIdentifier>(); |
| + Map<String, SimpleIdentifier> _locals = new Map<String, SimpleIdentifier>(); |
| int _position = 0; |
| @@ -17130,6 +17169,10 @@ class ScopedNameFinder extends GeneralizingASTVisitor<Object> { |
| this._position = position; |
| } |
| + Declaration get declaration => _declarationNode; |
| + |
| + Map<String, SimpleIdentifier> get locals => _locals; |
| + |
| Object visitBlock(Block node) { |
| checkStatements(node.statements); |
| return super.visitBlock(node); |
| @@ -17145,12 +17188,12 @@ class ScopedNameFinder extends GeneralizingASTVisitor<Object> { |
| if (_immediateChild != node.parameters) { |
| addParameters(node.parameters.parameters); |
| } |
| - declaration = node; |
| + _declarationNode = node; |
| return null; |
| } |
| Object visitFieldDeclaration(FieldDeclaration node) { |
| - declaration = node; |
| + _declarationNode = node; |
| return null; |
| } |
| @@ -17171,7 +17214,7 @@ class ScopedNameFinder extends GeneralizingASTVisitor<Object> { |
| Object visitFunctionDeclaration(FunctionDeclaration node) { |
| if (node.parent is! FunctionDeclarationStatement) { |
| - declaration = node; |
| + _declarationNode = node; |
| return null; |
| } |
| return super.visitFunctionDeclaration(node); |
| @@ -17190,7 +17233,7 @@ class ScopedNameFinder extends GeneralizingASTVisitor<Object> { |
| } |
| Object visitMethodDeclaration(MethodDeclaration node) { |
| - declaration = node; |
| + _declarationNode = node; |
| if (node.parameters == null) { |
| return null; |
| } |
| @@ -17215,12 +17258,12 @@ class ScopedNameFinder extends GeneralizingASTVisitor<Object> { |
| } |
| Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { |
| - declaration = node; |
| + _declarationNode = node; |
| return null; |
| } |
| Object visitTypeAlias(TypeAlias node) { |
| - declaration = node; |
| + _declarationNode = node; |
| return null; |
| } |
| @@ -17233,8 +17276,8 @@ class ScopedNameFinder extends GeneralizingASTVisitor<Object> { |
| void addToScope(SimpleIdentifier identifier) { |
| if (identifier != null && isInRange(identifier)) { |
| String name = identifier.name; |
| - if (!locals.containsKey(name)) { |
| - locals[name] = identifier; |
| + if (!_locals.containsKey(name)) { |
| + _locals[name] = identifier; |
| } |
| } |
| } |