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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/ast.dart

Issue 23769004: java2dart improvement - use field if getter/setter are trivial. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_experimental/lib/src/generated/ast.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/ast.dart b/pkg/analyzer_experimental/lib/src/generated/ast.dart
index f3e9d2e595dabe0973e6658e1178da5a2909b378..9c25d8ad90d3f349d8d0221a6628a86a9f848863 100644
--- a/pkg/analyzer_experimental/lib/src/generated/ast.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/ast.dart
@@ -378,7 +378,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.
@@ -386,8 +386,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);
}
/**
@@ -397,17 +397,10 @@ class AdjacentStrings extends StringLiteral {
*/
AdjacentStrings({List<StringLiteral> strings}) : this.full(strings);
accept(ASTVisitor visitor) => visitor.visitAdjacentStrings(this);
- Token get beginToken => _strings.beginToken;
- Token get endToken => _strings.endToken;
-
- /**
- * Return the strings that are implicitly concatenated.
- *
- * @return the strings that are implicitly concatenated
- */
- NodeList<StringLiteral> get strings => _strings;
+ Token get beginToken => strings.beginToken;
+ Token get endToken => strings.endToken;
void visitChildren(ASTVisitor visitor) {
- _strings.accept(visitor);
+ strings.accept(visitor);
}
void appendStringValue(JavaStringBuilder builder) {
for (StringLiteral stringLiteral in strings) {
@@ -570,7 +563,7 @@ class Annotation extends ASTNode {
/**
* The at sign that introduced the annotation.
*/
- Token _atSign;
+ Token atSign;
/**
* The name of the class defining the constructor that is being invoked or the name of the field
@@ -582,7 +575,7 @@ class Annotation extends ASTNode {
* The period before the constructor name, or `null` if this annotation is not the
* invocation of a named constructor.
*/
- Token _period;
+ Token period;
/**
* The name of the constructor being invoked, or `null` if this annotation is not the
@@ -616,9 +609,9 @@ class Annotation extends ASTNode {
* annotation is not the invocation of a constructor
*/
Annotation.full(Token atSign, Identifier name, Token period, SimpleIdentifier constructorName, ArgumentList arguments) {
- this._atSign = atSign;
+ this.atSign = atSign;
this._name = becomeParentOf(name);
- this._period = period;
+ this.period = period;
this._constructorName = becomeParentOf(constructorName);
this._arguments = becomeParentOf(arguments);
}
@@ -646,14 +639,7 @@ class Annotation extends ASTNode {
* @return the arguments to the constructor being invoked
*/
ArgumentList get arguments => _arguments;
-
- /**
- * Return the at sign that introduced the annotation.
- *
- * @return the at sign that introduced the annotation
- */
- Token get atSign => _atSign;
- Token get beginToken => _atSign;
+ Token get beginToken => atSign;
/**
* Return the name of the constructor being invoked, or `null` if this annotation is not the
@@ -696,14 +682,6 @@ class Annotation extends ASTNode {
Identifier get name => _name;
/**
- * Return the period before the constructor name, or `null` if this annotation is not the
- * invocation of a named constructor.
- *
- * @return the period before the constructor name
- */
- Token get period => _period;
-
- /**
* Set the arguments to the constructor being invoked to the given arguments.
*
* @param arguments the arguments to the constructor being invoked
@@ -713,15 +691,6 @@ class Annotation extends ASTNode {
}
/**
- * Set the at sign that introduced the annotation to the given token.
- *
- * @param atSign the at sign that introduced the annotation
- */
- void set atSign(Token atSign2) {
- this._atSign = atSign2;
- }
-
- /**
* Set the name of the constructor being invoked to the given name.
*
* @param constructorName the name of the constructor being invoked
@@ -748,15 +717,6 @@ class Annotation extends ASTNode {
void set name(Identifier name2) {
this._name = becomeParentOf(name2);
}
-
- /**
- * Set the period before the constructor name to the given token.
- *
- * @param period the period before the constructor name
- */
- void set period(Token period2) {
- this._period = period2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_name, visitor);
safelyVisitChild(_constructorName, visitor);
@@ -778,7 +738,7 @@ class ArgumentDefinitionTest extends Expression {
/**
* The token representing the question mark.
*/
- Token _question;
+ Token question;
/**
* The identifier representing the argument being tested.
@@ -792,7 +752,7 @@ class ArgumentDefinitionTest extends Expression {
* @param identifier the identifier representing the argument being tested
*/
ArgumentDefinitionTest.full(Token question, SimpleIdentifier identifier) {
- this._question = question;
+ this.question = question;
this._identifier = becomeParentOf(identifier);
}
@@ -804,7 +764,7 @@ class ArgumentDefinitionTest extends Expression {
*/
ArgumentDefinitionTest({Token question, SimpleIdentifier identifier}) : this.full(question, identifier);
accept(ASTVisitor visitor) => visitor.visitArgumentDefinitionTest(this);
- Token get beginToken => _question;
+ Token get beginToken => question;
Token get endToken => _identifier.endToken;
/**
@@ -815,13 +775,6 @@ class ArgumentDefinitionTest extends Expression {
SimpleIdentifier get identifier => _identifier;
/**
- * Return the token representing the question mark.
- *
- * @return the token representing the question mark
- */
- Token get question => _question;
-
- /**
* Set the identifier representing the argument being tested to the given identifier.
*
* @param identifier the identifier representing the argument being tested
@@ -829,15 +782,6 @@ class ArgumentDefinitionTest extends Expression {
void set identifier(SimpleIdentifier identifier2) {
this._identifier = becomeParentOf(identifier2);
}
-
- /**
- * Set the token representing the question mark to the given token.
- *
- * @param question the token representing the question mark
- */
- void set question(Token question2) {
- this._question = question2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_identifier, visitor);
}
@@ -867,7 +811,7 @@ class ArgumentList extends ASTNode {
/**
* The expressions producing the values of the arguments.
*/
- NodeList<Expression> _arguments;
+ NodeList<Expression> arguments;
/**
* The right parenthesis.
@@ -900,9 +844,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;
}
@@ -915,15 +859,6 @@ class ArgumentList extends ASTNode {
*/
ArgumentList({Token leftParenthesis, List<Expression> arguments, Token rightParenthesis}) : this.full(leftParenthesis, arguments, rightParenthesis);
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;
@@ -950,8 +885,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;
}
@@ -965,8 +900,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;
}
@@ -989,7 +924,7 @@ class ArgumentList extends ASTNode {
_rightParenthesis = parenthesis;
}
void visitChildren(ASTVisitor visitor) {
- _arguments.accept(visitor);
+ arguments.accept(visitor);
}
/**
@@ -1009,7 +944,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;
}
@@ -1033,7 +968,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;
}
@@ -1060,7 +995,7 @@ class AsExpression extends Expression {
/**
* The as operator.
*/
- Token _asOperator;
+ Token asOperator;
/**
* The name of the type being cast to.
@@ -1076,7 +1011,7 @@ class AsExpression extends Expression {
*/
AsExpression.full(Expression expression, Token isOperator, TypeName type) {
this._expression = becomeParentOf(expression);
- this._asOperator = isOperator;
+ this.asOperator = isOperator;
this._type = becomeParentOf(type);
}
@@ -1089,13 +1024,6 @@ class AsExpression extends Expression {
*/
AsExpression({Expression expression, Token isOperator, TypeName type}) : this.full(expression, isOperator, type);
accept(ASTVisitor visitor) => visitor.visitAsExpression(this);
-
- /**
- * Return the as operator being applied.
- *
- * @return the as operator being applied
- */
- Token get asOperator => _asOperator;
Token get beginToken => _expression.beginToken;
Token get endToken => _type.endToken;
@@ -1114,15 +1042,6 @@ class AsExpression extends Expression {
TypeName get type => _type;
/**
- * Set the is operator being applied to the given operator.
- *
- * @param asOperator the is operator being applied
- */
- void set asOperator(Token asOperator2) {
- this._asOperator = asOperator2;
- }
-
- /**
* Set the expression used to compute the value being cast to the given expression.
*
* @param expression the expression used to compute the value being cast
@@ -1159,12 +1078,12 @@ class AssertStatement extends Statement {
/**
* The token representing the 'assert' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The left parenthesis.
*/
- Token _leftParenthesis;
+ Token leftParenthesis;
/**
* The condition that is being asserted to be `true`.
@@ -1174,12 +1093,12 @@ class AssertStatement extends Statement {
/**
* The right parenthesis.
*/
- Token _rightParenthesis;
+ Token rightParenthesis;
/**
* The semicolon terminating the statement.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created assert statement.
@@ -1191,11 +1110,11 @@ class AssertStatement extends Statement {
* @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;
+ this.keyword = keyword;
+ this.leftParenthesis = leftParenthesis;
this._condition = becomeParentOf(condition);
- this._rightParenthesis = rightParenthesis;
- this._semicolon = semicolon;
+ this.rightParenthesis = rightParenthesis;
+ this.semicolon = semicolon;
}
/**
@@ -1209,7 +1128,7 @@ class AssertStatement extends Statement {
*/
AssertStatement({Token keyword, Token leftParenthesis, Expression condition, Token rightParenthesis, Token semicolon}) : this.full(keyword, leftParenthesis, condition, rightParenthesis, semicolon);
accept(ASTVisitor visitor) => visitor.visitAssertStatement(this);
- Token get beginToken => _keyword;
+ Token get beginToken => keyword;
/**
* Return the condition that is being asserted to be `true`.
@@ -1217,35 +1136,7 @@ class AssertStatement extends Statement {
* @return the condition that is being asserted to be `true`
*/
Expression get condition => _condition;
- Token get endToken => _semicolon;
-
- /**
- * Return the token representing the 'assert' keyword.
- *
- * @return the token representing the 'assert' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Return the left parenthesis.
- *
- * @return the left parenthesis
- */
- Token get leftParenthesis => _leftParenthesis;
-
- /**
- * Return the right parenthesis.
- *
- * @return the right parenthesis
- */
- Token get rightParenthesis => _rightParenthesis;
-
- /**
- * Return the semicolon terminating the statement.
- *
- * @return the semicolon terminating the statement
- */
- Token get semicolon => _semicolon;
+ Token get endToken => semicolon;
/**
* Set the condition that is being asserted to be `true` to the given expression.
@@ -1255,42 +1146,6 @@ class AssertStatement extends Statement {
void set condition(Expression condition2) {
this._condition = becomeParentOf(condition2);
}
-
- /**
- * Set the token representing the 'assert' keyword to the given token.
- *
- * @param keyword the token representing the 'assert' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
- * Set the left parenthesis to the given token.
- *
- * @param the left parenthesis
- */
- void set leftParenthesis(Token leftParenthesis2) {
- this._leftParenthesis = leftParenthesis2;
- }
-
- /**
- * Set the right parenthesis to the given token.
- *
- * @param rightParenthesis the right parenthesis
- */
- void set rightParenthesis(Token rightParenthesis2) {
- this._rightParenthesis = rightParenthesis2;
- }
-
- /**
- * Set the semicolon terminating the statement to the given token.
- *
- * @param semicolon the semicolon terminating the statement
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_condition, visitor);
}
@@ -1315,7 +1170,7 @@ class AssignmentExpression extends Expression {
/**
* The assignment operator being applied.
*/
- Token _operator;
+ Token operator;
/**
* The expression used to compute the right hand side.
@@ -1345,7 +1200,7 @@ class AssignmentExpression extends Expression {
*/
AssignmentExpression.full(Expression leftHandSide, Token operator, Expression rightHandSide) {
this._leftHandSide = becomeParentOf(leftHandSide);
- this._operator = operator;
+ this.operator = operator;
this._rightHandSide = becomeParentOf(rightHandSide);
}
@@ -1385,13 +1240,6 @@ class AssignmentExpression extends Expression {
Expression get leftHandSide => _leftHandSide;
/**
- * Return the assignment operator being applied.
- *
- * @return the assignment operator being applied
- */
- Token get operator => _operator;
-
- /**
* Return the element associated with the operator based on the propagated type of the
* left-hand-side, or `null` if the AST structure has not been resolved, if the operator is
* not a compound operator, or if the operator could not be resolved. One example of the latter
@@ -1428,15 +1276,6 @@ class AssignmentExpression extends Expression {
}
/**
- * Set the assignment operator being applied to the given operator.
- *
- * @param operator the assignment operator being applied
- */
- void set operator(Token operator2) {
- this._operator = operator2;
- }
-
- /**
* Set the element associated with the operator based on the propagated type of the left-hand-side
* to the given element.
*
@@ -1531,7 +1370,7 @@ class BinaryExpression extends Expression {
/**
* The binary operator being applied.
*/
- Token _operator;
+ Token operator;
/**
* The expression used to compute the right operand.
@@ -1561,7 +1400,7 @@ class BinaryExpression extends Expression {
*/
BinaryExpression.full(Expression leftOperand, Token operator, Expression rightOperand) {
this._leftOperand = becomeParentOf(leftOperand);
- this._operator = operator;
+ this.operator = operator;
this._rightOperand = becomeParentOf(rightOperand);
}
@@ -1601,13 +1440,6 @@ class BinaryExpression extends Expression {
Expression get leftOperand => _leftOperand;
/**
- * Return the binary operator being applied.
- *
- * @return the binary operator being applied
- */
- Token get operator => _operator;
-
- /**
* Return the element associated with the operator based on the propagated type of the left
* operand, or `null` if the AST structure has not been resolved, if the operator is not
* user definable, or if the operator could not be resolved. One example of the latter case is an
@@ -1644,15 +1476,6 @@ class BinaryExpression extends Expression {
}
/**
- * Set the binary operator being applied to the given operator.
- *
- * @return the binary operator being applied
- */
- void set operator(Token operator2) {
- this._operator = operator2;
- }
-
- /**
* Set the element associated with the operator based on the propagated type of the left operand
* to the given element.
*
@@ -1742,17 +1565,17 @@ class Block extends Statement {
/**
* The left curly bracket.
*/
- Token _leftBracket;
+ Token leftBracket;
/**
* The statements contained in the block.
*/
- NodeList<Statement> _statements;
+ NodeList<Statement> statements;
/**
* The right curly bracket.
*/
- Token _rightBracket;
+ Token rightBracket;
/**
* Initialize a newly created block of code.
@@ -1762,10 +1585,10 @@ class Block extends Statement {
* @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;
+ this.statements = new NodeList<Statement>(this);
+ this.leftBracket = leftBracket;
+ this.statements.addAll(statements);
+ this.rightBracket = rightBracket;
}
/**
@@ -1777,49 +1600,10 @@ class Block extends Statement {
*/
Block({Token leftBracket, List<Statement> statements, Token rightBracket}) : this.full(leftBracket, statements, rightBracket);
accept(ASTVisitor visitor) => visitor.visitBlock(this);
- Token get beginToken => _leftBracket;
- Token get endToken => _rightBracket;
-
- /**
- * Return the left curly bracket.
- *
- * @return the left curly bracket
- */
- Token get leftBracket => _leftBracket;
-
- /**
- * Return the right curly bracket.
- *
- * @return the right curly bracket
- */
- Token get rightBracket => _rightBracket;
-
- /**
- * Return the statements contained in the block.
- *
- * @return the statements contained in the block
- */
- NodeList<Statement> get statements => _statements;
-
- /**
- * Set the left curly bracket to the given token.
- *
- * @param leftBracket the left curly bracket
- */
- void set leftBracket(Token leftBracket2) {
- this._leftBracket = leftBracket2;
- }
-
- /**
- * Set the right curly bracket to the given token.
- *
- * @param rightBracket the right curly bracket
- */
- void set rightBracket(Token rightBracket2) {
- this._rightBracket = rightBracket2;
- }
+ Token get beginToken => leftBracket;
+ Token get endToken => rightBracket;
void visitChildren(ASTVisitor visitor) {
- _statements.accept(visitor);
+ statements.accept(visitor);
}
}
/**
@@ -1893,12 +1677,12 @@ class BooleanLiteral extends Literal {
/**
* The token representing the literal.
*/
- Token _literal;
+ Token literal;
/**
* The value of the literal.
*/
- bool _value = false;
+ bool value = false;
/**
* Initialize a newly created boolean literal.
@@ -1907,8 +1691,8 @@ class BooleanLiteral extends Literal {
* @param value the value of the literal
*/
BooleanLiteral.full(Token literal, bool value) {
- this._literal = literal;
- this._value = value;
+ this.literal = literal;
+ this.value = value;
}
/**
@@ -1919,41 +1703,9 @@ class BooleanLiteral extends Literal {
*/
BooleanLiteral({Token literal, bool value}) : this.full(literal, value);
accept(ASTVisitor visitor) => visitor.visitBooleanLiteral(this);
- Token get beginToken => _literal;
- Token get endToken => _literal;
-
- /**
- * Return the token representing the literal.
- *
- * @return the token representing the literal
- */
- Token get literal => _literal;
-
- /**
- * Return the value of the literal.
- *
- * @return the value of the literal
- */
- bool get value => _value;
- bool get isSynthetic => _literal.isSynthetic;
-
- /**
- * Set the token representing the literal to the given token.
- *
- * @param literal the token representing the literal
- */
- void set literal(Token literal2) {
- this._literal = literal2;
- }
-
- /**
- * Set the value of the literal to the given value.
- *
- * @param value the value of the literal
- */
- void set value(bool value2) {
- this._value = value2;
- }
+ Token get beginToken => literal;
+ Token get endToken => literal;
+ bool get isSynthetic => literal.isSynthetic;
void visitChildren(ASTVisitor visitor) {
}
}
@@ -1972,7 +1724,7 @@ class BreakStatement extends Statement {
/**
* The token representing the 'break' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The label associated with the statement, or `null` if there is no label.
@@ -1982,7 +1734,7 @@ class BreakStatement extends Statement {
/**
* The semicolon terminating the statement.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created break statement.
@@ -1992,9 +1744,9 @@ class BreakStatement extends Statement {
* @param semicolon the semicolon terminating the statement
*/
BreakStatement.full(Token keyword, SimpleIdentifier label, Token semicolon) {
- this._keyword = keyword;
+ this.keyword = keyword;
this._label = becomeParentOf(label);
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -2006,15 +1758,8 @@ class BreakStatement extends Statement {
*/
BreakStatement({Token keyword, SimpleIdentifier label, Token semicolon}) : this.full(keyword, label, semicolon);
accept(ASTVisitor visitor) => visitor.visitBreakStatement(this);
- Token get beginToken => _keyword;
- Token get endToken => _semicolon;
-
- /**
- * Return the token representing the 'break' keyword.
- *
- * @return the token representing the 'break' keyword
- */
- Token get keyword => _keyword;
+ Token get beginToken => keyword;
+ Token get endToken => semicolon;
/**
* Return the label associated with the statement, or `null` if there is no label.
@@ -2024,22 +1769,6 @@ class BreakStatement extends Statement {
SimpleIdentifier get label => _label;
/**
- * Return the semicolon terminating the statement.
- *
- * @return the semicolon terminating the statement
- */
- Token get semicolon => _semicolon;
-
- /**
- * Set the token representing the 'break' keyword to the given token.
- *
- * @param keyword the token representing the 'break' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
* Set the label associated with the statement to the given identifier.
*
* @param identifier the label associated with the statement
@@ -2047,15 +1776,6 @@ class BreakStatement extends Statement {
void set label(SimpleIdentifier identifier) {
_label = becomeParentOf(identifier);
}
-
- /**
- * Set the semicolon terminating the statement to the given token.
- *
- * @param semicolon the semicolon terminating the statement
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_label, visitor);
}
@@ -2090,7 +1810,7 @@ class CascadeExpression extends Expression {
/**
* The cascade sections sharing the common target.
*/
- NodeList<Expression> _cascadeSections;
+ NodeList<Expression> cascadeSections;
/**
* Initialize a newly created cascade expression.
@@ -2099,9 +1819,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);
}
/**
@@ -2113,14 +1833,7 @@ class CascadeExpression extends Expression {
CascadeExpression({Expression target, List<Expression> cascadeSections}) : this.full(target, cascadeSections);
accept(ASTVisitor visitor) => visitor.visitCascadeExpression(this);
Token get beginToken => _target.beginToken;
-
- /**
- * 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;
+ Token get endToken => cascadeSections.endToken;
/**
* Return the target of the cascade sections.
@@ -2139,7 +1852,7 @@ class CascadeExpression extends Expression {
}
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_target, visitor);
- _cascadeSections.accept(visitor);
+ cascadeSections.accept(visitor);
}
}
/**
@@ -2161,18 +1874,18 @@ class CatchClause extends ASTNode {
/**
* The token representing the 'on' keyword, or `null` if there is no 'on' keyword.
*/
- Token _onKeyword;
+ Token onKeyword;
/**
* The type of exceptions caught by this catch clause, or `null` if this catch clause
* catches every type of exception.
*/
- TypeName _exceptionType;
+ TypeName exceptionType;
/**
* The token representing the 'catch' keyword, or `null` if there is no 'catch' keyword.
*/
- Token _catchKeyword;
+ Token catchKeyword;
/**
* The left parenthesis.
@@ -2188,7 +1901,7 @@ class CatchClause extends ASTNode {
* The comma separating the exception parameter from the stack trace parameter, or `null` if
* there is no stack trace parameter.
*/
- Token _comma;
+ Token comma;
/**
* The parameter whose value will be the stack trace associated with the exception, or
@@ -2220,12 +1933,12 @@ class CatchClause extends ASTNode {
* @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;
- this._exceptionType = becomeParentOf(exceptionType);
- this._catchKeyword = catchKeyword;
+ this.onKeyword = onKeyword;
+ this.exceptionType = becomeParentOf(exceptionType);
+ this.catchKeyword = catchKeyword;
this._leftParenthesis = leftParenthesis;
this._exceptionParameter = becomeParentOf(exceptionParameter);
- this._comma = comma;
+ this.comma = comma;
this._stackTraceParameter = becomeParentOf(stackTraceParameter);
this._rightParenthesis = rightParenthesis;
this._body = becomeParentOf(body);
@@ -2247,10 +1960,10 @@ class CatchClause extends ASTNode {
CatchClause({Token onKeyword, TypeName exceptionType, Token catchKeyword, Token leftParenthesis, SimpleIdentifier exceptionParameter, Token comma, SimpleIdentifier stackTraceParameter, Token rightParenthesis, Block body}) : this.full(onKeyword, exceptionType, catchKeyword, leftParenthesis, exceptionParameter, comma, stackTraceParameter, rightParenthesis, body);
accept(ASTVisitor visitor) => visitor.visitCatchClause(this);
Token get beginToken {
- if (_onKeyword != null) {
- return _onKeyword;
+ if (onKeyword != null) {
+ return onKeyword;
}
- return _catchKeyword;
+ return catchKeyword;
}
/**
@@ -2259,21 +1972,6 @@ class CatchClause extends ASTNode {
* @return the body of the catch block
*/
Block get body => _body;
-
- /**
- * Return the token representing the 'catch' keyword, or `null` if there is no 'catch'
- * keyword.
- *
- * @return the token representing the 'catch' keyword
- */
- Token get catchKeyword => _catchKeyword;
-
- /**
- * Return the comma, or `null` if there is no stack trace parameter.
- *
- * @return the comma
- */
- Token get comma => _comma;
Token get endToken => _body.endToken;
/**
@@ -2284,14 +1982,6 @@ class CatchClause extends ASTNode {
SimpleIdentifier get exceptionParameter => _exceptionParameter;
/**
- * Return the type of exceptions caught by this catch clause, or `null` if this catch clause
- * catches every type of exception.
- *
- * @return the type of exceptions caught by this catch clause
- */
- TypeName get exceptionType => _exceptionType;
-
- /**
* Return the left parenthesis.
*
* @return the left parenthesis
@@ -2299,13 +1989,6 @@ class CatchClause extends ASTNode {
Token get leftParenthesis => _leftParenthesis;
/**
- * Return the token representing the 'on' keyword, or `null` if there is no 'on' keyword.
- *
- * @return the token representing the 'on' keyword
- */
- Token get onKeyword => _onKeyword;
-
- /**
* Return the right parenthesis.
*
* @return the right parenthesis
@@ -2330,24 +2013,6 @@ class CatchClause extends ASTNode {
}
/**
- * Set the token representing the 'catch' keyword to the given token.
- *
- * @param catchKeyword the token representing the 'catch' keyword
- */
- void set catchKeyword(Token catchKeyword2) {
- this._catchKeyword = catchKeyword2;
- }
-
- /**
- * Set the comma to the given token.
- *
- * @param comma the comma
- */
- void set comma(Token comma2) {
- this._comma = comma2;
- }
-
- /**
* Set the parameter whose value will be the exception that was thrown to the given parameter.
*
* @param parameter the parameter whose value will be the exception that was thrown
@@ -2357,15 +2022,6 @@ class CatchClause extends ASTNode {
}
/**
- * Set the type of exceptions caught by this catch clause to the given type.
- *
- * @param exceptionType the type of exceptions caught by this catch clause
- */
- void set exceptionType(TypeName exceptionType2) {
- this._exceptionType = exceptionType2;
- }
-
- /**
* Set the left parenthesis to the given token.
*
* @param parenthesis the left parenthesis
@@ -2375,15 +2031,6 @@ class CatchClause extends ASTNode {
}
/**
- * Set the token representing the 'on' keyword to the given keyword.
- *
- * @param onKeyword the token representing the 'on' keyword
- */
- void set onKeyword(Token onKeyword2) {
- this._onKeyword = onKeyword2;
- }
-
- /**
* Set the right parenthesis to the given token.
*
* @param parenthesis the right parenthesis
@@ -2403,7 +2050,7 @@ class CatchClause extends ASTNode {
_stackTraceParameter = becomeParentOf(parameter);
}
void visitChildren(ASTVisitor visitor) {
- safelyVisitChild(_exceptionType, visitor);
+ safelyVisitChild(exceptionType, visitor);
safelyVisitChild(_exceptionParameter, visitor);
safelyVisitChild(_stackTraceParameter, visitor);
safelyVisitChild(_body, visitor);
@@ -2427,12 +2074,12 @@ class ClassDeclaration extends CompilationUnitMember {
/**
* The 'abstract' keyword, or `null` if the keyword was absent.
*/
- Token _abstractKeyword;
+ Token abstractKeyword;
/**
* The token representing the 'class' keyword.
*/
- Token _classKeyword;
+ Token classKeyword;
/**
* The name of the class being declared.
@@ -2443,7 +2090,7 @@ class ClassDeclaration extends CompilationUnitMember {
* The type parameters for the class, or `null` if the class does not have any type
* parameters.
*/
- TypeParameterList _typeParameters;
+ TypeParameterList typeParameters;
/**
* The extends clause for the class, or `null` if the class does not extend any other class.
@@ -2464,22 +2111,22 @@ class ClassDeclaration extends CompilationUnitMember {
/**
* The native clause for the class, or `null` if the class does not have a native clause.
*/
- NativeClause _nativeClause;
+ NativeClause nativeClause;
/**
* The left curly bracket.
*/
- Token _leftBracket;
+ Token leftBracket;
/**
* The members defined by the class.
*/
- NodeList<ClassMember> _members;
+ NodeList<ClassMember> members;
/**
* The right curly bracket.
*/
- Token _rightBracket;
+ Token rightBracket;
/**
* Initialize a newly created class declaration.
@@ -2498,17 +2145,17 @@ class ClassDeclaration extends CompilationUnitMember {
* @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;
+ this.members = new NodeList<ClassMember>(this);
+ this.abstractKeyword = abstractKeyword;
+ this.classKeyword = classKeyword;
this._name = becomeParentOf(name);
- this._typeParameters = becomeParentOf(typeParameters);
+ 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.leftBracket = leftBracket;
+ this.members.addAll(members);
+ this.rightBracket = rightBracket;
}
/**
@@ -2529,22 +2176,8 @@ class ClassDeclaration extends CompilationUnitMember {
*/
ClassDeclaration({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}) : this.full(comment, metadata, abstractKeyword, classKeyword, name, typeParameters, extendsClause, withClause, implementsClause, leftBracket, members, rightBracket);
accept(ASTVisitor visitor) => visitor.visitClassDeclaration(this);
-
- /**
- * Return the 'abstract' keyword, or `null` if the keyword was absent.
- *
- * @return the 'abstract' keyword
- */
- Token get abstractKeyword => _abstractKeyword;
-
- /**
- * Return the token representing the 'class' keyword.
- *
- * @return the token representing the 'class' keyword
- */
- Token get classKeyword => _classKeyword;
- ClassElement get element => _name != null ? (_name.staticElement as ClassElement) : null;
- Token get endToken => _rightBracket;
+ ClassElement get element => _name != null ? (_name.staticElement as ClassElement) : null;
+ Token get endToken => rightBracket;
/**
* Return the extends clause for this class, or `null` if the class does not extend any
@@ -2563,20 +2196,6 @@ class ClassDeclaration extends CompilationUnitMember {
ImplementsClause get implementsClause => _implementsClause;
/**
- * Return the left curly bracket.
- *
- * @return the left curly bracket
- */
- Token get leftBracket => _leftBracket;
-
- /**
- * 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
@@ -2584,29 +2203,6 @@ class ClassDeclaration extends CompilationUnitMember {
SimpleIdentifier get name => _name;
/**
- * Return the native clause for this class, or `null` if the class does not have a native
- * cluse.
- *
- * @return the native clause for this class
- */
- NativeClause get nativeClause => _nativeClause;
-
- /**
- * Return the right curly bracket.
- *
- * @return the right curly bracket
- */
- Token get rightBracket => _rightBracket;
-
- /**
- * Return the type parameters for the class, or `null` if the class does not have any type
- * parameters.
- *
- * @return the type parameters for the class
- */
- TypeParameterList get typeParameters => _typeParameters;
-
- /**
* Return the with clause for the class, or `null` if the class does not have a with clause.
*
* @return the with clause for the class
@@ -2614,24 +2210,6 @@ class ClassDeclaration extends CompilationUnitMember {
WithClause get withClause => _withClause;
/**
- * Set the 'abstract' keyword to the given keyword.
- *
- * @param abstractKeyword the 'abstract' keyword
- */
- void set abstractKeyword(Token abstractKeyword2) {
- this._abstractKeyword = abstractKeyword2;
- }
-
- /**
- * Set the token representing the 'class' keyword to the given token.
- *
- * @param classKeyword the token representing the 'class' keyword
- */
- void set classKeyword(Token classKeyword2) {
- this._classKeyword = classKeyword2;
- }
-
- /**
* Set the extends clause for this class to the given clause.
*
* @param extendsClause the extends clause for this class
@@ -2650,15 +2228,6 @@ class ClassDeclaration extends CompilationUnitMember {
}
/**
- * Set the left curly bracket to the given token.
- *
- * @param leftBracket the left curly bracket
- */
- void set leftBracket(Token leftBracket2) {
- this._leftBracket = leftBracket2;
- }
-
- /**
* Set the name of the class being declared to the given identifier.
*
* @param identifier the name of the class being declared
@@ -2668,33 +2237,6 @@ class ClassDeclaration extends CompilationUnitMember {
}
/**
- * Set the native clause for this class to the given clause.
- *
- * @param nativeClause the native clause for this class
- */
- void set nativeClause(NativeClause nativeClause2) {
- this._nativeClause = nativeClause2;
- }
-
- /**
- * Set the right curly bracket to the given token.
- *
- * @param rightBracket the right curly bracket
- */
- void set rightBracket(Token rightBracket2) {
- this._rightBracket = rightBracket2;
- }
-
- /**
- * Set the type parameters for the class to the given list of type parameters.
- *
- * @param typeParameters the type parameters for the class
- */
- void set typeParameters(TypeParameterList typeParameters2) {
- this._typeParameters = typeParameters2;
- }
-
- /**
* Set the with clause for the class to the given clause.
*
* @param withClause the with clause for the class
@@ -2705,18 +2247,18 @@ class ClassDeclaration extends CompilationUnitMember {
void visitChildren(ASTVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_name, visitor);
- safelyVisitChild(_typeParameters, visitor);
+ safelyVisitChild(typeParameters, visitor);
safelyVisitChild(_extendsClause, visitor);
safelyVisitChild(_withClause, visitor);
safelyVisitChild(_implementsClause, visitor);
- safelyVisitChild(_nativeClause, visitor);
+ safelyVisitChild(nativeClause, visitor);
members.accept(visitor);
}
Token get firstTokenAfterCommentAndMetadata {
- if (_abstractKeyword != null) {
- return _abstractKeyword;
+ if (abstractKeyword != null) {
+ return abstractKeyword;
}
- return _classKeyword;
+ return classKeyword;
}
}
/**
@@ -2772,13 +2314,13 @@ class ClassTypeAlias extends TypeAlias {
/**
* The token for the '=' separating the name from the definition.
*/
- Token _equals;
+ Token equals;
/**
* The token for the 'abstract' keyword, or `null` if this is not defining an abstract
* class.
*/
- Token _abstractKeyword;
+ Token abstractKeyword;
/**
* The name of the superclass of the class being declared.
@@ -2813,8 +2355,8 @@ class ClassTypeAlias extends TypeAlias {
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) {
this._name = becomeParentOf(name);
this._typeParameters = becomeParentOf(typeParameters);
- this._equals = equals;
- this._abstractKeyword = abstractKeyword;
+ this.equals = equals;
+ this.abstractKeyword = abstractKeyword;
this._superclass = becomeParentOf(superclass);
this._withClause = becomeParentOf(withClause);
this._implementsClause = becomeParentOf(implementsClause);
@@ -2837,24 +2379,9 @@ class ClassTypeAlias extends TypeAlias {
*/
ClassTypeAlias({Comment comment, List<Annotation> metadata, Token keyword, SimpleIdentifier name, TypeParameterList typeParameters, Token equals, Token abstractKeyword, TypeName superclass, WithClause withClause, ImplementsClause implementsClause, Token semicolon}) : this.full(comment, metadata, keyword, name, typeParameters, equals, abstractKeyword, superclass, withClause, implementsClause, semicolon);
accept(ASTVisitor visitor) => visitor.visitClassTypeAlias(this);
-
- /**
- * Return the token for the 'abstract' keyword, or `null` if this is not defining an
- * abstract class.
- *
- * @return the token for the 'abstract' keyword
- */
- Token get abstractKeyword => _abstractKeyword;
ClassElement get element => _name != null ? (_name.staticElement as ClassElement) : null;
/**
- * Return the token for the '=' separating the name from the definition.
- *
- * @return the token for the '=' separating the name from the definition
- */
- Token get equals => _equals;
-
- /**
* Return the implements clause for this class, or `null` if there is no implements clause.
*
* @return the implements clause for this class
@@ -2891,24 +2418,6 @@ class ClassTypeAlias extends TypeAlias {
WithClause get withClause => _withClause;
/**
- * Set the token for the 'abstract' keyword to the given token.
- *
- * @param abstractKeyword the token for the 'abstract' keyword
- */
- void set abstractKeyword(Token abstractKeyword2) {
- this._abstractKeyword = abstractKeyword2;
- }
-
- /**
- * Set the token for the '=' separating the name from the definition to the given token.
- *
- * @param equals the token for the '=' separating the name from the definition
- */
- void set equals(Token equals2) {
- this._equals = equals2;
- }
-
- /**
* Set the implements clause for this class to the given implements clause.
*
* @param implementsClause the implements clause for this class
@@ -2978,7 +2487,7 @@ abstract class Combinator extends ASTNode {
/**
* The keyword specifying what kind of processing is to be done on the imported names.
*/
- Token _keyword;
+ Token keyword;
/**
* Initialize a newly created import combinator.
@@ -2987,7 +2496,7 @@ abstract class Combinator extends ASTNode {
* names
*/
Combinator.full(Token keyword) {
- this._keyword = keyword;
+ this.keyword = keyword;
}
/**
@@ -2997,25 +2506,7 @@ abstract class Combinator extends ASTNode {
* names
*/
Combinator({Token keyword}) : this.full(keyword);
- Token get beginToken => _keyword;
-
- /**
- * Return the keyword specifying what kind of processing is to be done on the imported names.
- *
- * @return the keyword specifying what kind of processing is to be done on the imported names
- */
- Token get keyword => _keyword;
-
- /**
- * Set the keyword specifying what kind of processing is to be done on the imported names to the
- * given token.
- *
- * @param keyword the keyword specifying what kind of processing is to be done on the imported
- * names
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
+ Token get beginToken => keyword;
}
/**
* Instances of the class `Comment` represent a comment within the source code.
@@ -3077,7 +2568,7 @@ class Comment extends ASTNode {
/**
* The tokens representing the comment.
*/
- List<Token> _tokens;
+ List<Token> tokens;
/**
* The type of the comment.
@@ -3088,7 +2579,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.
@@ -3098,10 +2589,10 @@ class Comment extends ASTNode {
* @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;
+ this.references = new NodeList<CommentReference>(this);
+ this.tokens = tokens;
this._type = type;
- this._references.addAll(references);
+ this.references.addAll(references);
}
/**
@@ -3113,22 +2604,8 @@ class Comment extends ASTNode {
*/
Comment({List<Token> tokens, CommentType type, List<CommentReference> references}) : this.full(tokens, type, references);
accept(ASTVisitor visitor) => visitor.visitComment(this);
- Token get beginToken => _tokens[0];
- 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 the tokens representing the comment.
- *
- * @return the tokens representing the comment
- */
- List<Token> get tokens => _tokens;
+ Token get beginToken => tokens[0];
+ Token get endToken => tokens[tokens.length - 1];
/**
* Return `true` if this is a block comment.
@@ -3151,7 +2628,7 @@ class Comment extends ASTNode {
*/
bool get isEndOfLine => identical(_type, CommentType.END_OF_LINE);
void visitChildren(ASTVisitor visitor) {
- _references.accept(visitor);
+ references.accept(visitor);
}
}
/**
@@ -3193,7 +2670,7 @@ class CommentReference extends ASTNode {
/**
* The token representing the 'new' keyword, or `null` if there was no 'new' keyword.
*/
- Token _newKeyword;
+ Token newKeyword;
/**
* The identifier being referenced.
@@ -3207,7 +2684,7 @@ class CommentReference extends ASTNode {
* @param identifier the identifier being referenced
*/
CommentReference.full(Token newKeyword, Identifier identifier) {
- this._newKeyword = newKeyword;
+ this.newKeyword = newKeyword;
this._identifier = becomeParentOf(identifier);
}
@@ -3230,13 +2707,6 @@ class CommentReference extends ASTNode {
Identifier get identifier => _identifier;
/**
- * Return the token representing the 'new' keyword, or `null` if there was no 'new' keyword.
- *
- * @return the token representing the 'new' keyword
- */
- Token get newKeyword => _newKeyword;
-
- /**
* Set the identifier being referenced to the given identifier.
*
* @param identifier the identifier being referenced
@@ -3244,15 +2714,6 @@ class CommentReference extends ASTNode {
void set identifier(Identifier identifier2) {
identifier2 = becomeParentOf(identifier2);
}
-
- /**
- * Set the token representing the 'new' keyword to the given token.
- *
- * @param newKeyword the token representing the 'new' keyword
- */
- void set newKeyword(Token newKeyword2) {
- this._newKeyword = newKeyword2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_identifier, visitor);
}
@@ -3299,12 +2760,12 @@ 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
@@ -3316,12 +2777,12 @@ class CompilationUnit extends ASTNode {
* The element associated with this compilation unit, or `null` if the AST structure has not
* been resolved.
*/
- CompilationUnitElement _element;
+ CompilationUnitElement element;
/**
* The line information for this compilation unit.
*/
- LineInfo _lineInfo;
+ LineInfo lineInfo;
/**
* The parsing errors encountered when the receiver was parsed.
@@ -3343,12 +2804,12 @@ class CompilationUnit extends ASTNode {
* @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.directives = new NodeList<Directive>(this);
+ this.declarations = new NodeList<CompilationUnitMember>(this);
this._beginToken = beginToken;
this._scriptTag = becomeParentOf(scriptTag);
- this._directives.addAll(directives);
- this._declarations.addAll(declarations);
+ this.directives.addAll(directives);
+ this.declarations.addAll(declarations);
this._endToken = endToken;
}
@@ -3364,28 +2825,6 @@ class CompilationUnit extends ASTNode {
CompilationUnit({Token beginToken, ScriptTag scriptTag, List<Directive> directives, List<CompilationUnitMember> declarations, Token endToken}) : this.full(beginToken, scriptTag, directives, declarations, endToken);
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;
-
- /**
- * Return the directives contained in this compilation unit.
- *
- * @return the directives contained in this compilation unit
- */
- NodeList<Directive> get directives => _directives;
-
- /**
- * Return the element associated with this compilation unit, or `null` if the AST structure
- * has not been resolved.
- *
- * @return the element associated with this compilation unit
- */
- CompilationUnitElement get element => _element;
Token get endToken => _endToken;
/**
@@ -3415,13 +2854,6 @@ class CompilationUnit extends ASTNode {
}
return endToken.offset + endToken.length;
}
-
- /**
- * Return the line information for this compilation unit.
- *
- * @return the line information for this compilation unit
- */
- LineInfo get lineInfo => _lineInfo;
int get offset => 0;
/**
@@ -3448,24 +2880,6 @@ class CompilationUnit extends ASTNode {
ScriptTag get scriptTag => _scriptTag;
/**
- * Set the element associated with this compilation unit to the given element.
- *
- * @param element the element associated with this compilation unit
- */
- void set element(CompilationUnitElement element2) {
- this._element = element2;
- }
-
- /**
- * Set the line information for this compilation unit to the given line information.
- *
- * @param errors the line information to associate with this compilation unit
- */
- void set lineInfo(LineInfo lineInfo2) {
- this._lineInfo = lineInfo2;
- }
-
- /**
* Set the parse errors associated with this compilation unit to the given errors.
*
* @param the parse errors to be associated with this compilation unit
@@ -3494,8 +2908,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);
@@ -3509,11 +2923,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;
}
@@ -3526,8 +2940,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;
@@ -3587,7 +3001,7 @@ class ConditionalExpression extends Expression {
/**
* The token used to separate the condition from the then expression.
*/
- Token _question;
+ Token question;
/**
* The expression that is executed if the condition evaluates to `true`.
@@ -3597,7 +3011,7 @@ class ConditionalExpression extends Expression {
/**
* The token used to separate the then expression from the else expression.
*/
- Token _colon;
+ Token colon;
/**
* The expression that is executed if the condition evaluates to `false`.
@@ -3617,9 +3031,9 @@ class ConditionalExpression extends Expression {
*/
ConditionalExpression.full(Expression condition, Token question, Expression thenExpression, Token colon, Expression elseExpression) {
this._condition = becomeParentOf(condition);
- this._question = question;
+ this.question = question;
this._thenExpression = becomeParentOf(thenExpression);
- this._colon = colon;
+ this.colon = colon;
this._elseExpression = becomeParentOf(elseExpression);
}
@@ -3639,13 +3053,6 @@ class ConditionalExpression extends Expression {
Token get beginToken => _condition.beginToken;
/**
- * Return the token used to separate the then expression from the else expression.
- *
- * @return the token used to separate the then expression from the else expression
- */
- Token get colon => _colon;
-
- /**
* Return the condition used to determine which of the expressions is executed next.
*
* @return the condition used to determine which expression is executed next
@@ -3661,13 +3068,6 @@ class ConditionalExpression extends Expression {
Token get endToken => _elseExpression.endToken;
/**
- * Return the token used to separate the condition from the then expression.
- *
- * @return the token used to separate the condition from the then expression
- */
- Token get question => _question;
-
- /**
* Return the expression that is executed if the condition evaluates to `true`.
*
* @return the expression that is executed if the condition evaluates to `true`
@@ -3675,15 +3075,6 @@ class ConditionalExpression extends Expression {
Expression get thenExpression => _thenExpression;
/**
- * Set the token used to separate the then expression from the else expression to the given token.
- *
- * @param colon the token used to separate the then expression from the else expression
- */
- void set colon(Token colon2) {
- this._colon = colon2;
- }
-
- /**
* Set the condition used to determine which of the expressions is executed next to the given
* expression.
*
@@ -3704,15 +3095,6 @@ class ConditionalExpression extends Expression {
}
/**
- * Set the token used to separate the condition from the then expression to the given token.
- *
- * @param question the token used to separate the condition from the then expression
- */
- void set question(Token question2) {
- this._question = question2;
- }
-
- /**
* Set the expression that is executed if the condition evaluates to `true` to the given
* expression.
*
@@ -3757,19 +3139,19 @@ class ConstructorDeclaration extends ClassMember {
/**
* The token for the 'external' keyword, or `null` if the constructor is not external.
*/
- Token _externalKeyword;
+ Token externalKeyword;
/**
* The token for the 'const' keyword, or `null` if the constructor is not a const
* constructor.
*/
- Token _constKeyword;
+ Token constKeyword;
/**
* The token for the 'factory' keyword, or `null` if the constructor is not a factory
* constructor.
*/
- Token _factoryKeyword;
+ Token factoryKeyword;
/**
* The type of object being created. This can be different than the type in which the constructor
@@ -3781,7 +3163,7 @@ class ConstructorDeclaration extends ClassMember {
* The token for the period before the constructor name, or `null` if the constructor being
* declared is unnamed.
*/
- Token _period;
+ Token period;
/**
* The name of the constructor, or `null` if the constructor being declared is unnamed.
@@ -3797,12 +3179,12 @@ class ConstructorDeclaration extends ClassMember {
* The token for the separator (colon or equals) before the initializer list or redirection, or
* `null` if there are no initializers.
*/
- Token _separator;
+ Token separator;
/**
* 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
@@ -3840,16 +3222,16 @@ class ConstructorDeclaration extends ClassMember {
* @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;
+ this.initializers = new NodeList<ConstructorInitializer>(this);
+ this.externalKeyword = externalKeyword;
+ this.constKeyword = constKeyword;
+ this.factoryKeyword = factoryKeyword;
this._returnType = becomeParentOf(returnType);
- this._period = period;
+ this.period = period;
this._name = becomeParentOf(name);
this._parameters = becomeParentOf(parameters);
- this._separator = separator;
- this._initializers.addAll(initializers);
+ this.separator = separator;
+ this.initializers.addAll(initializers);
this._redirectedConstructor = becomeParentOf(redirectedConstructor);
this._body = becomeParentOf(body);
}
@@ -3881,46 +3263,17 @@ class ConstructorDeclaration extends ClassMember {
* @return the body of the constructor
*/
FunctionBody get body => _body;
-
- /**
- * Return the token for the 'const' keyword.
- *
- * @return the token for the 'const' keyword
- */
- Token get constKeyword => _constKeyword;
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 token for the 'external' keyword, or `null` if the constructor is not
- * external.
- *
- * @return the token for the 'external' keyword
- */
- Token get externalKeyword => _externalKeyword;
-
- /**
- * Return the token for the 'factory' keyword.
- *
- * @return the token for the 'factory' keyword
- */
- Token get factoryKeyword => _factoryKeyword;
-
- /**
- * 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.
*
@@ -3936,14 +3289,6 @@ class ConstructorDeclaration extends ClassMember {
FormalParameterList get parameters => _parameters;
/**
- * Return the token for the period before the constructor name, or `null` if the constructor
- * being declared is unnamed.
- *
- * @return the token for the period before the constructor name
- */
- Token get period => _period;
-
- /**
* Return the name of the constructor to which this constructor will be redirected, or
* `null` if this is not a redirecting factory constructor.
*
@@ -3961,14 +3306,6 @@ class ConstructorDeclaration extends ClassMember {
Identifier get returnType => _returnType;
/**
- * Return the token for the separator (colon or equals) before the initializer list or
- * redirection, or `null` if there are no initializers.
- *
- * @return the token for the separator before the initializer list or redirection
- */
- Token get separator => _separator;
-
- /**
* Set the body of the constructor to the given function body.
*
* @param functionBody the body of the constructor
@@ -3978,15 +3315,6 @@ class ConstructorDeclaration extends ClassMember {
}
/**
- * Set the token for the 'const' keyword to the given token.
- *
- * @param constKeyword the token for the 'const' keyword
- */
- void set constKeyword(Token constKeyword2) {
- this._constKeyword = constKeyword2;
- }
-
- /**
* Set the element associated with this constructor to the given element.
*
* @param element the element associated with this constructor
@@ -3996,24 +3324,6 @@ class ConstructorDeclaration extends ClassMember {
}
/**
- * Set the token for the 'external' keyword to the given token.
- *
- * @param externalKeyword the token for the 'external' keyword
- */
- void set externalKeyword(Token externalKeyword2) {
- this._externalKeyword = externalKeyword2;
- }
-
- /**
- * Set the token for the 'factory' keyword to the given token.
- *
- * @param factoryKeyword the token for the 'factory' keyword
- */
- void set factoryKeyword(Token factoryKeyword2) {
- this._factoryKeyword = factoryKeyword2;
- }
-
- /**
* Set the name of the constructor to the given identifier.
*
* @param identifier the name of the constructor
@@ -4032,15 +3342,6 @@ class ConstructorDeclaration extends ClassMember {
}
/**
- * Set the token for the period before the constructor name to the given token.
- *
- * @param period the token for the period before the constructor name
- */
- void set period(Token period2) {
- this._period = period2;
- }
-
- /**
* Set the name of the constructor to which this constructor will be redirected to the given
* constructor name.
*
@@ -4059,26 +3360,17 @@ class ConstructorDeclaration extends ClassMember {
void set returnType(Identifier typeName) {
_returnType = becomeParentOf(typeName);
}
-
- /**
- * Set the token for the separator (colon or equals) before the initializers to the given token.
- *
- * @param separator the token for the separator (colon or equals) before the initializers
- */
- void set separator(Token separator2) {
- this._separator = separator2;
- }
void visitChildren(ASTVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_returnType, visitor);
safelyVisitChild(_name, visitor);
safelyVisitChild(_parameters, visitor);
- _initializers.accept(visitor);
+ initializers.accept(visitor);
safelyVisitChild(_redirectedConstructor, visitor);
safelyVisitChild(_body, visitor);
}
Token get firstTokenAfterCommentAndMetadata {
- Token leftMost2 = leftMost([_externalKeyword, _constKeyword, _factoryKeyword]);
+ Token leftMost2 = leftMost([externalKeyword, constKeyword, factoryKeyword]);
if (leftMost2 != null) {
return leftMost2;
}
@@ -4119,13 +3411,13 @@ class ConstructorFieldInitializer extends ConstructorInitializer {
/**
* The token for the 'this' keyword, or `null` if there is no 'this' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The token for the period after the 'this' keyword, or `null` if there is no 'this'
* keyword.
*/
- Token _period;
+ Token period;
/**
* The name of the field being initialized.
@@ -4135,7 +3427,7 @@ class ConstructorFieldInitializer extends ConstructorInitializer {
/**
* The token for the equal sign between the field name and the expression.
*/
- Token _equals;
+ Token equals;
/**
* The expression computing the value to which the field will be initialized.
@@ -4153,10 +3445,10 @@ class ConstructorFieldInitializer extends ConstructorInitializer {
* @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;
+ this.keyword = keyword;
+ this.period = period;
this._fieldName = becomeParentOf(fieldName);
- this._equals = equals;
+ this.equals = equals;
this._expression = becomeParentOf(expression);
}
@@ -4173,21 +3465,14 @@ class ConstructorFieldInitializer extends ConstructorInitializer {
ConstructorFieldInitializer({Token keyword, Token period, SimpleIdentifier fieldName, Token equals, Expression expression}) : this.full(keyword, period, fieldName, equals, expression);
accept(ASTVisitor visitor) => visitor.visitConstructorFieldInitializer(this);
Token get beginToken {
- if (_keyword != null) {
- return _keyword;
+ if (keyword != null) {
+ return keyword;
}
return _fieldName.beginToken;
}
Token get endToken => _expression.endToken;
/**
- * Return the token for the equal sign between the field name and the expression.
- *
- * @return the token for the equal sign between the field name and the expression
- */
- Token get equals => _equals;
-
- /**
* Return the expression computing the value to which the field will be initialized.
*
* @return the expression computing the value to which the field will be initialized
@@ -4202,30 +3487,6 @@ class ConstructorFieldInitializer extends ConstructorInitializer {
SimpleIdentifier get fieldName => _fieldName;
/**
- * Return the token for the 'this' keyword, or `null` if there is no 'this' keyword.
- *
- * @return the token for the 'this' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Return the token for the period after the 'this' keyword, or `null` if there is no 'this'
- * keyword.
- *
- * @return the token for the period after the 'this' keyword
- */
- Token get period => _period;
-
- /**
- * Set the token for the equal sign between the field name and the expression to the given token.
- *
- * @param equals the token for the equal sign between the field name and the expression
- */
- void set equals(Token equals2) {
- this._equals = equals2;
- }
-
- /**
* Set the expression computing the value to which the field will be initialized to the given
* expression.
*
@@ -4243,24 +3504,6 @@ class ConstructorFieldInitializer extends ConstructorInitializer {
void set fieldName(SimpleIdentifier identifier) {
_fieldName = becomeParentOf(identifier);
}
-
- /**
- * Set the token for the 'this' keyword to the given token.
- *
- * @param keyword the token for the 'this' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
- * Set the token for the period after the 'this' keyword to the given token.
- *
- * @param period the token for the period after the 'this' keyword
- */
- void set period(Token period2) {
- this._period = period2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_fieldName, visitor);
safelyVisitChild(_expression, visitor);
@@ -4301,7 +3544,7 @@ class ConstructorName extends ASTNode {
* The token for the period before the constructor name, or `null` if the specified
* constructor is the unnamed constructor.
*/
- Token _period;
+ Token period;
/**
* The name of the constructor, or `null` if the specified constructor is the unnamed
@@ -4332,7 +3575,7 @@ class ConstructorName extends ASTNode {
*/
ConstructorName.full(TypeName type, Token period, SimpleIdentifier name) {
this._type = becomeParentOf(type);
- this._period = period;
+ this.period = period;
this._name = becomeParentOf(name);
}
@@ -4371,14 +3614,6 @@ class ConstructorName extends ASTNode {
SimpleIdentifier get name => _name;
/**
- * Return the token for the period before the constructor name, or `null` if the specified
- * constructor is the unnamed constructor.
- *
- * @return the token for the period before the constructor name
- */
- Token get period => _period;
-
- /**
* Return the element associated with this constructor name based on static type information, or
* `null` if the AST structure has not been resolved or if this constructor name could not
* be resolved.
@@ -4414,15 +3649,6 @@ class ConstructorName extends ASTNode {
}
/**
- * Return the token for the period before the constructor name to the given token.
- *
- * @param period the token for the period before the constructor name
- */
- void set period(Token period2) {
- this._period = period2;
- }
-
- /**
* Set the element associated with this constructor name based on static type information to the
* given element.
*
@@ -4460,7 +3686,7 @@ class ContinueStatement extends Statement {
/**
* The token representing the 'continue' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The label associated with the statement, or `null` if there is no label.
@@ -4470,7 +3696,7 @@ class ContinueStatement extends Statement {
/**
* The semicolon terminating the statement.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created continue statement.
@@ -4480,9 +3706,9 @@ class ContinueStatement extends Statement {
* @param semicolon the semicolon terminating the statement
*/
ContinueStatement.full(Token keyword, SimpleIdentifier label, Token semicolon) {
- this._keyword = keyword;
+ this.keyword = keyword;
this._label = becomeParentOf(label);
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -4494,15 +3720,8 @@ class ContinueStatement extends Statement {
*/
ContinueStatement({Token keyword, SimpleIdentifier label, Token semicolon}) : this.full(keyword, label, semicolon);
accept(ASTVisitor visitor) => visitor.visitContinueStatement(this);
- Token get beginToken => _keyword;
- Token get endToken => _semicolon;
-
- /**
- * Return the token representing the 'continue' keyword.
- *
- * @return the token representing the 'continue' keyword
- */
- Token get keyword => _keyword;
+ Token get beginToken => keyword;
+ Token get endToken => semicolon;
/**
* Return the label associated with the statement, or `null` if there is no label.
@@ -4512,22 +3731,6 @@ class ContinueStatement extends Statement {
SimpleIdentifier get label => _label;
/**
- * Return the semicolon terminating the statement.
- *
- * @return the semicolon terminating the statement
- */
- Token get semicolon => _semicolon;
-
- /**
- * Set the token representing the 'continue' keyword to the given token.
- *
- * @param keyword the token representing the 'continue' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
* Set the label associated with the statement to the given label.
*
* @param identifier the label associated with the statement
@@ -4535,15 +3738,6 @@ class ContinueStatement extends Statement {
void set label(SimpleIdentifier identifier) {
_label = becomeParentOf(identifier);
}
-
- /**
- * Set the semicolon terminating the statement to the given token.
- *
- * @param semicolon the semicolon terminating the statement
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_label, visitor);
}
@@ -4597,7 +3791,7 @@ class DeclaredIdentifier extends Declaration {
* The token representing either the 'final', 'const' or 'var' keyword, or `null` if no
* keyword was used.
*/
- Token _keyword;
+ Token keyword;
/**
* The name of the declared type of the parameter, or `null` if the parameter does not have
@@ -4608,7 +3802,7 @@ class DeclaredIdentifier extends Declaration {
/**
* The name of the variable being declared.
*/
- SimpleIdentifier _identifier;
+ SimpleIdentifier identifier;
/**
* Initialize a newly created formal parameter.
@@ -4620,9 +3814,9 @@ class DeclaredIdentifier extends Declaration {
* @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;
+ this.keyword = keyword;
this._type = becomeParentOf(type);
- this._identifier = becomeParentOf(identifier);
+ this.identifier = becomeParentOf(identifier);
}
/**
@@ -4637,28 +3831,13 @@ class DeclaredIdentifier extends Declaration {
DeclaredIdentifier({Comment comment, List<Annotation> metadata, Token keyword, TypeName type, SimpleIdentifier identifier}) : this.full(comment, metadata, keyword, type, identifier);
accept(ASTVisitor visitor) => visitor.visitDeclaredIdentifier(this);
LocalVariableElement get element {
- SimpleIdentifier identifier = this.identifier;
- if (identifier == null) {
+ SimpleIdentifier identifier2 = identifier;
+ if (identifier2 == null) {
return null;
}
- return identifier.staticElement as LocalVariableElement;
+ return identifier2.staticElement as LocalVariableElement;
}
- 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 token representing either the 'final', 'const' or 'var' keyword, or `null` if
- * no keyword was used.
- *
- * @return the token representing either the 'final', 'const' or 'var' keyword
- */
- Token get keyword => _keyword;
+ Token get endToken => identifier.endToken;
/**
* Return the name of the declared type of the parameter, or `null` if the parameter does
@@ -4673,7 +3852,7 @@ class DeclaredIdentifier extends Declaration {
*
* @return `true` if this variable was declared with the 'const' modifier
*/
- bool get isConst => (_keyword is KeywordToken) && identical(((_keyword as KeywordToken)).keyword, Keyword.CONST);
+ bool get isConst => (keyword is KeywordToken) && identical(((keyword as KeywordToken)).keyword, Keyword.CONST);
/**
* Return `true` if this variable was declared with the 'final' modifier. Variables that are
@@ -4682,16 +3861,7 @@ class DeclaredIdentifier extends Declaration {
*
* @return `true` if this variable was declared with the 'final' modifier
*/
- bool get isFinal => (_keyword is KeywordToken) && identical(((_keyword as KeywordToken)).keyword, Keyword.FINAL);
-
- /**
- * Set the token representing either the 'final', 'const' or 'var' keyword to the given token.
- *
- * @param keyword the token representing either the 'final', 'const' or 'var' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
+ bool get isFinal => (keyword is KeywordToken) && identical(((keyword as KeywordToken)).keyword, Keyword.FINAL);
/**
* Set the name of the declared type of the parameter to the given type name.
@@ -4704,15 +3874,15 @@ class DeclaredIdentifier extends Declaration {
void visitChildren(ASTVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_type, visitor);
- safelyVisitChild(_identifier, visitor);
+ safelyVisitChild(identifier, visitor);
}
Token get firstTokenAfterCommentAndMetadata {
- if (_keyword != null) {
- return _keyword;
+ if (keyword != null) {
+ return keyword;
} else if (_type != null) {
return _type.beginToken;
}
- return _identifier.beginToken;
+ return identifier.beginToken;
}
}
/**
@@ -4746,7 +3916,7 @@ class DefaultFormalParameter extends FormalParameter {
* The token separating the parameter from the default value, or `null` if there is no
* default value.
*/
- Token _separator;
+ Token separator;
/**
* The expression computing the default value for the parameter, or `null` if there is no
@@ -4765,7 +3935,7 @@ class DefaultFormalParameter extends FormalParameter {
DefaultFormalParameter.full(NormalFormalParameter parameter, ParameterKind kind, Token separator, Expression defaultValue) {
this._parameter = becomeParentOf(parameter);
this._kind = kind;
- this._separator = separator;
+ this.separator = separator;
this._defaultValue = becomeParentOf(defaultValue);
}
@@ -4803,14 +3973,6 @@ class DefaultFormalParameter extends FormalParameter {
* @return the formal parameter with which the default value is associated
*/
NormalFormalParameter get parameter => _parameter;
-
- /**
- * Return the token separating the parameter from the default value, or `null` if there is
- * no default value.
- *
- * @return the token separating the parameter from the default value
- */
- Token get separator => _separator;
bool get isConst => _parameter != null && _parameter.isConst;
bool get isFinal => _parameter != null && _parameter.isFinal;
@@ -4840,15 +4002,6 @@ class DefaultFormalParameter extends FormalParameter {
void set parameter(NormalFormalParameter formalParameter) {
_parameter = becomeParentOf(formalParameter);
}
-
- /**
- * Set the token separating the parameter from the default value to the given token.
- *
- * @param separator the token separating the parameter from the default value
- */
- void set separator(Token separator2) {
- this._separator = separator2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_parameter, visitor);
safelyVisitChild(_defaultValue, visitor);
@@ -4875,7 +4028,7 @@ abstract class Directive extends AnnotatedNode {
* The element associated with this directive, or `null` if the AST structure has not been
* resolved or if this directive could not be resolved.
*/
- Element _element;
+ Element element;
/**
* Initialize a newly create directive.
@@ -4894,30 +4047,12 @@ abstract class Directive extends AnnotatedNode {
Directive({Comment comment, List<Annotation> metadata}) : this.full(comment, metadata);
/**
- * Return the element associated with this directive, or `null` if the AST structure has not
- * been resolved or if this directive could not be resolved. Examples of the latter case include a
- * directive that contains an invalid URL or a URL that does not exist.
- *
- * @return the element associated with this directive
- */
- Element get element => _element;
-
- /**
* Return the token representing the keyword that introduces this directive ('import', 'export',
* 'library' or 'part').
*
* @return the token representing the keyword that introduces this directive
*/
Token get keyword;
-
- /**
- * Set the element associated with this directive to the given element.
- *
- * @param element the element associated with this directive
- */
- void set element(Element element2) {
- this._element = element2;
- }
}
/**
* Instances of the class `DoStatement` represent a do statement.
@@ -4934,7 +4069,7 @@ class DoStatement extends Statement {
/**
* The token representing the 'do' keyword.
*/
- Token _doKeyword;
+ Token doKeyword;
/**
* The body of the loop.
@@ -4944,7 +4079,7 @@ class DoStatement extends Statement {
/**
* The token representing the 'while' keyword.
*/
- Token _whileKeyword;
+ Token whileKeyword;
/**
* The left parenthesis.
@@ -4964,7 +4099,7 @@ class DoStatement extends Statement {
/**
* The semicolon terminating the statement.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created do loop.
@@ -4978,13 +4113,13 @@ class DoStatement extends Statement {
* @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;
+ this.doKeyword = doKeyword;
this._body = becomeParentOf(body);
- this._whileKeyword = whileKeyword;
+ this.whileKeyword = whileKeyword;
this._leftParenthesis = leftParenthesis;
this._condition = becomeParentOf(condition);
this._rightParenthesis = rightParenthesis;
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -5000,7 +4135,7 @@ class DoStatement extends Statement {
*/
DoStatement({Token doKeyword, Statement body, Token whileKeyword, Token leftParenthesis, Expression condition, Token rightParenthesis, Token semicolon}) : this.full(doKeyword, body, whileKeyword, leftParenthesis, condition, rightParenthesis, semicolon);
accept(ASTVisitor visitor) => visitor.visitDoStatement(this);
- Token get beginToken => _doKeyword;
+ Token get beginToken => doKeyword;
/**
* Return the body of the loop.
@@ -5015,14 +4150,7 @@ class DoStatement extends Statement {
* @return the condition that determines when the loop will terminate
*/
Expression get condition => _condition;
-
- /**
- * Return the token representing the 'do' keyword.
- *
- * @return the token representing the 'do' keyword
- */
- Token get doKeyword => _doKeyword;
- Token get endToken => _semicolon;
+ Token get endToken => semicolon;
/**
* Return the left parenthesis.
@@ -5039,20 +4167,6 @@ class DoStatement extends Statement {
Token get rightParenthesis => _rightParenthesis;
/**
- * Return the semicolon terminating the statement.
- *
- * @return the semicolon terminating the statement
- */
- Token get semicolon => _semicolon;
-
- /**
- * Return the token representing the 'while' keyword.
- *
- * @return the token representing the 'while' keyword
- */
- Token get whileKeyword => _whileKeyword;
-
- /**
* Set the body of the loop to the given statement.
*
* @param statement the body of the loop
@@ -5071,15 +4185,6 @@ class DoStatement extends Statement {
}
/**
- * Set the token representing the 'do' keyword to the given token.
- *
- * @param doKeyword the token representing the 'do' keyword
- */
- void set doKeyword(Token doKeyword2) {
- this._doKeyword = doKeyword2;
- }
-
- /**
* Set the left parenthesis to the given token.
*
* @param parenthesis the left parenthesis
@@ -5096,24 +4201,6 @@ class DoStatement extends Statement {
void set rightParenthesis(Token parenthesis) {
_rightParenthesis = parenthesis;
}
-
- /**
- * Set the semicolon terminating the statement to the given token.
- *
- * @param semicolon the semicolon terminating the statement
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
-
- /**
- * Set the token representing the 'while' keyword to the given token.
- *
- * @param whileKeyword the token representing the 'while' keyword
- */
- void set whileKeyword(Token whileKeyword2) {
- this._whileKeyword = whileKeyword2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_body, visitor);
safelyVisitChild(_condition, visitor);
@@ -5138,12 +4225,12 @@ class DoubleLiteral extends Literal {
/**
* The token representing the literal.
*/
- Token _literal;
+ Token literal;
/**
* The value of the literal.
*/
- double _value = 0.0;
+ double value = 0.0;
/**
* Initialize a newly created floating point literal.
@@ -5152,8 +4239,8 @@ class DoubleLiteral extends Literal {
* @param value the value of the literal
*/
DoubleLiteral.full(Token literal, double value) {
- this._literal = literal;
- this._value = value;
+ this.literal = literal;
+ this.value = value;
}
/**
@@ -5164,40 +4251,8 @@ class DoubleLiteral extends Literal {
*/
DoubleLiteral({Token literal, double value}) : this.full(literal, value);
accept(ASTVisitor visitor) => visitor.visitDoubleLiteral(this);
- Token get beginToken => _literal;
- Token get endToken => _literal;
-
- /**
- * Return the token representing the literal.
- *
- * @return the token representing the literal
- */
- Token get literal => _literal;
-
- /**
- * Return the value of the literal.
- *
- * @return the value of the literal
- */
- double get value => _value;
-
- /**
- * Set the token representing the literal to the given token.
- *
- * @param literal the token representing the literal
- */
- void set literal(Token literal2) {
- this._literal = literal2;
- }
-
- /**
- * Set the value of the literal to the given value.
- *
- * @param value the value of the literal
- */
- void set value(double value2) {
- this._value = value2;
- }
+ Token get beginToken => literal;
+ Token get endToken => literal;
void visitChildren(ASTVisitor visitor) {
}
}
@@ -5217,7 +4272,7 @@ class EmptyFunctionBody extends FunctionBody {
/**
* The token representing the semicolon that marks the end of the function body.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created function body.
@@ -5225,7 +4280,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;
+ this.semicolon = semicolon;
}
/**
@@ -5235,25 +4290,8 @@ class EmptyFunctionBody extends FunctionBody {
*/
EmptyFunctionBody({Token semicolon}) : this.full(semicolon);
accept(ASTVisitor visitor) => visitor.visitEmptyFunctionBody(this);
- Token get beginToken => _semicolon;
- Token get endToken => _semicolon;
-
- /**
- * Return the token representing the semicolon that marks the end of the function body.
- *
- * @return the token representing the semicolon that marks the end of the function body
- */
- Token get semicolon => _semicolon;
-
- /**
- * Set the token representing the semicolon that marks the end of the function body to the given
- * token.
- *
- * @param semicolon the token representing the semicolon that marks the end of the function body
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
+ Token get beginToken => semicolon;
+ Token get endToken => semicolon;
void visitChildren(ASTVisitor visitor) {
}
}
@@ -5272,7 +4310,7 @@ class EmptyStatement extends Statement {
/**
* The semicolon terminating the statement.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created empty statement.
@@ -5280,7 +4318,7 @@ class EmptyStatement extends Statement {
* @param semicolon the semicolon terminating the statement
*/
EmptyStatement.full(Token semicolon) {
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -5290,24 +4328,8 @@ class EmptyStatement extends Statement {
*/
EmptyStatement({Token semicolon}) : this.full(semicolon);
accept(ASTVisitor visitor) => visitor.visitEmptyStatement(this);
- Token get beginToken => _semicolon;
- Token get endToken => _semicolon;
-
- /**
- * Return the semicolon terminating the statement.
- *
- * @return the semicolon terminating the statement
- */
- Token get semicolon => _semicolon;
-
- /**
- * Set the semicolon terminating the statement to the given token.
- *
- * @param semicolon the semicolon terminating the statement
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
+ Token get beginToken => semicolon;
+ Token get endToken => semicolon;
void visitChildren(ASTVisitor visitor) {
}
}
@@ -5359,9 +4381,9 @@ class ExportDirective extends NamespaceDirective {
ExportDirective({Comment comment, List<Annotation> metadata, Token keyword, StringLiteral libraryUri, List<Combinator> combinators, Token semicolon}) : this.full(comment, metadata, keyword, libraryUri, combinators, semicolon);
accept(ASTVisitor visitor) => visitor.visitExportDirective(this);
LibraryElement get uriElement {
- Element element = this.element;
- if (element is ExportElement) {
- return ((element as ExportElement)).exportedLibrary;
+ Element element2 = element;
+ if (element2 is ExportElement) {
+ return ((element2 as ExportElement)).exportedLibrary;
}
return null;
}
@@ -5388,13 +4410,13 @@ abstract class Expression extends ASTNode {
/**
* The static type of this expression, or `null` if the AST structure has not been resolved.
*/
- Type2 _staticType;
+ Type2 staticType;
/**
* The propagated type of this expression, or `null` if type propagation has not been
* performed on the AST structure.
*/
- Type2 _propagatedType;
+ Type2 propagatedType;
/**
* Return the best type information available for this expression. If type propagation was able to
@@ -5405,10 +4427,10 @@ abstract class Expression extends ASTNode {
* @return the best type information available for this expression
*/
Type2 get bestType {
- if (_propagatedType != null) {
- return _propagatedType;
- } else if (_staticType != null) {
- return _staticType;
+ if (propagatedType != null) {
+ return propagatedType;
+ } else if (staticType != null) {
+ return staticType;
}
return DynamicTypeImpl.instance;
}
@@ -5451,14 +4473,6 @@ abstract class Expression extends ASTNode {
}
/**
- * Return the propagated type of this expression, or `null` if type propagation has not been
- * performed on the AST structure.
- *
- * @return the propagated type of this expression
- */
- Type2 get propagatedType => _propagatedType;
-
- /**
* If this expression is an argument to an invocation, and the AST structure has been resolved,
* and the function being invoked is known based on static type information, and this expression
* corresponds to one of the parameters of the function being invoked, then return the parameter
@@ -5496,38 +4510,12 @@ abstract class Expression extends ASTNode {
}
/**
- * Return the static type of this expression, or `null` if the AST structure has not been
- * resolved.
- *
- * @return the static type of this expression
- */
- Type2 get staticType => _staticType;
-
- /**
* Return `true` if this expression is syntactically valid for the LHS of an
* [AssignmentExpression].
*
* @return `true` if this expression matches the `assignableExpression` production
*/
bool get isAssignable => false;
-
- /**
- * Set the propagated type of this expression to the given type.
- *
- * @param propagatedType the propagated type of this expression
- */
- void set propagatedType(Type2 propagatedType2) {
- this._propagatedType = propagatedType2;
- }
-
- /**
- * Set the static type of this expression to the given type.
- *
- * @param staticType the static type of this expression
- */
- void set staticType(Type2 staticType2) {
- this._staticType = staticType2;
- }
}
/**
* Instances of the class `ExpressionFunctionBody` represent a function body consisting of a
@@ -5545,7 +4533,7 @@ class ExpressionFunctionBody extends FunctionBody {
/**
* The token introducing the expression that represents the body of the function.
*/
- Token _functionDefinition;
+ Token functionDefinition;
/**
* The expression representing the body of the function.
@@ -5555,7 +4543,7 @@ class ExpressionFunctionBody extends FunctionBody {
/**
* The semicolon terminating the statement.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created function body consisting of a block of statements.
@@ -5566,9 +4554,9 @@ class ExpressionFunctionBody extends FunctionBody {
* @param semicolon the semicolon terminating the statement
*/
ExpressionFunctionBody.full(Token functionDefinition, Expression expression, Token semicolon) {
- this._functionDefinition = functionDefinition;
+ this.functionDefinition = functionDefinition;
this._expression = becomeParentOf(expression);
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -5581,10 +4569,10 @@ class ExpressionFunctionBody extends FunctionBody {
*/
ExpressionFunctionBody({Token functionDefinition, Expression expression, Token semicolon}) : this.full(functionDefinition, expression, semicolon);
accept(ASTVisitor visitor) => visitor.visitExpressionFunctionBody(this);
- Token get beginToken => _functionDefinition;
+ Token get beginToken => functionDefinition;
Token get endToken {
- if (_semicolon != null) {
- return _semicolon;
+ if (semicolon != null) {
+ return semicolon;
}
return _expression.endToken;
}
@@ -5597,20 +4585,6 @@ class ExpressionFunctionBody extends FunctionBody {
Expression get expression => _expression;
/**
- * Return the token introducing the expression that represents the body of the function.
- *
- * @return the function definition token
- */
- Token get functionDefinition => _functionDefinition;
-
- /**
- * Return the semicolon terminating the statement.
- *
- * @return the semicolon terminating the statement
- */
- Token get semicolon => _semicolon;
-
- /**
* Set the expression representing the body of the function to the given expression.
*
* @param expression the expression representing the body of the function
@@ -5618,25 +4592,6 @@ class ExpressionFunctionBody extends FunctionBody {
void set expression(Expression expression2) {
this._expression = becomeParentOf(expression2);
}
-
- /**
- * Set the token introducing the expression that represents the body of the function to the given
- * token.
- *
- * @param functionDefinition the function definition token
- */
- void set functionDefinition(Token functionDefinition2) {
- this._functionDefinition = functionDefinition2;
- }
-
- /**
- * Set the semicolon terminating the statement to the given token.
- *
- * @param semicolon the semicolon terminating the statement
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_expression, visitor);
}
@@ -5662,7 +4617,7 @@ class ExpressionStatement extends Statement {
* The semicolon terminating the statement, or `null` if the expression is a function
* expression and therefore isn't followed by a semicolon.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created expression statement.
@@ -5672,7 +4627,7 @@ class ExpressionStatement extends Statement {
*/
ExpressionStatement.full(Expression expression, Token semicolon) {
this._expression = becomeParentOf(expression);
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -5685,8 +4640,8 @@ class ExpressionStatement extends Statement {
accept(ASTVisitor visitor) => visitor.visitExpressionStatement(this);
Token get beginToken => _expression.beginToken;
Token get endToken {
- if (_semicolon != null) {
- return _semicolon;
+ if (semicolon != null) {
+ return semicolon;
}
return _expression.endToken;
}
@@ -5697,15 +4652,7 @@ class ExpressionStatement extends Statement {
* @return the expression that comprises the statement
*/
Expression get expression => _expression;
-
- /**
- * Return the semicolon terminating the statement, or `null` if the expression is a function
- * expression and therefore isn't followed by a semicolon.
- *
- * @return the semicolon terminating the statement
- */
- Token get semicolon => _semicolon;
- bool get isSynthetic => _expression.isSynthetic && _semicolon.isSynthetic;
+ bool get isSynthetic => _expression.isSynthetic && semicolon.isSynthetic;
/**
* Set the expression that comprises the statement to the given expression.
@@ -5715,15 +4662,6 @@ class ExpressionStatement extends Statement {
void set expression(Expression expression2) {
this._expression = becomeParentOf(expression2);
}
-
- /**
- * Set the semicolon terminating the statement to the given token.
- *
- * @param semicolon the semicolon terminating the statement
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_expression, visitor);
}
@@ -5744,7 +4682,7 @@ class ExtendsClause extends ASTNode {
/**
* The token representing the 'extends' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The name of the class that is being extended.
@@ -5758,7 +4696,7 @@ class ExtendsClause extends ASTNode {
* @param superclass the name of the class that is being extended
*/
ExtendsClause.full(Token keyword, TypeName superclass) {
- this._keyword = keyword;
+ this.keyword = keyword;
this._superclass = becomeParentOf(superclass);
}
@@ -5770,17 +4708,10 @@ class ExtendsClause extends ASTNode {
*/
ExtendsClause({Token keyword, TypeName superclass}) : this.full(keyword, superclass);
accept(ASTVisitor visitor) => visitor.visitExtendsClause(this);
- Token get beginToken => _keyword;
+ Token get beginToken => keyword;
Token get endToken => _superclass.endToken;
/**
- * Return the token representing the 'extends' keyword.
- *
- * @return the token representing the 'extends' keyword
- */
- Token get keyword => _keyword;
-
- /**
* Return the name of the class that is being extended.
*
* @return the name of the class that is being extended
@@ -5788,15 +4719,6 @@ class ExtendsClause extends ASTNode {
TypeName get superclass => _superclass;
/**
- * Set the token representing the 'extends' keyword to the given token.
- *
- * @param keyword the token representing the 'extends' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
* Set the name of the class that is being extended to the given name.
*
* @param name the name of the class that is being extended
@@ -5824,7 +4746,7 @@ class FieldDeclaration extends ClassMember {
/**
* The token representing the 'static' keyword, or `null` if the fields are not static.
*/
- Token _staticKeyword;
+ Token staticKeyword;
/**
* The fields being declared.
@@ -5834,7 +4756,7 @@ class FieldDeclaration extends ClassMember {
/**
* The semicolon terminating the declaration.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created field declaration.
@@ -5846,9 +4768,9 @@ class FieldDeclaration extends ClassMember {
* @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;
+ this.staticKeyword = staticKeyword;
this._fieldList = becomeParentOf(fieldList);
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -5863,7 +4785,7 @@ class FieldDeclaration extends ClassMember {
FieldDeclaration({Comment comment, List<Annotation> metadata, Token staticKeyword, VariableDeclarationList fieldList, Token semicolon}) : this.full(comment, metadata, staticKeyword, fieldList, semicolon);
accept(ASTVisitor visitor) => visitor.visitFieldDeclaration(this);
Element get element => null;
- Token get endToken => _semicolon;
+ Token get endToken => semicolon;
/**
* Return the fields being declared.
@@ -5873,26 +4795,11 @@ class FieldDeclaration extends ClassMember {
VariableDeclarationList get fields => _fieldList;
/**
- * Return the token representing the 'static' keyword, or `null` if the fields are not
- * static.
- *
- * @return the token representing the 'static' keyword
- */
- Token get staticKeyword => _staticKeyword;
-
- /**
- * Return the semicolon terminating the declaration.
- *
- * @return the semicolon terminating the declaration
- */
- Token get semicolon => _semicolon;
-
- /**
* Return `true` if the fields are static.
*
* @return `true` if the fields are declared to be static
*/
- bool get isStatic => _staticKeyword != null;
+ bool get isStatic => staticKeyword != null;
/**
* Set the fields being declared to the given list of variables.
@@ -5902,31 +4809,13 @@ class FieldDeclaration extends ClassMember {
void set fields(VariableDeclarationList fieldList) {
fieldList = becomeParentOf(fieldList);
}
-
- /**
- * Set the token representing the 'static' keyword to the given token.
- *
- * @param keyword the token representing the 'static' keyword
- */
- void set staticKeyword(Token keyword) {
- this._staticKeyword = keyword;
- }
-
- /**
- * Set the semicolon terminating the declaration to the given token.
- *
- * @param semicolon the semicolon terminating the declaration
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
void visitChildren(ASTVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_fieldList, visitor);
}
Token get firstTokenAfterCommentAndMetadata {
- if (_staticKeyword != null) {
- return _staticKeyword;
+ if (staticKeyword != null) {
+ return staticKeyword;
}
return _fieldList.beginToken;
}
@@ -5947,7 +4836,7 @@ class FieldFormalParameter extends NormalFormalParameter {
* The token representing either the 'final', 'const' or 'var' keyword, or `null` if no
* keyword was used.
*/
- Token _keyword;
+ Token keyword;
/**
* The name of the declared type of the parameter, or `null` if the parameter does not have
@@ -5958,12 +4847,12 @@ class FieldFormalParameter extends NormalFormalParameter {
/**
* The token representing the 'this' keyword.
*/
- Token _thisToken;
+ Token thisToken;
/**
* The token representing the period.
*/
- Token _period;
+ Token period;
/**
* The parameters of the function-typed parameter, or `null` if this is not a function-typed
@@ -5985,10 +4874,10 @@ class FieldFormalParameter extends NormalFormalParameter {
* 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;
+ this.keyword = keyword;
this._type = becomeParentOf(type);
- this._thisToken = thisToken;
- this._period = period;
+ this.thisToken = thisToken;
+ this.period = period;
this._parameters = becomeParentOf(parameters);
}
@@ -6008,24 +4897,16 @@ class FieldFormalParameter extends NormalFormalParameter {
FieldFormalParameter({Comment comment, List<Annotation> metadata, Token keyword, TypeName type, Token thisToken, Token period, SimpleIdentifier identifier, FormalParameterList parameters}) : this.full(comment, metadata, keyword, type, thisToken, period, identifier, parameters);
accept(ASTVisitor visitor) => visitor.visitFieldFormalParameter(this);
Token get beginToken {
- if (_keyword != null) {
- return _keyword;
+ if (keyword != null) {
+ return keyword;
} else if (_type != null) {
return _type.beginToken;
}
- return _thisToken;
+ return thisToken;
}
Token get endToken => identifier.endToken;
/**
- * Return the token representing either the 'final', 'const' or 'var' keyword, or `null` if
- * no keyword was used.
- *
- * @return the token representing either the 'final', 'const' or 'var' keyword
- */
- Token get keyword => _keyword;
-
- /**
* Return the parameters of the function-typed parameter, or `null` if this is not a
* function-typed field formal parameter.
*
@@ -6034,20 +4915,6 @@ class FieldFormalParameter extends NormalFormalParameter {
FormalParameterList get parameters => _parameters;
/**
- * Return the token representing the period.
- *
- * @return the token representing the period
- */
- Token get period => _period;
-
- /**
- * Return the token representing the 'this' keyword.
- *
- * @return the token representing the 'this' keyword
- */
- Token get thisToken => _thisToken;
-
- /**
* Return the name of the declared type of the parameter, or `null` if the parameter does
* not have a declared type. Note that if this is a function-typed field formal parameter this is
* the return type of the function.
@@ -6055,17 +4922,8 @@ class FieldFormalParameter extends NormalFormalParameter {
* @return the name of the declared type of the parameter
*/
TypeName get type => _type;
- bool get isConst => (_keyword is KeywordToken) && identical(((_keyword as KeywordToken)).keyword, Keyword.CONST);
- bool get isFinal => (_keyword is KeywordToken) && identical(((_keyword as KeywordToken)).keyword, Keyword.FINAL);
-
- /**
- * Set the token representing either the 'final', 'const' or 'var' keyword to the given token.
- *
- * @param keyword the token representing either the 'final', 'const' or 'var' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
+ bool get isConst => (keyword is KeywordToken) && identical(((keyword as KeywordToken)).keyword, Keyword.CONST);
+ bool get isFinal => (keyword is KeywordToken) && identical(((keyword as KeywordToken)).keyword, Keyword.FINAL);
/**
* Set the parameters of the function-typed parameter to the given parameters.
@@ -6077,24 +4935,6 @@ class FieldFormalParameter extends NormalFormalParameter {
}
/**
- * Set the token representing the period to the given token.
- *
- * @param period the token representing the period
- */
- void set period(Token period2) {
- this._period = period2;
- }
-
- /**
- * Set the token representing the 'this' keyword to the given token.
- *
- * @param thisToken the token representing the 'this' keyword
- */
- void set thisToken(Token thisToken2) {
- this._thisToken = thisToken2;
- }
-
- /**
* Set the name of the declared type of the parameter to the given type name.
*
* @param typeName the name of the declared type of the parameter
@@ -6124,12 +4964,12 @@ class ForEachStatement extends Statement {
/**
* The token representing the 'for' keyword.
*/
- Token _forKeyword;
+ Token forKeyword;
/**
* The left parenthesis.
*/
- Token _leftParenthesis;
+ Token leftParenthesis;
/**
* The declaration of the loop variable.
@@ -6139,7 +4979,7 @@ class ForEachStatement extends Statement {
/**
* The token representing the 'in' keyword.
*/
- Token _inKeyword;
+ Token inKeyword;
/**
* The expression evaluated to produce the iterator.
@@ -6149,7 +4989,7 @@ class ForEachStatement extends Statement {
/**
* The right parenthesis.
*/
- Token _rightParenthesis;
+ Token rightParenthesis;
/**
* The body of the loop.
@@ -6167,12 +5007,12 @@ class ForEachStatement extends Statement {
* @param body the body of the loop
*/
ForEachStatement.full(Token forKeyword, Token leftParenthesis, DeclaredIdentifier loopVariable, Token inKeyword, Expression iterator, Token rightParenthesis, Statement body) {
- this._forKeyword = forKeyword;
- this._leftParenthesis = leftParenthesis;
+ this.forKeyword = forKeyword;
+ this.leftParenthesis = leftParenthesis;
this._loopVariable = becomeParentOf(loopVariable);
- this._inKeyword = inKeyword;
+ this.inKeyword = inKeyword;
this._iterator = becomeParentOf(iterator);
- this._rightParenthesis = rightParenthesis;
+ this.rightParenthesis = rightParenthesis;
this._body = becomeParentOf(body);
}
@@ -6188,7 +5028,7 @@ class ForEachStatement extends Statement {
*/
ForEachStatement({Token forKeyword, Token leftParenthesis, DeclaredIdentifier loopVariable, Token inKeyword, Expression iterator, Token rightParenthesis, Statement body}) : this.full(forKeyword, leftParenthesis, loopVariable, inKeyword, iterator, rightParenthesis, body);
accept(ASTVisitor visitor) => visitor.visitForEachStatement(this);
- Token get beginToken => _forKeyword;
+ Token get beginToken => forKeyword;
/**
* Return the body of the loop.
@@ -6199,20 +5039,6 @@ class ForEachStatement extends Statement {
Token get endToken => _body.endToken;
/**
- * Return the token representing the 'for' keyword.
- *
- * @return the token representing the 'for' keyword
- */
- Token get forKeyword => _forKeyword;
-
- /**
- * Return the token representing the 'in' keyword.
- *
- * @return the token representing the 'in' keyword
- */
- Token get inKeyword => _inKeyword;
-
- /**
* Return the expression evaluated to produce the iterator.
*
* @return the expression evaluated to produce the iterator
@@ -6220,13 +5046,6 @@ class ForEachStatement extends Statement {
Expression get iterator => _iterator;
/**
- * Return the left parenthesis.
- *
- * @return the left parenthesis
- */
- Token get leftParenthesis => _leftParenthesis;
-
- /**
* Return the declaration of the loop variable.
*
* @return the declaration of the loop variable
@@ -6234,13 +5053,6 @@ class ForEachStatement extends Statement {
DeclaredIdentifier get loopVariable => _loopVariable;
/**
- * Return the right parenthesis.
- *
- * @return the right parenthesis
- */
- Token get rightParenthesis => _rightParenthesis;
-
- /**
* Set the body of the loop to the given block.
*
* @param body the body of the loop
@@ -6250,24 +5062,6 @@ class ForEachStatement extends Statement {
}
/**
- * Set the token representing the 'for' keyword to the given token.
- *
- * @param forKeyword the token representing the 'for' keyword
- */
- void set forKeyword(Token forKeyword2) {
- this._forKeyword = forKeyword2;
- }
-
- /**
- * Set the token representing the 'in' keyword to the given token.
- *
- * @param inKeyword the token representing the 'in' keyword
- */
- void set inKeyword(Token inKeyword2) {
- this._inKeyword = inKeyword2;
- }
-
- /**
* Set the expression evaluated to produce the iterator to the given expression.
*
* @param expression the expression evaluated to produce the iterator
@@ -6277,15 +5071,6 @@ class ForEachStatement extends Statement {
}
/**
- * Set the left parenthesis to the given token.
- *
- * @param leftParenthesis the left parenthesis
- */
- void set leftParenthesis(Token leftParenthesis2) {
- this._leftParenthesis = leftParenthesis2;
- }
-
- /**
* Set the declaration of the loop variable to the given variable.
*
* @param variable the declaration of the loop variable
@@ -6293,15 +5078,6 @@ class ForEachStatement extends Statement {
void set loopVariable(DeclaredIdentifier variable) {
_loopVariable = becomeParentOf(variable);
}
-
- /**
- * Set the right parenthesis to the given token.
- *
- * @param rightParenthesis the right parenthesis
- */
- void set rightParenthesis(Token rightParenthesis2) {
- this._rightParenthesis = rightParenthesis2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_loopVariable, visitor);
safelyVisitChild(_iterator, visitor);
@@ -6330,12 +5106,12 @@ class ForStatement extends Statement {
/**
* The token representing the 'for' keyword.
*/
- Token _forKeyword;
+ Token forKeyword;
/**
* The left parenthesis.
*/
- Token _leftParenthesis;
+ Token leftParenthesis;
/**
* The declaration of the loop variables, or `null` if there are no variables. Note that a
@@ -6354,7 +5130,7 @@ class ForStatement extends Statement {
/**
* The semicolon separating the initializer and the condition.
*/
- Token _leftSeparator;
+ Token leftSeparator;
/**
* The condition used to determine when to terminate the loop, or `null` if there is no
@@ -6365,17 +5141,17 @@ class ForStatement extends Statement {
/**
* The semicolon separating the condition and the updater.
*/
- Token _rightSeparator;
+ Token rightSeparator;
/**
* The list of expressions run after each execution of the loop body.
*/
- NodeList<Expression> _updaters;
+ NodeList<Expression> updaters;
/**
* The right parenthesis.
*/
- Token _rightParenthesis;
+ Token rightParenthesis;
/**
* The body of the loop.
@@ -6397,16 +5173,16 @@ class ForStatement extends Statement {
* @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;
+ this.updaters = new NodeList<Expression>(this);
+ this.forKeyword = forKeyword;
+ this.leftParenthesis = leftParenthesis;
this._variableList = becomeParentOf(variableList);
this._initialization = becomeParentOf(initialization);
- this._leftSeparator = leftSeparator;
+ this.leftSeparator = leftSeparator;
this._condition = becomeParentOf(condition);
- this._rightSeparator = rightSeparator;
- this._updaters.addAll(updaters);
- this._rightParenthesis = rightParenthesis;
+ this.rightSeparator = rightSeparator;
+ this.updaters.addAll(updaters);
+ this.rightParenthesis = rightParenthesis;
this._body = becomeParentOf(body);
}
@@ -6426,7 +5202,7 @@ class ForStatement extends Statement {
*/
ForStatement({Token forKeyword, Token leftParenthesis, VariableDeclarationList variableList, Expression initialization, Token leftSeparator, Expression condition, Token rightSeparator, List<Expression> updaters, Token rightParenthesis, Statement body}) : this.full(forKeyword, leftParenthesis, variableList, initialization, leftSeparator, condition, rightSeparator, updaters, rightParenthesis, body);
accept(ASTVisitor visitor) => visitor.visitForStatement(this);
- Token get beginToken => _forKeyword;
+ Token get beginToken => forKeyword;
/**
* Return the body of the loop.
@@ -6445,13 +5221,6 @@ class ForStatement extends Statement {
Token get endToken => _body.endToken;
/**
- * Return the token representing the 'for' keyword.
- *
- * @return the token representing the 'for' keyword
- */
- Token get forKeyword => _forKeyword;
-
- /**
* Return the initialization expression, or `null` if there is no initialization expression.
*
* @return the initialization expression
@@ -6459,41 +5228,6 @@ class ForStatement extends Statement {
Expression get initialization => _initialization;
/**
- * Return the left parenthesis.
- *
- * @return the left parenthesis
- */
- Token get leftParenthesis => _leftParenthesis;
-
- /**
- * Return the semicolon separating the initializer and the condition.
- *
- * @return the semicolon separating the initializer and the condition
- */
- Token get leftSeparator => _leftSeparator;
-
- /**
- * Return the right parenthesis.
- *
- * @return the right parenthesis
- */
- Token get rightParenthesis => _rightParenthesis;
-
- /**
- * Return the semicolon separating the condition and the updater.
- *
- * @return the semicolon separating the condition and the updater
- */
- Token get rightSeparator => _rightSeparator;
-
- /**
- * 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
@@ -6519,15 +5253,6 @@ class ForStatement extends Statement {
}
/**
- * Set the token representing the 'for' keyword to the given token.
- *
- * @param forKeyword the token representing the 'for' keyword
- */
- void set forKeyword(Token forKeyword2) {
- this._forKeyword = forKeyword2;
- }
-
- /**
* Set the initialization expression to the given expression.
*
* @param initialization the initialization expression
@@ -6537,42 +5262,6 @@ class ForStatement extends Statement {
}
/**
- * Set the left parenthesis to the given token.
- *
- * @param leftParenthesis the left parenthesis
- */
- void set leftParenthesis(Token leftParenthesis2) {
- this._leftParenthesis = leftParenthesis2;
- }
-
- /**
- * Set the semicolon separating the initializer and the condition to the given token.
- *
- * @param leftSeparator the semicolon separating the initializer and the condition
- */
- void set leftSeparator(Token leftSeparator2) {
- this._leftSeparator = leftSeparator2;
- }
-
- /**
- * Set the right parenthesis to the given token.
- *
- * @param rightParenthesis the right parenthesis
- */
- void set rightParenthesis(Token rightParenthesis2) {
- this._rightParenthesis = rightParenthesis2;
- }
-
- /**
- * Set the semicolon separating the condition and the updater to the given token.
- *
- * @param rightSeparator the semicolon separating the condition and the updater
- */
- void set rightSeparator(Token rightSeparator2) {
- this._rightSeparator = rightSeparator2;
- }
-
- /**
* Set the declaration of the loop variables to the given parameter.
*
* @param variableList the declaration of the loop variables
@@ -6584,7 +5273,7 @@ class ForStatement extends Statement {
safelyVisitChild(_variableList, visitor);
safelyVisitChild(_initialization, visitor);
safelyVisitChild(_condition, visitor);
- _updaters.accept(visitor);
+ updaters.accept(visitor);
safelyVisitChild(_body, visitor);
}
}
@@ -6688,7 +5377,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
@@ -6717,9 +5406,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;
@@ -6762,22 +5451,15 @@ 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.
*
@@ -6831,7 +5513,7 @@ class FormalParameterList extends ASTNode {
_rightParenthesis = parenthesis;
}
void visitChildren(ASTVisitor visitor) {
- _parameters.accept(visitor);
+ parameters.accept(visitor);
}
}
/**
@@ -6869,7 +5551,7 @@ class FunctionDeclaration extends CompilationUnitMember {
* The token representing the 'external' keyword, or `null` if this is not an external
* function.
*/
- Token _externalKeyword;
+ Token externalKeyword;
/**
* The return type of the function, or `null` if no return type was declared.
@@ -6880,7 +5562,7 @@ class FunctionDeclaration extends CompilationUnitMember {
* The token representing the 'get' or 'set' keyword, or `null` if this is a function
* declaration rather than a property declaration.
*/
- Token _propertyKeyword;
+ Token propertyKeyword;
/**
* The name of the function, or `null` if the function is not named.
@@ -6904,9 +5586,9 @@ class FunctionDeclaration extends CompilationUnitMember {
* @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;
+ this.externalKeyword = externalKeyword;
this._returnType = becomeParentOf(returnType);
- this._propertyKeyword = propertyKeyword;
+ this.propertyKeyword = propertyKeyword;
this._name = becomeParentOf(name);
this._functionExpression = becomeParentOf(functionExpression);
}
@@ -6928,14 +5610,6 @@ class FunctionDeclaration extends CompilationUnitMember {
Token get endToken => _functionExpression.endToken;
/**
- * Return the token representing the 'external' keyword, or `null` if this is not an
- * external function.
- *
- * @return the token representing the 'external' keyword
- */
- Token get externalKeyword => _externalKeyword;
-
- /**
* Return the function expression being wrapped.
*
* @return the function expression being wrapped
@@ -6950,14 +5624,6 @@ class FunctionDeclaration extends CompilationUnitMember {
SimpleIdentifier get name => _name;
/**
- * Return the token representing the 'get' or 'set' keyword, or `null` if this is a function
- * declaration rather than a property declaration.
- *
- * @return the token representing the 'get' or 'set' keyword
- */
- Token get propertyKeyword => _propertyKeyword;
-
- /**
* Return the return type of the function, or `null` if no return type was declared.
*
* @return the return type of the function
@@ -6969,23 +5635,14 @@ class FunctionDeclaration extends CompilationUnitMember {
*
* @return `true` if this function declares a getter
*/
- bool get isGetter => _propertyKeyword != null && identical(((_propertyKeyword as KeywordToken)).keyword, Keyword.GET);
+ bool get isGetter => propertyKeyword != null && identical(((propertyKeyword as KeywordToken)).keyword, Keyword.GET);
/**
* Return `true` if this function declares a setter.
*
* @return `true` if this function declares a setter
*/
- bool get isSetter => _propertyKeyword != null && identical(((_propertyKeyword as KeywordToken)).keyword, Keyword.SET);
-
- /**
- * Set the token representing the 'external' keyword to the given token.
- *
- * @param externalKeyword the token representing the 'external' keyword
- */
- void set externalKeyword(Token externalKeyword2) {
- this._externalKeyword = externalKeyword2;
- }
+ bool get isSetter => propertyKeyword != null && identical(((propertyKeyword as KeywordToken)).keyword, Keyword.SET);
/**
* Set the function expression being wrapped to the given function expression.
@@ -7006,15 +5663,6 @@ class FunctionDeclaration extends CompilationUnitMember {
}
/**
- * Set the token representing the 'get' or 'set' keyword to the given token.
- *
- * @param propertyKeyword the token representing the 'get' or 'set' keyword
- */
- void set propertyKeyword(Token propertyKeyword2) {
- this._propertyKeyword = propertyKeyword2;
- }
-
- /**
* Set the return type of the function to the given name.
*
* @param name the return type of the function
@@ -7029,13 +5677,13 @@ class FunctionDeclaration extends CompilationUnitMember {
safelyVisitChild(_functionExpression, visitor);
}
Token get firstTokenAfterCommentAndMetadata {
- if (_externalKeyword != null) {
- return _externalKeyword;
+ if (externalKeyword != null) {
+ return externalKeyword;
}
if (_returnType != null) {
return _returnType.beginToken;
- } else if (_propertyKeyword != null) {
- return _propertyKeyword;
+ } else if (propertyKeyword != null) {
+ return propertyKeyword;
} else if (_name != null) {
return _name.beginToken;
}
@@ -7053,7 +5701,7 @@ class FunctionDeclarationStatement extends Statement {
/**
* The function declaration being wrapped.
*/
- FunctionDeclaration _functionDeclaration;
+ FunctionDeclaration functionDeclaration;
/**
* Initialize a newly created function declaration statement.
@@ -7061,7 +5709,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);
}
/**
@@ -7071,15 +5719,8 @@ class FunctionDeclarationStatement extends Statement {
*/
FunctionDeclarationStatement({FunctionDeclaration functionDeclaration}) : this.full(functionDeclaration);
accept(ASTVisitor visitor) => visitor.visitFunctionDeclarationStatement(this);
- Token get beginToken => _functionDeclaration.beginToken;
- Token get endToken => _functionDeclaration.endToken;
-
- /**
- * Return the function declaration being wrapped.
- *
- * @return the function declaration being wrapped
- */
- FunctionDeclaration get functionDeclaration => _functionDeclaration;
+ Token get beginToken => functionDeclaration.beginToken;
+ Token get endToken => functionDeclaration.endToken;
/**
* Set the function declaration being wrapped to the given function declaration.
@@ -7087,10 +5728,10 @@ class FunctionDeclarationStatement extends Statement {
* @param functionDeclaration the function declaration being wrapped
*/
void set functionExpression(FunctionDeclaration functionDeclaration2) {
- this._functionDeclaration = becomeParentOf(functionDeclaration2);
+ this.functionDeclaration = becomeParentOf(functionDeclaration2);
}
void visitChildren(ASTVisitor visitor) {
- safelyVisitChild(_functionDeclaration, visitor);
+ safelyVisitChild(functionDeclaration, visitor);
}
}
/**
@@ -7119,7 +5760,7 @@ class FunctionExpression extends Expression {
* The element associated with the function, or `null` if the AST structure has not been
* resolved.
*/
- ExecutableElement _element;
+ ExecutableElement element;
/**
* Initialize a newly created function declaration.
@@ -7155,14 +5796,6 @@ class FunctionExpression extends Expression {
* @return the body of the function
*/
FunctionBody get body => _body;
-
- /**
- * Return the element associated with this function, or `null` if the AST structure has not
- * been resolved.
- *
- * @return the element associated with this function
- */
- ExecutableElement get element => _element;
Token get endToken {
if (_body != null) {
return _body.endToken;
@@ -7189,15 +5822,6 @@ class FunctionExpression extends Expression {
}
/**
- * Set the element associated with this function to the given element.
- *
- * @param element the element associated with this function
- */
- void set element(ExecutableElement element2) {
- this._element = element2;
- }
-
- /**
* Set the parameters associated with the function to the given list of parameters.
*
* @param parameters the parameters associated with the function
@@ -7240,7 +5864,7 @@ class FunctionExpressionInvocation extends Expression {
* The element associated with the function being invoked based on static type information, or
* `null` if the AST structure has not been resolved or the function could not be resolved.
*/
- ExecutableElement _staticElement;
+ ExecutableElement staticElement;
/**
* The element associated with the function being invoked based on propagated type information, or
@@ -7311,16 +5935,6 @@ class FunctionExpressionInvocation extends Expression {
ExecutableElement get propagatedElement => _propagatedElement;
/**
- * Return the element associated with the function being invoked based on static type information,
- * or `null` if the AST structure has not been resolved or the function could not be
- * resolved. One common example of the latter case is an expression whose value can change over
- * time.
- *
- * @return the element associated with the function
- */
- ExecutableElement get staticElement => _staticElement;
-
- /**
* Set the list of arguments to the method to the given list.
*
* @param argumentList the list of arguments to the method
@@ -7347,16 +5961,6 @@ class FunctionExpressionInvocation extends Expression {
void set propagatedElement(ExecutableElement element) {
_propagatedElement = element;
}
-
- /**
- * Set the element associated with the function being invoked based on static type information to
- * the given element.
- *
- * @param element the element to be associated with the function
- */
- void set staticElement(ExecutableElement element) {
- this._staticElement = element;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_function, visitor);
safelyVisitChild(_argumentList, visitor);
@@ -7622,7 +6226,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.
@@ -7631,8 +6235,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);
}
/**
@@ -7643,16 +6247,9 @@ class HideCombinator extends Combinator {
*/
HideCombinator({Token keyword, List<SimpleIdentifier> hiddenNames}) : this.full(keyword, hiddenNames);
accept(ASTVisitor visitor) => visitor.visitHideCombinator(this);
- 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;
+ Token get endToken => hiddenNames.endToken;
void visitChildren(ASTVisitor visitor) {
- _hiddenNames.accept(visitor);
+ hiddenNames.accept(visitor);
}
}
/**
@@ -7731,12 +6328,12 @@ class IfStatement extends Statement {
/**
* The token representing the 'if' keyword.
*/
- Token _ifKeyword;
+ Token ifKeyword;
/**
* The left parenthesis.
*/
- Token _leftParenthesis;
+ Token leftParenthesis;
/**
* The condition used to determine which of the statements is executed next.
@@ -7746,7 +6343,7 @@ class IfStatement extends Statement {
/**
* The right parenthesis.
*/
- Token _rightParenthesis;
+ Token rightParenthesis;
/**
* The statement that is executed if the condition evaluates to `true`.
@@ -7756,7 +6353,7 @@ class IfStatement extends Statement {
/**
* The token representing the 'else' keyword, or `null` if there is no else statement.
*/
- Token _elseKeyword;
+ Token elseKeyword;
/**
* The statement that is executed if the condition evaluates to `false`, or `null` if
@@ -7776,12 +6373,12 @@ class IfStatement extends Statement {
* @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;
+ this.ifKeyword = ifKeyword;
+ this.leftParenthesis = leftParenthesis;
this._condition = becomeParentOf(condition);
- this._rightParenthesis = rightParenthesis;
+ this.rightParenthesis = rightParenthesis;
this._thenStatement = becomeParentOf(thenStatement);
- this._elseKeyword = elseKeyword;
+ this.elseKeyword = elseKeyword;
this._elseStatement = becomeParentOf(elseStatement);
}
@@ -7798,7 +6395,7 @@ class IfStatement extends Statement {
*/
IfStatement({Token ifKeyword, Token leftParenthesis, Expression condition, Token rightParenthesis, Statement thenStatement, Token elseKeyword, Statement elseStatement}) : this.full(ifKeyword, leftParenthesis, condition, rightParenthesis, thenStatement, elseKeyword, elseStatement);
accept(ASTVisitor visitor) => visitor.visitIfStatement(this);
- Token get beginToken => _ifKeyword;
+ Token get beginToken => ifKeyword;
/**
* Return the condition used to determine which of the statements is executed next.
@@ -7808,14 +6405,6 @@ class IfStatement extends Statement {
Expression get condition => _condition;
/**
- * Return the token representing the 'else' keyword, or `null` if there is no else
- * statement.
- *
- * @return the token representing the 'else' keyword
- */
- Token get elseKeyword => _elseKeyword;
-
- /**
* Return the statement that is executed if the condition evaluates to `false`, or
* `null` if there is no else statement.
*
@@ -7830,27 +6419,6 @@ class IfStatement extends Statement {
}
/**
- * Return the token representing the 'if' keyword.
- *
- * @return the token representing the 'if' keyword
- */
- Token get ifKeyword => _ifKeyword;
-
- /**
- * Return the left parenthesis.
- *
- * @return the left parenthesis
- */
- Token get leftParenthesis => _leftParenthesis;
-
- /**
- * Return the right parenthesis.
- *
- * @return the right parenthesis
- */
- Token get rightParenthesis => _rightParenthesis;
-
- /**
* Return the statement that is executed if the condition evaluates to `true`.
*
* @return the statement that is executed if the condition evaluates to `true`
@@ -7868,15 +6436,6 @@ class IfStatement extends Statement {
}
/**
- * Set the token representing the 'else' keyword to the given token.
- *
- * @param elseKeyword the token representing the 'else' keyword
- */
- void set elseKeyword(Token elseKeyword2) {
- this._elseKeyword = elseKeyword2;
- }
-
- /**
* Set the statement that is executed if the condition evaluates to `false` to the given
* statement.
*
@@ -7887,33 +6446,6 @@ class IfStatement extends Statement {
}
/**
- * Set the token representing the 'if' keyword to the given token.
- *
- * @param ifKeyword the token representing the 'if' keyword
- */
- void set ifKeyword(Token ifKeyword2) {
- this._ifKeyword = ifKeyword2;
- }
-
- /**
- * Set the left parenthesis to the given token.
- *
- * @param leftParenthesis the left parenthesis
- */
- void set leftParenthesis(Token leftParenthesis2) {
- this._leftParenthesis = leftParenthesis2;
- }
-
- /**
- * Set the right parenthesis to the given token.
- *
- * @param rightParenthesis the right parenthesis
- */
- void set rightParenthesis(Token rightParenthesis2) {
- this._rightParenthesis = rightParenthesis2;
- }
-
- /**
* Set the statement that is executed if the condition evaluates to `true` to the given
* statement.
*
@@ -7944,12 +6476,12 @@ class ImplementsClause extends ASTNode {
/**
* The token representing the 'implements' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The interfaces that are being implemented.
*/
- NodeList<TypeName> _interfaces;
+ NodeList<TypeName> interfaces;
/**
* Initialize a newly created implements clause.
@@ -7958,9 +6490,9 @@ class ImplementsClause extends ASTNode {
* @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);
+ this.interfaces = new NodeList<TypeName>(this);
+ this.keyword = keyword;
+ this.interfaces.addAll(interfaces);
}
/**
@@ -7971,33 +6503,10 @@ class ImplementsClause extends ASTNode {
*/
ImplementsClause({Token keyword, List<TypeName> interfaces}) : this.full(keyword, interfaces);
accept(ASTVisitor visitor) => visitor.visitImplementsClause(this);
- Token get beginToken => _keyword;
- 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;
-
- /**
- * Return the token representing the 'implements' keyword.
- *
- * @return the token representing the 'implements' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Set the token representing the 'implements' keyword to the given token.
- *
- * @param keyword the token representing the 'implements' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
+ Token get beginToken => keyword;
+ Token get endToken => interfaces.endToken;
void visitChildren(ASTVisitor visitor) {
- _interfaces.accept(visitor);
+ interfaces.accept(visitor);
}
}
/**
@@ -8015,7 +6524,7 @@ class ImportDirective extends NamespaceDirective {
/**
* The token representing the 'as' token, or `null` if the imported names are not prefixed.
*/
- Token _asToken;
+ Token asToken;
/**
* The prefix to be used with the imported names, or `null` if the imported names are not
@@ -8036,7 +6545,7 @@ class ImportDirective extends NamespaceDirective {
* @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;
+ this.asToken = asToken;
this._prefix = becomeParentOf(prefix);
}
@@ -8056,14 +6565,6 @@ class ImportDirective extends NamespaceDirective {
accept(ASTVisitor visitor) => visitor.visitImportDirective(this);
/**
- * Return the token representing the 'as' token, or `null` if the imported names are not
- * prefixed.
- *
- * @return the token representing the 'as' token
- */
- Token get asToken => _asToken;
-
- /**
* Return the prefix to be used with the imported names, or `null` if the imported names are
* not prefixed.
*
@@ -8071,23 +6572,14 @@ class ImportDirective extends NamespaceDirective {
*/
SimpleIdentifier get prefix => _prefix;
LibraryElement get uriElement {
- Element element = this.element;
- if (element is ImportElement) {
- return ((element as ImportElement)).importedLibrary;
+ Element element2 = element;
+ if (element2 is ImportElement) {
+ return ((element2 as ImportElement)).importedLibrary;
}
return null;
}
/**
- * Set the token representing the 'as' token to the given token.
- *
- * @param asToken the token representing the 'as' token
- */
- void set asToken(Token asToken2) {
- this._asToken = asToken2;
- }
-
- /**
* Set the prefix to be used with the imported names to the given identifier.
*
* @param prefix the prefix to be used with the imported names
@@ -8123,7 +6615,7 @@ class IndexExpression extends Expression {
* The period ("..") before a cascaded index expression, or `null` if this index expression
* is not part of a cascade expression.
*/
- Token _period;
+ Token period;
/**
* The left square bracket.
@@ -8159,7 +6651,7 @@ class IndexExpression extends Expression {
* be set to hold onto the static and propagated information. The auxiliary element will hold onto
* the elements from the getter context.
*/
- AuxiliaryElements _auxiliaryElements = null;
+ AuxiliaryElements auxiliaryElements = null;
/**
* Initialize a newly created index expression.
@@ -8195,7 +6687,7 @@ class IndexExpression extends Expression {
* @param rightBracket the right square bracket
*/
IndexExpression.forCascade_full(Token period, Token leftBracket, Expression index, Token rightBracket) {
- this._period = period;
+ this.period = period;
this._leftBracket = leftBracket;
this._index = becomeParentOf(index);
this._rightBracket = rightBracket;
@@ -8211,17 +6703,11 @@ class IndexExpression extends Expression {
*/
IndexExpression.forCascade({Token period, Token leftBracket, Expression index, Token rightBracket}) : this.forCascade_full(period, leftBracket, index, rightBracket);
accept(ASTVisitor visitor) => visitor.visitIndexExpression(this);
-
- /**
- * Get the auxiliary elements, this will be `null` if the node is not in a getter and setter
- * context, or if it is not yet fully resolved.
- */
- AuxiliaryElements get auxiliaryElements => _auxiliaryElements;
Token get beginToken {
if (_target != null) {
return _target.beginToken;
}
- return _period;
+ return period;
}
/**
@@ -8256,14 +6742,6 @@ class IndexExpression extends Expression {
Token get leftBracket => _leftBracket;
/**
- * Return the period ("..") before a cascaded index expression, or `null` if this index
- * expression is not part of a cascade expression.
- *
- * @return the period ("..") before a cascaded index expression
- */
- Token get period => _period;
-
- /**
* Return the element associated with the operator based on the propagated type of the target, or
* `null` if the AST structure has not been resolved or if the operator could not be
* resolved. One example of the latter case is an operator that is not defined for the type of the
@@ -8372,14 +6850,7 @@ class IndexExpression extends Expression {
*
* @return `true` if this expression is cascaded
*/
- bool get isCascaded => _period != null;
-
- /**
- * Set the auxiliary elements.
- */
- void set auxiliaryElements(AuxiliaryElements auxiliaryElements2) {
- this._auxiliaryElements = auxiliaryElements2;
- }
+ bool get isCascaded => period != null;
/**
* Set the expression used to compute the index to the given expression.
@@ -8400,15 +6871,6 @@ class IndexExpression extends Expression {
}
/**
- * Set the period ("..") before a cascaded index expression to the given token.
- *
- * @param period the period ("..") before a cascaded index expression
- */
- void set period(Token period2) {
- this._period = period2;
- }
-
- /**
* Set the element associated with the operator based on the propagated type of the target to the
* given element.
*
@@ -8508,12 +6970,12 @@ class InstanceCreationExpression extends Expression {
/**
* The keyword used to indicate how an object should be created.
*/
- Token _keyword;
+ Token keyword;
/**
* The name of the constructor to be invoked.
*/
- ConstructorName _constructorName;
+ ConstructorName constructorName;
/**
* The list of arguments to the constructor.
@@ -8524,14 +6986,14 @@ class InstanceCreationExpression extends Expression {
* The element associated with the constructor based on static type information, or `null`
* if the AST structure has not been resolved or if the constructor could not be resolved.
*/
- ConstructorElement _staticElement;
+ ConstructorElement staticElement;
/**
* The element associated with the constructor based on propagated type information, or
* `null` if the AST structure has not been resolved or if the constructor could not be
* resolved.
*/
- ConstructorElement _propagatedElement;
+ ConstructorElement element;
/**
* Initialize a newly created instance creation expression.
@@ -8541,8 +7003,8 @@ class InstanceCreationExpression extends Expression {
* @param argumentList the list of arguments to the constructor
*/
InstanceCreationExpression.full(Token keyword, ConstructorName constructorName, ArgumentList argumentList) {
- this._keyword = keyword;
- this._constructorName = becomeParentOf(constructorName);
+ this.keyword = keyword;
+ this.constructorName = becomeParentOf(constructorName);
this._argumentList = becomeParentOf(argumentList);
}
@@ -8562,47 +7024,15 @@ class InstanceCreationExpression extends Expression {
* @return the list of arguments to the constructor
*/
ArgumentList get argumentList => _argumentList;
- Token get beginToken => _keyword;
-
- /**
- * Return the name of the constructor to be invoked.
- *
- * @return the name of the constructor to be invoked
- */
- ConstructorName get constructorName => _constructorName;
-
- /**
- * Return the element associated with the constructor based on propagated type information, or
- * `null` if the AST structure has not been resolved or if the constructor could not be
- * resolved.
- *
- * @return the element associated with the constructor
- */
- ConstructorElement get element => _propagatedElement;
+ Token get beginToken => keyword;
Token get endToken => _argumentList.endToken;
/**
- * Return the keyword used to indicate how an object should be created.
- *
- * @return the keyword used to indicate how an object should be created
- */
- Token get keyword => _keyword;
-
- /**
- * Return the element associated with the constructor based on static type information, or
- * `null` if the AST structure has not been resolved or if the constructor could not be
- * resolved.
- *
- * @return the element associated with the constructor
- */
- ConstructorElement get staticElement => _staticElement;
-
- /**
* Return `true` if this creation expression is used to invoke a constant constructor.
*
* @return `true` if this creation expression is used to invoke a constant constructor
*/
- bool get isConst => _keyword is KeywordToken && identical(((_keyword as KeywordToken)).keyword, Keyword.CONST);
+ bool get isConst => keyword is KeywordToken && identical(((keyword as KeywordToken)).keyword, Keyword.CONST);
/**
* Set the list of arguments to the constructor to the given list.
@@ -8612,46 +7042,8 @@ class InstanceCreationExpression extends Expression {
void set argumentList(ArgumentList argumentList2) {
this._argumentList = becomeParentOf(argumentList2);
}
-
- /**
- * Set the name of the constructor to be invoked to the given name.
- *
- * @param constructorName the name of the constructor to be invoked
- */
- void set constructorName(ConstructorName constructorName2) {
- this._constructorName = constructorName2;
- }
-
- /**
- * Set the element associated with the constructor based on propagated type information to the
- * given element.
- *
- * @param element the element to be associated with the constructor
- */
- void set element(ConstructorElement element2) {
- this._propagatedElement = element2;
- }
-
- /**
- * Set the keyword used to indicate how an object should be created to the given keyword.
- *
- * @param keyword the keyword used to indicate how an object should be created
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
- * Set the element associated with the constructor based on static type information to the given
- * element.
- *
- * @param element the element to be associated with the constructor
- */
- void set staticElement(ConstructorElement element) {
- this._staticElement = element;
- }
void visitChildren(ASTVisitor visitor) {
- safelyVisitChild(_constructorName, visitor);
+ safelyVisitChild(constructorName, visitor);
safelyVisitChild(_argumentList, visitor);
}
}
@@ -8678,12 +7070,12 @@ class IntegerLiteral extends Literal {
/**
* The token representing the literal.
*/
- Token _literal;
+ Token literal;
/**
* The value of the literal.
*/
- int _value = 0;
+ int value = 0;
/**
* Initialize a newly created integer literal.
@@ -8692,8 +7084,8 @@ class IntegerLiteral extends Literal {
* @param value the value of the literal
*/
IntegerLiteral.full(Token literal, int value) {
- this._literal = literal;
- this._value = value;
+ this.literal = literal;
+ this.value = value;
}
/**
@@ -8704,40 +7096,8 @@ class IntegerLiteral extends Literal {
*/
IntegerLiteral({Token literal, int value}) : this.full(literal, value);
accept(ASTVisitor visitor) => visitor.visitIntegerLiteral(this);
- Token get beginToken => _literal;
- Token get endToken => _literal;
-
- /**
- * Return the token representing the literal.
- *
- * @return the token representing the literal
- */
- Token get literal => _literal;
-
- /**
- * Return the value of the literal.
- *
- * @return the value of the literal
- */
- int get value => _value;
-
- /**
- * Set the token representing the literal to the given token.
- *
- * @param literal the token representing the literal
- */
- void set literal(Token literal2) {
- this._literal = literal2;
- }
-
- /**
- * Set the value of the literal to the given value.
- *
- * @param value the value of the literal
- */
- void set value(int value2) {
- this._value = value2;
- }
+ Token get beginToken => literal;
+ Token get endToken => literal;
void visitChildren(ASTVisitor visitor) {
}
}
@@ -8773,7 +7133,7 @@ class InterpolationExpression extends InterpolationElement {
* The token used to introduce the interpolation expression; either '$' if the expression is a
* simple identifier or '${' if the expression is a full expression.
*/
- Token _leftBracket;
+ Token leftBracket;
/**
* The expression to be evaluated for the value to be converted into a string.
@@ -8783,7 +7143,7 @@ class InterpolationExpression extends InterpolationElement {
/**
* The right curly bracket, or `null` if the expression is an identifier without brackets.
*/
- Token _rightBracket;
+ Token rightBracket;
/**
* Initialize a newly created interpolation expression.
@@ -8793,9 +7153,9 @@ class InterpolationExpression extends InterpolationElement {
* @param rightBracket the right curly bracket
*/
InterpolationExpression.full(Token leftBracket, Expression expression, Token rightBracket) {
- this._leftBracket = leftBracket;
+ this.leftBracket = leftBracket;
this._expression = becomeParentOf(expression);
- this._rightBracket = rightBracket;
+ this.rightBracket = rightBracket;
}
/**
@@ -8807,10 +7167,10 @@ class InterpolationExpression extends InterpolationElement {
*/
InterpolationExpression({Token leftBracket, Expression expression, Token rightBracket}) : this.full(leftBracket, expression, rightBracket);
accept(ASTVisitor visitor) => visitor.visitInterpolationExpression(this);
- Token get beginToken => _leftBracket;
+ Token get beginToken => leftBracket;
Token get endToken {
- if (_rightBracket != null) {
- return _rightBracket;
+ if (rightBracket != null) {
+ return rightBracket;
}
return _expression.endToken;
}
@@ -8823,20 +7183,6 @@ class InterpolationExpression extends InterpolationElement {
Expression get expression => _expression;
/**
- * Return the left curly bracket.
- *
- * @return the left curly bracket
- */
- Token get leftBracket => _leftBracket;
-
- /**
- * Return the right curly bracket.
- *
- * @return the right curly bracket
- */
- Token get rightBracket => _rightBracket;
-
- /**
* Set the expression to be evaluated for the value to be converted into a string to the given
* expression.
*
@@ -8845,24 +7191,6 @@ class InterpolationExpression extends InterpolationElement {
void set expression(Expression expression2) {
this._expression = becomeParentOf(expression2);
}
-
- /**
- * Set the left curly bracket to the given token.
- *
- * @param leftBracket the left curly bracket
- */
- void set leftBracket(Token leftBracket2) {
- this._leftBracket = leftBracket2;
- }
-
- /**
- * Set the right curly bracket to the given token.
- *
- * @param rightBracket the right curly bracket
- */
- void set rightBracket(Token rightBracket2) {
- this._rightBracket = rightBracket2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_expression, visitor);
}
@@ -8966,12 +7294,12 @@ class IsExpression extends Expression {
/**
* The is operator.
*/
- Token _isOperator;
+ Token isOperator;
/**
* The not operator, or `null` if the sense of the test is not negated.
*/
- Token _notOperator;
+ Token notOperator;
/**
* The name of the type being tested for.
@@ -8988,8 +7316,8 @@ class IsExpression extends Expression {
*/
IsExpression.full(Expression expression, Token isOperator, Token notOperator, TypeName type) {
this._expression = becomeParentOf(expression);
- this._isOperator = isOperator;
- this._notOperator = notOperator;
+ this.isOperator = isOperator;
+ this.notOperator = notOperator;
this._type = becomeParentOf(type);
}
@@ -9014,20 +7342,6 @@ class IsExpression extends Expression {
Expression get expression => _expression;
/**
- * Return the is operator being applied.
- *
- * @return the is operator being applied
- */
- Token get isOperator => _isOperator;
-
- /**
- * Return the not operator being applied.
- *
- * @return the not operator being applied
- */
- Token get notOperator => _notOperator;
-
- /**
* Return the name of the type being tested for.
*
* @return the name of the type being tested for
@@ -9045,24 +7359,6 @@ class IsExpression extends Expression {
}
/**
- * Set the is operator being applied to the given operator.
- *
- * @param isOperator the is operator being applied
- */
- void set isOperator(Token isOperator2) {
- this._isOperator = isOperator2;
- }
-
- /**
- * Set the not operator being applied to the given operator.
- *
- * @param notOperator the is operator being applied
- */
- void set notOperator(Token notOperator2) {
- this._notOperator = notOperator2;
- }
-
- /**
* Set the name of the type being tested for to the given name.
*
* @param name the name of the type being tested for
@@ -9095,7 +7391,7 @@ class Label extends ASTNode {
/**
* The colon that separates the label from the statement.
*/
- Token _colon;
+ Token colon;
/**
* Initialize a newly created label.
@@ -9105,7 +7401,7 @@ class Label extends ASTNode {
*/
Label.full(SimpleIdentifier label, Token colon) {
this._label = becomeParentOf(label);
- this._colon = colon;
+ this.colon = colon;
}
/**
@@ -9117,14 +7413,7 @@ class Label extends ASTNode {
Label({SimpleIdentifier label, Token colon}) : this.full(label, colon);
accept(ASTVisitor visitor) => visitor.visitLabel(this);
Token get beginToken => _label.beginToken;
-
- /**
- * Return the colon that separates the label from the statement.
- *
- * @return the colon that separates the label from the statement
- */
- Token get colon => _colon;
- Token get endToken => _colon;
+ Token get endToken => colon;
/**
* Return the label being associated with the statement.
@@ -9134,15 +7423,6 @@ class Label extends ASTNode {
SimpleIdentifier get label => _label;
/**
- * Set the colon that separates the label from the statement to the given token.
- *
- * @param colon the colon that separates the label from the statement
- */
- void set colon(Token colon2) {
- this._colon = colon2;
- }
-
- /**
* Set the label being associated with the statement to the given label.
*
* @param label the label being associated with the statement
@@ -9170,7 +7450,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.
@@ -9184,8 +7464,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);
}
@@ -9198,21 +7478,14 @@ class LabeledStatement extends Statement {
LabeledStatement({List<Label> labels, Statement statement}) : this.full(labels, 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;
}
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
@@ -9228,7 +7501,7 @@ class LabeledStatement extends Statement {
this._statement = becomeParentOf(statement2);
}
void visitChildren(ASTVisitor visitor) {
- _labels.accept(visitor);
+ labels.accept(visitor);
safelyVisitChild(_statement, visitor);
}
}
@@ -9247,7 +7520,7 @@ class LibraryDirective extends Directive {
/**
* The token representing the 'library' token.
*/
- Token _libraryToken;
+ Token libraryToken;
/**
* The name of the library being defined.
@@ -9257,7 +7530,7 @@ class LibraryDirective extends Directive {
/**
* The semicolon terminating the directive.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created library directive.
@@ -9269,9 +7542,9 @@ class LibraryDirective extends Directive {
* @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;
+ this.libraryToken = libraryToken;
this._name = becomeParentOf(name);
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -9285,15 +7558,8 @@ class LibraryDirective extends Directive {
*/
LibraryDirective({Comment comment, List<Annotation> metadata, Token libraryToken, LibraryIdentifier name, Token semicolon}) : this.full(comment, metadata, libraryToken, name, semicolon);
accept(ASTVisitor visitor) => visitor.visitLibraryDirective(this);
- Token get endToken => _semicolon;
- Token get keyword => _libraryToken;
-
- /**
- * Return the token representing the 'library' token.
- *
- * @return the token representing the 'library' token
- */
- Token get libraryToken => _libraryToken;
+ Token get endToken => semicolon;
+ Token get keyword => libraryToken;
/**
* Return the name of the library being defined.
@@ -9303,22 +7569,6 @@ class LibraryDirective extends Directive {
LibraryIdentifier get name => _name;
/**
- * Return the semicolon terminating the directive.
- *
- * @return the semicolon terminating the directive
- */
- Token get semicolon => _semicolon;
-
- /**
- * Set the token representing the 'library' token to the given token.
- *
- * @param libraryToken the token representing the 'library' token
- */
- void set libraryToken(Token libraryToken2) {
- this._libraryToken = libraryToken2;
- }
-
- /**
* Set the name of the library being defined to the given name.
*
* @param name the name of the library being defined
@@ -9326,20 +7576,11 @@ class LibraryDirective extends Directive {
void set name(LibraryIdentifier name2) {
this._name = becomeParentOf(name2);
}
-
- /**
- * Set the semicolon terminating the directive to the given token.
- *
- * @param semicolon the semicolon terminating the directive
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
void visitChildren(ASTVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_name, visitor);
}
- Token get firstTokenAfterCommentAndMetadata => _libraryToken;
+ Token get firstTokenAfterCommentAndMetadata => libraryToken;
}
/**
* Instances of the class `LibraryIdentifier` represent the identifier for a library.
@@ -9356,7 +7597,7 @@ class LibraryIdentifier extends Identifier {
/**
* The components of the identifier.
*/
- NodeList<SimpleIdentifier> _components;
+ NodeList<SimpleIdentifier> components;
/**
* Initialize a newly created prefixed identifier.
@@ -9364,8 +7605,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);
}
/**
@@ -9375,20 +7616,13 @@ class LibraryIdentifier extends Identifier {
*/
LibraryIdentifier({List<SimpleIdentifier> components}) : this.full(components);
accept(ASTVisitor visitor) => visitor.visitLibraryIdentifier(this);
- Token get beginToken => _components.beginToken;
+ Token get beginToken => components.beginToken;
Element get bestElement => staticElement;
-
- /**
- * Return the components of the identifier.
- *
- * @return the components of the identifier
- */
- NodeList<SimpleIdentifier> get components => _components;
- Token get endToken => _components.endToken;
+ 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 {
@@ -9401,7 +7635,7 @@ class LibraryIdentifier extends Identifier {
Element get propagatedElement => null;
Element get staticElement => null;
void visitChildren(ASTVisitor visitor) {
- _components.accept(visitor);
+ components.accept(visitor);
}
}
/**
@@ -9424,7 +7658,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.
@@ -9442,9 +7676,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;
}
@@ -9465,19 +7699,12 @@ class ListLiteral extends TypedLiteral {
if (token != null) {
return token;
}
- TypeArgumentList typeArguments = this.typeArguments;
- if (typeArguments != null) {
- return typeArguments.beginToken;
+ TypeArgumentList typeArguments2 = typeArguments;
+ if (typeArguments2 != null) {
+ return typeArguments2.beginToken;
}
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;
/**
@@ -9513,7 +7740,7 @@ class ListLiteral extends TypedLiteral {
}
void visitChildren(ASTVisitor visitor) {
super.visitChildren(visitor);
- _elements.accept(visitor);
+ elements.accept(visitor);
}
}
/**
@@ -9555,7 +7782,7 @@ class MapLiteral extends TypedLiteral {
/**
* The entries in the map.
*/
- NodeList<MapLiteralEntry> _entries;
+ NodeList<MapLiteralEntry> entries;
/**
* The right curly bracket.
@@ -9573,9 +7800,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;
}
@@ -9596,22 +7823,15 @@ class MapLiteral extends TypedLiteral {
if (token != null) {
return token;
}
- TypeArgumentList typeArguments = this.typeArguments;
- if (typeArguments != null) {
- return typeArguments.beginToken;
+ TypeArgumentList typeArguments2 = typeArguments;
+ if (typeArguments2 != null) {
+ return typeArguments2.beginToken;
}
return _leftBracket;
}
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
@@ -9644,7 +7864,7 @@ class MapLiteral extends TypedLiteral {
}
void visitChildren(ASTVisitor visitor) {
super.visitChildren(visitor);
- _entries.accept(visitor);
+ entries.accept(visitor);
}
}
/**
@@ -9668,7 +7888,7 @@ class MapLiteralEntry extends ASTNode {
/**
* The colon that separates the key from the value.
*/
- Token _separator;
+ Token separator;
/**
* The expression computing the value that will be associated with the key.
@@ -9684,7 +7904,7 @@ class MapLiteralEntry extends ASTNode {
*/
MapLiteralEntry.full(Expression key, Token separator, Expression value) {
this._key = becomeParentOf(key);
- this._separator = separator;
+ this.separator = separator;
this._value = becomeParentOf(value);
}
@@ -9708,13 +7928,6 @@ class MapLiteralEntry extends ASTNode {
Expression get key => _key;
/**
- * Return the colon that separates the key from the value.
- *
- * @return the colon that separates the key from the value
- */
- Token get separator => _separator;
-
- /**
* Return the expression computing the value that will be associated with the key.
*
* @return the expression computing the value that will be associated with the key
@@ -9732,15 +7945,6 @@ class MapLiteralEntry extends ASTNode {
}
/**
- * Set the colon that separates the key from the value to the given token.
- *
- * @param separator the colon that separates the key from the value
- */
- void set separator(Token separator2) {
- this._separator = separator2;
- }
-
- /**
* Set the expression computing the value that will be associated with the key to the given
* expression.
*
@@ -9777,13 +7981,13 @@ class MethodDeclaration extends ClassMember {
/**
* The token for the 'external' keyword, or `null` if the constructor is not external.
*/
- Token _externalKeyword;
+ Token externalKeyword;
/**
* The token representing the 'abstract' or 'static' keyword, or `null` if neither modifier
* was specified.
*/
- Token _modifierKeyword;
+ Token modifierKeyword;
/**
* The return type of the method, or `null` if no return type was declared.
@@ -9794,13 +7998,13 @@ class MethodDeclaration extends ClassMember {
* The token representing the 'get' or 'set' keyword, or `null` if this is a method
* declaration rather than a property declaration.
*/
- Token _propertyKeyword;
+ Token propertyKeyword;
/**
* The token representing the 'operator' keyword, or `null` if this method does not declare
* an operator.
*/
- Token _operatorKeyword;
+ Token operatorKeyword;
/**
* The name of the method.
@@ -9833,11 +8037,11 @@ class MethodDeclaration extends ClassMember {
* @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;
+ this.externalKeyword = externalKeyword;
+ this.modifierKeyword = modifierKeyword;
this._returnType = becomeParentOf(returnType);
- this._propertyKeyword = propertyKeyword;
- this._operatorKeyword = operatorKeyword;
+ this.propertyKeyword = propertyKeyword;
+ this.operatorKeyword = operatorKeyword;
this._name = becomeParentOf(name);
this._parameters = becomeParentOf(parameters);
this._body = becomeParentOf(body);
@@ -9880,22 +8084,6 @@ class MethodDeclaration extends ClassMember {
Token get endToken => _body.endToken;
/**
- * Return the token for the 'external' keyword, or `null` if the constructor is not
- * external.
- *
- * @return the token for the 'external' keyword
- */
- Token get externalKeyword => _externalKeyword;
-
- /**
- * Return the token representing the 'abstract' or 'static' keyword, or `null` if neither
- * modifier was specified.
- *
- * @return the token representing the 'abstract' or 'static' keyword
- */
- Token get modifierKeyword => _modifierKeyword;
-
- /**
* Return the name of the method.
*
* @return the name of the method
@@ -9903,14 +8091,6 @@ class MethodDeclaration extends ClassMember {
SimpleIdentifier get name => _name;
/**
- * Return the token representing the 'operator' keyword, or `null` if this method does not
- * declare an operator.
- *
- * @return the token representing the 'operator' keyword
- */
- Token get operatorKeyword => _operatorKeyword;
-
- /**
* Return the parameters associated with the method, or `null` if this method declares a
* getter.
*
@@ -9919,14 +8099,6 @@ class MethodDeclaration extends ClassMember {
FormalParameterList get parameters => _parameters;
/**
- * Return the token representing the 'get' or 'set' keyword, or `null` if this is a method
- * declaration rather than a property declaration.
- *
- * @return the token representing the 'get' or 'set' keyword
- */
- Token get propertyKeyword => _propertyKeyword;
-
- /**
* Return the return type of the method, or `null` if no return type was declared.
*
* @return the return type of the method
@@ -9938,35 +8110,35 @@ class MethodDeclaration extends ClassMember {
*
* @return `true` if this method is declared to be an abstract method
*/
- bool get isAbstract => _externalKeyword == null && (_body is EmptyFunctionBody);
+ bool get isAbstract => externalKeyword == null && (_body is EmptyFunctionBody);
/**
* Return `true` if this method declares a getter.
*
* @return `true` if this method declares a getter
*/
- bool get isGetter => _propertyKeyword != null && identical(((_propertyKeyword as KeywordToken)).keyword, Keyword.GET);
+ bool get isGetter => propertyKeyword != null && identical(((propertyKeyword as KeywordToken)).keyword, Keyword.GET);
/**
* Return `true` if this method declares an operator.
*
* @return `true` if this method declares an operator
*/
- bool get isOperator => _operatorKeyword != null;
+ bool get isOperator => operatorKeyword != null;
/**
* Return `true` if this method declares a setter.
*
* @return `true` if this method declares a setter
*/
- bool get isSetter => _propertyKeyword != null && identical(((_propertyKeyword as KeywordToken)).keyword, Keyword.SET);
+ bool get isSetter => propertyKeyword != null && identical(((propertyKeyword as KeywordToken)).keyword, Keyword.SET);
/**
* Return `true` if this method is declared to be a static method.
*
* @return `true` if this method is declared to be a static method
*/
- bool get isStatic => _modifierKeyword != null && identical(((_modifierKeyword as KeywordToken)).keyword, Keyword.STATIC);
+ bool get isStatic => modifierKeyword != null && identical(((modifierKeyword as KeywordToken)).keyword, Keyword.STATIC);
/**
* Set the body of the method to the given function body.
@@ -9978,61 +8150,25 @@ class MethodDeclaration extends ClassMember {
}
/**
- * Set the token for the 'external' keyword to the given token.
+ * Set the name of the method to the given identifier.
*
- * @param externalKeyword the token for the 'external' keyword
+ * @param identifier the name of the method
*/
- void set externalKeyword(Token externalKeyword2) {
- this._externalKeyword = externalKeyword2;
+ void set name(SimpleIdentifier identifier) {
+ _name = becomeParentOf(identifier);
}
/**
- * Set the token representing the 'abstract' or 'static' keyword to the given token.
+ * Set the parameters associated with the method to the given list of parameters.
*
- * @param modifierKeyword the token representing the 'abstract' or 'static' keyword
+ * @param parameters the parameters associated with the method
*/
- void set modifierKeyword(Token modifierKeyword2) {
- this._modifierKeyword = modifierKeyword2;
+ void set parameters(FormalParameterList parameters2) {
+ this._parameters = becomeParentOf(parameters2);
}
/**
- * Set the name of the method to the given identifier.
- *
- * @param identifier the name of the method
- */
- void set name(SimpleIdentifier identifier) {
- _name = becomeParentOf(identifier);
- }
-
- /**
- * Set the token representing the 'operator' keyword to the given token.
- *
- * @param operatorKeyword the token representing the 'operator' keyword
- */
- void set operatorKeyword(Token operatorKeyword2) {
- this._operatorKeyword = operatorKeyword2;
- }
-
- /**
- * Set the parameters associated with the method to the given list of parameters.
- *
- * @param parameters the parameters associated with the method
- */
- void set parameters(FormalParameterList parameters2) {
- this._parameters = becomeParentOf(parameters2);
- }
-
- /**
- * Set the token representing the 'get' or 'set' keyword to the given token.
- *
- * @param propertyKeyword the token representing the 'get' or 'set' keyword
- */
- void set propertyKeyword(Token propertyKeyword2) {
- this._propertyKeyword = propertyKeyword2;
- }
-
- /**
- * Set the return type of the method to the given type name.
+ * Set the return type of the method to the given type name.
*
* @param typeName the return type of the method
*/
@@ -10047,14 +8183,14 @@ class MethodDeclaration extends ClassMember {
safelyVisitChild(_body, visitor);
}
Token get firstTokenAfterCommentAndMetadata {
- if (_modifierKeyword != null) {
- return _modifierKeyword;
+ if (modifierKeyword != null) {
+ return modifierKeyword;
} else if (_returnType != null) {
return _returnType.beginToken;
- } else if (_propertyKeyword != null) {
- return _propertyKeyword;
- } else if (_operatorKeyword != null) {
- return _operatorKeyword;
+ } else if (propertyKeyword != null) {
+ return propertyKeyword;
+ } else if (operatorKeyword != null) {
+ return operatorKeyword;
}
return _name.beginToken;
}
@@ -10085,7 +8221,7 @@ class MethodInvocation extends Expression {
* The period that separates the target from the method name, or `null` if there is no
* target.
*/
- Token _period;
+ Token period;
/**
* The name of the method being invoked.
@@ -10107,7 +8243,7 @@ class MethodInvocation extends Expression {
*/
MethodInvocation.full(Expression target, Token period, SimpleIdentifier methodName, ArgumentList argumentList) {
this._target = becomeParentOf(target);
- this._period = period;
+ this.period = period;
this._methodName = becomeParentOf(methodName);
this._argumentList = becomeParentOf(argumentList);
}
@@ -10132,8 +8268,8 @@ class MethodInvocation extends Expression {
Token get beginToken {
if (_target != null) {
return _target.beginToken;
- } else if (_period != null) {
- return _period;
+ } else if (period != null) {
+ return period;
}
return _methodName.beginToken;
}
@@ -10147,14 +8283,6 @@ class MethodInvocation extends Expression {
SimpleIdentifier get methodName => _methodName;
/**
- * Return the period that separates the target from the method name, or `null` if there is
- * no target.
- *
- * @return the period that separates the target from the method name
- */
- Token get period => _period;
-
- /**
* Return the expression used to compute the receiver of the invocation. If this invocation is not
* part of a cascade expression, then this is the same as [getTarget]. If this invocation
* is part of a cascade expression, then the target stored with the cascade expression is
@@ -10194,7 +8322,7 @@ class MethodInvocation extends Expression {
*
* @return `true` if this expression is cascaded
*/
- bool get isCascaded => _period != null && identical(_period.type, TokenType.PERIOD_PERIOD);
+ bool get isCascaded => period != null && identical(period.type, TokenType.PERIOD_PERIOD);
/**
* Set the list of arguments to the method to the given list.
@@ -10215,15 +8343,6 @@ class MethodInvocation extends Expression {
}
/**
- * Set the period that separates the target from the method name to the given token.
- *
- * @param period the period that separates the target from the method name
- */
- void set period(Token period2) {
- this._period = period2;
- }
-
- /**
* Set the expression producing the object on which the method is defined to the given expression.
*
* @param expression the expression producing the object on which the method is defined
@@ -10355,12 +8474,12 @@ abstract class NamespaceDirective extends UriBasedDirective {
/**
* The combinators used to control which names are imported or exported.
*/
- NodeList<Combinator> _combinators;
+ NodeList<Combinator> combinators;
/**
* The semicolon terminating the directive.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created namespace directive.
@@ -10373,10 +8492,10 @@ abstract class NamespaceDirective extends UriBasedDirective {
* @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.combinators = new NodeList<Combinator>(this);
this._keyword = keyword;
- this._combinators.addAll(combinators);
- this._semicolon = semicolon;
+ this.combinators.addAll(combinators);
+ this.semicolon = semicolon;
}
/**
@@ -10390,22 +8509,8 @@ abstract class NamespaceDirective extends UriBasedDirective {
* @param semicolon the semicolon terminating the directive
*/
NamespaceDirective({Comment comment, List<Annotation> metadata, Token keyword, StringLiteral libraryUri, List<Combinator> combinators, Token semicolon}) : this.full(comment, metadata, keyword, libraryUri, combinators, semicolon);
-
- /**
- * Return the combinators used to control how names are imported or exported.
- *
- * @return the combinators used to control how names are imported or exported
- */
- NodeList<Combinator> get combinators => _combinators;
- Token get endToken => _semicolon;
+ Token get endToken => semicolon;
Token get keyword => _keyword;
-
- /**
- * Return the semicolon terminating the directive.
- *
- * @return the semicolon terminating the directive
- */
- Token get semicolon => _semicolon;
LibraryElement get uriElement;
/**
@@ -10416,15 +8521,6 @@ abstract class NamespaceDirective extends UriBasedDirective {
void set keyword(Token exportToken) {
this._keyword = exportToken;
}
-
- /**
- * Set the semicolon terminating the directive to the given token.
- *
- * @param semicolon the semicolon terminating the directive
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
Token get firstTokenAfterCommentAndMetadata => _keyword;
}
/**
@@ -10443,12 +8539,12 @@ class NativeClause extends ASTNode {
/**
* The token representing the 'native' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The name of the native object that implements the class.
*/
- StringLiteral _name;
+ StringLiteral name;
/**
* Initialize a newly created native clause.
@@ -10457,8 +8553,8 @@ class NativeClause extends ASTNode {
* @param name the name of the native object that implements the class.
*/
NativeClause.full(Token keyword, StringLiteral name) {
- this._keyword = keyword;
- this._name = name;
+ this.keyword = keyword;
+ this.name = name;
}
/**
@@ -10469,42 +8565,10 @@ class NativeClause extends ASTNode {
*/
NativeClause({Token keyword, StringLiteral name}) : this.full(keyword, name);
accept(ASTVisitor visitor) => visitor.visitNativeClause(this);
- Token get beginToken => _keyword;
- Token get endToken => _name.endToken;
-
- /**
- * Return the token representing the 'native' keyword.
- *
- * @return the token representing the 'native' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Return the name of the native object that implements the class.
- *
- * @return the name of the native object that implements the class
- */
- StringLiteral get name => _name;
-
- /**
- * Set the token representing the 'native' keyword to the given token.
- *
- * @param keyword the token representing the 'native' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
- * Sets the name of the native object that implements the class.
- *
- * @param name the name of the native object that implements the class.
- */
- void set name(StringLiteral name2) {
- this._name = name2;
- }
+ Token get beginToken => keyword;
+ Token get endToken => name.endToken;
void visitChildren(ASTVisitor visitor) {
- safelyVisitChild(_name, visitor);
+ safelyVisitChild(name, visitor);
}
}
/**
@@ -10523,17 +8587,17 @@ class NativeFunctionBody extends FunctionBody {
/**
* The token representing 'native' that marks the start of the function body.
*/
- Token _nativeToken;
+ 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;
+ Token semicolon;
/**
* Initialize a newly created function body consisting of the 'native' token, a string literal,
@@ -10544,9 +8608,9 @@ class NativeFunctionBody extends FunctionBody {
* @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;
+ this.nativeToken = nativeToken;
+ this.stringLiteral = becomeParentOf(stringLiteral);
+ this.semicolon = semicolon;
}
/**
@@ -10559,31 +8623,10 @@ class NativeFunctionBody extends FunctionBody {
*/
NativeFunctionBody({Token nativeToken, StringLiteral stringLiteral, Token semicolon}) : this.full(nativeToken, stringLiteral, semicolon);
accept(ASTVisitor visitor) => visitor.visitNativeFunctionBody(this);
- Token get beginToken => _nativeToken;
- Token get endToken => _semicolon;
-
- /**
- * Return the simple identifier representing the 'native' token.
- *
- * @return the simple identifier representing the 'native' token
- */
- Token get nativeToken => _nativeToken;
-
- /**
- * Return the token representing the semicolon that marks the end of the function body.
- *
- * @return the token representing the semicolon that marks the end of the function body
- */
- Token get semicolon => _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;
+ Token get beginToken => nativeToken;
+ Token get endToken => semicolon;
void visitChildren(ASTVisitor visitor) {
- safelyVisitChild(_stringLiteral, visitor);
+ safelyVisitChild(stringLiteral, visitor);
}
}
/**
@@ -10610,7 +8653,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.
@@ -10625,9 +8668,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);
}
@@ -10657,13 +8700,6 @@ 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
@@ -10683,7 +8719,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);
@@ -10697,10 +8733,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;
}
@@ -10714,7 +8750,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;
@@ -10735,7 +8771,7 @@ class NullLiteral extends Literal {
/**
* The token representing the literal.
*/
- Token _literal;
+ Token literal;
/**
* Initialize a newly created null literal.
@@ -10743,7 +8779,7 @@ class NullLiteral extends Literal {
* @param token the token representing the literal
*/
NullLiteral.full(Token token) {
- this._literal = token;
+ this.literal = token;
}
/**
@@ -10753,24 +8789,8 @@ class NullLiteral extends Literal {
*/
NullLiteral({Token token}) : this.full(token);
accept(ASTVisitor visitor) => visitor.visitNullLiteral(this);
- Token get beginToken => _literal;
- Token get endToken => _literal;
-
- /**
- * Return the token representing the literal.
- *
- * @return the token representing the literal
- */
- Token get literal => _literal;
-
- /**
- * Set the token representing the literal to the given token.
- *
- * @param literal the token representing the literal
- */
- void set literal(Token literal2) {
- this._literal = literal2;
- }
+ Token get beginToken => literal;
+ Token get endToken => literal;
void visitChildren(ASTVisitor visitor) {
}
}
@@ -10892,12 +8912,12 @@ class PartDirective extends UriBasedDirective {
/**
* The token representing the 'part' token.
*/
- Token _partToken;
+ Token partToken;
/**
* The semicolon terminating the directive.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created part directive.
@@ -10909,8 +8929,8 @@ class PartDirective extends UriBasedDirective {
* @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;
+ this.partToken = partToken;
+ this.semicolon = semicolon;
}
/**
@@ -10924,42 +8944,10 @@ class PartDirective extends UriBasedDirective {
*/
PartDirective({Comment comment, List<Annotation> metadata, Token partToken, StringLiteral partUri, Token semicolon}) : this.full(comment, metadata, partToken, partUri, semicolon);
accept(ASTVisitor visitor) => visitor.visitPartDirective(this);
- Token get endToken => _semicolon;
- Token get keyword => _partToken;
-
- /**
- * Return the token representing the 'part' token.
- *
- * @return the token representing the 'part' token
- */
- Token get partToken => _partToken;
-
- /**
- * Return the semicolon terminating the directive.
- *
- * @return the semicolon terminating the directive
- */
- Token get semicolon => _semicolon;
+ Token get endToken => semicolon;
+ Token get keyword => partToken;
CompilationUnitElement get uriElement => element as CompilationUnitElement;
-
- /**
- * Set the token representing the 'part' token to the given token.
- *
- * @param partToken the token representing the 'part' token
- */
- void set partToken(Token partToken2) {
- this._partToken = partToken2;
- }
-
- /**
- * Set the semicolon terminating the directive to the given token.
- *
- * @param semicolon the semicolon terminating the directive
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
- Token get firstTokenAfterCommentAndMetadata => _partToken;
+ Token get firstTokenAfterCommentAndMetadata => partToken;
}
/**
* Instances of the class `PartOfDirective` represent a part-of directive.
@@ -10976,12 +8964,12 @@ class PartOfDirective extends Directive {
/**
* The token representing the 'part' token.
*/
- Token _partToken;
+ Token partToken;
/**
* The token representing the 'of' token.
*/
- Token _ofToken;
+ Token ofToken;
/**
* The name of the library that the containing compilation unit is part of.
@@ -10991,7 +8979,7 @@ class PartOfDirective extends Directive {
/**
* The semicolon terminating the directive.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created part-of directive.
@@ -11004,10 +8992,10 @@ class PartOfDirective extends Directive {
* @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;
+ this.partToken = partToken;
+ this.ofToken = ofToken;
this._libraryName = becomeParentOf(libraryName);
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -11022,8 +9010,8 @@ class PartOfDirective extends Directive {
*/
PartOfDirective({Comment comment, List<Annotation> metadata, Token partToken, Token ofToken, LibraryIdentifier libraryName, Token semicolon}) : this.full(comment, metadata, partToken, ofToken, libraryName, semicolon);
accept(ASTVisitor visitor) => visitor.visitPartOfDirective(this);
- Token get endToken => _semicolon;
- Token get keyword => _partToken;
+ Token get endToken => semicolon;
+ Token get keyword => partToken;
/**
* Return the name of the library that the containing compilation unit is part of.
@@ -11033,27 +9021,6 @@ class PartOfDirective extends Directive {
LibraryIdentifier get libraryName => _libraryName;
/**
- * Return the token representing the 'of' token.
- *
- * @return the token representing the 'of' token
- */
- Token get ofToken => _ofToken;
-
- /**
- * Return the token representing the 'part' token.
- *
- * @return the token representing the 'part' token
- */
- Token get partToken => _partToken;
-
- /**
- * Return the semicolon terminating the directive.
- *
- * @return the semicolon terminating the directive
- */
- Token get semicolon => _semicolon;
-
- /**
* Set the name of the library that the containing compilation unit is part of to the given name.
*
* @param libraryName the name of the library that the containing compilation unit is part of
@@ -11061,38 +9028,11 @@ class PartOfDirective extends Directive {
void set libraryName(LibraryIdentifier libraryName2) {
this._libraryName = becomeParentOf(libraryName2);
}
-
- /**
- * Set the token representing the 'of' token to the given token.
- *
- * @param ofToken the token representing the 'of' token
- */
- void set ofToken(Token ofToken2) {
- this._ofToken = ofToken2;
- }
-
- /**
- * Set the token representing the 'part' token to the given token.
- *
- * @param partToken the token representing the 'part' token
- */
- void set partToken(Token partToken2) {
- this._partToken = partToken2;
- }
-
- /**
- * Set the semicolon terminating the directive to the given token.
- *
- * @param semicolon the semicolon terminating the directive
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
void visitChildren(ASTVisitor visitor) {
super.visitChildren(visitor);
safelyVisitChild(_libraryName, visitor);
}
- Token get firstTokenAfterCommentAndMetadata => _partToken;
+ Token get firstTokenAfterCommentAndMetadata => partToken;
}
/**
* Instances of the class `PostfixExpression` represent a postfix unary expression.
@@ -11114,7 +9054,7 @@ class PostfixExpression extends Expression {
/**
* The postfix operator being applied to the operand.
*/
- Token _operator;
+ Token operator;
/**
* The element associated with this the operator based on the propagated type of the operand, or
@@ -11138,7 +9078,7 @@ class PostfixExpression extends Expression {
*/
PostfixExpression.full(Expression operand, Token operator) {
this._operand = becomeParentOf(operand);
- this._operator = operator;
+ this.operator = operator;
}
/**
@@ -11166,7 +9106,7 @@ class PostfixExpression extends Expression {
}
return element;
}
- Token get endToken => _operator;
+ Token get endToken => operator;
/**
* Return the expression computing the operand for the operator.
@@ -11176,13 +9116,6 @@ class PostfixExpression extends Expression {
Expression get operand => _operand;
/**
- * Return the postfix operator being applied to the operand.
- *
- * @return the postfix operator being applied to the operand
- */
- Token get operator => _operator;
-
- /**
* Return the element associated with the operator based on the propagated type of the operand, or
* `null` if the AST structure has not been resolved, if the operator is not user definable,
* or if the operator could not be resolved. One example of the latter case is an operator that is
@@ -11212,15 +9145,6 @@ class PostfixExpression extends Expression {
}
/**
- * Set the postfix operator being applied to the operand to the given operator.
- *
- * @param operator the postfix operator being applied to the operand
- */
- void set operator(Token operator2) {
- this._operator = operator2;
- }
-
- /**
* Set the element associated with the operator based on the propagated type of the operand to the
* given element.
*
@@ -11300,7 +9224,7 @@ class PrefixExpression extends Expression {
/**
* The prefix operator being applied to the operand.
*/
- Token _operator;
+ Token operator;
/**
* The expression computing the operand for the operator.
@@ -11328,7 +9252,7 @@ class PrefixExpression extends Expression {
* @param operand the expression computing the operand for the operator
*/
PrefixExpression.full(Token operator, Expression operand) {
- this._operator = operator;
+ this.operator = operator;
this._operand = becomeParentOf(operand);
}
@@ -11340,7 +9264,7 @@ class PrefixExpression extends Expression {
*/
PrefixExpression({Token operator, Expression operand}) : this.full(operator, operand);
accept(ASTVisitor visitor) => visitor.visitPrefixExpression(this);
- Token get beginToken => _operator;
+ Token get beginToken => operator;
/**
* Return the best element available for this operator. If resolution was able to find a better
@@ -11367,13 +9291,6 @@ class PrefixExpression extends Expression {
Expression get operand => _operand;
/**
- * Return the prefix operator being applied to the operand.
- *
- * @return the prefix operator being applied to the operand
- */
- Token get operator => _operator;
-
- /**
* Return the element associated with the operator based on the propagated type of the operand, or
* `null` if the AST structure has not been resolved, if the operator is not user definable,
* or if the operator could not be resolved. One example of the latter case is an operator that is
@@ -11403,15 +9320,6 @@ class PrefixExpression extends Expression {
}
/**
- * Set the prefix operator being applied to the operand to the given operator.
- *
- * @param operator the prefix operator being applied to the operand
- */
- void set operator(Token operator2) {
- this._operator = operator2;
- }
-
- /**
* Set the element associated with the operator based on the propagated type of the operand to the
* given element.
*
@@ -11498,7 +9406,7 @@ class PrefixedIdentifier extends Identifier {
/**
* The period used to separate the prefix from the identifier.
*/
- Token _period;
+ Token period;
/**
* The identifier being prefixed.
@@ -11514,7 +9422,7 @@ class PrefixedIdentifier extends Identifier {
*/
PrefixedIdentifier.full(SimpleIdentifier prefix, Token period, SimpleIdentifier identifier) {
this._prefix = becomeParentOf(prefix);
- this._period = period;
+ this.period = period;
this._identifier = becomeParentOf(identifier);
}
@@ -11545,13 +9453,6 @@ class PrefixedIdentifier extends Identifier {
String get name => "${_prefix.name}.${_identifier.name}";
/**
- * Return the period used to separate the prefix from the identifier.
- *
- * @return the period used to separate the prefix from the identifier
- */
- Token get period => _period;
-
- /**
* Return the prefix associated with the library in which the identifier is defined.
*
* @return the prefix associated with the library in which the identifier is defined
@@ -11580,15 +9481,6 @@ class PrefixedIdentifier extends Identifier {
}
/**
- * Set the period used to separate the prefix from the identifier to the given token.
- *
- * @param period the period used to separate the prefix from the identifier
- */
- void set period(Token period2) {
- this._period = period2;
- }
-
- /**
* Set the prefix associated with the library in which the identifier is defined to the given
* identifier.
*
@@ -11626,7 +9518,7 @@ class PropertyAccess extends Expression {
/**
* The property access operator.
*/
- Token _operator;
+ Token operator;
/**
* The name of the property being accessed.
@@ -11642,7 +9534,7 @@ class PropertyAccess extends Expression {
*/
PropertyAccess.full(Expression target, Token operator, SimpleIdentifier propertyName) {
this._target = becomeParentOf(target);
- this._operator = operator;
+ this.operator = operator;
this._propertyName = becomeParentOf(propertyName);
}
@@ -11659,18 +9551,11 @@ class PropertyAccess extends Expression {
if (_target != null) {
return _target.beginToken;
}
- return _operator;
+ return operator;
}
Token get endToken => _propertyName.endToken;
/**
- * Return the property access operator.
- *
- * @return the property access operator
- */
- Token get operator => _operator;
-
- /**
* Return the name of the property being accessed.
*
* @return the name of the property being accessed
@@ -11717,16 +9602,7 @@ class PropertyAccess extends Expression {
*
* @return `true` if this expression is cascaded
*/
- bool get isCascaded => _operator != null && identical(_operator.type, TokenType.PERIOD_PERIOD);
-
- /**
- * Set the property access operator to the given token.
- *
- * @param operator the property access operator
- */
- void set operator(Token operator2) {
- this._operator = operator2;
- }
+ bool get isCascaded => operator != null && identical(operator.type, TokenType.PERIOD_PERIOD);
/**
* Set the name of the property being accessed to the given identifier.
@@ -11767,13 +9643,13 @@ class RedirectingConstructorInvocation extends ConstructorInitializer {
/**
* The token for the 'this' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The token for the period before the name of the constructor that is being invoked, or
* `null` if the unnamed constructor is being invoked.
*/
- Token _period;
+ Token period;
/**
* The name of the constructor that is being invoked, or `null` if the unnamed constructor
@@ -11790,7 +9666,7 @@ class RedirectingConstructorInvocation extends ConstructorInitializer {
* The element associated with the constructor based on static type information, or `null`
* if the AST structure has not been resolved or if the constructor could not be resolved.
*/
- ConstructorElement _staticElement;
+ ConstructorElement staticElement;
/**
* The element associated with the constructor based on propagated type information, or
@@ -11809,8 +9685,8 @@ class RedirectingConstructorInvocation extends ConstructorInitializer {
* @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;
+ this.keyword = keyword;
+ this.period = period;
this._constructorName = becomeParentOf(constructorName);
this._argumentList = becomeParentOf(argumentList);
}
@@ -11833,7 +9709,7 @@ class RedirectingConstructorInvocation extends ConstructorInitializer {
* @return the list of arguments to the constructor
*/
ArgumentList get argumentList => _argumentList;
- Token get beginToken => _keyword;
+ Token get beginToken => keyword;
/**
* Return the name of the constructor that is being invoked, or `null` if the unnamed
@@ -11854,30 +9730,6 @@ class RedirectingConstructorInvocation extends ConstructorInitializer {
Token get endToken => _argumentList.endToken;
/**
- * Return the token for the 'this' keyword.
- *
- * @return the token for the 'this' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Return the token for the period before the name of the constructor that is being invoked, or
- * `null` if the unnamed constructor is being invoked.
- *
- * @return the token for the period before the name of the constructor that is being invoked
- */
- Token get period => _period;
-
- /**
- * Return the element associated with the constructor based on static type information, or
- * `null` if the AST structure has not been resolved or if the constructor could not be
- * resolved.
- *
- * @return the element associated with the constructor
- */
- ConstructorElement get staticElement => _staticElement;
-
- /**
* Set the list of arguments to the constructor to the given list.
*
* @param argumentList the list of arguments to the constructor
@@ -11904,35 +9756,6 @@ class RedirectingConstructorInvocation extends ConstructorInitializer {
void set element(ConstructorElement element2) {
_propagatedElement = element2;
}
-
- /**
- * Set the token for the 'this' keyword to the given token.
- *
- * @param keyword the token for the 'this' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
- * Set the token for the period before the name of the constructor that is being invoked to the
- * given token.
- *
- * @param period the token for the period before the name of the constructor that is being invoked
- */
- void set period(Token period2) {
- this._period = period2;
- }
-
- /**
- * Set the element associated with the constructor based on static type information to the given
- * element.
- *
- * @param element the element to be associated with the constructor
- */
- void set staticElement(ConstructorElement element) {
- this._staticElement = element;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_constructorName, visitor);
safelyVisitChild(_argumentList, visitor);
@@ -11953,7 +9776,7 @@ class RethrowExpression extends Expression {
/**
* The token representing the 'rethrow' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* Initialize a newly created rethrow expression.
@@ -11961,7 +9784,7 @@ class RethrowExpression extends Expression {
* @param keyword the token representing the 'rethrow' keyword
*/
RethrowExpression.full(Token keyword) {
- this._keyword = keyword;
+ this.keyword = keyword;
}
/**
@@ -11971,24 +9794,8 @@ class RethrowExpression extends Expression {
*/
RethrowExpression({Token keyword}) : this.full(keyword);
accept(ASTVisitor visitor) => visitor.visitRethrowExpression(this);
- Token get beginToken => _keyword;
- Token get endToken => _keyword;
-
- /**
- * Return the token representing the 'rethrow' keyword.
- *
- * @return the token representing the 'rethrow' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Set the token representing the 'rethrow' keyword to the given token.
- *
- * @param keyword the token representing the 'rethrow' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
+ Token get beginToken => keyword;
+ Token get endToken => keyword;
void visitChildren(ASTVisitor visitor) {
}
}
@@ -12007,7 +9814,7 @@ class ReturnStatement extends Statement {
/**
* The token representing the 'return' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The expression computing the value to be returned, or `null` if no explicit value was
@@ -12018,7 +9825,7 @@ class ReturnStatement extends Statement {
/**
* The semicolon terminating the statement.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created return statement.
@@ -12028,9 +9835,9 @@ class ReturnStatement extends Statement {
* @param semicolon the semicolon terminating the statement
*/
ReturnStatement.full(Token keyword, Expression expression, Token semicolon) {
- this._keyword = keyword;
+ this.keyword = keyword;
this._expression = becomeParentOf(expression);
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -12042,8 +9849,8 @@ class ReturnStatement extends Statement {
*/
ReturnStatement({Token keyword, Expression expression, Token semicolon}) : this.full(keyword, expression, semicolon);
accept(ASTVisitor visitor) => visitor.visitReturnStatement(this);
- Token get beginToken => _keyword;
- Token get endToken => _semicolon;
+ Token get beginToken => keyword;
+ Token get endToken => semicolon;
/**
* Return the expression computing the value to be returned, or `null` if no explicit value
@@ -12054,20 +9861,6 @@ class ReturnStatement extends Statement {
Expression get expression => _expression;
/**
- * Return the token representing the 'return' keyword.
- *
- * @return the token representing the 'return' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Return the semicolon terminating the statement.
- *
- * @return the semicolon terminating the statement
- */
- Token get semicolon => _semicolon;
-
- /**
* Set the expression computing the value to be returned to the given expression.
*
* @param expression the expression computing the value to be returned
@@ -12075,24 +9868,6 @@ class ReturnStatement extends Statement {
void set expression(Expression expression2) {
this._expression = becomeParentOf(expression2);
}
-
- /**
- * Set the token representing the 'return' keyword to the given token.
- *
- * @param keyword the token representing the 'return' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
- * Set the semicolon terminating the statement to the given token.
- *
- * @param semicolon the semicolon terminating the statement
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_expression, visitor);
}
@@ -12113,7 +9888,7 @@ class ScriptTag extends ASTNode {
/**
* The token representing this script tag.
*/
- Token _scriptTag;
+ Token scriptTag;
/**
* Initialize a newly created script tag.
@@ -12121,7 +9896,7 @@ class ScriptTag extends ASTNode {
* @param scriptTag the token representing this script tag
*/
ScriptTag.full(Token scriptTag) {
- this._scriptTag = scriptTag;
+ this.scriptTag = scriptTag;
}
/**
@@ -12131,24 +9906,8 @@ class ScriptTag extends ASTNode {
*/
ScriptTag({Token scriptTag}) : this.full(scriptTag);
accept(ASTVisitor visitor) => visitor.visitScriptTag(this);
- Token get beginToken => _scriptTag;
- Token get endToken => _scriptTag;
-
- /**
- * Return the token representing this script tag.
- *
- * @return the token representing this script tag
- */
- Token get scriptTag => _scriptTag;
-
- /**
- * Set the token representing this script tag to the given script tag.
- *
- * @param scriptTag the token representing this script tag
- */
- void set scriptTag(Token scriptTag2) {
- this._scriptTag = scriptTag2;
- }
+ Token get beginToken => scriptTag;
+ Token get endToken => scriptTag;
void visitChildren(ASTVisitor visitor) {
}
}
@@ -12168,7 +9927,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.
@@ -12177,8 +9936,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);
}
/**
@@ -12189,16 +9948,9 @@ class ShowCombinator extends Combinator {
*/
ShowCombinator({Token keyword, List<SimpleIdentifier> shownNames}) : this.full(keyword, shownNames);
accept(ASTVisitor visitor) => visitor.visitShowCombinator(this);
- 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;
+ Token get endToken => shownNames.endToken;
void visitChildren(ASTVisitor visitor) {
- _shownNames.accept(visitor);
+ shownNames.accept(visitor);
}
}
/**
@@ -12217,7 +9969,7 @@ class SimpleFormalParameter extends NormalFormalParameter {
* The token representing either the 'final', 'const' or 'var' keyword, or `null` if no
* keyword was used.
*/
- Token _keyword;
+ Token keyword;
/**
* The name of the declared type of the parameter, or `null` if the parameter does not have
@@ -12235,7 +9987,7 @@ class SimpleFormalParameter extends NormalFormalParameter {
* @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;
+ this.keyword = keyword;
this._type = becomeParentOf(type);
}
@@ -12251,8 +10003,8 @@ class SimpleFormalParameter extends NormalFormalParameter {
SimpleFormalParameter({Comment comment, List<Annotation> metadata, Token keyword, TypeName type, SimpleIdentifier identifier}) : this.full(comment, metadata, keyword, type, identifier);
accept(ASTVisitor visitor) => visitor.visitSimpleFormalParameter(this);
Token get beginToken {
- if (_keyword != null) {
- return _keyword;
+ if (keyword != null) {
+ return keyword;
} else if (_type != null) {
return _type.beginToken;
}
@@ -12261,30 +10013,14 @@ class SimpleFormalParameter extends NormalFormalParameter {
Token get endToken => identifier.endToken;
/**
- * Return the token representing either the 'final', 'const' or 'var' keyword.
- *
- * @return the token representing either the 'final', 'const' or 'var' keyword
- */
- Token get keyword => _keyword;
-
- /**
* Return the name of the declared type of the parameter, or `null` if the parameter does
* not have a declared type.
*
* @return the name of the declared type of the parameter
*/
TypeName get type => _type;
- bool get isConst => (_keyword is KeywordToken) && identical(((_keyword as KeywordToken)).keyword, Keyword.CONST);
- bool get isFinal => (_keyword is KeywordToken) && identical(((_keyword as KeywordToken)).keyword, Keyword.FINAL);
-
- /**
- * Set the token representing either the 'final', 'const' or 'var' keyword to the given token.
- *
- * @param keyword the token representing either the 'final', 'const' or 'var' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
+ bool get isConst => (keyword is KeywordToken) && identical(((keyword as KeywordToken)).keyword, Keyword.CONST);
+ bool get isFinal => (keyword is KeywordToken) && identical(((keyword as KeywordToken)).keyword, Keyword.FINAL);
/**
* Set the name of the declared type of the parameter to the given type name.
@@ -12319,7 +10055,7 @@ class SimpleIdentifier extends Identifier {
/**
* The token representing the identifier.
*/
- Token _token;
+ Token token;
/**
* The element associated with this identifier based on static type information, or `null`
@@ -12339,7 +10075,7 @@ class SimpleIdentifier extends Identifier {
* be set to hold onto the static and propagated information. The auxiliary element will hold onto
* the elements from the getter context.
*/
- AuxiliaryElements _auxiliaryElements = null;
+ AuxiliaryElements auxiliaryElements = null;
/**
* Initialize a newly created identifier.
@@ -12347,7 +10083,7 @@ class SimpleIdentifier extends Identifier {
* @param token the token representing the identifier
*/
SimpleIdentifier.full(Token token) {
- this._token = token;
+ this.token = token;
}
/**
@@ -12357,32 +10093,19 @@ class SimpleIdentifier extends Identifier {
*/
SimpleIdentifier({Token token}) : this.full(token);
accept(ASTVisitor visitor) => visitor.visitSimpleIdentifier(this);
-
- /**
- * Get the auxiliary elements, this will be `null` if the node is not in a getter and setter
- * context, or if it is not yet fully resolved.
- */
- AuxiliaryElements get auxiliaryElements => _auxiliaryElements;
- Token get beginToken => _token;
+ Token get beginToken => token;
Element get bestElement {
if (_propagatedElement == null) {
return _staticElement;
}
return _propagatedElement;
}
- Token get endToken => _token;
- String get name => _token.lexeme;
+ Token get endToken => token;
+ String get name => token.lexeme;
Element get propagatedElement => _propagatedElement;
Element get staticElement => _staticElement;
/**
- * Return the token representing the identifier.
- *
- * @return the token representing the identifier
- */
- Token get token => _token;
-
- /**
* Return `true` if this identifier is the name being declared in a declaration.
*
* @return `true` if this identifier is the name being declared in a declaration
@@ -12493,14 +10216,7 @@ class SimpleIdentifier extends Identifier {
}
return false;
}
- bool get isSynthetic => _token.isSynthetic;
-
- /**
- * Set the auxiliary elements.
- */
- void set auxiliaryElements(AuxiliaryElements auxiliaryElements2) {
- this._auxiliaryElements = auxiliaryElements2;
- }
+ bool get isSynthetic => token.isSynthetic;
/**
* Set the element associated with this identifier based on propagated type information to the
@@ -12521,15 +10237,6 @@ class SimpleIdentifier extends Identifier {
void set staticElement(Element element) {
_staticElement = validateElement2(element);
}
-
- /**
- * Set the token representing the identifier to the given token.
- *
- * @param token the token representing the literal
- */
- void set token(Token token2) {
- this._token = token2;
- }
void visitChildren(ASTVisitor visitor) {
}
@@ -12614,7 +10321,7 @@ class SimpleStringLiteral extends StringLiteral {
/**
* The token representing the literal.
*/
- Token _literal;
+ Token literal;
/**
* The value of the literal.
@@ -12628,7 +10335,7 @@ class SimpleStringLiteral extends StringLiteral {
* @param value the value of the literal
*/
SimpleStringLiteral.full(Token literal, String value) {
- this._literal = literal;
+ this.literal = literal;
this._value = StringUtilities.intern(value);
}
@@ -12640,15 +10347,8 @@ class SimpleStringLiteral extends StringLiteral {
*/
SimpleStringLiteral({Token literal, String value}) : this.full(literal, value);
accept(ASTVisitor visitor) => visitor.visitSimpleStringLiteral(this);
- Token get beginToken => _literal;
- Token get endToken => _literal;
-
- /**
- * Return the token representing the literal.
- *
- * @return the token representing the literal
- */
- Token get literal => _literal;
+ Token get beginToken => literal;
+ Token get endToken => literal;
/**
* Return the value of the literal.
@@ -12675,16 +10375,7 @@ class SimpleStringLiteral extends StringLiteral {
* @return `true` if this string literal is a raw string
*/
bool get isRaw => _value.codeUnitAt(0) == 0x40;
- bool get isSynthetic => _literal.isSynthetic;
-
- /**
- * Set the token representing the literal to the given token.
- *
- * @param literal the token representing the literal
- */
- void set literal(Token literal2) {
- this._literal = literal2;
- }
+ bool get isSynthetic => literal.isSynthetic;
/**
* Set the value of the literal to the given string.
@@ -12742,7 +10433,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.
@@ -12750,8 +10441,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);
}
/**
@@ -12761,17 +10452,10 @@ class StringInterpolation extends StringLiteral {
*/
StringInterpolation({List<InterpolationElement> elements}) : this.full(elements);
accept(ASTVisitor visitor) => visitor.visitStringInterpolation(this);
- 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 beginToken => elements.beginToken;
+ Token get endToken => elements.endToken;
void visitChildren(ASTVisitor visitor) {
- _elements.accept(visitor);
+ elements.accept(visitor);
}
void appendStringValue(JavaStringBuilder builder) {
throw new IllegalArgumentException();
@@ -12832,13 +10516,13 @@ class SuperConstructorInvocation extends ConstructorInitializer {
/**
* The token for the 'super' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The token for the period before the name of the constructor that is being invoked, or
* `null` if the unnamed constructor is being invoked.
*/
- Token _period;
+ Token period;
/**
* The name of the constructor that is being invoked, or `null` if the unnamed constructor
@@ -12855,7 +10539,7 @@ class SuperConstructorInvocation extends ConstructorInitializer {
* The element associated with the constructor based on static type information, or `null`
* if the AST structure has not been resolved or if the constructor could not be resolved.
*/
- ConstructorElement _staticElement;
+ ConstructorElement staticElement;
/**
* The element associated with the constructor based on propagated type information, or `null` if the AST structure has not been
@@ -12873,8 +10557,8 @@ class SuperConstructorInvocation extends ConstructorInitializer {
* @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;
+ this.keyword = keyword;
+ this.period = period;
this._constructorName = becomeParentOf(constructorName);
this._argumentList = becomeParentOf(argumentList);
}
@@ -12897,7 +10581,7 @@ class SuperConstructorInvocation extends ConstructorInitializer {
* @return the list of arguments to the constructor
*/
ArgumentList get argumentList => _argumentList;
- Token get beginToken => _keyword;
+ Token get beginToken => keyword;
/**
* Return the name of the constructor that is being invoked, or `null` if the unnamed
@@ -12918,30 +10602,6 @@ class SuperConstructorInvocation extends ConstructorInitializer {
Token get endToken => _argumentList.endToken;
/**
- * Return the token for the 'super' keyword.
- *
- * @return the token for the 'super' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Return the token for the period before the name of the constructor that is being invoked, or
- * `null` if the unnamed constructor is being invoked.
- *
- * @return the token for the period before the name of the constructor that is being invoked
- */
- Token get period => _period;
-
- /**
- * Return the element associated with the constructor based on static type information, or
- * `null` if the AST structure has not been resolved or if the constructor could not be
- * resolved.
- *
- * @return the element associated with the constructor
- */
- ConstructorElement get staticElement => _staticElement;
-
- /**
* Set the list of arguments to the constructor to the given list.
*
* @param argumentList the list of arguments to the constructor
@@ -12968,35 +10628,6 @@ class SuperConstructorInvocation extends ConstructorInitializer {
void set element(ConstructorElement element2) {
_propagatedElement = element2;
}
-
- /**
- * Set the token for the 'super' keyword to the given token.
- *
- * @param keyword the token for the 'super' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
- * Set the token for the period before the name of the constructor that is being invoked to the
- * given token.
- *
- * @param period the token for the period before the name of the constructor that is being invoked
- */
- void set period(Token period2) {
- this._period = period2;
- }
-
- /**
- * Set the element associated with the constructor based on static type information to the given
- * element.
- *
- * @param element the element to be associated with the constructor
- */
- void set staticElement(ConstructorElement element) {
- this._staticElement = element;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_constructorName, visitor);
safelyVisitChild(_argumentList, visitor);
@@ -13017,7 +10648,7 @@ class SuperExpression extends Expression {
/**
* The token representing the keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* Initialize a newly created super expression.
@@ -13025,7 +10656,7 @@ class SuperExpression extends Expression {
* @param keyword the token representing the keyword
*/
SuperExpression.full(Token keyword) {
- this._keyword = keyword;
+ this.keyword = keyword;
}
/**
@@ -13035,24 +10666,8 @@ class SuperExpression extends Expression {
*/
SuperExpression({Token keyword}) : this.full(keyword);
accept(ASTVisitor visitor) => visitor.visitSuperExpression(this);
- Token get beginToken => _keyword;
- Token get endToken => _keyword;
-
- /**
- * Return the token representing the keyword.
- *
- * @return the token representing the keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Set the token representing the keyword to the given token.
- *
- * @param keyword the token representing the keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
+ Token get beginToken => keyword;
+ Token get endToken => keyword;
void visitChildren(ASTVisitor visitor) {
}
}
@@ -13173,22 +10788,22 @@ 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.
*/
- Token _keyword;
+ Token keyword;
/**
* The colon separating the keyword or the expression from the statements.
*/
- Token _colon;
+ Token colon;
/**
* The statements that will be executed if this switch member is selected.
*/
- NodeList<Statement> _statements;
+ NodeList<Statement> statements;
/**
* Initialize a newly created switch member.
@@ -13199,12 +10814,12 @@ abstract class SwitchMember extends ASTNode {
* @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);
+ 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);
}
/**
@@ -13217,62 +10832,16 @@ 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;
+ return keyword;
}
-
- /**
- * Return the colon separating the keyword or the expression from the statements.
- *
- * @return the colon separating the keyword or the expression from the statements
- */
- Token get colon => _colon;
Token get endToken {
- if (!_statements.isEmpty) {
- return _statements.endToken;
+ if (!statements.isEmpty) {
+ return statements.endToken;
}
- return _colon;
- }
-
- /**
- * Return the token representing the 'case' or 'default' keyword.
- *
- * @return the token representing the 'case' or 'default' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * 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;
-
- /**
- * Set the colon separating the keyword or the expression from the statements to the given token.
- *
- * @param colon the colon separating the keyword or the expression from the statements
- */
- void set colon(Token colon2) {
- this._colon = colon2;
- }
-
- /**
- * Set the token representing the 'case' or 'default' keyword to the given token.
- *
- * @param keyword the token representing the 'case' or 'default' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
+ return colon;
}
}
/**
@@ -13290,12 +10859,12 @@ class SwitchStatement extends Statement {
/**
* The token representing the 'switch' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The left parenthesis.
*/
- Token _leftParenthesis;
+ Token leftParenthesis;
/**
* The expression used to determine which of the switch members will be selected.
@@ -13305,22 +10874,22 @@ class SwitchStatement extends Statement {
/**
* The right parenthesis.
*/
- Token _rightParenthesis;
+ Token rightParenthesis;
/**
* The left curly bracket.
*/
- Token _leftBracket;
+ Token leftBracket;
/**
* The switch members that can be selected by the expression.
*/
- NodeList<SwitchMember> _members;
+ NodeList<SwitchMember> members;
/**
* The right curly bracket.
*/
- Token _rightBracket;
+ Token rightBracket;
/**
* Initialize a newly created switch statement.
@@ -13334,14 +10903,14 @@ class SwitchStatement extends Statement {
* @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;
+ this.members = new NodeList<SwitchMember>(this);
+ this.keyword = keyword;
+ this.leftParenthesis = leftParenthesis;
this._expression = becomeParentOf(expression);
- this._rightParenthesis = rightParenthesis;
- this._leftBracket = leftBracket;
- this._members.addAll(members);
- this._rightBracket = rightBracket;
+ this.rightParenthesis = rightParenthesis;
+ this.leftBracket = leftBracket;
+ this.members.addAll(members);
+ this.rightBracket = rightBracket;
}
/**
@@ -13357,8 +10926,8 @@ class SwitchStatement extends Statement {
*/
SwitchStatement({Token keyword, Token leftParenthesis, Expression expression, Token rightParenthesis, Token leftBracket, List<SwitchMember> members, Token rightBracket}) : this.full(keyword, leftParenthesis, expression, rightParenthesis, leftBracket, members, rightBracket);
accept(ASTVisitor visitor) => visitor.visitSwitchStatement(this);
- Token get beginToken => _keyword;
- Token get endToken => _rightBracket;
+ Token get beginToken => keyword;
+ Token get endToken => rightBracket;
/**
* Return the expression used to determine which of the switch members will be selected.
@@ -13368,48 +10937,6 @@ class SwitchStatement extends Statement {
Expression get expression => _expression;
/**
- * Return the token representing the 'switch' keyword.
- *
- * @return the token representing the 'switch' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Return the left curly bracket.
- *
- * @return the left curly bracket
- */
- Token get leftBracket => _leftBracket;
-
- /**
- * Return the left parenthesis.
- *
- * @return the left parenthesis
- */
- Token get leftParenthesis => _leftParenthesis;
-
- /**
- * 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;
-
- /**
- * Return the right curly bracket.
- *
- * @return the right curly bracket
- */
- Token get rightBracket => _rightBracket;
-
- /**
- * Return the right parenthesis.
- *
- * @return the right parenthesis
- */
- Token get rightParenthesis => _rightParenthesis;
-
- /**
* Set the expression used to determine which of the switch members will be selected to the given
* expression.
*
@@ -13418,54 +10945,9 @@ class SwitchStatement extends Statement {
void set expression(Expression expression2) {
this._expression = becomeParentOf(expression2);
}
-
- /**
- * Set the token representing the 'switch' keyword to the given token.
- *
- * @param keyword the token representing the 'switch' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
- * Set the left curly bracket to the given token.
- *
- * @param leftBracket the left curly bracket
- */
- void set leftBracket(Token leftBracket2) {
- this._leftBracket = leftBracket2;
- }
-
- /**
- * Set the left parenthesis to the given token.
- *
- * @param leftParenthesis the left parenthesis
- */
- void set leftParenthesis(Token leftParenthesis2) {
- this._leftParenthesis = leftParenthesis2;
- }
-
- /**
- * Set the right curly bracket to the given token.
- *
- * @param rightBracket the right curly bracket
- */
- void set rightBracket(Token rightBracket2) {
- this._rightBracket = rightBracket2;
- }
-
- /**
- * Set the right parenthesis to the given token.
- *
- * @param rightParenthesis the right parenthesis
- */
- void set rightParenthesis(Token rightParenthesis2) {
- this._rightParenthesis = rightParenthesis2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_expression, visitor);
- _members.accept(visitor);
+ members.accept(visitor);
}
}
/**
@@ -13483,12 +10965,12 @@ class SymbolLiteral extends Literal {
/**
* The token introducing the literal.
*/
- Token _poundSign;
+ Token poundSign;
/**
* The components of the literal.
*/
- List<Token> _components;
+ List<Token> components;
/**
* Initialize a newly created symbol literal.
@@ -13497,8 +10979,8 @@ class SymbolLiteral extends Literal {
* @param components the components of the literal
*/
SymbolLiteral.full(Token poundSign, List<Token> components) {
- this._poundSign = poundSign;
- this._components = components;
+ this.poundSign = poundSign;
+ this.components = components;
}
/**
@@ -13509,31 +10991,8 @@ class SymbolLiteral extends Literal {
*/
SymbolLiteral({Token poundSign, List<Token> components}) : this.full(poundSign, components);
accept(ASTVisitor visitor) => visitor.visitSymbolLiteral(this);
- Token get beginToken => _poundSign;
-
- /**
- * Return the components of the literal.
- *
- * @return the components of the literal
- */
- List<Token> get components => _components;
- Token get endToken => _components[_components.length - 1];
-
- /**
- * Return the token introducing the literal.
- *
- * @return the token introducing the literal
- */
- Token get poundSign => _poundSign;
-
- /**
- * Set the token introducing the literal to the given token.
- *
- * @param poundSign the token introducing the literal
- */
- void set poundSign(Token poundSign2) {
- this._poundSign = poundSign2;
- }
+ Token get beginToken => poundSign;
+ Token get endToken => components[components.length - 1];
void visitChildren(ASTVisitor visitor) {
}
}
@@ -13552,7 +11011,7 @@ class ThisExpression extends Expression {
/**
* The token representing the keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* Initialize a newly created this expression.
@@ -13560,7 +11019,7 @@ class ThisExpression extends Expression {
* @param keyword the token representing the keyword
*/
ThisExpression.full(Token keyword) {
- this._keyword = keyword;
+ this.keyword = keyword;
}
/**
@@ -13570,24 +11029,8 @@ class ThisExpression extends Expression {
*/
ThisExpression({Token keyword}) : this.full(keyword);
accept(ASTVisitor visitor) => visitor.visitThisExpression(this);
- Token get beginToken => _keyword;
- Token get endToken => _keyword;
-
- /**
- * Return the token representing the keyword.
- *
- * @return the token representing the keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Set the token representing the keyword to the given token.
- *
- * @param keyword the token representing the keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
+ Token get beginToken => keyword;
+ Token get endToken => keyword;
void visitChildren(ASTVisitor visitor) {
}
}
@@ -13606,7 +11049,7 @@ class ThrowExpression extends Expression {
/**
* The token representing the 'throw' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The expression computing the exception to be thrown.
@@ -13620,7 +11063,7 @@ class ThrowExpression extends Expression {
* @param expression the expression computing the exception to be thrown
*/
ThrowExpression.full(Token keyword, Expression expression) {
- this._keyword = keyword;
+ this.keyword = keyword;
this._expression = becomeParentOf(expression);
}
@@ -13632,12 +11075,12 @@ class ThrowExpression extends Expression {
*/
ThrowExpression({Token keyword, Expression expression}) : this.full(keyword, expression);
accept(ASTVisitor visitor) => visitor.visitThrowExpression(this);
- Token get beginToken => _keyword;
+ Token get beginToken => keyword;
Token get endToken {
if (_expression != null) {
return _expression.endToken;
}
- return _keyword;
+ return keyword;
}
/**
@@ -13648,13 +11091,6 @@ class ThrowExpression extends Expression {
Expression get expression => _expression;
/**
- * Return the token representing the 'throw' keyword.
- *
- * @return the token representing the 'throw' keyword
- */
- Token get keyword => _keyword;
-
- /**
* Set the expression computing the exception to be thrown to the given expression.
*
* @param expression the expression computing the exception to be thrown
@@ -13662,15 +11098,6 @@ class ThrowExpression extends Expression {
void set expression(Expression expression2) {
this._expression = becomeParentOf(expression2);
}
-
- /**
- * Set the token representing the 'throw' keyword to the given token.
- *
- * @param keyword the token representing the 'throw' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_expression, visitor);
}
@@ -13697,7 +11124,7 @@ class TopLevelVariableDeclaration extends CompilationUnitMember {
/**
* The semicolon terminating the declaration.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created top-level variable declaration.
@@ -13709,7 +11136,7 @@ class TopLevelVariableDeclaration extends CompilationUnitMember {
*/
TopLevelVariableDeclaration.full(Comment comment, List<Annotation> metadata, VariableDeclarationList variableList, Token semicolon) : super.full(comment, metadata) {
this._variableList = becomeParentOf(variableList);
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -13723,14 +11150,7 @@ class TopLevelVariableDeclaration extends CompilationUnitMember {
TopLevelVariableDeclaration({Comment comment, List<Annotation> metadata, VariableDeclarationList variableList, Token semicolon}) : this.full(comment, metadata, variableList, semicolon);
accept(ASTVisitor visitor) => visitor.visitTopLevelVariableDeclaration(this);
Element get element => null;
- Token get endToken => _semicolon;
-
- /**
- * Return the semicolon terminating the declaration.
- *
- * @return the semicolon terminating the declaration
- */
- Token get semicolon => _semicolon;
+ Token get endToken => semicolon;
/**
* Return the top-level variables being declared.
@@ -13740,15 +11160,6 @@ class TopLevelVariableDeclaration extends CompilationUnitMember {
VariableDeclarationList get variables => _variableList;
/**
- * Set the semicolon terminating the declaration to the given token.
- *
- * @param semicolon the semicolon terminating the declaration
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
-
- /**
* Set the top-level variables being declared to the given list of variables.
*
* @param variableList the top-level variables being declared
@@ -13780,7 +11191,7 @@ class TryStatement extends Statement {
/**
* The token representing the 'try' keyword.
*/
- Token _tryKeyword;
+ Token tryKeyword;
/**
* The body of the statement.
@@ -13790,13 +11201,13 @@ 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
* a finally clause.
*/
- Token _finallyKeyword;
+ Token finallyKeyword;
/**
* The finally block contained in the try statement, or `null` if the statement does not
@@ -13814,11 +11225,11 @@ class TryStatement extends Statement {
* @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;
+ this.catchClauses = new NodeList<CatchClause>(this);
+ this.tryKeyword = tryKeyword;
this._body = becomeParentOf(body);
- this._catchClauses.addAll(catchClauses);
- this._finallyKeyword = finallyKeyword;
+ this.catchClauses.addAll(catchClauses);
+ this.finallyKeyword = finallyKeyword;
this._finallyBlock = becomeParentOf(finallyBlock);
}
@@ -13833,7 +11244,7 @@ class TryStatement extends Statement {
*/
TryStatement({Token tryKeyword, Block body, List<CatchClause> catchClauses, Token finallyKeyword, Block finallyBlock}) : this.full(tryKeyword, body, catchClauses, finallyKeyword, finallyBlock);
accept(ASTVisitor visitor) => visitor.visitTryStatement(this);
- Token get beginToken => _tryKeyword;
+ Token get beginToken => tryKeyword;
/**
* Return the body of the statement.
@@ -13841,20 +11252,13 @@ class TryStatement extends Statement {
* @return the body of the 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 (finallyKeyword != null) {
+ return finallyKeyword;
+ } else if (!catchClauses.isEmpty) {
+ return catchClauses.endToken;
}
return _body.endToken;
}
@@ -13868,21 +11272,6 @@ class TryStatement extends Statement {
Block get finallyBlock => _finallyBlock;
/**
- * Return the token representing the 'finally' keyword, or `null` if the statement does not
- * contain a finally clause.
- *
- * @return the token representing the 'finally' keyword
- */
- Token get finallyKeyword => _finallyKeyword;
-
- /**
- * Return the token representing the 'try' keyword.
- *
- * @return the token representing the 'try' keyword
- */
- Token get tryKeyword => _tryKeyword;
-
- /**
* Set the body of the statement to the given block.
*
* @param block the body of the statement
@@ -13899,27 +11288,9 @@ class TryStatement extends Statement {
void set finallyBlock(Block block) {
_finallyBlock = becomeParentOf(block);
}
-
- /**
- * Set the token representing the 'finally' keyword to the given token.
- *
- * @param finallyKeyword the token representing the 'finally' keyword
- */
- void set finallyKeyword(Token finallyKeyword2) {
- this._finallyKeyword = finallyKeyword2;
- }
-
- /**
- * Set the token representing the 'try' keyword to the given token.
- *
- * @param tryKeyword the token representing the 'try' keyword
- */
- void set tryKeyword(Token tryKeyword2) {
- this._tryKeyword = tryKeyword2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_body, visitor);
- _catchClauses.accept(visitor);
+ catchClauses.accept(visitor);
safelyVisitChild(_finallyBlock, visitor);
}
}
@@ -13942,12 +11313,12 @@ abstract class TypeAlias extends CompilationUnitMember {
/**
* The token representing the 'typedef' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The semicolon terminating the declaration.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created type alias.
@@ -13958,8 +11329,8 @@ abstract class TypeAlias extends CompilationUnitMember {
* @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;
+ this.keyword = keyword;
+ this.semicolon = semicolon;
}
/**
@@ -13971,40 +11342,8 @@ abstract class TypeAlias extends CompilationUnitMember {
* @param semicolon the semicolon terminating the declaration
*/
TypeAlias({Comment comment, List<Annotation> metadata, Token keyword, Token semicolon}) : this.full(comment, metadata, keyword, semicolon);
- Token get endToken => _semicolon;
-
- /**
- * Return the token representing the 'typedef' keyword.
- *
- * @return the token representing the 'typedef' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Return the semicolon terminating the declaration.
- *
- * @return the semicolon terminating the declaration
- */
- Token get semicolon => _semicolon;
-
- /**
- * Set the token representing the 'typedef' keyword to the given token.
- *
- * @param keyword the token representing the 'typedef' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
- * Set the semicolon terminating the declaration to the given token.
- *
- * @param semicolon the semicolon terminating the declaration
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
- Token get firstTokenAfterCommentAndMetadata => _keyword;
+ Token get endToken => semicolon;
+ Token get firstTokenAfterCommentAndMetadata => keyword;
}
/**
* Instances of the class `TypeArgumentList` represent a list of type arguments.
@@ -14021,17 +11360,17 @@ class TypeArgumentList extends ASTNode {
/**
* The left bracket.
*/
- Token _leftBracket;
+ Token leftBracket;
/**
* The type arguments associated with the type.
*/
- NodeList<TypeName> _arguments;
+ NodeList<TypeName> arguments;
/**
* The right bracket.
*/
- Token _rightBracket;
+ Token rightBracket;
/**
* Initialize a newly created list of type arguments.
@@ -14041,10 +11380,10 @@ class TypeArgumentList extends ASTNode {
* @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;
+ this.arguments = new NodeList<TypeName>(this);
+ this.leftBracket = leftBracket;
+ this.arguments.addAll(arguments);
+ this.rightBracket = rightBracket;
}
/**
@@ -14056,49 +11395,10 @@ class TypeArgumentList extends ASTNode {
*/
TypeArgumentList({Token leftBracket, List<TypeName> arguments, Token rightBracket}) : this.full(leftBracket, arguments, rightBracket);
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;
-
- /**
- * Return the left bracket.
- *
- * @return the left bracket
- */
- Token get leftBracket => _leftBracket;
-
- /**
- * Return the right bracket.
- *
- * @return the right bracket
- */
- Token get rightBracket => _rightBracket;
-
- /**
- * Set the left bracket to the given token.
- *
- * @param leftBracket the left bracket
- */
- void set leftBracket(Token leftBracket2) {
- this._leftBracket = leftBracket2;
- }
-
- /**
- * Set the right bracket to the given token.
- *
- * @param rightBracket the right bracket
- */
- void set rightBracket(Token rightBracket2) {
- this._rightBracket = rightBracket2;
- }
+ Token get beginToken => leftBracket;
+ Token get endToken => rightBracket;
void visitChildren(ASTVisitor visitor) {
- _arguments.accept(visitor);
+ arguments.accept(visitor);
}
}
/**
@@ -14127,7 +11427,7 @@ class TypeName extends ASTNode {
/**
* The type being named, or `null` if the AST structure has not been resolved.
*/
- Type2 _type;
+ Type2 type;
/**
* Initialize a newly created type name.
@@ -14166,13 +11466,6 @@ class TypeName extends ASTNode {
Identifier get name => _name;
/**
- * Return the type being named, or `null` if the AST structure has not been resolved.
- *
- * @return the type being named
- */
- Type2 get type => _type;
-
- /**
* Return the type arguments associated with the type, or `null` if there are no type
* arguments.
*
@@ -14191,15 +11484,6 @@ class TypeName extends ASTNode {
}
/**
- * Set the type being named to the given type.
- *
- * @param type the type being named
- */
- void set type(Type2 type2) {
- this._type = type2;
- }
-
- /**
* Set the type arguments associated with the type to the given type arguments.
*
* @param typeArguments the type arguments associated with the type
@@ -14233,7 +11517,7 @@ class TypeParameter extends Declaration {
* The token representing the 'extends' keyword, or `null` if there was no explicit upper
* bound.
*/
- Token _keyword;
+ Token keyword;
/**
* The name of the upper bound for legal arguments, or `null` if there was no explicit upper
@@ -14252,7 +11536,7 @@ class TypeParameter extends Declaration {
*/
TypeParameter.full(Comment comment, List<Annotation> metadata, SimpleIdentifier name, Token keyword, TypeName bound) : super.full(comment, metadata) {
this._name = becomeParentOf(name);
- this._keyword = keyword;
+ this.keyword = keyword;
this._bound = becomeParentOf(bound);
}
@@ -14284,14 +11568,6 @@ class TypeParameter extends Declaration {
}
/**
- * Return the token representing the 'extends' keyword, or `null` if there was no explicit
- * upper bound.
- *
- * @return the token representing the 'extends' keyword
- */
- Token get keyword => _keyword;
-
- /**
* Return the name of the type parameter.
*
* @return the name of the type parameter
@@ -14308,15 +11584,6 @@ class TypeParameter extends Declaration {
}
/**
- * Set the token representing the 'extends' keyword to the given token.
- *
- * @param keyword the token representing the 'extends' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
* Set the name of the type parameter to the given identifier.
*
* @param identifier the name of the type parameter
@@ -14346,17 +11613,17 @@ class TypeParameterList extends ASTNode {
/**
* The left angle bracket.
*/
- Token _leftBracket;
+ Token leftBracket;
/**
* The type parameters in the list.
*/
- NodeList<TypeParameter> _typeParameters;
+ NodeList<TypeParameter> typeParameters;
/**
* The right angle bracket.
*/
- Token _rightBracket;
+ Token rightBracket;
/**
* Initialize a newly created list of type parameters.
@@ -14366,10 +11633,10 @@ class TypeParameterList extends ASTNode {
* @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;
+ this.typeParameters = new NodeList<TypeParameter>(this);
+ this.leftBracket = leftBracket;
+ this.typeParameters.addAll(typeParameters);
+ this.rightBracket = rightBracket;
}
/**
@@ -14381,31 +11648,10 @@ class TypeParameterList extends ASTNode {
*/
TypeParameterList({Token leftBracket, List<TypeParameter> typeParameters, Token rightBracket}) : this.full(leftBracket, typeParameters, rightBracket);
accept(ASTVisitor visitor) => visitor.visitTypeParameterList(this);
- Token get beginToken => _leftBracket;
- Token get endToken => _rightBracket;
-
- /**
- * Return the left angle bracket.
- *
- * @return the left angle bracket
- */
- Token get leftBracket => _leftBracket;
-
- /**
- * Return the right angle bracket.
- *
- * @return the right angle bracket
- */
- Token get rightBracket => _rightBracket;
-
- /**
- * Return the type parameters for the type.
- *
- * @return the type parameters for the type
- */
- NodeList<TypeParameter> get typeParameters => _typeParameters;
+ Token get beginToken => leftBracket;
+ Token get endToken => rightBracket;
void visitChildren(ASTVisitor visitor) {
- _typeParameters.accept(visitor);
+ typeParameters.accept(visitor);
}
}
/**
@@ -14425,13 +11671,13 @@ abstract class TypedLiteral extends Literal {
/**
* The token representing the 'const' keyword, or `null` if the literal is not a constant.
*/
- Token _constKeyword;
+ Token constKeyword;
/**
* The type argument associated with this literal, or `null` if no type arguments were
* declared.
*/
- TypeArgumentList _typeArguments;
+ TypeArgumentList typeArguments;
/**
* Initialize a newly created typed literal.
@@ -14441,8 +11687,8 @@ abstract class TypedLiteral extends Literal {
* arguments were declared
*/
TypedLiteral.full(Token constKeyword, TypeArgumentList typeArguments) {
- this._constKeyword = constKeyword;
- this._typeArguments = becomeParentOf(typeArguments);
+ this.constKeyword = constKeyword;
+ this.typeArguments = becomeParentOf(typeArguments);
}
/**
@@ -14453,41 +11699,8 @@ abstract class TypedLiteral extends Literal {
* arguments were declared
*/
TypedLiteral({Token constKeyword, TypeArgumentList typeArguments}) : this.full(constKeyword, typeArguments);
-
- /**
- * Return the token representing the 'const' keyword.
- *
- * @return the token representing the 'const' keyword
- */
- Token get constKeyword => _constKeyword;
-
- /**
- * Return the type argument associated with this literal, or `null` if no type arguments
- * were declared.
- *
- * @return the type argument associated with this literal
- */
- TypeArgumentList get typeArguments => _typeArguments;
-
- /**
- * Set the token representing the 'const' keyword to the given keyword.
- *
- * @param keyword the token representing the 'const' keyword
- */
- void set constKeyword(Token keyword) {
- this._constKeyword = keyword;
- }
-
- /**
- * Set the type argument associated with this literal to the given arguments.
- *
- * @param typeArguments the type argument associated with this literal
- */
- void set typeArguments(TypeArgumentList typeArguments2) {
- this._typeArguments = typeArguments2;
- }
void visitChildren(ASTVisitor visitor) {
- safelyVisitChild(_typeArguments, visitor);
+ safelyVisitChild(typeArguments, visitor);
}
}
/**
@@ -14582,7 +11795,7 @@ class VariableDeclaration extends Declaration {
* The equal sign separating the variable name from the initial value, or `null` if the
* initial value was not specified.
*/
- Token _equals;
+ Token equals;
/**
* The expression used to compute the initial value for the variable, or `null` if the
@@ -14601,7 +11814,7 @@ class VariableDeclaration extends Declaration {
*/
VariableDeclaration.full(Comment comment, List<Annotation> metadata, SimpleIdentifier name, Token equals, Expression initializer) : super.full(comment, metadata) {
this._name = becomeParentOf(name);
- this._equals = equals;
+ this.equals = equals;
this._initializer = becomeParentOf(initializer);
}
@@ -14642,14 +11855,6 @@ class VariableDeclaration extends Declaration {
}
/**
- * Return the equal sign separating the variable name from the initial value, or `null` if
- * the initial value was not specified.
- *
- * @return the equal sign separating the variable name from the initial value
- */
- Token get equals => _equals;
-
- /**
* Return the expression used to compute the initial value for the variable, or `null` if
* the initial value was not specified.
*
@@ -14687,15 +11892,6 @@ class VariableDeclaration extends Declaration {
}
/**
- * Set the equal sign separating the variable name from the initial value to the given token.
- *
- * @param equals the equal sign separating the variable name from the initial value
- */
- void set equals(Token equals2) {
- this._equals = equals2;
- }
-
- /**
* Set the expression used to compute the initial value for the variable to the given expression.
*
* @param initializer the expression used to compute the initial value for the variable
@@ -14742,7 +11938,7 @@ class VariableDeclarationList extends AnnotatedNode {
* The token representing the 'final', 'const' or 'var' keyword, or `null` if no keyword was
* included.
*/
- Token _keyword;
+ Token keyword;
/**
* The type of the variables being declared, or `null` if no type was provided.
@@ -14752,7 +11948,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.
@@ -14764,10 +11960,10 @@ class VariableDeclarationList extends AnnotatedNode {
* @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;
+ this.variables = new NodeList<VariableDeclaration>(this);
+ this.keyword = keyword;
this._type = becomeParentOf(type);
- this._variables.addAll(variables);
+ this.variables.addAll(variables);
}
/**
@@ -14781,15 +11977,7 @@ class VariableDeclarationList extends AnnotatedNode {
*/
VariableDeclarationList({Comment comment, List<Annotation> metadata, Token keyword, TypeName type, List<VariableDeclaration> variables}) : this.full(comment, metadata, keyword, type, variables);
accept(ASTVisitor visitor) => visitor.visitVariableDeclarationList(this);
- Token get endToken => _variables.endToken;
-
- /**
- * Return the token representing the 'final', 'const' or 'var' keyword, or `null` if no
- * keyword was included.
- *
- * @return the token representing the 'final', 'const' or 'var' keyword
- */
- Token get keyword => _keyword;
+ Token get endToken => variables.endToken;
/**
* Return the type of the variables being declared, or `null` if no type was provided.
@@ -14799,18 +11987,11 @@ 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
*/
- bool get isConst => _keyword is KeywordToken && identical(((_keyword as KeywordToken)).keyword, Keyword.CONST);
+ bool get isConst => keyword is KeywordToken && identical(((keyword as KeywordToken)).keyword, Keyword.CONST);
/**
* Return `true` if the variables in this list were declared with the 'final' modifier.
@@ -14819,16 +12000,7 @@ class VariableDeclarationList extends AnnotatedNode {
*
* @return `true` if the variables in this list were declared with the 'final' modifier
*/
- bool get isFinal => _keyword is KeywordToken && identical(((_keyword as KeywordToken)).keyword, Keyword.FINAL);
-
- /**
- * Set the token representing the 'final', 'const' or 'var' keyword to the given token.
- *
- * @param keyword the token representing the 'final', 'const' or 'var' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
+ bool get isFinal => keyword is KeywordToken && identical(((keyword as KeywordToken)).keyword, Keyword.FINAL);
/**
* Set the type of the variables being declared to the given type name.
@@ -14840,15 +12012,15 @@ class VariableDeclarationList extends AnnotatedNode {
}
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_type, visitor);
- _variables.accept(visitor);
+ variables.accept(visitor);
}
Token get firstTokenAfterCommentAndMetadata {
- if (_keyword != null) {
- return _keyword;
+ if (keyword != null) {
+ return keyword;
} else if (_type != null) {
return _type.beginToken;
}
- return _variables.beginToken;
+ return variables.beginToken;
}
}
/**
@@ -14872,7 +12044,7 @@ class VariableDeclarationStatement extends Statement {
/**
* The semicolon terminating the statement.
*/
- Token _semicolon;
+ Token semicolon;
/**
* Initialize a newly created variable declaration statement.
@@ -14882,7 +12054,7 @@ class VariableDeclarationStatement extends Statement {
*/
VariableDeclarationStatement.full(VariableDeclarationList variableList, Token semicolon) {
this._variableList = becomeParentOf(variableList);
- this._semicolon = semicolon;
+ this.semicolon = semicolon;
}
/**
@@ -14894,14 +12066,7 @@ class VariableDeclarationStatement extends Statement {
VariableDeclarationStatement({VariableDeclarationList variableList, Token semicolon}) : this.full(variableList, semicolon);
accept(ASTVisitor visitor) => visitor.visitVariableDeclarationStatement(this);
Token get beginToken => _variableList.beginToken;
- Token get endToken => _semicolon;
-
- /**
- * Return the semicolon terminating the statement.
- *
- * @return the semicolon terminating the statement
- */
- Token get semicolon => _semicolon;
+ Token get endToken => semicolon;
/**
* Return the variables being declared.
@@ -14911,15 +12076,6 @@ class VariableDeclarationStatement extends Statement {
VariableDeclarationList get variables => _variableList;
/**
- * Set the semicolon terminating the statement to the given token.
- *
- * @param semicolon the semicolon terminating the statement
- */
- void set semicolon(Token semicolon2) {
- this._semicolon = semicolon2;
- }
-
- /**
* Set the variables being declared to the given list of variables.
*
* @param variableList the variables being declared
@@ -14946,12 +12102,12 @@ class WhileStatement extends Statement {
/**
* The token representing the 'while' keyword.
*/
- Token _keyword;
+ Token keyword;
/**
* The left parenthesis.
*/
- Token _leftParenthesis;
+ Token leftParenthesis;
/**
* The expression used to determine whether to execute the body of the loop.
@@ -14961,7 +12117,7 @@ class WhileStatement extends Statement {
/**
* The right parenthesis.
*/
- Token _rightParenthesis;
+ Token rightParenthesis;
/**
* The body of the loop.
@@ -14978,10 +12134,10 @@ class WhileStatement extends Statement {
* @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;
+ this.keyword = keyword;
+ this.leftParenthesis = leftParenthesis;
this._condition = becomeParentOf(condition);
- this._rightParenthesis = rightParenthesis;
+ this.rightParenthesis = rightParenthesis;
this._body = becomeParentOf(body);
}
@@ -14996,7 +12152,7 @@ class WhileStatement extends Statement {
*/
WhileStatement({Token keyword, Token leftParenthesis, Expression condition, Token rightParenthesis, Statement body}) : this.full(keyword, leftParenthesis, condition, rightParenthesis, body);
accept(ASTVisitor visitor) => visitor.visitWhileStatement(this);
- Token get beginToken => _keyword;
+ Token get beginToken => keyword;
/**
* Return the body of the loop.
@@ -15014,27 +12170,6 @@ class WhileStatement extends Statement {
Token get endToken => _body.endToken;
/**
- * Return the token representing the 'while' keyword.
- *
- * @return the token representing the 'while' keyword
- */
- Token get keyword => _keyword;
-
- /**
- * Return the left parenthesis.
- *
- * @return the left parenthesis
- */
- Token get leftParenthesis => _leftParenthesis;
-
- /**
- * Return the right parenthesis.
- *
- * @return the right parenthesis
- */
- Token get rightParenthesis => _rightParenthesis;
-
- /**
* Set the body of the loop to the given statement.
*
* @param statement the body of the loop
@@ -15052,33 +12187,6 @@ class WhileStatement extends Statement {
void set condition(Expression expression) {
_condition = becomeParentOf(expression);
}
-
- /**
- * Set the token representing the 'while' keyword to the given token.
- *
- * @param keyword the token representing the 'while' keyword
- */
- void set keyword(Token keyword2) {
- this._keyword = keyword2;
- }
-
- /**
- * Set the left parenthesis to the given token.
- *
- * @param leftParenthesis the left parenthesis
- */
- void set leftParenthesis(Token leftParenthesis2) {
- this._leftParenthesis = leftParenthesis2;
- }
-
- /**
- * Set the right parenthesis to the given token.
- *
- * @param rightParenthesis the right parenthesis
- */
- void set rightParenthesis(Token rightParenthesis2) {
- this._rightParenthesis = rightParenthesis2;
- }
void visitChildren(ASTVisitor visitor) {
safelyVisitChild(_condition, visitor);
safelyVisitChild(_body, visitor);
@@ -15099,12 +12207,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.
@@ -15113,9 +12221,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);
}
/**
@@ -15126,22 +12234,8 @@ class WithClause extends ASTNode {
*/
WithClause({Token withKeyword, List<TypeName> mixinTypes}) : this.full(withKeyword, mixinTypes);
accept(ASTVisitor visitor) => visitor.visitWithClause(this);
- Token get beginToken => _withKeyword;
- 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;
+ Token get beginToken => withKeyword;
+ Token get endToken => mixinTypes.endToken;
/**
* Set the token representing the 'with' keyword to the given token.
@@ -15149,10 +12243,10 @@ class WithClause extends ASTNode {
* @param withKeyword the token representing the 'with' keyword
*/
void set mixinKeyword(Token withKeyword2) {
- this._withKeyword = withKeyword2;
+ this.withKeyword = withKeyword2;
}
void visitChildren(ASTVisitor visitor) {
- _mixinTypes.accept(visitor);
+ mixinTypes.accept(visitor);
}
}
/**
@@ -15762,7 +12856,7 @@ class NodeLocator extends GeneralizingASTVisitor<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
@@ -15786,14 +12880,6 @@ class NodeLocator extends GeneralizingASTVisitor<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.
*
@@ -15811,7 +12897,7 @@ class NodeLocator extends GeneralizingASTVisitor<Object> {
AnalysisEngine.instance.logger.logInformation2("Unable to locate element at offset (${_startOffset} - ${_endOffset})", exception);
return null;
}
- return _foundNode;
+ return foundNode;
}
Object visitNode(ASTNode node) {
int start = node.offset;
@@ -15830,7 +12916,7 @@ class NodeLocator extends GeneralizingASTVisitor<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;
@@ -17397,16 +14483,14 @@ class ASTCloner implements ASTVisitor<ASTNode> {
* @coverage com.google.dart.engine.services.completion
*/
class ScopedNameFinder extends GeneralizingASTVisitor<Object> {
- Declaration _declarationNode;
+ Declaration declaration;
ASTNode _immediateChild;
- Map<String, SimpleIdentifier> _locals = new Map<String, SimpleIdentifier>();
+ final Map<String, SimpleIdentifier> locals = new Map<String, SimpleIdentifier>();
int _position = 0;
bool _referenceIsWithinLocalFunction = false;
ScopedNameFinder(int position) {
this._position = position;
}
- Declaration get declaration => _declarationNode;
- Map<String, SimpleIdentifier> get locals => _locals;
Object visitBlock(Block node) {
checkStatements(node.statements);
return super.visitBlock(node);
@@ -17420,11 +14504,11 @@ class ScopedNameFinder extends GeneralizingASTVisitor<Object> {
if (_immediateChild != node.parameters) {
addParameters(node.parameters.parameters);
}
- _declarationNode = node;
+ declaration = node;
return null;
}
Object visitFieldDeclaration(FieldDeclaration node) {
- _declarationNode = node;
+ declaration = node;
return null;
}
Object visitForEachStatement(ForEachStatement node) {
@@ -17439,7 +14523,7 @@ class ScopedNameFinder extends GeneralizingASTVisitor<Object> {
}
Object visitFunctionDeclaration(FunctionDeclaration node) {
if (node.parent is! FunctionDeclarationStatement) {
- _declarationNode = node;
+ declaration = node;
return null;
}
return super.visitFunctionDeclaration(node);
@@ -17461,7 +14545,7 @@ class ScopedNameFinder extends GeneralizingASTVisitor<Object> {
if (_immediateChild != node.parameters) {
addParameters(node.parameters.parameters);
}
- _declarationNode = node;
+ declaration = node;
return null;
}
Object visitNode(ASTNode node) {
@@ -17477,11 +14561,11 @@ class ScopedNameFinder extends GeneralizingASTVisitor<Object> {
return super.visitSwitchMember(node);
}
Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
- _declarationNode = node;
+ declaration = node;
return null;
}
Object visitTypeAlias(TypeAlias node) {
- _declarationNode = node;
+ declaration = node;
return null;
}
void addParameters(NodeList<FormalParameter> vars) {
@@ -17492,8 +14576,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;
}
}
}

Powered by Google App Engine
This is Rietveld 408576698