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

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

Issue 23852002: java2dart improvements and new analyzer_experimental snapshot. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 library engine.ast; 3 library engine.ast;
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'java_core.dart'; 5 import 'java_core.dart';
6 import 'java_engine.dart'; 6 import 'java_engine.dart';
7 import 'error.dart'; 7 import 'error.dart';
8 import 'source.dart' show LineInfo; 8 import 'source.dart' show LineInfo;
9 import 'scanner.dart'; 9 import 'scanner.dart';
10 import 'engine.dart' show AnalysisEngine; 10 import 'engine.dart' show AnalysisEngine;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return writer.toString(); 202 return writer.toString();
203 } 203 }
204 String toString() => toSource(); 204 String toString() => toSource();
205 205
206 /** 206 /**
207 * Use the given visitor to visit all of the children of this node. The childr en will be visited 207 * Use the given visitor to visit all of the children of this node. The childr en will be visited
208 * in source order. 208 * in source order.
209 * 209 *
210 * @param visitor the visitor that will be used to visit the children of this node 210 * @param visitor the visitor that will be used to visit the children of this node
211 */ 211 */
212 void visitChildren(ASTVisitor<Object> visitor); 212 void visitChildren(ASTVisitor visitor);
213 213
214 /** 214 /**
215 * Make this node the parent of the given child node. 215 * Make this node the parent of the given child node.
216 * 216 *
217 * @param child the node that will become a child of this node 217 * @param child the node that will become a child of this node
218 * @return the node that was made a child of this node 218 * @return the node that was made a child of this node
219 */ 219 */
220 ASTNode becomeParentOf(ASTNode child) { 220 ASTNode becomeParentOf(ASTNode child) {
221 if (child != null) { 221 if (child != null) {
222 ASTNode node = child; 222 ASTNode node = child;
223 node.parent = this; 223 node.parent = this;
224 } 224 }
225 return child; 225 return child;
226 } 226 }
227 227
228 /** 228 /**
229 * If the given child is not `null`, use the given visitor to visit it. 229 * If the given child is not `null`, use the given visitor to visit it.
230 * 230 *
231 * @param child the child to be visited 231 * @param child the child to be visited
232 * @param visitor the visitor that will be used to visit the child 232 * @param visitor the visitor that will be used to visit the child
233 */ 233 */
234 void safelyVisitChild(ASTNode child, ASTVisitor<Object> visitor) { 234 void safelyVisitChild(ASTNode child, ASTVisitor visitor) {
235 if (child != null) { 235 if (child != null) {
236 child.accept(visitor); 236 child.accept(visitor);
237 } 237 }
238 } 238 }
239 239
240 /** 240 /**
241 * Set the parent of this node to the given node. 241 * Set the parent of this node to the given node.
242 * 242 *
243 * @param newParent the node that is to be made the parent of this node 243 * @param newParent the node that is to be made the parent of this node
244 */ 244 */
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 accept(ASTVisitor visitor) => visitor.visitAdjacentStrings(this); 399 accept(ASTVisitor visitor) => visitor.visitAdjacentStrings(this);
400 Token get beginToken => _strings.beginToken; 400 Token get beginToken => _strings.beginToken;
401 Token get endToken => _strings.endToken; 401 Token get endToken => _strings.endToken;
402 402
403 /** 403 /**
404 * Return the strings that are implicitly concatenated. 404 * Return the strings that are implicitly concatenated.
405 * 405 *
406 * @return the strings that are implicitly concatenated 406 * @return the strings that are implicitly concatenated
407 */ 407 */
408 NodeList<StringLiteral> get strings => _strings; 408 NodeList<StringLiteral> get strings => _strings;
409 void visitChildren(ASTVisitor<Object> visitor) { 409 void visitChildren(ASTVisitor visitor) {
410 _strings.accept(visitor); 410 _strings.accept(visitor);
411 } 411 }
412 void appendStringValue(JavaStringBuilder builder) { 412 void appendStringValue(JavaStringBuilder builder) {
413 for (StringLiteral stringLiteral in strings) { 413 for (StringLiteral stringLiteral in strings) {
414 stringLiteral.appendStringValue(builder); 414 stringLiteral.appendStringValue(builder);
415 } 415 }
416 } 416 }
417 } 417 }
418 /** 418 /**
419 * The abstract class `AnnotatedNode` defines the behavior of nodes that can be annotated with 419 * The abstract class `AnnotatedNode` defines the behavior of nodes that can be annotated with
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 497
498 /** 498 /**
499 * Set the metadata associated with this node to the given metadata. 499 * Set the metadata associated with this node to the given metadata.
500 * 500 *
501 * @param metadata the metadata to be associated with this node 501 * @param metadata the metadata to be associated with this node
502 */ 502 */
503 void set metadata(List<Annotation> metadata2) { 503 void set metadata(List<Annotation> metadata2) {
504 this._metadata.clear(); 504 this._metadata.clear();
505 this._metadata.addAll(metadata2); 505 this._metadata.addAll(metadata2);
506 } 506 }
507 void visitChildren(ASTVisitor<Object> visitor) { 507 void visitChildren(ASTVisitor visitor) {
508 if (commentIsBeforeAnnotations()) { 508 if (commentIsBeforeAnnotations()) {
509 safelyVisitChild(_comment, visitor); 509 safelyVisitChild(_comment, visitor);
510 _metadata.accept(visitor); 510 _metadata.accept(visitor);
511 } else { 511 } else {
512 for (ASTNode child in sortedCommentAndAnnotations) { 512 for (ASTNode child in sortedCommentAndAnnotations) {
513 child.accept(visitor); 513 child.accept(visitor);
514 } 514 }
515 } 515 }
516 } 516 }
517 517
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 } 750 }
751 751
752 /** 752 /**
753 * Set the period before the constructor name to the given token. 753 * Set the period before the constructor name to the given token.
754 * 754 *
755 * @param period the period before the constructor name 755 * @param period the period before the constructor name
756 */ 756 */
757 void set period(Token period2) { 757 void set period(Token period2) {
758 this._period = period2; 758 this._period = period2;
759 } 759 }
760 void visitChildren(ASTVisitor<Object> visitor) { 760 void visitChildren(ASTVisitor visitor) {
761 safelyVisitChild(_name, visitor); 761 safelyVisitChild(_name, visitor);
762 safelyVisitChild(_constructorName, visitor); 762 safelyVisitChild(_constructorName, visitor);
763 safelyVisitChild(_arguments, visitor); 763 safelyVisitChild(_arguments, visitor);
764 } 764 }
765 } 765 }
766 /** 766 /**
767 * Instances of the class `ArgumentDefinitionTest` represent an argument definit ion test. 767 * Instances of the class `ArgumentDefinitionTest` represent an argument definit ion test.
768 * 768 *
769 * <pre> 769 * <pre>
770 * argumentDefinitionTest ::= 770 * argumentDefinitionTest ::=
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 } 831 }
832 832
833 /** 833 /**
834 * Set the token representing the question mark to the given token. 834 * Set the token representing the question mark to the given token.
835 * 835 *
836 * @param question the token representing the question mark 836 * @param question the token representing the question mark
837 */ 837 */
838 void set question(Token question2) { 838 void set question(Token question2) {
839 this._question = question2; 839 this._question = question2;
840 } 840 }
841 void visitChildren(ASTVisitor<Object> visitor) { 841 void visitChildren(ASTVisitor visitor) {
842 safelyVisitChild(_identifier, visitor); 842 safelyVisitChild(_identifier, visitor);
843 } 843 }
844 } 844 }
845 /** 845 /**
846 * Instances of the class `ArgumentList` represent a list of arguments in the in vocation of a 846 * Instances of the class `ArgumentList` represent a list of arguments in the in vocation of a
847 * executable element: a function, method, or constructor. 847 * executable element: a function, method, or constructor.
848 * 848 *
849 * <pre> 849 * <pre>
850 * argumentList ::= 850 * argumentList ::=
851 * '(' arguments? ')' 851 * '(' arguments? ')'
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 } 981 }
982 982
983 /** 983 /**
984 * Set the right parenthesis to the given token. 984 * Set the right parenthesis to the given token.
985 * 985 *
986 * @param parenthesis the right parenthesis 986 * @param parenthesis the right parenthesis
987 */ 987 */
988 void set rightParenthesis(Token parenthesis) { 988 void set rightParenthesis(Token parenthesis) {
989 _rightParenthesis = parenthesis; 989 _rightParenthesis = parenthesis;
990 } 990 }
991 void visitChildren(ASTVisitor<Object> visitor) { 991 void visitChildren(ASTVisitor visitor) {
992 _arguments.accept(visitor); 992 _arguments.accept(visitor);
993 } 993 }
994 994
995 /** 995 /**
996 * If the given expression is a child of this list, and the AST structure has been resolved, and 996 * If the given expression is a child of this list, and the AST structure has been resolved, and
997 * the function being invoked is known based on propagated type information, a nd the expression 997 * the function being invoked is known based on propagated type information, a nd the expression
998 * corresponds to one of the parameters of the function being invoked, then re turn the parameter 998 * corresponds to one of the parameters of the function being invoked, then re turn the parameter
999 * element representing the parameter to which the value of the given expressi on will be bound. 999 * element representing the parameter to which the value of the given expressi on will be bound.
1000 * Otherwise, return `null`. 1000 * Otherwise, return `null`.
1001 * 1001 *
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 } 1132 }
1133 1133
1134 /** 1134 /**
1135 * Set the name of the type being cast to to the given name. 1135 * Set the name of the type being cast to to the given name.
1136 * 1136 *
1137 * @param name the name of the type being cast to 1137 * @param name the name of the type being cast to
1138 */ 1138 */
1139 void set type(TypeName name) { 1139 void set type(TypeName name) {
1140 this._type = becomeParentOf(name); 1140 this._type = becomeParentOf(name);
1141 } 1141 }
1142 void visitChildren(ASTVisitor<Object> visitor) { 1142 void visitChildren(ASTVisitor visitor) {
1143 safelyVisitChild(_expression, visitor); 1143 safelyVisitChild(_expression, visitor);
1144 safelyVisitChild(_type, visitor); 1144 safelyVisitChild(_type, visitor);
1145 } 1145 }
1146 } 1146 }
1147 /** 1147 /**
1148 * Instances of the class `AssertStatement` represent an assert statement. 1148 * Instances of the class `AssertStatement` represent an assert statement.
1149 * 1149 *
1150 * <pre> 1150 * <pre>
1151 * assertStatement ::= 1151 * assertStatement ::=
1152 * 'assert' '(' [Expression] ')' ';' 1152 * 'assert' '(' [Expression] ')' ';'
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 } 1284 }
1285 1285
1286 /** 1286 /**
1287 * Set the semicolon terminating the statement to the given token. 1287 * Set the semicolon terminating the statement to the given token.
1288 * 1288 *
1289 * @param semicolon the semicolon terminating the statement 1289 * @param semicolon the semicolon terminating the statement
1290 */ 1290 */
1291 void set semicolon(Token semicolon2) { 1291 void set semicolon(Token semicolon2) {
1292 this._semicolon = semicolon2; 1292 this._semicolon = semicolon2;
1293 } 1293 }
1294 void visitChildren(ASTVisitor<Object> visitor) { 1294 void visitChildren(ASTVisitor visitor) {
1295 safelyVisitChild(_condition, visitor); 1295 safelyVisitChild(_condition, visitor);
1296 } 1296 }
1297 } 1297 }
1298 /** 1298 /**
1299 * Instances of the class `AssignmentExpression` represent an assignment express ion. 1299 * Instances of the class `AssignmentExpression` represent an assignment express ion.
1300 * 1300 *
1301 * <pre> 1301 * <pre>
1302 * assignmentExpression ::= 1302 * assignmentExpression ::=
1303 * [Expression] [Token] [Expression] 1303 * [Expression] [Token] [Expression]
1304 * </pre> 1304 * </pre>
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 1457
1458 /** 1458 /**
1459 * Set the element associated with the operator based on the static type of th e left-hand-side to 1459 * Set the element associated with the operator based on the static type of th e left-hand-side to
1460 * the given element. 1460 * the given element.
1461 * 1461 *
1462 * @param element the static element to be associated with the operator 1462 * @param element the static element to be associated with the operator
1463 */ 1463 */
1464 void set staticElement(MethodElement element) { 1464 void set staticElement(MethodElement element) {
1465 _staticElement = element; 1465 _staticElement = element;
1466 } 1466 }
1467 void visitChildren(ASTVisitor<Object> visitor) { 1467 void visitChildren(ASTVisitor visitor) {
1468 safelyVisitChild(_leftHandSide, visitor); 1468 safelyVisitChild(_leftHandSide, visitor);
1469 safelyVisitChild(_rightHandSide, visitor); 1469 safelyVisitChild(_rightHandSide, visitor);
1470 } 1470 }
1471 1471
1472 /** 1472 /**
1473 * If the AST structure has been resolved, and the function being invoked is k nown based on 1473 * If the AST structure has been resolved, and the function being invoked is k nown based on
1474 * propagated type information, then return the parameter element representing the parameter to 1474 * propagated type information, then return the parameter element representing the parameter to
1475 * which the value of the right operand will be bound. Otherwise, return `null `. 1475 * which the value of the right operand will be bound. Otherwise, return `null `.
1476 * 1476 *
1477 * This method is only intended to be used by [Expression#getPropagatedParamet erElement]. 1477 * This method is only intended to be used by [Expression#getPropagatedParamet erElement].
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 1673
1674 /** 1674 /**
1675 * Set the element associated with the operator based on the static type of th e left operand to 1675 * Set the element associated with the operator based on the static type of th e left operand to
1676 * the given element. 1676 * the given element.
1677 * 1677 *
1678 * @param element the static element to be associated with the operator 1678 * @param element the static element to be associated with the operator
1679 */ 1679 */
1680 void set staticElement(MethodElement element) { 1680 void set staticElement(MethodElement element) {
1681 _staticElement = element; 1681 _staticElement = element;
1682 } 1682 }
1683 void visitChildren(ASTVisitor<Object> visitor) { 1683 void visitChildren(ASTVisitor visitor) {
1684 safelyVisitChild(_leftOperand, visitor); 1684 safelyVisitChild(_leftOperand, visitor);
1685 safelyVisitChild(_rightOperand, visitor); 1685 safelyVisitChild(_rightOperand, visitor);
1686 } 1686 }
1687 1687
1688 /** 1688 /**
1689 * If the AST structure has been resolved, and the function being invoked is k nown based on 1689 * If the AST structure has been resolved, and the function being invoked is k nown based on
1690 * propagated type information, then return the parameter element representing the parameter to 1690 * propagated type information, then return the parameter element representing the parameter to
1691 * which the value of the right operand will be bound. Otherwise, return `null `. 1691 * which the value of the right operand will be bound. Otherwise, return `null `.
1692 * 1692 *
1693 * This method is only intended to be used by [Expression#getPropagatedParamet erElement]. 1693 * This method is only intended to be used by [Expression#getPropagatedParamet erElement].
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 } 1811 }
1812 1812
1813 /** 1813 /**
1814 * Set the right curly bracket to the given token. 1814 * Set the right curly bracket to the given token.
1815 * 1815 *
1816 * @param rightBracket the right curly bracket 1816 * @param rightBracket the right curly bracket
1817 */ 1817 */
1818 void set rightBracket(Token rightBracket2) { 1818 void set rightBracket(Token rightBracket2) {
1819 this._rightBracket = rightBracket2; 1819 this._rightBracket = rightBracket2;
1820 } 1820 }
1821 void visitChildren(ASTVisitor<Object> visitor) { 1821 void visitChildren(ASTVisitor visitor) {
1822 _statements.accept(visitor); 1822 _statements.accept(visitor);
1823 } 1823 }
1824 } 1824 }
1825 /** 1825 /**
1826 * Instances of the class `BlockFunctionBody` represent a function body that con sists of a 1826 * Instances of the class `BlockFunctionBody` represent a function body that con sists of a
1827 * block of statements. 1827 * block of statements.
1828 * 1828 *
1829 * <pre> 1829 * <pre>
1830 * blockFunctionBody ::= 1830 * blockFunctionBody ::=
1831 * [Block] 1831 * [Block]
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1867 Token get endToken => _block.endToken; 1867 Token get endToken => _block.endToken;
1868 1868
1869 /** 1869 /**
1870 * Set the block representing the body of the function to the given block. 1870 * Set the block representing the body of the function to the given block.
1871 * 1871 *
1872 * @param block the block representing the body of the function 1872 * @param block the block representing the body of the function
1873 */ 1873 */
1874 void set block(Block block2) { 1874 void set block(Block block2) {
1875 this._block = becomeParentOf(block2); 1875 this._block = becomeParentOf(block2);
1876 } 1876 }
1877 void visitChildren(ASTVisitor<Object> visitor) { 1877 void visitChildren(ASTVisitor visitor) {
1878 safelyVisitChild(_block, visitor); 1878 safelyVisitChild(_block, visitor);
1879 } 1879 }
1880 } 1880 }
1881 /** 1881 /**
1882 * Instances of the class `BooleanLiteral` represent a boolean literal expressio n. 1882 * Instances of the class `BooleanLiteral` represent a boolean literal expressio n.
1883 * 1883 *
1884 * <pre> 1884 * <pre>
1885 * booleanLiteral ::= 1885 * booleanLiteral ::=
1886 * 'false' | 'true' 1886 * 'false' | 'true'
1887 * </pre> 1887 * </pre>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1947 } 1947 }
1948 1948
1949 /** 1949 /**
1950 * Set the value of the literal to the given value. 1950 * Set the value of the literal to the given value.
1951 * 1951 *
1952 * @param value the value of the literal 1952 * @param value the value of the literal
1953 */ 1953 */
1954 void set value(bool value2) { 1954 void set value(bool value2) {
1955 this._value = value2; 1955 this._value = value2;
1956 } 1956 }
1957 void visitChildren(ASTVisitor<Object> visitor) { 1957 void visitChildren(ASTVisitor visitor) {
1958 } 1958 }
1959 } 1959 }
1960 /** 1960 /**
1961 * Instances of the class `BreakStatement` represent a break statement. 1961 * Instances of the class `BreakStatement` represent a break statement.
1962 * 1962 *
1963 * <pre> 1963 * <pre>
1964 * breakStatement ::= 1964 * breakStatement ::=
1965 * 'break' [SimpleIdentifier]? ';' 1965 * 'break' [SimpleIdentifier]? ';'
1966 * </pre> 1966 * </pre>
1967 * 1967 *
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
2049 } 2049 }
2050 2050
2051 /** 2051 /**
2052 * Set the semicolon terminating the statement to the given token. 2052 * Set the semicolon terminating the statement to the given token.
2053 * 2053 *
2054 * @param semicolon the semicolon terminating the statement 2054 * @param semicolon the semicolon terminating the statement
2055 */ 2055 */
2056 void set semicolon(Token semicolon2) { 2056 void set semicolon(Token semicolon2) {
2057 this._semicolon = semicolon2; 2057 this._semicolon = semicolon2;
2058 } 2058 }
2059 void visitChildren(ASTVisitor<Object> visitor) { 2059 void visitChildren(ASTVisitor visitor) {
2060 safelyVisitChild(_label, visitor); 2060 safelyVisitChild(_label, visitor);
2061 } 2061 }
2062 } 2062 }
2063 /** 2063 /**
2064 * Instances of the class `CascadeExpression` represent a sequence of cascaded e xpressions: 2064 * Instances of the class `CascadeExpression` represent a sequence of cascaded e xpressions:
2065 * expressions that share a common target. There are three kinds of expressions that can be used in 2065 * expressions that share a common target. There are three kinds of expressions that can be used in
2066 * a cascade expression: [IndexExpression], [MethodInvocation] and 2066 * a cascade expression: [IndexExpression], [MethodInvocation] and
2067 * [PropertyAccess]. 2067 * [PropertyAccess].
2068 * 2068 *
2069 * <pre> 2069 * <pre>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
2130 Expression get target => _target; 2130 Expression get target => _target;
2131 2131
2132 /** 2132 /**
2133 * Set the target of the cascade sections to the given expression. 2133 * Set the target of the cascade sections to the given expression.
2134 * 2134 *
2135 * @param target the target of the cascade sections 2135 * @param target the target of the cascade sections
2136 */ 2136 */
2137 void set target(Expression target2) { 2137 void set target(Expression target2) {
2138 this._target = becomeParentOf(target2); 2138 this._target = becomeParentOf(target2);
2139 } 2139 }
2140 void visitChildren(ASTVisitor<Object> visitor) { 2140 void visitChildren(ASTVisitor visitor) {
2141 safelyVisitChild(_target, visitor); 2141 safelyVisitChild(_target, visitor);
2142 _cascadeSections.accept(visitor); 2142 _cascadeSections.accept(visitor);
2143 } 2143 }
2144 } 2144 }
2145 /** 2145 /**
2146 * Instances of the class `CatchClause` represent a catch clause within a try st atement. 2146 * Instances of the class `CatchClause` represent a catch clause within a try st atement.
2147 * 2147 *
2148 * <pre> 2148 * <pre>
2149 * onPart ::= 2149 * onPart ::=
2150 * catchPart [Block] 2150 * catchPart [Block]
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 /** 2395 /**
2396 * Set the parameter whose value will be the stack trace associated with the e xception to the 2396 * Set the parameter whose value will be the stack trace associated with the e xception to the
2397 * given parameter. 2397 * given parameter.
2398 * 2398 *
2399 * @param parameter the parameter whose value will be the stack trace associat ed with the 2399 * @param parameter the parameter whose value will be the stack trace associat ed with the
2400 * exception 2400 * exception
2401 */ 2401 */
2402 void set stackTraceParameter(SimpleIdentifier parameter) { 2402 void set stackTraceParameter(SimpleIdentifier parameter) {
2403 _stackTraceParameter = becomeParentOf(parameter); 2403 _stackTraceParameter = becomeParentOf(parameter);
2404 } 2404 }
2405 void visitChildren(ASTVisitor<Object> visitor) { 2405 void visitChildren(ASTVisitor visitor) {
2406 safelyVisitChild(_exceptionType, visitor); 2406 safelyVisitChild(_exceptionType, visitor);
2407 safelyVisitChild(_exceptionParameter, visitor); 2407 safelyVisitChild(_exceptionParameter, visitor);
2408 safelyVisitChild(_stackTraceParameter, visitor); 2408 safelyVisitChild(_stackTraceParameter, visitor);
2409 safelyVisitChild(_body, visitor); 2409 safelyVisitChild(_body, visitor);
2410 } 2410 }
2411 } 2411 }
2412 /** 2412 /**
2413 * Instances of the class `ClassDeclaration` represent the declaration of a clas s. 2413 * Instances of the class `ClassDeclaration` represent the declaration of a clas s.
2414 * 2414 *
2415 * <pre> 2415 * <pre>
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2695 } 2695 }
2696 2696
2697 /** 2697 /**
2698 * Set the with clause for the class to the given clause. 2698 * Set the with clause for the class to the given clause.
2699 * 2699 *
2700 * @param withClause the with clause for the class 2700 * @param withClause the with clause for the class
2701 */ 2701 */
2702 void set withClause(WithClause withClause2) { 2702 void set withClause(WithClause withClause2) {
2703 this._withClause = becomeParentOf(withClause2); 2703 this._withClause = becomeParentOf(withClause2);
2704 } 2704 }
2705 void visitChildren(ASTVisitor<Object> visitor) { 2705 void visitChildren(ASTVisitor visitor) {
2706 super.visitChildren(visitor); 2706 super.visitChildren(visitor);
2707 safelyVisitChild(_name, visitor); 2707 safelyVisitChild(_name, visitor);
2708 safelyVisitChild(_typeParameters, visitor); 2708 safelyVisitChild(_typeParameters, visitor);
2709 safelyVisitChild(_extendsClause, visitor); 2709 safelyVisitChild(_extendsClause, visitor);
2710 safelyVisitChild(_withClause, visitor); 2710 safelyVisitChild(_withClause, visitor);
2711 safelyVisitChild(_implementsClause, visitor); 2711 safelyVisitChild(_implementsClause, visitor);
2712 safelyVisitChild(_nativeClause, visitor); 2712 safelyVisitChild(_nativeClause, visitor);
2713 members.accept(visitor); 2713 members.accept(visitor);
2714 } 2714 }
2715 Token get firstTokenAfterCommentAndMetadata { 2715 Token get firstTokenAfterCommentAndMetadata {
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 } 2945 }
2946 2946
2947 /** 2947 /**
2948 * Set the with clause for this class to the given with clause. 2948 * Set the with clause for this class to the given with clause.
2949 * 2949 *
2950 * @param withClause the with clause for this class 2950 * @param withClause the with clause for this class
2951 */ 2951 */
2952 void set withClause(WithClause withClause2) { 2952 void set withClause(WithClause withClause2) {
2953 this._withClause = becomeParentOf(withClause2); 2953 this._withClause = becomeParentOf(withClause2);
2954 } 2954 }
2955 void visitChildren(ASTVisitor<Object> visitor) { 2955 void visitChildren(ASTVisitor visitor) {
2956 super.visitChildren(visitor); 2956 super.visitChildren(visitor);
2957 safelyVisitChild(_name, visitor); 2957 safelyVisitChild(_name, visitor);
2958 safelyVisitChild(_typeParameters, visitor); 2958 safelyVisitChild(_typeParameters, visitor);
2959 safelyVisitChild(_superclass, visitor); 2959 safelyVisitChild(_superclass, visitor);
2960 safelyVisitChild(_withClause, visitor); 2960 safelyVisitChild(_withClause, visitor);
2961 safelyVisitChild(_implementsClause, visitor); 2961 safelyVisitChild(_implementsClause, visitor);
2962 } 2962 }
2963 } 2963 }
2964 /** 2964 /**
2965 * Instances of the class `Combinator` represent the combinator associated with an import 2965 * Instances of the class `Combinator` represent the combinator associated with an import
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
3143 * @return `true` if this is a documentation comment 3143 * @return `true` if this is a documentation comment
3144 */ 3144 */
3145 bool get isDocumentation => identical(_type, CommentType.DOCUMENTATION); 3145 bool get isDocumentation => identical(_type, CommentType.DOCUMENTATION);
3146 3146
3147 /** 3147 /**
3148 * Return `true` if this is an end-of-line comment. 3148 * Return `true` if this is an end-of-line comment.
3149 * 3149 *
3150 * @return `true` if this is an end-of-line comment 3150 * @return `true` if this is an end-of-line comment
3151 */ 3151 */
3152 bool get isEndOfLine => identical(_type, CommentType.END_OF_LINE); 3152 bool get isEndOfLine => identical(_type, CommentType.END_OF_LINE);
3153 void visitChildren(ASTVisitor<Object> visitor) { 3153 void visitChildren(ASTVisitor visitor) {
3154 _references.accept(visitor); 3154 _references.accept(visitor);
3155 } 3155 }
3156 } 3156 }
3157 /** 3157 /**
3158 * The enumeration `CommentType` encodes all the different types of comments tha t are 3158 * The enumeration `CommentType` encodes all the different types of comments tha t are
3159 * recognized by the parser. 3159 * recognized by the parser.
3160 */ 3160 */
3161 class CommentType implements Enum<CommentType> { 3161 class CommentType extends Enum<CommentType> {
3162 3162
3163 /** 3163 /**
3164 * An end-of-line comment. 3164 * An end-of-line comment.
3165 */ 3165 */
3166 static final CommentType END_OF_LINE = new CommentType('END_OF_LINE', 0); 3166 static final CommentType END_OF_LINE = new CommentType('END_OF_LINE', 0);
3167 3167
3168 /** 3168 /**
3169 * A block comment. 3169 * A block comment.
3170 */ 3170 */
3171 static final CommentType BLOCK = new CommentType('BLOCK', 1); 3171 static final CommentType BLOCK = new CommentType('BLOCK', 1);
3172 3172
3173 /** 3173 /**
3174 * A documentation comment. 3174 * A documentation comment.
3175 */ 3175 */
3176 static final CommentType DOCUMENTATION = new CommentType('DOCUMENTATION', 2); 3176 static final CommentType DOCUMENTATION = new CommentType('DOCUMENTATION', 2);
3177 static final List<CommentType> values = [END_OF_LINE, BLOCK, DOCUMENTATION]; 3177 static final List<CommentType> values = [END_OF_LINE, BLOCK, DOCUMENTATION];
3178 3178 CommentType(String name, int ordinal) : super(name, ordinal);
3179 /// The name of this enum constant, as declared in the enum declaration.
3180 final String name;
3181
3182 /// The position in the enum declaration.
3183 final int ordinal;
3184 CommentType(this.name, this.ordinal);
3185 int compareTo(CommentType other) => ordinal - other.ordinal;
3186 int get hashCode => ordinal;
3187 String toString() => name;
3188 } 3179 }
3189 /** 3180 /**
3190 * Instances of the class `CommentReference` represent a reference to a Dart ele ment that is 3181 * Instances of the class `CommentReference` represent a reference to a Dart ele ment that is
3191 * found within a documentation comment. 3182 * found within a documentation comment.
3192 * 3183 *
3193 * <pre> 3184 * <pre>
3194 * commentReference ::= 3185 * commentReference ::=
3195 * '[' 'new'? [Identifier] ']' 3186 * '[' 'new'? [Identifier] ']'
3196 * </pre> 3187 * </pre>
3197 * 3188 *
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
3255 } 3246 }
3256 3247
3257 /** 3248 /**
3258 * Set the token representing the 'new' keyword to the given token. 3249 * Set the token representing the 'new' keyword to the given token.
3259 * 3250 *
3260 * @param newKeyword the token representing the 'new' keyword 3251 * @param newKeyword the token representing the 'new' keyword
3261 */ 3252 */
3262 void set newKeyword(Token newKeyword2) { 3253 void set newKeyword(Token newKeyword2) {
3263 this._newKeyword = newKeyword2; 3254 this._newKeyword = newKeyword2;
3264 } 3255 }
3265 void visitChildren(ASTVisitor<Object> visitor) { 3256 void visitChildren(ASTVisitor visitor) {
3266 safelyVisitChild(_identifier, visitor); 3257 safelyVisitChild(_identifier, visitor);
3267 } 3258 }
3268 } 3259 }
3269 /** 3260 /**
3270 * Instances of the class `CompilationUnit` represent a compilation unit. 3261 * Instances of the class `CompilationUnit` represent a compilation unit.
3271 * 3262 *
3272 * While the grammar restricts the order of the directives and declarations with in a compilation 3263 * While the grammar restricts the order of the directives and declarations with in a compilation
3273 * unit, this class does not enforce those restrictions. In particular, the chil dren of a 3264 * unit, this class does not enforce those restrictions. In particular, the chil dren of a
3274 * compilation unit will be visited in lexical order even if lexical order does not conform to the 3265 * compilation unit will be visited in lexical order even if lexical order does not conform to the
3275 * restrictions of the grammar. 3266 * restrictions of the grammar.
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
3493 } 3484 }
3494 3485
3495 /** 3486 /**
3496 * Set the script tag at the beginning of the compilation unit to the given sc ript tag. 3487 * Set the script tag at the beginning of the compilation unit to the given sc ript tag.
3497 * 3488 *
3498 * @param scriptTag the script tag at the beginning of the compilation unit 3489 * @param scriptTag the script tag at the beginning of the compilation unit
3499 */ 3490 */
3500 void set scriptTag(ScriptTag scriptTag2) { 3491 void set scriptTag(ScriptTag scriptTag2) {
3501 this._scriptTag = becomeParentOf(scriptTag2); 3492 this._scriptTag = becomeParentOf(scriptTag2);
3502 } 3493 }
3503 void visitChildren(ASTVisitor<Object> visitor) { 3494 void visitChildren(ASTVisitor visitor) {
3504 safelyVisitChild(_scriptTag, visitor); 3495 safelyVisitChild(_scriptTag, visitor);
3505 if (directivesAreBeforeDeclarations()) { 3496 if (directivesAreBeforeDeclarations()) {
3506 _directives.accept(visitor); 3497 _directives.accept(visitor);
3507 _declarations.accept(visitor); 3498 _declarations.accept(visitor);
3508 } else { 3499 } else {
3509 for (ASTNode child in sortedDirectivesAndDeclarations) { 3500 for (ASTNode child in sortedDirectivesAndDeclarations) {
3510 child.accept(visitor); 3501 child.accept(visitor);
3511 } 3502 }
3512 } 3503 }
3513 } 3504 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
3723 3714
3724 /** 3715 /**
3725 * Set the expression that is executed if the condition evaluates to `true` to the given 3716 * Set the expression that is executed if the condition evaluates to `true` to the given
3726 * expression. 3717 * expression.
3727 * 3718 *
3728 * @param expression the expression that is executed if the condition evaluate s to `true` 3719 * @param expression the expression that is executed if the condition evaluate s to `true`
3729 */ 3720 */
3730 void set thenExpression(Expression expression) { 3721 void set thenExpression(Expression expression) {
3731 _thenExpression = becomeParentOf(expression); 3722 _thenExpression = becomeParentOf(expression);
3732 } 3723 }
3733 void visitChildren(ASTVisitor<Object> visitor) { 3724 void visitChildren(ASTVisitor visitor) {
3734 safelyVisitChild(_condition, visitor); 3725 safelyVisitChild(_condition, visitor);
3735 safelyVisitChild(_thenExpression, visitor); 3726 safelyVisitChild(_thenExpression, visitor);
3736 safelyVisitChild(_elseExpression, visitor); 3727 safelyVisitChild(_elseExpression, visitor);
3737 } 3728 }
3738 } 3729 }
3739 /** 3730 /**
3740 * Instances of the class `ConstructorDeclaration` represent a constructor decla ration. 3731 * Instances of the class `ConstructorDeclaration` represent a constructor decla ration.
3741 * 3732 *
3742 * <pre> 3733 * <pre>
3743 * constructorDeclaration ::= 3734 * constructorDeclaration ::=
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
4070 } 4061 }
4071 4062
4072 /** 4063 /**
4073 * Set the token for the separator (colon or equals) before the initializers t o the given token. 4064 * Set the token for the separator (colon or equals) before the initializers t o the given token.
4074 * 4065 *
4075 * @param separator the token for the separator (colon or equals) before the i nitializers 4066 * @param separator the token for the separator (colon or equals) before the i nitializers
4076 */ 4067 */
4077 void set separator(Token separator2) { 4068 void set separator(Token separator2) {
4078 this._separator = separator2; 4069 this._separator = separator2;
4079 } 4070 }
4080 void visitChildren(ASTVisitor<Object> visitor) { 4071 void visitChildren(ASTVisitor visitor) {
4081 super.visitChildren(visitor); 4072 super.visitChildren(visitor);
4082 safelyVisitChild(_returnType, visitor); 4073 safelyVisitChild(_returnType, visitor);
4083 safelyVisitChild(_name, visitor); 4074 safelyVisitChild(_name, visitor);
4084 safelyVisitChild(_parameters, visitor); 4075 safelyVisitChild(_parameters, visitor);
4085 _initializers.accept(visitor); 4076 _initializers.accept(visitor);
4086 safelyVisitChild(_redirectedConstructor, visitor); 4077 safelyVisitChild(_redirectedConstructor, visitor);
4087 safelyVisitChild(_body, visitor); 4078 safelyVisitChild(_body, visitor);
4088 } 4079 }
4089 Token get firstTokenAfterCommentAndMetadata { 4080 Token get firstTokenAfterCommentAndMetadata {
4090 Token leftMost2 = leftMost([_externalKeyword, _constKeyword, _factoryKeyword ]); 4081 Token leftMost2 = leftMost([_externalKeyword, _constKeyword, _factoryKeyword ]);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
4263 } 4254 }
4264 4255
4265 /** 4256 /**
4266 * Set the token for the period after the 'this' keyword to the given token. 4257 * Set the token for the period after the 'this' keyword to the given token.
4267 * 4258 *
4268 * @param period the token for the period after the 'this' keyword 4259 * @param period the token for the period after the 'this' keyword
4269 */ 4260 */
4270 void set period(Token period2) { 4261 void set period(Token period2) {
4271 this._period = period2; 4262 this._period = period2;
4272 } 4263 }
4273 void visitChildren(ASTVisitor<Object> visitor) { 4264 void visitChildren(ASTVisitor visitor) {
4274 safelyVisitChild(_fieldName, visitor); 4265 safelyVisitChild(_fieldName, visitor);
4275 safelyVisitChild(_expression, visitor); 4266 safelyVisitChild(_expression, visitor);
4276 } 4267 }
4277 } 4268 }
4278 /** 4269 /**
4279 * Instances of the class `ConstructorInitializer` defines the behavior of nodes that can 4270 * Instances of the class `ConstructorInitializer` defines the behavior of nodes that can
4280 * occur in the initializer list of a constructor declaration. 4271 * occur in the initializer list of a constructor declaration.
4281 * 4272 *
4282 * <pre> 4273 * <pre>
4283 * constructorInitializer ::= 4274 * constructorInitializer ::=
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
4442 } 4433 }
4443 4434
4444 /** 4435 /**
4445 * Set the name of the type defining the constructor to the given type name. 4436 * Set the name of the type defining the constructor to the given type name.
4446 * 4437 *
4447 * @param type the name of the type defining the constructor 4438 * @param type the name of the type defining the constructor
4448 */ 4439 */
4449 void set type(TypeName type2) { 4440 void set type(TypeName type2) {
4450 this._type = becomeParentOf(type2); 4441 this._type = becomeParentOf(type2);
4451 } 4442 }
4452 void visitChildren(ASTVisitor<Object> visitor) { 4443 void visitChildren(ASTVisitor visitor) {
4453 safelyVisitChild(_type, visitor); 4444 safelyVisitChild(_type, visitor);
4454 safelyVisitChild(_name, visitor); 4445 safelyVisitChild(_name, visitor);
4455 } 4446 }
4456 } 4447 }
4457 /** 4448 /**
4458 * Instances of the class `ContinueStatement` represent a continue statement. 4449 * Instances of the class `ContinueStatement` represent a continue statement.
4459 * 4450 *
4460 * <pre> 4451 * <pre>
4461 * continueStatement ::= 4452 * continueStatement ::=
4462 * 'continue' [SimpleIdentifier]? ';' 4453 * 'continue' [SimpleIdentifier]? ';'
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
4546 } 4537 }
4547 4538
4548 /** 4539 /**
4549 * Set the semicolon terminating the statement to the given token. 4540 * Set the semicolon terminating the statement to the given token.
4550 * 4541 *
4551 * @param semicolon the semicolon terminating the statement 4542 * @param semicolon the semicolon terminating the statement
4552 */ 4543 */
4553 void set semicolon(Token semicolon2) { 4544 void set semicolon(Token semicolon2) {
4554 this._semicolon = semicolon2; 4545 this._semicolon = semicolon2;
4555 } 4546 }
4556 void visitChildren(ASTVisitor<Object> visitor) { 4547 void visitChildren(ASTVisitor visitor) {
4557 safelyVisitChild(_label, visitor); 4548 safelyVisitChild(_label, visitor);
4558 } 4549 }
4559 } 4550 }
4560 /** 4551 /**
4561 * The abstract class `Declaration` defines the behavior common to nodes that re present the 4552 * The abstract class `Declaration` defines the behavior common to nodes that re present the
4562 * declaration of a name. Each declared name is visible within a name scope. 4553 * declaration of a name. Each declared name is visible within a name scope.
4563 * 4554 *
4564 * @coverage dart.engine.ast 4555 * @coverage dart.engine.ast
4565 */ 4556 */
4566 abstract class Declaration extends AnnotatedNode { 4557 abstract class Declaration extends AnnotatedNode {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
4703 } 4694 }
4704 4695
4705 /** 4696 /**
4706 * Set the name of the declared type of the parameter to the given type name. 4697 * Set the name of the declared type of the parameter to the given type name.
4707 * 4698 *
4708 * @param typeName the name of the declared type of the parameter 4699 * @param typeName the name of the declared type of the parameter
4709 */ 4700 */
4710 void set type(TypeName typeName) { 4701 void set type(TypeName typeName) {
4711 _type = becomeParentOf(typeName); 4702 _type = becomeParentOf(typeName);
4712 } 4703 }
4713 void visitChildren(ASTVisitor<Object> visitor) { 4704 void visitChildren(ASTVisitor visitor) {
4714 super.visitChildren(visitor); 4705 super.visitChildren(visitor);
4715 safelyVisitChild(_type, visitor); 4706 safelyVisitChild(_type, visitor);
4716 safelyVisitChild(_identifier, visitor); 4707 safelyVisitChild(_identifier, visitor);
4717 } 4708 }
4718 Token get firstTokenAfterCommentAndMetadata { 4709 Token get firstTokenAfterCommentAndMetadata {
4719 if (_keyword != null) { 4710 if (_keyword != null) {
4720 return _keyword; 4711 return _keyword;
4721 } else if (_type != null) { 4712 } else if (_type != null) {
4722 return _type.beginToken; 4713 return _type.beginToken;
4723 } 4714 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
4851 } 4842 }
4852 4843
4853 /** 4844 /**
4854 * Set the token separating the parameter from the default value to the given token. 4845 * Set the token separating the parameter from the default value to the given token.
4855 * 4846 *
4856 * @param separator the token separating the parameter from the default value 4847 * @param separator the token separating the parameter from the default value
4857 */ 4848 */
4858 void set separator(Token separator2) { 4849 void set separator(Token separator2) {
4859 this._separator = separator2; 4850 this._separator = separator2;
4860 } 4851 }
4861 void visitChildren(ASTVisitor<Object> visitor) { 4852 void visitChildren(ASTVisitor visitor) {
4862 safelyVisitChild(_parameter, visitor); 4853 safelyVisitChild(_parameter, visitor);
4863 safelyVisitChild(_defaultValue, visitor); 4854 safelyVisitChild(_defaultValue, visitor);
4864 } 4855 }
4865 } 4856 }
4866 /** 4857 /**
4867 * The abstract class `Directive` defines the behavior common to nodes that repr esent a 4858 * The abstract class `Directive` defines the behavior common to nodes that repr esent a
4868 * directive. 4859 * directive.
4869 * 4860 *
4870 * <pre> 4861 * <pre>
4871 * directive ::= 4862 * directive ::=
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
5116 } 5107 }
5117 5108
5118 /** 5109 /**
5119 * Set the token representing the 'while' keyword to the given token. 5110 * Set the token representing the 'while' keyword to the given token.
5120 * 5111 *
5121 * @param whileKeyword the token representing the 'while' keyword 5112 * @param whileKeyword the token representing the 'while' keyword
5122 */ 5113 */
5123 void set whileKeyword(Token whileKeyword2) { 5114 void set whileKeyword(Token whileKeyword2) {
5124 this._whileKeyword = whileKeyword2; 5115 this._whileKeyword = whileKeyword2;
5125 } 5116 }
5126 void visitChildren(ASTVisitor<Object> visitor) { 5117 void visitChildren(ASTVisitor visitor) {
5127 safelyVisitChild(_body, visitor); 5118 safelyVisitChild(_body, visitor);
5128 safelyVisitChild(_condition, visitor); 5119 safelyVisitChild(_condition, visitor);
5129 } 5120 }
5130 } 5121 }
5131 /** 5122 /**
5132 * Instances of the class `DoubleLiteral` represent a floating point literal exp ression. 5123 * Instances of the class `DoubleLiteral` represent a floating point literal exp ression.
5133 * 5124 *
5134 * <pre> 5125 * <pre>
5135 * doubleLiteral ::= 5126 * doubleLiteral ::=
5136 * decimalDigit+ ('.' decimalDigit*)? exponent? 5127 * decimalDigit+ ('.' decimalDigit*)? exponent?
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
5200 } 5191 }
5201 5192
5202 /** 5193 /**
5203 * Set the value of the literal to the given value. 5194 * Set the value of the literal to the given value.
5204 * 5195 *
5205 * @param value the value of the literal 5196 * @param value the value of the literal
5206 */ 5197 */
5207 void set value(double value2) { 5198 void set value(double value2) {
5208 this._value = value2; 5199 this._value = value2;
5209 } 5200 }
5210 void visitChildren(ASTVisitor<Object> visitor) { 5201 void visitChildren(ASTVisitor visitor) {
5211 } 5202 }
5212 } 5203 }
5213 /** 5204 /**
5214 * Instances of the class `EmptyFunctionBody` represent an empty function body, which can only 5205 * Instances of the class `EmptyFunctionBody` represent an empty function body, which can only
5215 * appear in constructors or abstract methods. 5206 * appear in constructors or abstract methods.
5216 * 5207 *
5217 * <pre> 5208 * <pre>
5218 * emptyFunctionBody ::= 5209 * emptyFunctionBody ::=
5219 * ';' 5210 * ';'
5220 * </pre> 5211 * </pre>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
5256 5247
5257 /** 5248 /**
5258 * Set the token representing the semicolon that marks the end of the function body to the given 5249 * Set the token representing the semicolon that marks the end of the function body to the given
5259 * token. 5250 * token.
5260 * 5251 *
5261 * @param semicolon the token representing the semicolon that marks the end of the function body 5252 * @param semicolon the token representing the semicolon that marks the end of the function body
5262 */ 5253 */
5263 void set semicolon(Token semicolon2) { 5254 void set semicolon(Token semicolon2) {
5264 this._semicolon = semicolon2; 5255 this._semicolon = semicolon2;
5265 } 5256 }
5266 void visitChildren(ASTVisitor<Object> visitor) { 5257 void visitChildren(ASTVisitor visitor) {
5267 } 5258 }
5268 } 5259 }
5269 /** 5260 /**
5270 * Instances of the class `EmptyStatement` represent an empty statement. 5261 * Instances of the class `EmptyStatement` represent an empty statement.
5271 * 5262 *
5272 * <pre> 5263 * <pre>
5273 * emptyStatement ::= 5264 * emptyStatement ::=
5274 * ';' 5265 * ';'
5275 * </pre> 5266 * </pre>
5276 * 5267 *
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
5310 Token get semicolon => _semicolon; 5301 Token get semicolon => _semicolon;
5311 5302
5312 /** 5303 /**
5313 * Set the semicolon terminating the statement to the given token. 5304 * Set the semicolon terminating the statement to the given token.
5314 * 5305 *
5315 * @param semicolon the semicolon terminating the statement 5306 * @param semicolon the semicolon terminating the statement
5316 */ 5307 */
5317 void set semicolon(Token semicolon2) { 5308 void set semicolon(Token semicolon2) {
5318 this._semicolon = semicolon2; 5309 this._semicolon = semicolon2;
5319 } 5310 }
5320 void visitChildren(ASTVisitor<Object> visitor) { 5311 void visitChildren(ASTVisitor visitor) {
5321 } 5312 }
5322 } 5313 }
5323 /** 5314 /**
5324 * Ephemeral identifiers are created as needed to mimic the presence of an empty identifier. 5315 * Ephemeral identifiers are created as needed to mimic the presence of an empty identifier.
5325 * 5316 *
5326 * @coverage dart.engine.ast 5317 * @coverage dart.engine.ast
5327 */ 5318 */
5328 class EphemeralIdentifier extends SimpleIdentifier { 5319 class EphemeralIdentifier extends SimpleIdentifier {
5329 EphemeralIdentifier.full(ASTNode parent, int location) : super.full(new Token( TokenType.IDENTIFIER, location)) { 5320 EphemeralIdentifier.full(ASTNode parent, int location) : super.full(new Token( TokenType.IDENTIFIER, location)) {
5330 parent.becomeParentOf(this); 5321 parent.becomeParentOf(this);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
5367 */ 5358 */
5368 ExportDirective({Comment comment, List<Annotation> metadata, Token keyword, St ringLiteral libraryUri, List<Combinator> combinators, Token semicolon}) : this.f ull(comment, metadata, keyword, libraryUri, combinators, semicolon); 5359 ExportDirective({Comment comment, List<Annotation> metadata, Token keyword, St ringLiteral libraryUri, List<Combinator> combinators, Token semicolon}) : this.f ull(comment, metadata, keyword, libraryUri, combinators, semicolon);
5369 accept(ASTVisitor visitor) => visitor.visitExportDirective(this); 5360 accept(ASTVisitor visitor) => visitor.visitExportDirective(this);
5370 LibraryElement get uriElement { 5361 LibraryElement get uriElement {
5371 Element element = this.element; 5362 Element element = this.element;
5372 if (element is ExportElement) { 5363 if (element is ExportElement) {
5373 return ((element as ExportElement)).exportedLibrary; 5364 return ((element as ExportElement)).exportedLibrary;
5374 } 5365 }
5375 return null; 5366 return null;
5376 } 5367 }
5377 void visitChildren(ASTVisitor<Object> visitor) { 5368 void visitChildren(ASTVisitor visitor) {
5378 super.visitChildren(visitor); 5369 super.visitChildren(visitor);
5379 combinators.accept(visitor); 5370 combinators.accept(visitor);
5380 } 5371 }
5381 } 5372 }
5382 /** 5373 /**
5383 * Instances of the class `Expression` defines the behavior common to nodes that represent an 5374 * Instances of the class `Expression` defines the behavior common to nodes that represent an
5384 * expression. 5375 * expression.
5385 * 5376 *
5386 * <pre> 5377 * <pre>
5387 * expression ::= 5378 * expression ::=
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
5639 } 5630 }
5640 5631
5641 /** 5632 /**
5642 * Set the semicolon terminating the statement to the given token. 5633 * Set the semicolon terminating the statement to the given token.
5643 * 5634 *
5644 * @param semicolon the semicolon terminating the statement 5635 * @param semicolon the semicolon terminating the statement
5645 */ 5636 */
5646 void set semicolon(Token semicolon2) { 5637 void set semicolon(Token semicolon2) {
5647 this._semicolon = semicolon2; 5638 this._semicolon = semicolon2;
5648 } 5639 }
5649 void visitChildren(ASTVisitor<Object> visitor) { 5640 void visitChildren(ASTVisitor visitor) {
5650 safelyVisitChild(_expression, visitor); 5641 safelyVisitChild(_expression, visitor);
5651 } 5642 }
5652 } 5643 }
5653 /** 5644 /**
5654 * Instances of the class `ExpressionStatement` wrap an expression as a statemen t. 5645 * Instances of the class `ExpressionStatement` wrap an expression as a statemen t.
5655 * 5646 *
5656 * <pre> 5647 * <pre>
5657 * expressionStatement ::= 5648 * expressionStatement ::=
5658 * [Expression]? ';' 5649 * [Expression]? ';'
5659 * </pre> 5650 * </pre>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
5726 } 5717 }
5727 5718
5728 /** 5719 /**
5729 * Set the semicolon terminating the statement to the given token. 5720 * Set the semicolon terminating the statement to the given token.
5730 * 5721 *
5731 * @param semicolon the semicolon terminating the statement 5722 * @param semicolon the semicolon terminating the statement
5732 */ 5723 */
5733 void set semicolon(Token semicolon2) { 5724 void set semicolon(Token semicolon2) {
5734 this._semicolon = semicolon2; 5725 this._semicolon = semicolon2;
5735 } 5726 }
5736 void visitChildren(ASTVisitor<Object> visitor) { 5727 void visitChildren(ASTVisitor visitor) {
5737 safelyVisitChild(_expression, visitor); 5728 safelyVisitChild(_expression, visitor);
5738 } 5729 }
5739 } 5730 }
5740 /** 5731 /**
5741 * Instances of the class `ExtendsClause` represent the "extends" clause in a cl ass 5732 * Instances of the class `ExtendsClause` represent the "extends" clause in a cl ass
5742 * declaration. 5733 * declaration.
5743 * 5734 *
5744 * <pre> 5735 * <pre>
5745 * extendsClause ::= 5736 * extendsClause ::=
5746 * 'extends' [TypeName] 5737 * 'extends' [TypeName]
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
5806 } 5797 }
5807 5798
5808 /** 5799 /**
5809 * Set the name of the class that is being extended to the given name. 5800 * Set the name of the class that is being extended to the given name.
5810 * 5801 *
5811 * @param name the name of the class that is being extended 5802 * @param name the name of the class that is being extended
5812 */ 5803 */
5813 void set superclass(TypeName name) { 5804 void set superclass(TypeName name) {
5814 _superclass = becomeParentOf(name); 5805 _superclass = becomeParentOf(name);
5815 } 5806 }
5816 void visitChildren(ASTVisitor<Object> visitor) { 5807 void visitChildren(ASTVisitor visitor) {
5817 safelyVisitChild(_superclass, visitor); 5808 safelyVisitChild(_superclass, visitor);
5818 } 5809 }
5819 } 5810 }
5820 /** 5811 /**
5821 * Instances of the class `FieldDeclaration` represent the declaration of one or more fields 5812 * Instances of the class `FieldDeclaration` represent the declaration of one or more fields
5822 * of the same type. 5813 * of the same type.
5823 * 5814 *
5824 * <pre> 5815 * <pre>
5825 * fieldDeclaration ::= 5816 * fieldDeclaration ::=
5826 * 'static'? [VariableDeclarationList] ';' 5817 * 'static'? [VariableDeclarationList] ';'
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
5922 } 5913 }
5923 5914
5924 /** 5915 /**
5925 * Set the semicolon terminating the declaration to the given token. 5916 * Set the semicolon terminating the declaration to the given token.
5926 * 5917 *
5927 * @param semicolon the semicolon terminating the declaration 5918 * @param semicolon the semicolon terminating the declaration
5928 */ 5919 */
5929 void set semicolon(Token semicolon2) { 5920 void set semicolon(Token semicolon2) {
5930 this._semicolon = semicolon2; 5921 this._semicolon = semicolon2;
5931 } 5922 }
5932 void visitChildren(ASTVisitor<Object> visitor) { 5923 void visitChildren(ASTVisitor visitor) {
5933 super.visitChildren(visitor); 5924 super.visitChildren(visitor);
5934 safelyVisitChild(_fieldList, visitor); 5925 safelyVisitChild(_fieldList, visitor);
5935 } 5926 }
5936 Token get firstTokenAfterCommentAndMetadata { 5927 Token get firstTokenAfterCommentAndMetadata {
5937 if (_staticKeyword != null) { 5928 if (_staticKeyword != null) {
5938 return _staticKeyword; 5929 return _staticKeyword;
5939 } 5930 }
5940 return _fieldList.beginToken; 5931 return _fieldList.beginToken;
5941 } 5932 }
5942 } 5933 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
6104 } 6095 }
6105 6096
6106 /** 6097 /**
6107 * Set the name of the declared type of the parameter to the given type name. 6098 * Set the name of the declared type of the parameter to the given type name.
6108 * 6099 *
6109 * @param typeName the name of the declared type of the parameter 6100 * @param typeName the name of the declared type of the parameter
6110 */ 6101 */
6111 void set type(TypeName typeName) { 6102 void set type(TypeName typeName) {
6112 _type = becomeParentOf(typeName); 6103 _type = becomeParentOf(typeName);
6113 } 6104 }
6114 void visitChildren(ASTVisitor<Object> visitor) { 6105 void visitChildren(ASTVisitor visitor) {
6115 super.visitChildren(visitor); 6106 super.visitChildren(visitor);
6116 safelyVisitChild(_type, visitor); 6107 safelyVisitChild(_type, visitor);
6117 safelyVisitChild(identifier, visitor); 6108 safelyVisitChild(identifier, visitor);
6118 safelyVisitChild(_parameters, visitor); 6109 safelyVisitChild(_parameters, visitor);
6119 } 6110 }
6120 } 6111 }
6121 /** 6112 /**
6122 * Instances of the class `ForEachStatement` represent a for-each statement. 6113 * Instances of the class `ForEachStatement` represent a for-each statement.
6123 * 6114 *
6124 * <pre> 6115 * <pre>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
6304 } 6295 }
6305 6296
6306 /** 6297 /**
6307 * Set the right parenthesis to the given token. 6298 * Set the right parenthesis to the given token.
6308 * 6299 *
6309 * @param rightParenthesis the right parenthesis 6300 * @param rightParenthesis the right parenthesis
6310 */ 6301 */
6311 void set rightParenthesis(Token rightParenthesis2) { 6302 void set rightParenthesis(Token rightParenthesis2) {
6312 this._rightParenthesis = rightParenthesis2; 6303 this._rightParenthesis = rightParenthesis2;
6313 } 6304 }
6314 void visitChildren(ASTVisitor<Object> visitor) { 6305 void visitChildren(ASTVisitor visitor) {
6315 safelyVisitChild(_loopVariable, visitor); 6306 safelyVisitChild(_loopVariable, visitor);
6316 safelyVisitChild(_iterator, visitor); 6307 safelyVisitChild(_iterator, visitor);
6317 safelyVisitChild(_body, visitor); 6308 safelyVisitChild(_body, visitor);
6318 } 6309 }
6319 } 6310 }
6320 /** 6311 /**
6321 * Instances of the class `ForStatement` represent a for statement. 6312 * Instances of the class `ForStatement` represent a for statement.
6322 * 6313 *
6323 * <pre> 6314 * <pre>
6324 * forStatement ::= 6315 * forStatement ::=
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
6582 } 6573 }
6583 6574
6584 /** 6575 /**
6585 * Set the declaration of the loop variables to the given parameter. 6576 * Set the declaration of the loop variables to the given parameter.
6586 * 6577 *
6587 * @param variableList the declaration of the loop variables 6578 * @param variableList the declaration of the loop variables
6588 */ 6579 */
6589 void set variables(VariableDeclarationList variableList) { 6580 void set variables(VariableDeclarationList variableList) {
6590 variableList = becomeParentOf(variableList); 6581 variableList = becomeParentOf(variableList);
6591 } 6582 }
6592 void visitChildren(ASTVisitor<Object> visitor) { 6583 void visitChildren(ASTVisitor visitor) {
6593 safelyVisitChild(_variableList, visitor); 6584 safelyVisitChild(_variableList, visitor);
6594 safelyVisitChild(_initialization, visitor); 6585 safelyVisitChild(_initialization, visitor);
6595 safelyVisitChild(_condition, visitor); 6586 safelyVisitChild(_condition, visitor);
6596 _updaters.accept(visitor); 6587 _updaters.accept(visitor);
6597 safelyVisitChild(_body, visitor); 6588 safelyVisitChild(_body, visitor);
6598 } 6589 }
6599 } 6590 }
6600 /** 6591 /**
6601 * The abstract class `FormalParameter` defines the behavior of objects represen ting a 6592 * The abstract class `FormalParameter` defines the behavior of objects represen ting a
6602 * parameter to a function. 6593 * parameter to a function.
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
6832 } 6823 }
6833 6824
6834 /** 6825 /**
6835 * Set the right parenthesis to the given token. 6826 * Set the right parenthesis to the given token.
6836 * 6827 *
6837 * @param parenthesis the right parenthesis 6828 * @param parenthesis the right parenthesis
6838 */ 6829 */
6839 void set rightParenthesis(Token parenthesis) { 6830 void set rightParenthesis(Token parenthesis) {
6840 _rightParenthesis = parenthesis; 6831 _rightParenthesis = parenthesis;
6841 } 6832 }
6842 void visitChildren(ASTVisitor<Object> visitor) { 6833 void visitChildren(ASTVisitor visitor) {
6843 _parameters.accept(visitor); 6834 _parameters.accept(visitor);
6844 } 6835 }
6845 } 6836 }
6846 /** 6837 /**
6847 * The abstract class `FunctionBody` defines the behavior common to objects repr esenting the 6838 * The abstract class `FunctionBody` defines the behavior common to objects repr esenting the
6848 * body of a function or method. 6839 * body of a function or method.
6849 * 6840 *
6850 * <pre> 6841 * <pre>
6851 * functionBody ::= 6842 * functionBody ::=
6852 * [BlockFunctionBody] 6843 * [BlockFunctionBody]
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
7024 } 7015 }
7025 7016
7026 /** 7017 /**
7027 * Set the return type of the function to the given name. 7018 * Set the return type of the function to the given name.
7028 * 7019 *
7029 * @param name the return type of the function 7020 * @param name the return type of the function
7030 */ 7021 */
7031 void set returnType(TypeName name) { 7022 void set returnType(TypeName name) {
7032 _returnType = becomeParentOf(name); 7023 _returnType = becomeParentOf(name);
7033 } 7024 }
7034 void visitChildren(ASTVisitor<Object> visitor) { 7025 void visitChildren(ASTVisitor visitor) {
7035 super.visitChildren(visitor); 7026 super.visitChildren(visitor);
7036 safelyVisitChild(_returnType, visitor); 7027 safelyVisitChild(_returnType, visitor);
7037 safelyVisitChild(_name, visitor); 7028 safelyVisitChild(_name, visitor);
7038 safelyVisitChild(_functionExpression, visitor); 7029 safelyVisitChild(_functionExpression, visitor);
7039 } 7030 }
7040 Token get firstTokenAfterCommentAndMetadata { 7031 Token get firstTokenAfterCommentAndMetadata {
7041 if (_externalKeyword != null) { 7032 if (_externalKeyword != null) {
7042 return _externalKeyword; 7033 return _externalKeyword;
7043 } 7034 }
7044 if (_returnType != null) { 7035 if (_returnType != null) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
7091 FunctionDeclaration get functionDeclaration => _functionDeclaration; 7082 FunctionDeclaration get functionDeclaration => _functionDeclaration;
7092 7083
7093 /** 7084 /**
7094 * Set the function declaration being wrapped to the given function declaratio n. 7085 * Set the function declaration being wrapped to the given function declaratio n.
7095 * 7086 *
7096 * @param functionDeclaration the function declaration being wrapped 7087 * @param functionDeclaration the function declaration being wrapped
7097 */ 7088 */
7098 void set functionExpression(FunctionDeclaration functionDeclaration2) { 7089 void set functionExpression(FunctionDeclaration functionDeclaration2) {
7099 this._functionDeclaration = becomeParentOf(functionDeclaration2); 7090 this._functionDeclaration = becomeParentOf(functionDeclaration2);
7100 } 7091 }
7101 void visitChildren(ASTVisitor<Object> visitor) { 7092 void visitChildren(ASTVisitor visitor) {
7102 safelyVisitChild(_functionDeclaration, visitor); 7093 safelyVisitChild(_functionDeclaration, visitor);
7103 } 7094 }
7104 } 7095 }
7105 /** 7096 /**
7106 * Instances of the class `FunctionExpression` represent a function expression. 7097 * Instances of the class `FunctionExpression` represent a function expression.
7107 * 7098 *
7108 * <pre> 7099 * <pre>
7109 * functionExpression ::= 7100 * functionExpression ::=
7110 * [FormalParameterList] [FunctionBody] 7101 * [FormalParameterList] [FunctionBody]
7111 * </pre> 7102 * </pre>
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
7207 } 7198 }
7208 7199
7209 /** 7200 /**
7210 * Set the parameters associated with the function to the given list of parame ters. 7201 * Set the parameters associated with the function to the given list of parame ters.
7211 * 7202 *
7212 * @param parameters the parameters associated with the function 7203 * @param parameters the parameters associated with the function
7213 */ 7204 */
7214 void set parameters(FormalParameterList parameters2) { 7205 void set parameters(FormalParameterList parameters2) {
7215 this._parameters = becomeParentOf(parameters2); 7206 this._parameters = becomeParentOf(parameters2);
7216 } 7207 }
7217 void visitChildren(ASTVisitor<Object> visitor) { 7208 void visitChildren(ASTVisitor visitor) {
7218 safelyVisitChild(_parameters, visitor); 7209 safelyVisitChild(_parameters, visitor);
7219 safelyVisitChild(_body, visitor); 7210 safelyVisitChild(_body, visitor);
7220 } 7211 }
7221 } 7212 }
7222 /** 7213 /**
7223 * Instances of the class `FunctionExpressionInvocation` represent the invocatio n of a 7214 * Instances of the class `FunctionExpressionInvocation` represent the invocatio n of a
7224 * function resulting from evaluating an expression. Invocations of methods and other forms of 7215 * function resulting from evaluating an expression. Invocations of methods and other forms of
7225 * functions are represented by [MethodInvocation] nodes. Invocations of 7216 * functions are represented by [MethodInvocation] nodes. Invocations of
7226 * getters and setters are represented by either [PrefixedIdentifier] or 7217 * getters and setters are represented by either [PrefixedIdentifier] or
7227 * [PropertyAccess] nodes. 7218 * [PropertyAccess] nodes.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
7359 7350
7360 /** 7351 /**
7361 * Set the element associated with the function being invoked based on static type information to 7352 * Set the element associated with the function being invoked based on static type information to
7362 * the given element. 7353 * the given element.
7363 * 7354 *
7364 * @param element the element to be associated with the function 7355 * @param element the element to be associated with the function
7365 */ 7356 */
7366 void set staticElement(ExecutableElement element) { 7357 void set staticElement(ExecutableElement element) {
7367 this._staticElement = element; 7358 this._staticElement = element;
7368 } 7359 }
7369 void visitChildren(ASTVisitor<Object> visitor) { 7360 void visitChildren(ASTVisitor visitor) {
7370 safelyVisitChild(_function, visitor); 7361 safelyVisitChild(_function, visitor);
7371 safelyVisitChild(_argumentList, visitor); 7362 safelyVisitChild(_argumentList, visitor);
7372 } 7363 }
7373 } 7364 }
7374 /** 7365 /**
7375 * Instances of the class `FunctionTypeAlias` represent a function type alias. 7366 * Instances of the class `FunctionTypeAlias` represent a function type alias.
7376 * 7367 *
7377 * <pre> 7368 * <pre>
7378 * functionTypeAlias ::= 7369 * functionTypeAlias ::=
7379 * functionPrefix [TypeParameterList]? [FormalParameterList] ';' 7370 * functionPrefix [TypeParameterList]? [FormalParameterList] ';'
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
7501 } 7492 }
7502 7493
7503 /** 7494 /**
7504 * Set the type parameters for the function type to the given list of paramete rs. 7495 * Set the type parameters for the function type to the given list of paramete rs.
7505 * 7496 *
7506 * @param typeParameters the type parameters for the function type 7497 * @param typeParameters the type parameters for the function type
7507 */ 7498 */
7508 void set typeParameters(TypeParameterList typeParameters2) { 7499 void set typeParameters(TypeParameterList typeParameters2) {
7509 this._typeParameters = becomeParentOf(typeParameters2); 7500 this._typeParameters = becomeParentOf(typeParameters2);
7510 } 7501 }
7511 void visitChildren(ASTVisitor<Object> visitor) { 7502 void visitChildren(ASTVisitor visitor) {
7512 super.visitChildren(visitor); 7503 super.visitChildren(visitor);
7513 safelyVisitChild(_returnType, visitor); 7504 safelyVisitChild(_returnType, visitor);
7514 safelyVisitChild(_name, visitor); 7505 safelyVisitChild(_name, visitor);
7515 safelyVisitChild(_typeParameters, visitor); 7506 safelyVisitChild(_typeParameters, visitor);
7516 safelyVisitChild(_parameters, visitor); 7507 safelyVisitChild(_parameters, visitor);
7517 } 7508 }
7518 } 7509 }
7519 /** 7510 /**
7520 * Instances of the class `FunctionTypedFormalParameter` represent a function-ty ped formal 7511 * Instances of the class `FunctionTypedFormalParameter` represent a function-ty ped formal
7521 * parameter. 7512 * parameter.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
7601 } 7592 }
7602 7593
7603 /** 7594 /**
7604 * Set the return type of the function to the given type. 7595 * Set the return type of the function to the given type.
7605 * 7596 *
7606 * @param returnType the return type of the function 7597 * @param returnType the return type of the function
7607 */ 7598 */
7608 void set returnType(TypeName returnType2) { 7599 void set returnType(TypeName returnType2) {
7609 this._returnType = becomeParentOf(returnType2); 7600 this._returnType = becomeParentOf(returnType2);
7610 } 7601 }
7611 void visitChildren(ASTVisitor<Object> visitor) { 7602 void visitChildren(ASTVisitor visitor) {
7612 super.visitChildren(visitor); 7603 super.visitChildren(visitor);
7613 safelyVisitChild(_returnType, visitor); 7604 safelyVisitChild(_returnType, visitor);
7614 safelyVisitChild(identifier, visitor); 7605 safelyVisitChild(identifier, visitor);
7615 safelyVisitChild(_parameters, visitor); 7606 safelyVisitChild(_parameters, visitor);
7616 } 7607 }
7617 } 7608 }
7618 /** 7609 /**
7619 * Instances of the class `HideCombinator` represent a combinator that restricts the names 7610 * Instances of the class `HideCombinator` represent a combinator that restricts the names
7620 * being imported to those that are not in a given list. 7611 * being imported to those that are not in a given list.
7621 * 7612 *
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
7653 HideCombinator({Token keyword, List<SimpleIdentifier> hiddenNames}) : this.ful l(keyword, hiddenNames); 7644 HideCombinator({Token keyword, List<SimpleIdentifier> hiddenNames}) : this.ful l(keyword, hiddenNames);
7654 accept(ASTVisitor visitor) => visitor.visitHideCombinator(this); 7645 accept(ASTVisitor visitor) => visitor.visitHideCombinator(this);
7655 Token get endToken => _hiddenNames.endToken; 7646 Token get endToken => _hiddenNames.endToken;
7656 7647
7657 /** 7648 /**
7658 * Return the list of names from the library that are hidden by this combinato r. 7649 * Return the list of names from the library that are hidden by this combinato r.
7659 * 7650 *
7660 * @return the list of names from the library that are hidden by this combinat or 7651 * @return the list of names from the library that are hidden by this combinat or
7661 */ 7652 */
7662 NodeList<SimpleIdentifier> get hiddenNames => _hiddenNames; 7653 NodeList<SimpleIdentifier> get hiddenNames => _hiddenNames;
7663 void visitChildren(ASTVisitor<Object> visitor) { 7654 void visitChildren(ASTVisitor visitor) {
7664 _hiddenNames.accept(visitor); 7655 _hiddenNames.accept(visitor);
7665 } 7656 }
7666 } 7657 }
7667 /** 7658 /**
7668 * The abstract class `Identifier` defines the behavior common to nodes that rep resent an 7659 * The abstract class `Identifier` defines the behavior common to nodes that rep resent an
7669 * identifier. 7660 * identifier.
7670 * 7661 *
7671 * <pre> 7662 * <pre>
7672 * identifier ::= 7663 * identifier ::=
7673 * [SimpleIdentifier] 7664 * [SimpleIdentifier]
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
7924 7915
7925 /** 7916 /**
7926 * Set the statement that is executed if the condition evaluates to `true` to the given 7917 * Set the statement that is executed if the condition evaluates to `true` to the given
7927 * statement. 7918 * statement.
7928 * 7919 *
7929 * @param statement the statement that is executed if the condition evaluates to `true` 7920 * @param statement the statement that is executed if the condition evaluates to `true`
7930 */ 7921 */
7931 void set thenStatement(Statement statement) { 7922 void set thenStatement(Statement statement) {
7932 _thenStatement = becomeParentOf(statement); 7923 _thenStatement = becomeParentOf(statement);
7933 } 7924 }
7934 void visitChildren(ASTVisitor<Object> visitor) { 7925 void visitChildren(ASTVisitor visitor) {
7935 safelyVisitChild(_condition, visitor); 7926 safelyVisitChild(_condition, visitor);
7936 safelyVisitChild(_thenStatement, visitor); 7927 safelyVisitChild(_thenStatement, visitor);
7937 safelyVisitChild(_elseStatement, visitor); 7928 safelyVisitChild(_elseStatement, visitor);
7938 } 7929 }
7939 } 7930 }
7940 /** 7931 /**
7941 * Instances of the class `ImplementsClause` represent the "implements" clause i n an class 7932 * Instances of the class `ImplementsClause` represent the "implements" clause i n an class
7942 * declaration. 7933 * declaration.
7943 * 7934 *
7944 * <pre> 7935 * <pre>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
7998 Token get keyword => _keyword; 7989 Token get keyword => _keyword;
7999 7990
8000 /** 7991 /**
8001 * Set the token representing the 'implements' keyword to the given token. 7992 * Set the token representing the 'implements' keyword to the given token.
8002 * 7993 *
8003 * @param keyword the token representing the 'implements' keyword 7994 * @param keyword the token representing the 'implements' keyword
8004 */ 7995 */
8005 void set keyword(Token keyword2) { 7996 void set keyword(Token keyword2) {
8006 this._keyword = keyword2; 7997 this._keyword = keyword2;
8007 } 7998 }
8008 void visitChildren(ASTVisitor<Object> visitor) { 7999 void visitChildren(ASTVisitor visitor) {
8009 _interfaces.accept(visitor); 8000 _interfaces.accept(visitor);
8010 } 8001 }
8011 } 8002 }
8012 /** 8003 /**
8013 * Instances of the class `ImportDirective` represent an import directive. 8004 * Instances of the class `ImportDirective` represent an import directive.
8014 * 8005 *
8015 * <pre> 8006 * <pre>
8016 * importDirective ::= 8007 * importDirective ::=
8017 * [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* '; ' 8008 * [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* '; '
8018 * </pre> 8009 * </pre>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
8097 } 8088 }
8098 8089
8099 /** 8090 /**
8100 * Set the prefix to be used with the imported names to the given identifier. 8091 * Set the prefix to be used with the imported names to the given identifier.
8101 * 8092 *
8102 * @param prefix the prefix to be used with the imported names 8093 * @param prefix the prefix to be used with the imported names
8103 */ 8094 */
8104 void set prefix(SimpleIdentifier prefix2) { 8095 void set prefix(SimpleIdentifier prefix2) {
8105 this._prefix = becomeParentOf(prefix2); 8096 this._prefix = becomeParentOf(prefix2);
8106 } 8097 }
8107 void visitChildren(ASTVisitor<Object> visitor) { 8098 void visitChildren(ASTVisitor visitor) {
8108 super.visitChildren(visitor); 8099 super.visitChildren(visitor);
8109 safelyVisitChild(_prefix, visitor); 8100 safelyVisitChild(_prefix, visitor);
8110 combinators.accept(visitor); 8101 combinators.accept(visitor);
8111 } 8102 }
8112 } 8103 }
8113 /** 8104 /**
8114 * Instances of the class `IndexExpression` represent an index expression. 8105 * Instances of the class `IndexExpression` represent an index expression.
8115 * 8106 *
8116 * <pre> 8107 * <pre>
8117 * indexExpression ::= 8108 * indexExpression ::=
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
8157 MethodElement _staticElement; 8148 MethodElement _staticElement;
8158 8149
8159 /** 8150 /**
8160 * The element associated with the operator based on the propagated type of th e target, or 8151 * The element associated with the operator based on the propagated type of th e target, or
8161 * `null` if the AST structure has not been resolved or if the operator could not be 8152 * `null` if the AST structure has not been resolved or if the operator could not be
8162 * resolved. 8153 * resolved.
8163 */ 8154 */
8164 MethodElement _propagatedElement; 8155 MethodElement _propagatedElement;
8165 8156
8166 /** 8157 /**
8158 * If this expression is both in a getter and setter context, the [AuxiliaryEl ements] will
8159 * be set to hold onto the static and propagated information. The auxiliary el ement will hold onto
8160 * the elements from the getter context.
8161 */
8162 AuxiliaryElements _auxiliaryElements = null;
8163
8164 /**
8167 * Initialize a newly created index expression. 8165 * Initialize a newly created index expression.
8168 * 8166 *
8169 * @param target the expression used to compute the object being indexed 8167 * @param target the expression used to compute the object being indexed
8170 * @param leftBracket the left square bracket 8168 * @param leftBracket the left square bracket
8171 * @param index the expression used to compute the index 8169 * @param index the expression used to compute the index
8172 * @param rightBracket the right square bracket 8170 * @param rightBracket the right square bracket
8173 */ 8171 */
8174 IndexExpression.forTarget_full(Expression target, Token leftBracket, Expressio n index, Token rightBracket) { 8172 IndexExpression.forTarget_full(Expression target, Token leftBracket, Expressio n index, Token rightBracket) {
8175 this._target = becomeParentOf(target); 8173 this._target = becomeParentOf(target);
8176 this._leftBracket = leftBracket; 8174 this._leftBracket = leftBracket;
(...skipping 29 matching lines...) Expand all
8206 /** 8204 /**
8207 * Initialize a newly created index expression. 8205 * Initialize a newly created index expression.
8208 * 8206 *
8209 * @param period the period ("..") before a cascaded index expression 8207 * @param period the period ("..") before a cascaded index expression
8210 * @param leftBracket the left square bracket 8208 * @param leftBracket the left square bracket
8211 * @param index the expression used to compute the index 8209 * @param index the expression used to compute the index
8212 * @param rightBracket the right square bracket 8210 * @param rightBracket the right square bracket
8213 */ 8211 */
8214 IndexExpression.forCascade({Token period, Token leftBracket, Expression index, Token rightBracket}) : this.forCascade_full(period, leftBracket, index, rightBr acket); 8212 IndexExpression.forCascade({Token period, Token leftBracket, Expression index, Token rightBracket}) : this.forCascade_full(period, leftBracket, index, rightBr acket);
8215 accept(ASTVisitor visitor) => visitor.visitIndexExpression(this); 8213 accept(ASTVisitor visitor) => visitor.visitIndexExpression(this);
8214
8215 /**
8216 * Get the auxiliary elements, this will be `null` if the node is not in a get ter and setter
8217 * context, or if it is not yet fully resolved.
8218 */
8219 AuxiliaryElements get auxiliaryElements => _auxiliaryElements;
8216 Token get beginToken { 8220 Token get beginToken {
8217 if (_target != null) { 8221 if (_target != null) {
8218 return _target.beginToken; 8222 return _target.beginToken;
8219 } 8223 }
8220 return _period; 8224 return _period;
8221 } 8225 }
8222 8226
8223 /** 8227 /**
8224 * Return the best element available for this operator. If resolution was able to find a better 8228 * Return the best element available for this operator. If resolution was able to find a better
8225 * element based on type propagation, that element will be returned. Otherwise , the element found 8229 * element based on type propagation, that element will be returned. Otherwise , the element found
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
8364 /** 8368 /**
8365 * Return `true` if this expression is cascaded. If it is, then the target of this 8369 * Return `true` if this expression is cascaded. If it is, then the target of this
8366 * expression is not stored locally but is stored in the nearest ancestor that is a 8370 * expression is not stored locally but is stored in the nearest ancestor that is a
8367 * [CascadeExpression]. 8371 * [CascadeExpression].
8368 * 8372 *
8369 * @return `true` if this expression is cascaded 8373 * @return `true` if this expression is cascaded
8370 */ 8374 */
8371 bool get isCascaded => _period != null; 8375 bool get isCascaded => _period != null;
8372 8376
8373 /** 8377 /**
8378 * Set the auxiliary elements.
8379 */
8380 void set auxiliaryElements(AuxiliaryElements auxiliaryElements2) {
8381 this._auxiliaryElements = auxiliaryElements2;
8382 }
8383
8384 /**
8374 * Set the expression used to compute the index to the given expression. 8385 * Set the expression used to compute the index to the given expression.
8375 * 8386 *
8376 * @param expression the expression used to compute the index 8387 * @param expression the expression used to compute the index
8377 */ 8388 */
8378 void set index(Expression expression) { 8389 void set index(Expression expression) {
8379 _index = becomeParentOf(expression); 8390 _index = becomeParentOf(expression);
8380 } 8391 }
8381 8392
8382 /** 8393 /**
8383 * Set the left square bracket to the given token. 8394 * Set the left square bracket to the given token.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
8427 } 8438 }
8428 8439
8429 /** 8440 /**
8430 * Set the expression used to compute the object being indexed to the given ex pression. 8441 * Set the expression used to compute the object being indexed to the given ex pression.
8431 * 8442 *
8432 * @param expression the expression used to compute the object being indexed 8443 * @param expression the expression used to compute the object being indexed
8433 */ 8444 */
8434 void set target(Expression expression) { 8445 void set target(Expression expression) {
8435 _target = becomeParentOf(expression); 8446 _target = becomeParentOf(expression);
8436 } 8447 }
8437 void visitChildren(ASTVisitor<Object> visitor) { 8448 void visitChildren(ASTVisitor visitor) {
8438 safelyVisitChild(_target, visitor); 8449 safelyVisitChild(_target, visitor);
8439 safelyVisitChild(_index, visitor); 8450 safelyVisitChild(_index, visitor);
8440 } 8451 }
8441 8452
8442 /** 8453 /**
8443 * If the AST structure has been resolved, and the function being invoked is k nown based on 8454 * If the AST structure has been resolved, and the function being invoked is k nown based on
8444 * propagated type information, then return the parameter element representing the parameter to 8455 * propagated type information, then return the parameter element representing the parameter to
8445 * which the value of the index expression will be bound. Otherwise, return `n ull`. 8456 * which the value of the index expression will be bound. Otherwise, return `n ull`.
8446 * 8457 *
8447 * This method is only intended to be used by [Expression#getPropagatedParamet erElement]. 8458 * This method is only intended to be used by [Expression#getPropagatedParamet erElement].
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
8632 8643
8633 /** 8644 /**
8634 * Set the element associated with the constructor based on static type inform ation to the given 8645 * Set the element associated with the constructor based on static type inform ation to the given
8635 * element. 8646 * element.
8636 * 8647 *
8637 * @param element the element to be associated with the constructor 8648 * @param element the element to be associated with the constructor
8638 */ 8649 */
8639 void set staticElement(ConstructorElement element) { 8650 void set staticElement(ConstructorElement element) {
8640 this._staticElement = element; 8651 this._staticElement = element;
8641 } 8652 }
8642 void visitChildren(ASTVisitor<Object> visitor) { 8653 void visitChildren(ASTVisitor visitor) {
8643 safelyVisitChild(_constructorName, visitor); 8654 safelyVisitChild(_constructorName, visitor);
8644 safelyVisitChild(_argumentList, visitor); 8655 safelyVisitChild(_argumentList, visitor);
8645 } 8656 }
8646 } 8657 }
8647 /** 8658 /**
8648 * Instances of the class `IntegerLiteral` represent an integer literal expressi on. 8659 * Instances of the class `IntegerLiteral` represent an integer literal expressi on.
8649 * 8660 *
8650 * <pre> 8661 * <pre>
8651 * integerLiteral ::= 8662 * integerLiteral ::=
8652 * decimalIntegerLiteral 8663 * decimalIntegerLiteral
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
8720 } 8731 }
8721 8732
8722 /** 8733 /**
8723 * Set the value of the literal to the given value. 8734 * Set the value of the literal to the given value.
8724 * 8735 *
8725 * @param value the value of the literal 8736 * @param value the value of the literal
8726 */ 8737 */
8727 void set value(int value2) { 8738 void set value(int value2) {
8728 this._value = value2; 8739 this._value = value2;
8729 } 8740 }
8730 void visitChildren(ASTVisitor<Object> visitor) { 8741 void visitChildren(ASTVisitor visitor) {
8731 } 8742 }
8732 } 8743 }
8733 /** 8744 /**
8734 * The abstract class `InterpolationElement` defines the behavior common to elem ents within a 8745 * The abstract class `InterpolationElement` defines the behavior common to elem ents within a
8735 * [StringInterpolation]. 8746 * [StringInterpolation].
8736 * 8747 *
8737 * <pre> 8748 * <pre>
8738 * interpolationElement ::= 8749 * interpolationElement ::=
8739 * [InterpolationExpression] 8750 * [InterpolationExpression]
8740 * | [InterpolationString] 8751 * | [InterpolationString]
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
8845 } 8856 }
8846 8857
8847 /** 8858 /**
8848 * Set the right curly bracket to the given token. 8859 * Set the right curly bracket to the given token.
8849 * 8860 *
8850 * @param rightBracket the right curly bracket 8861 * @param rightBracket the right curly bracket
8851 */ 8862 */
8852 void set rightBracket(Token rightBracket2) { 8863 void set rightBracket(Token rightBracket2) {
8853 this._rightBracket = rightBracket2; 8864 this._rightBracket = rightBracket2;
8854 } 8865 }
8855 void visitChildren(ASTVisitor<Object> visitor) { 8866 void visitChildren(ASTVisitor visitor) {
8856 safelyVisitChild(_expression, visitor); 8867 safelyVisitChild(_expression, visitor);
8857 } 8868 }
8858 } 8869 }
8859 /** 8870 /**
8860 * Instances of the class `InterpolationString` represent a non-empty substring of an 8871 * Instances of the class `InterpolationString` represent a non-empty substring of an
8861 * interpolated string. 8872 * interpolated string.
8862 * 8873 *
8863 * <pre> 8874 * <pre>
8864 * interpolationString ::= 8875 * interpolationString ::=
8865 * characters 8876 * characters
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
8925 } 8936 }
8926 8937
8927 /** 8938 /**
8928 * Set the value of the literal to the given string. 8939 * Set the value of the literal to the given string.
8929 * 8940 *
8930 * @param string the value of the literal 8941 * @param string the value of the literal
8931 */ 8942 */
8932 void set value(String string) { 8943 void set value(String string) {
8933 _value = string; 8944 _value = string;
8934 } 8945 }
8935 void visitChildren(ASTVisitor<Object> visitor) { 8946 void visitChildren(ASTVisitor visitor) {
8936 } 8947 }
8937 } 8948 }
8938 /** 8949 /**
8939 * Instances of the class `IsExpression` represent an is expression. 8950 * Instances of the class `IsExpression` represent an is expression.
8940 * 8951 *
8941 * <pre> 8952 * <pre>
8942 * isExpression ::= 8953 * isExpression ::=
8943 * [Expression] 'is' '!'? [TypeName] 8954 * [Expression] 'is' '!'? [TypeName]
8944 * </pre> 8955 * </pre>
8945 * 8956 *
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
9052 } 9063 }
9053 9064
9054 /** 9065 /**
9055 * Set the name of the type being tested for to the given name. 9066 * Set the name of the type being tested for to the given name.
9056 * 9067 *
9057 * @param name the name of the type being tested for 9068 * @param name the name of the type being tested for
9058 */ 9069 */
9059 void set type(TypeName name) { 9070 void set type(TypeName name) {
9060 this._type = becomeParentOf(name); 9071 this._type = becomeParentOf(name);
9061 } 9072 }
9062 void visitChildren(ASTVisitor<Object> visitor) { 9073 void visitChildren(ASTVisitor visitor) {
9063 safelyVisitChild(_expression, visitor); 9074 safelyVisitChild(_expression, visitor);
9064 safelyVisitChild(_type, visitor); 9075 safelyVisitChild(_type, visitor);
9065 } 9076 }
9066 } 9077 }
9067 /** 9078 /**
9068 * Instances of the class `Label` represent a label. 9079 * Instances of the class `Label` represent a label.
9069 * 9080 *
9070 * <pre> 9081 * <pre>
9071 * label ::= 9082 * label ::=
9072 * [SimpleIdentifier] ':' 9083 * [SimpleIdentifier] ':'
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
9132 } 9143 }
9133 9144
9134 /** 9145 /**
9135 * Set the label being associated with the statement to the given label. 9146 * Set the label being associated with the statement to the given label.
9136 * 9147 *
9137 * @param label the label being associated with the statement 9148 * @param label the label being associated with the statement
9138 */ 9149 */
9139 void set label(SimpleIdentifier label2) { 9150 void set label(SimpleIdentifier label2) {
9140 this._label = becomeParentOf(label2); 9151 this._label = becomeParentOf(label2);
9141 } 9152 }
9142 void visitChildren(ASTVisitor<Object> visitor) { 9153 void visitChildren(ASTVisitor visitor) {
9143 safelyVisitChild(_label, visitor); 9154 safelyVisitChild(_label, visitor);
9144 } 9155 }
9145 } 9156 }
9146 /** 9157 /**
9147 * Instances of the class `LabeledStatement` represent a statement that has a la bel associated 9158 * Instances of the class `LabeledStatement` represent a statement that has a la bel associated
9148 * with them. 9159 * with them.
9149 * 9160 *
9150 * <pre> 9161 * <pre>
9151 * labeledStatement ::= 9162 * labeledStatement ::=
9152 * [Label]+ [Statement] 9163 * [Label]+ [Statement]
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
9209 Statement get statement => _statement; 9220 Statement get statement => _statement;
9210 9221
9211 /** 9222 /**
9212 * Set the statement with which the labels are being associated to the given s tatement. 9223 * Set the statement with which the labels are being associated to the given s tatement.
9213 * 9224 *
9214 * @param statement the statement with which the labels are being associated 9225 * @param statement the statement with which the labels are being associated
9215 */ 9226 */
9216 void set statement(Statement statement2) { 9227 void set statement(Statement statement2) {
9217 this._statement = becomeParentOf(statement2); 9228 this._statement = becomeParentOf(statement2);
9218 } 9229 }
9219 void visitChildren(ASTVisitor<Object> visitor) { 9230 void visitChildren(ASTVisitor visitor) {
9220 _labels.accept(visitor); 9231 _labels.accept(visitor);
9221 safelyVisitChild(_statement, visitor); 9232 safelyVisitChild(_statement, visitor);
9222 } 9233 }
9223 } 9234 }
9224 /** 9235 /**
9225 * Instances of the class `LibraryDirective` represent a library directive. 9236 * Instances of the class `LibraryDirective` represent a library directive.
9226 * 9237 *
9227 * <pre> 9238 * <pre>
9228 * libraryDirective ::= 9239 * libraryDirective ::=
9229 * [Annotation] 'library' [Identifier] ';' 9240 * [Annotation] 'library' [Identifier] ';'
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
9317 } 9328 }
9318 9329
9319 /** 9330 /**
9320 * Set the semicolon terminating the directive to the given token. 9331 * Set the semicolon terminating the directive to the given token.
9321 * 9332 *
9322 * @param semicolon the semicolon terminating the directive 9333 * @param semicolon the semicolon terminating the directive
9323 */ 9334 */
9324 void set semicolon(Token semicolon2) { 9335 void set semicolon(Token semicolon2) {
9325 this._semicolon = semicolon2; 9336 this._semicolon = semicolon2;
9326 } 9337 }
9327 void visitChildren(ASTVisitor<Object> visitor) { 9338 void visitChildren(ASTVisitor visitor) {
9328 super.visitChildren(visitor); 9339 super.visitChildren(visitor);
9329 safelyVisitChild(_name, visitor); 9340 safelyVisitChild(_name, visitor);
9330 } 9341 }
9331 Token get firstTokenAfterCommentAndMetadata => _libraryToken; 9342 Token get firstTokenAfterCommentAndMetadata => _libraryToken;
9332 } 9343 }
9333 /** 9344 /**
9334 * Instances of the class `LibraryIdentifier` represent the identifier for a lib rary. 9345 * Instances of the class `LibraryIdentifier` represent the identifier for a lib rary.
9335 * 9346 *
9336 * <pre> 9347 * <pre>
9337 * libraryIdentifier ::= 9348 * libraryIdentifier ::=
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
9382 builder.append("."); 9393 builder.append(".");
9383 } else { 9394 } else {
9384 needsPeriod = true; 9395 needsPeriod = true;
9385 } 9396 }
9386 builder.append(identifier.name); 9397 builder.append(identifier.name);
9387 } 9398 }
9388 return builder.toString(); 9399 return builder.toString();
9389 } 9400 }
9390 Element get propagatedElement => null; 9401 Element get propagatedElement => null;
9391 Element get staticElement => null; 9402 Element get staticElement => null;
9392 void visitChildren(ASTVisitor<Object> visitor) { 9403 void visitChildren(ASTVisitor visitor) {
9393 _components.accept(visitor); 9404 _components.accept(visitor);
9394 } 9405 }
9395 } 9406 }
9396 /** 9407 /**
9397 * Instances of the class `ListLiteral` represent a list literal. 9408 * Instances of the class `ListLiteral` represent a list literal.
9398 * 9409 *
9399 * <pre> 9410 * <pre>
9400 * listLiteral ::= 9411 * listLiteral ::=
9401 * 'const'? ('<' [TypeName] '>')? '[' ([Expression] ','?)? ']' 9412 * 'const'? ('<' [TypeName] '>')? '[' ([Expression] ','?)? ']'
9402 * </pre> 9413 * </pre>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
9493 } 9504 }
9494 9505
9495 /** 9506 /**
9496 * Set the right square bracket to the given token. 9507 * Set the right square bracket to the given token.
9497 * 9508 *
9498 * @param bracket the right square bracket 9509 * @param bracket the right square bracket
9499 */ 9510 */
9500 void set rightBracket(Token bracket) { 9511 void set rightBracket(Token bracket) {
9501 _rightBracket = bracket; 9512 _rightBracket = bracket;
9502 } 9513 }
9503 void visitChildren(ASTVisitor<Object> visitor) { 9514 void visitChildren(ASTVisitor visitor) {
9504 super.visitChildren(visitor); 9515 super.visitChildren(visitor);
9505 _elements.accept(visitor); 9516 _elements.accept(visitor);
9506 } 9517 }
9507 } 9518 }
9508 /** 9519 /**
9509 * The abstract class `Literal` defines the behavior common to nodes that repres ent a literal 9520 * The abstract class `Literal` defines the behavior common to nodes that repres ent a literal
9510 * expression. 9521 * expression.
9511 * 9522 *
9512 * <pre> 9523 * <pre>
9513 * literal ::= 9524 * literal ::=
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
9624 } 9635 }
9625 9636
9626 /** 9637 /**
9627 * Set the right curly bracket to the given token. 9638 * Set the right curly bracket to the given token.
9628 * 9639 *
9629 * @param bracket the right curly bracket 9640 * @param bracket the right curly bracket
9630 */ 9641 */
9631 void set rightBracket(Token bracket) { 9642 void set rightBracket(Token bracket) {
9632 _rightBracket = bracket; 9643 _rightBracket = bracket;
9633 } 9644 }
9634 void visitChildren(ASTVisitor<Object> visitor) { 9645 void visitChildren(ASTVisitor visitor) {
9635 super.visitChildren(visitor); 9646 super.visitChildren(visitor);
9636 _entries.accept(visitor); 9647 _entries.accept(visitor);
9637 } 9648 }
9638 } 9649 }
9639 /** 9650 /**
9640 * Instances of the class `MapLiteralEntry` represent a single key/value pair in a map 9651 * Instances of the class `MapLiteralEntry` represent a single key/value pair in a map
9641 * literal. 9652 * literal.
9642 * 9653 *
9643 * <pre> 9654 * <pre>
9644 * mapLiteralEntry ::= 9655 * mapLiteralEntry ::=
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
9731 9742
9732 /** 9743 /**
9733 * Set the expression computing the value that will be associated with the key to the given 9744 * Set the expression computing the value that will be associated with the key to the given
9734 * expression. 9745 * expression.
9735 * 9746 *
9736 * @param expression the expression computing the value that will be associate d with the key 9747 * @param expression the expression computing the value that will be associate d with the key
9737 */ 9748 */
9738 void set value(Expression expression) { 9749 void set value(Expression expression) {
9739 _value = becomeParentOf(expression); 9750 _value = becomeParentOf(expression);
9740 } 9751 }
9741 void visitChildren(ASTVisitor<Object> visitor) { 9752 void visitChildren(ASTVisitor visitor) {
9742 safelyVisitChild(_key, visitor); 9753 safelyVisitChild(_key, visitor);
9743 safelyVisitChild(_value, visitor); 9754 safelyVisitChild(_value, visitor);
9744 } 9755 }
9745 } 9756 }
9746 /** 9757 /**
9747 * Instances of the class `MethodDeclaration` represent a method declaration. 9758 * Instances of the class `MethodDeclaration` represent a method declaration.
9748 * 9759 *
9749 * <pre> 9760 * <pre>
9750 * methodDeclaration ::= 9761 * methodDeclaration ::=
9751 * methodSignature [FunctionBody] 9762 * methodSignature [FunctionBody]
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
10021 } 10032 }
10022 10033
10023 /** 10034 /**
10024 * Set the return type of the method to the given type name. 10035 * Set the return type of the method to the given type name.
10025 * 10036 *
10026 * @param typeName the return type of the method 10037 * @param typeName the return type of the method
10027 */ 10038 */
10028 void set returnType(TypeName typeName) { 10039 void set returnType(TypeName typeName) {
10029 _returnType = becomeParentOf(typeName); 10040 _returnType = becomeParentOf(typeName);
10030 } 10041 }
10031 void visitChildren(ASTVisitor<Object> visitor) { 10042 void visitChildren(ASTVisitor visitor) {
10032 super.visitChildren(visitor); 10043 super.visitChildren(visitor);
10033 safelyVisitChild(_returnType, visitor); 10044 safelyVisitChild(_returnType, visitor);
10034 safelyVisitChild(_name, visitor); 10045 safelyVisitChild(_name, visitor);
10035 safelyVisitChild(_parameters, visitor); 10046 safelyVisitChild(_parameters, visitor);
10036 safelyVisitChild(_body, visitor); 10047 safelyVisitChild(_body, visitor);
10037 } 10048 }
10038 Token get firstTokenAfterCommentAndMetadata { 10049 Token get firstTokenAfterCommentAndMetadata {
10039 if (_modifierKeyword != null) { 10050 if (_modifierKeyword != null) {
10040 return _modifierKeyword; 10051 return _modifierKeyword;
10041 } else if (_returnType != null) { 10052 } else if (_returnType != null) {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
10213 } 10224 }
10214 10225
10215 /** 10226 /**
10216 * Set the expression producing the object on which the method is defined to t he given expression. 10227 * Set the expression producing the object on which the method is defined to t he given expression.
10217 * 10228 *
10218 * @param expression the expression producing the object on which the method i s defined 10229 * @param expression the expression producing the object on which the method i s defined
10219 */ 10230 */
10220 void set target(Expression expression) { 10231 void set target(Expression expression) {
10221 _target = becomeParentOf(expression); 10232 _target = becomeParentOf(expression);
10222 } 10233 }
10223 void visitChildren(ASTVisitor<Object> visitor) { 10234 void visitChildren(ASTVisitor visitor) {
10224 safelyVisitChild(_target, visitor); 10235 safelyVisitChild(_target, visitor);
10225 safelyVisitChild(_methodName, visitor); 10236 safelyVisitChild(_methodName, visitor);
10226 safelyVisitChild(_argumentList, visitor); 10237 safelyVisitChild(_argumentList, visitor);
10227 } 10238 }
10228 } 10239 }
10229 /** 10240 /**
10230 * Instances of the class `NamedExpression` represent an expression that has a n ame associated 10241 * Instances of the class `NamedExpression` represent an expression that has a n ame associated
10231 * with it. They are used in method invocations when there are named parameters. 10242 * with it. They are used in method invocations when there are named parameters.
10232 * 10243 *
10233 * <pre> 10244 * <pre>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
10310 } 10321 }
10311 10322
10312 /** 10323 /**
10313 * Set the name associated with the expression to the given identifier. 10324 * Set the name associated with the expression to the given identifier.
10314 * 10325 *
10315 * @param identifier the name associated with the expression 10326 * @param identifier the name associated with the expression
10316 */ 10327 */
10317 void set name(Label identifier) { 10328 void set name(Label identifier) {
10318 _name = becomeParentOf(identifier); 10329 _name = becomeParentOf(identifier);
10319 } 10330 }
10320 void visitChildren(ASTVisitor<Object> visitor) { 10331 void visitChildren(ASTVisitor visitor) {
10321 safelyVisitChild(_name, visitor); 10332 safelyVisitChild(_name, visitor);
10322 safelyVisitChild(_expression, visitor); 10333 safelyVisitChild(_expression, visitor);
10323 } 10334 }
10324 } 10335 }
10325 /** 10336 /**
10326 * The abstract class `NamespaceDirective` defines the behavior common to nodes that represent 10337 * The abstract class `NamespaceDirective` defines the behavior common to nodes that represent
10327 * a directive that impacts the namespace of a library. 10338 * a directive that impacts the namespace of a library.
10328 * 10339 *
10329 * <pre> 10340 * <pre>
10330 * directive ::= 10341 * directive ::=
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
10485 } 10496 }
10486 10497
10487 /** 10498 /**
10488 * Sets the name of the native object that implements the class. 10499 * Sets the name of the native object that implements the class.
10489 * 10500 *
10490 * @param name the name of the native object that implements the class. 10501 * @param name the name of the native object that implements the class.
10491 */ 10502 */
10492 void set name(StringLiteral name2) { 10503 void set name(StringLiteral name2) {
10493 this._name = name2; 10504 this._name = name2;
10494 } 10505 }
10495 void visitChildren(ASTVisitor<Object> visitor) { 10506 void visitChildren(ASTVisitor visitor) {
10496 safelyVisitChild(_name, visitor); 10507 safelyVisitChild(_name, visitor);
10497 } 10508 }
10498 } 10509 }
10499 /** 10510 /**
10500 * Instances of the class `NativeFunctionBody` represent a function body that co nsists of a 10511 * Instances of the class `NativeFunctionBody` represent a function body that co nsists of a
10501 * native keyword followed by a string literal. 10512 * native keyword followed by a string literal.
10502 * 10513 *
10503 * <pre> 10514 * <pre>
10504 * nativeFunctionBody ::= 10515 * nativeFunctionBody ::=
10505 * 'native' [SimpleStringLiteral] ';' 10516 * 'native' [SimpleStringLiteral] ';'
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
10564 * @return the token representing the semicolon that marks the end of the func tion body 10575 * @return the token representing the semicolon that marks the end of the func tion body
10565 */ 10576 */
10566 Token get semicolon => _semicolon; 10577 Token get semicolon => _semicolon;
10567 10578
10568 /** 10579 /**
10569 * Return the string literal representing the string after the 'native' token. 10580 * Return the string literal representing the string after the 'native' token.
10570 * 10581 *
10571 * @return the string literal representing the string after the 'native' token 10582 * @return the string literal representing the string after the 'native' token
10572 */ 10583 */
10573 StringLiteral get stringLiteral => _stringLiteral; 10584 StringLiteral get stringLiteral => _stringLiteral;
10574 void visitChildren(ASTVisitor<Object> visitor) { 10585 void visitChildren(ASTVisitor visitor) {
10575 safelyVisitChild(_stringLiteral, visitor); 10586 safelyVisitChild(_stringLiteral, visitor);
10576 } 10587 }
10577 } 10588 }
10578 /** 10589 /**
10579 * The abstract class `NormalFormalParameter` defines the behavior common to for mal parameters 10590 * The abstract class `NormalFormalParameter` defines the behavior common to for mal parameters
10580 * that are required (are not optional). 10591 * that are required (are not optional).
10581 * 10592 *
10582 * <pre> 10593 * <pre>
10583 * normalFormalParameter ::= 10594 * normalFormalParameter ::=
10584 * [FunctionTypedFormalParameter] 10595 * [FunctionTypedFormalParameter]
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
10662 } 10673 }
10663 10674
10664 /** 10675 /**
10665 * Set the name of the parameter being declared to the given identifier. 10676 * Set the name of the parameter being declared to the given identifier.
10666 * 10677 *
10667 * @param identifier the name of the parameter being declared 10678 * @param identifier the name of the parameter being declared
10668 */ 10679 */
10669 void set identifier(SimpleIdentifier identifier2) { 10680 void set identifier(SimpleIdentifier identifier2) {
10670 this._identifier = becomeParentOf(identifier2); 10681 this._identifier = becomeParentOf(identifier2);
10671 } 10682 }
10672 void visitChildren(ASTVisitor<Object> visitor) { 10683 void visitChildren(ASTVisitor visitor) {
10673 if (commentIsBeforeAnnotations()) { 10684 if (commentIsBeforeAnnotations()) {
10674 safelyVisitChild(_comment, visitor); 10685 safelyVisitChild(_comment, visitor);
10675 _metadata.accept(visitor); 10686 _metadata.accept(visitor);
10676 } else { 10687 } else {
10677 for (ASTNode child in sortedCommentAndAnnotations) { 10688 for (ASTNode child in sortedCommentAndAnnotations) {
10678 child.accept(visitor); 10689 child.accept(visitor);
10679 } 10690 }
10680 } 10691 }
10681 } 10692 }
10682 10693
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
10753 Token get literal => _literal; 10764 Token get literal => _literal;
10754 10765
10755 /** 10766 /**
10756 * Set the token representing the literal to the given token. 10767 * Set the token representing the literal to the given token.
10757 * 10768 *
10758 * @param literal the token representing the literal 10769 * @param literal the token representing the literal
10759 */ 10770 */
10760 void set literal(Token literal2) { 10771 void set literal(Token literal2) {
10761 this._literal = literal2; 10772 this._literal = literal2;
10762 } 10773 }
10763 void visitChildren(ASTVisitor<Object> visitor) { 10774 void visitChildren(ASTVisitor visitor) {
10764 } 10775 }
10765 } 10776 }
10766 /** 10777 /**
10767 * Instances of the class `ParenthesizedExpression` represent a parenthesized ex pression. 10778 * Instances of the class `ParenthesizedExpression` represent a parenthesized ex pression.
10768 * 10779 *
10769 * <pre> 10780 * <pre>
10770 * parenthesizedExpression ::= 10781 * parenthesizedExpression ::=
10771 * '(' [Expression] ')' 10782 * '(' [Expression] ')'
10772 * </pre> 10783 * </pre>
10773 * 10784 *
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
10855 } 10866 }
10856 10867
10857 /** 10868 /**
10858 * Set the right parenthesis to the given token. 10869 * Set the right parenthesis to the given token.
10859 * 10870 *
10860 * @param parenthesis the right parenthesis 10871 * @param parenthesis the right parenthesis
10861 */ 10872 */
10862 void set rightParenthesis(Token parenthesis) { 10873 void set rightParenthesis(Token parenthesis) {
10863 _rightParenthesis = parenthesis; 10874 _rightParenthesis = parenthesis;
10864 } 10875 }
10865 void visitChildren(ASTVisitor<Object> visitor) { 10876 void visitChildren(ASTVisitor visitor) {
10866 safelyVisitChild(_expression, visitor); 10877 safelyVisitChild(_expression, visitor);
10867 } 10878 }
10868 } 10879 }
10869 /** 10880 /**
10870 * Instances of the class `PartDirective` represent a part directive. 10881 * Instances of the class `PartDirective` represent a part directive.
10871 * 10882 *
10872 * <pre> 10883 * <pre>
10873 * partDirective ::= 10884 * partDirective ::=
10874 * [Annotation] 'part' [StringLiteral] ';' 10885 * [Annotation] 'part' [StringLiteral] ';'
10875 * </pre> 10886 * </pre>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
11070 } 11081 }
11071 11082
11072 /** 11083 /**
11073 * Set the semicolon terminating the directive to the given token. 11084 * Set the semicolon terminating the directive to the given token.
11074 * 11085 *
11075 * @param semicolon the semicolon terminating the directive 11086 * @param semicolon the semicolon terminating the directive
11076 */ 11087 */
11077 void set semicolon(Token semicolon2) { 11088 void set semicolon(Token semicolon2) {
11078 this._semicolon = semicolon2; 11089 this._semicolon = semicolon2;
11079 } 11090 }
11080 void visitChildren(ASTVisitor<Object> visitor) { 11091 void visitChildren(ASTVisitor visitor) {
11081 super.visitChildren(visitor); 11092 super.visitChildren(visitor);
11082 safelyVisitChild(_libraryName, visitor); 11093 safelyVisitChild(_libraryName, visitor);
11083 } 11094 }
11084 Token get firstTokenAfterCommentAndMetadata => _partToken; 11095 Token get firstTokenAfterCommentAndMetadata => _partToken;
11085 } 11096 }
11086 /** 11097 /**
11087 * Instances of the class `PostfixExpression` represent a postfix unary expressi on. 11098 * Instances of the class `PostfixExpression` represent a postfix unary expressi on.
11088 * 11099 *
11089 * <pre> 11100 * <pre>
11090 * postfixExpression ::= 11101 * postfixExpression ::=
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
11221 11232
11222 /** 11233 /**
11223 * Set the element associated with the operator based on the static type of th e operand to the 11234 * Set the element associated with the operator based on the static type of th e operand to the
11224 * given element. 11235 * given element.
11225 * 11236 *
11226 * @param element the element to be associated with the operator 11237 * @param element the element to be associated with the operator
11227 */ 11238 */
11228 void set staticElement(MethodElement element) { 11239 void set staticElement(MethodElement element) {
11229 _staticElement = element; 11240 _staticElement = element;
11230 } 11241 }
11231 void visitChildren(ASTVisitor<Object> visitor) { 11242 void visitChildren(ASTVisitor visitor) {
11232 safelyVisitChild(_operand, visitor); 11243 safelyVisitChild(_operand, visitor);
11233 } 11244 }
11234 11245
11235 /** 11246 /**
11236 * If the AST structure has been resolved, and the function being invoked is k nown based on 11247 * If the AST structure has been resolved, and the function being invoked is k nown based on
11237 * propagated type information, then return the parameter element representing the parameter to 11248 * propagated type information, then return the parameter element representing the parameter to
11238 * which the value of the operand will be bound. Otherwise, return `null`. 11249 * which the value of the operand will be bound. Otherwise, return `null`.
11239 * 11250 *
11240 * This method is only intended to be used by [Expression#getPropagatedParamet erElement]. 11251 * This method is only intended to be used by [Expression#getPropagatedParamet erElement].
11241 * 11252 *
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
11412 11423
11413 /** 11424 /**
11414 * Set the element associated with the operator based on the static type of th e operand to the 11425 * Set the element associated with the operator based on the static type of th e operand to the
11415 * given element. 11426 * given element.
11416 * 11427 *
11417 * @param element the static element to be associated with the operator 11428 * @param element the static element to be associated with the operator
11418 */ 11429 */
11419 void set staticElement(MethodElement element) { 11430 void set staticElement(MethodElement element) {
11420 _staticElement = element; 11431 _staticElement = element;
11421 } 11432 }
11422 void visitChildren(ASTVisitor<Object> visitor) { 11433 void visitChildren(ASTVisitor visitor) {
11423 safelyVisitChild(_operand, visitor); 11434 safelyVisitChild(_operand, visitor);
11424 } 11435 }
11425 11436
11426 /** 11437 /**
11427 * If the AST structure has been resolved, and the function being invoked is k nown based on 11438 * If the AST structure has been resolved, and the function being invoked is k nown based on
11428 * propagated type information, then return the parameter element representing the parameter to 11439 * propagated type information, then return the parameter element representing the parameter to
11429 * which the value of the operand will be bound. Otherwise, return `null`. 11440 * which the value of the operand will be bound. Otherwise, return `null`.
11430 * 11441 *
11431 * This method is only intended to be used by [Expression#getPropagatedParamet erElement]. 11442 * This method is only intended to be used by [Expression#getPropagatedParamet erElement].
11432 * 11443 *
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
11579 11590
11580 /** 11591 /**
11581 * Set the prefix associated with the library in which the identifier is defin ed to the given 11592 * Set the prefix associated with the library in which the identifier is defin ed to the given
11582 * identifier. 11593 * identifier.
11583 * 11594 *
11584 * @param identifier the prefix associated with the library in which the ident ifier is defined 11595 * @param identifier the prefix associated with the library in which the ident ifier is defined
11585 */ 11596 */
11586 void set prefix(SimpleIdentifier identifier) { 11597 void set prefix(SimpleIdentifier identifier) {
11587 _prefix = becomeParentOf(identifier); 11598 _prefix = becomeParentOf(identifier);
11588 } 11599 }
11589 void visitChildren(ASTVisitor<Object> visitor) { 11600 void visitChildren(ASTVisitor visitor) {
11590 safelyVisitChild(_prefix, visitor); 11601 safelyVisitChild(_prefix, visitor);
11591 safelyVisitChild(_identifier, visitor); 11602 safelyVisitChild(_identifier, visitor);
11592 } 11603 }
11593 } 11604 }
11594 /** 11605 /**
11595 * Instances of the class `PropertyAccess` represent the access of a property of an object. 11606 * Instances of the class `PropertyAccess` represent the access of a property of an object.
11596 * 11607 *
11597 * Note, however, that accesses to properties of objects can also be represented as 11608 * Note, however, that accesses to properties of objects can also be represented as
11598 * [PrefixedIdentifier] nodes in cases where the target is also a simple 11609 * [PrefixedIdentifier] nodes in cases where the target is also a simple
11599 * identifier. 11610 * identifier.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
11728 11739
11729 /** 11740 /**
11730 * Set the expression computing the object defining the property being accesse d to the given 11741 * Set the expression computing the object defining the property being accesse d to the given
11731 * expression. 11742 * expression.
11732 * 11743 *
11733 * @param expression the expression computing the object defining the property being accessed 11744 * @param expression the expression computing the object defining the property being accessed
11734 */ 11745 */
11735 void set target(Expression expression) { 11746 void set target(Expression expression) {
11736 _target = becomeParentOf(expression); 11747 _target = becomeParentOf(expression);
11737 } 11748 }
11738 void visitChildren(ASTVisitor<Object> visitor) { 11749 void visitChildren(ASTVisitor visitor) {
11739 safelyVisitChild(_target, visitor); 11750 safelyVisitChild(_target, visitor);
11740 safelyVisitChild(_propertyName, visitor); 11751 safelyVisitChild(_propertyName, visitor);
11741 } 11752 }
11742 } 11753 }
11743 /** 11754 /**
11744 * Instances of the class `RedirectingConstructorInvocation` represent the invoc ation of a 11755 * Instances of the class `RedirectingConstructorInvocation` represent the invoc ation of a
11745 * another constructor in the same class from within a constructor's initializat ion list. 11756 * another constructor in the same class from within a constructor's initializat ion list.
11746 * 11757 *
11747 * <pre> 11758 * <pre>
11748 * redirectingConstructorInvocation ::= 11759 * redirectingConstructorInvocation ::=
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
11915 11926
11916 /** 11927 /**
11917 * Set the element associated with the constructor based on static type inform ation to the given 11928 * Set the element associated with the constructor based on static type inform ation to the given
11918 * element. 11929 * element.
11919 * 11930 *
11920 * @param element the element to be associated with the constructor 11931 * @param element the element to be associated with the constructor
11921 */ 11932 */
11922 void set staticElement(ConstructorElement element) { 11933 void set staticElement(ConstructorElement element) {
11923 this._staticElement = element; 11934 this._staticElement = element;
11924 } 11935 }
11925 void visitChildren(ASTVisitor<Object> visitor) { 11936 void visitChildren(ASTVisitor visitor) {
11926 safelyVisitChild(_constructorName, visitor); 11937 safelyVisitChild(_constructorName, visitor);
11927 safelyVisitChild(_argumentList, visitor); 11938 safelyVisitChild(_argumentList, visitor);
11928 } 11939 }
11929 } 11940 }
11930 /** 11941 /**
11931 * Instances of the class `RethrowExpression` represent a rethrow expression. 11942 * Instances of the class `RethrowExpression` represent a rethrow expression.
11932 * 11943 *
11933 * <pre> 11944 * <pre>
11934 * rethrowExpression ::= 11945 * rethrowExpression ::=
11935 * 'rethrow' 11946 * 'rethrow'
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
11971 Token get keyword => _keyword; 11982 Token get keyword => _keyword;
11972 11983
11973 /** 11984 /**
11974 * Set the token representing the 'rethrow' keyword to the given token. 11985 * Set the token representing the 'rethrow' keyword to the given token.
11975 * 11986 *
11976 * @param keyword the token representing the 'rethrow' keyword 11987 * @param keyword the token representing the 'rethrow' keyword
11977 */ 11988 */
11978 void set keyword(Token keyword2) { 11989 void set keyword(Token keyword2) {
11979 this._keyword = keyword2; 11990 this._keyword = keyword2;
11980 } 11991 }
11981 void visitChildren(ASTVisitor<Object> visitor) { 11992 void visitChildren(ASTVisitor visitor) {
11982 } 11993 }
11983 } 11994 }
11984 /** 11995 /**
11985 * Instances of the class `ReturnStatement` represent a return statement. 11996 * Instances of the class `ReturnStatement` represent a return statement.
11986 * 11997 *
11987 * <pre> 11998 * <pre>
11988 * returnStatement ::= 11999 * returnStatement ::=
11989 * 'return' [Expression]? ';' 12000 * 'return' [Expression]? ';'
11990 * </pre> 12001 * </pre>
11991 * 12002 *
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
12075 } 12086 }
12076 12087
12077 /** 12088 /**
12078 * Set the semicolon terminating the statement to the given token. 12089 * Set the semicolon terminating the statement to the given token.
12079 * 12090 *
12080 * @param semicolon the semicolon terminating the statement 12091 * @param semicolon the semicolon terminating the statement
12081 */ 12092 */
12082 void set semicolon(Token semicolon2) { 12093 void set semicolon(Token semicolon2) {
12083 this._semicolon = semicolon2; 12094 this._semicolon = semicolon2;
12084 } 12095 }
12085 void visitChildren(ASTVisitor<Object> visitor) { 12096 void visitChildren(ASTVisitor visitor) {
12086 safelyVisitChild(_expression, visitor); 12097 safelyVisitChild(_expression, visitor);
12087 } 12098 }
12088 } 12099 }
12089 /** 12100 /**
12090 * Instances of the class `ScriptTag` represent the script tag that can optional ly occur at 12101 * Instances of the class `ScriptTag` represent the script tag that can optional ly occur at
12091 * the beginning of a compilation unit. 12102 * the beginning of a compilation unit.
12092 * 12103 *
12093 * <pre> 12104 * <pre>
12094 * scriptTag ::= 12105 * scriptTag ::=
12095 * '#!' (~NEWLINE)* NEWLINE 12106 * '#!' (~NEWLINE)* NEWLINE
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
12131 Token get scriptTag => _scriptTag; 12142 Token get scriptTag => _scriptTag;
12132 12143
12133 /** 12144 /**
12134 * Set the token representing this script tag to the given script tag. 12145 * Set the token representing this script tag to the given script tag.
12135 * 12146 *
12136 * @param scriptTag the token representing this script tag 12147 * @param scriptTag the token representing this script tag
12137 */ 12148 */
12138 void set scriptTag(Token scriptTag2) { 12149 void set scriptTag(Token scriptTag2) {
12139 this._scriptTag = scriptTag2; 12150 this._scriptTag = scriptTag2;
12140 } 12151 }
12141 void visitChildren(ASTVisitor<Object> visitor) { 12152 void visitChildren(ASTVisitor visitor) {
12142 } 12153 }
12143 } 12154 }
12144 /** 12155 /**
12145 * Instances of the class `ShowCombinator` represent a combinator that restricts the names 12156 * Instances of the class `ShowCombinator` represent a combinator that restricts the names
12146 * being imported to those in a given list. 12157 * being imported to those in a given list.
12147 * 12158 *
12148 * <pre> 12159 * <pre>
12149 * showCombinator ::= 12160 * showCombinator ::=
12150 * 'show' [SimpleIdentifier] (',' [SimpleIdentifier])* 12161 * 'show' [SimpleIdentifier] (',' [SimpleIdentifier])*
12151 * </pre> 12162 * </pre>
(...skipping 27 matching lines...) Expand all
12179 ShowCombinator({Token keyword, List<SimpleIdentifier> shownNames}) : this.full (keyword, shownNames); 12190 ShowCombinator({Token keyword, List<SimpleIdentifier> shownNames}) : this.full (keyword, shownNames);
12180 accept(ASTVisitor visitor) => visitor.visitShowCombinator(this); 12191 accept(ASTVisitor visitor) => visitor.visitShowCombinator(this);
12181 Token get endToken => _shownNames.endToken; 12192 Token get endToken => _shownNames.endToken;
12182 12193
12183 /** 12194 /**
12184 * Return the list of names from the library that are made visible by this com binator. 12195 * Return the list of names from the library that are made visible by this com binator.
12185 * 12196 *
12186 * @return the list of names from the library that are made visible by this co mbinator 12197 * @return the list of names from the library that are made visible by this co mbinator
12187 */ 12198 */
12188 NodeList<SimpleIdentifier> get shownNames => _shownNames; 12199 NodeList<SimpleIdentifier> get shownNames => _shownNames;
12189 void visitChildren(ASTVisitor<Object> visitor) { 12200 void visitChildren(ASTVisitor visitor) {
12190 _shownNames.accept(visitor); 12201 _shownNames.accept(visitor);
12191 } 12202 }
12192 } 12203 }
12193 /** 12204 /**
12194 * Instances of the class `SimpleFormalParameter` represent a simple formal para meter. 12205 * Instances of the class `SimpleFormalParameter` represent a simple formal para meter.
12195 * 12206 *
12196 * <pre> 12207 * <pre>
12197 * simpleFormalParameter ::= 12208 * simpleFormalParameter ::=
12198 * ('final' [TypeName] | 'var' | [TypeName])? [SimpleIdentifier] 12209 * ('final' [TypeName] | 'var' | [TypeName])? [SimpleIdentifier]
12199 * </pre> 12210 * </pre>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
12276 } 12287 }
12277 12288
12278 /** 12289 /**
12279 * Set the name of the declared type of the parameter to the given type name. 12290 * Set the name of the declared type of the parameter to the given type name.
12280 * 12291 *
12281 * @param typeName the name of the declared type of the parameter 12292 * @param typeName the name of the declared type of the parameter
12282 */ 12293 */
12283 void set type(TypeName typeName) { 12294 void set type(TypeName typeName) {
12284 _type = becomeParentOf(typeName); 12295 _type = becomeParentOf(typeName);
12285 } 12296 }
12286 void visitChildren(ASTVisitor<Object> visitor) { 12297 void visitChildren(ASTVisitor visitor) {
12287 super.visitChildren(visitor); 12298 super.visitChildren(visitor);
12288 safelyVisitChild(_type, visitor); 12299 safelyVisitChild(_type, visitor);
12289 safelyVisitChild(identifier, visitor); 12300 safelyVisitChild(identifier, visitor);
12290 } 12301 }
12291 } 12302 }
12292 /** 12303 /**
12293 * Instances of the class `SimpleIdentifier` represent a simple identifier. 12304 * Instances of the class `SimpleIdentifier` represent a simple identifier.
12294 * 12305 *
12295 * <pre> 12306 * <pre>
12296 * simpleIdentifier ::= 12307 * simpleIdentifier ::=
(...skipping 20 matching lines...) Expand all
12317 Element _staticElement; 12328 Element _staticElement;
12318 12329
12319 /** 12330 /**
12320 * The element associated with this identifier based on propagated type inform ation, or 12331 * The element associated with this identifier based on propagated type inform ation, or
12321 * `null` if the AST structure has not been resolved or if this identifier cou ld not be 12332 * `null` if the AST structure has not been resolved or if this identifier cou ld not be
12322 * resolved. 12333 * resolved.
12323 */ 12334 */
12324 Element _propagatedElement; 12335 Element _propagatedElement;
12325 12336
12326 /** 12337 /**
12338 * If this expression is both in a getter and setter context, the [AuxiliaryEl ements] will
12339 * be set to hold onto the static and propagated information. The auxiliary el ement will hold onto
12340 * the elements from the getter context.
12341 */
12342 AuxiliaryElements _auxiliaryElements = null;
12343
12344 /**
12327 * Initialize a newly created identifier. 12345 * Initialize a newly created identifier.
12328 * 12346 *
12329 * @param token the token representing the identifier 12347 * @param token the token representing the identifier
12330 */ 12348 */
12331 SimpleIdentifier.full(Token token) { 12349 SimpleIdentifier.full(Token token) {
12332 this._token = token; 12350 this._token = token;
12333 } 12351 }
12334 12352
12335 /** 12353 /**
12336 * Initialize a newly created identifier. 12354 * Initialize a newly created identifier.
12337 * 12355 *
12338 * @param token the token representing the identifier 12356 * @param token the token representing the identifier
12339 */ 12357 */
12340 SimpleIdentifier({Token token}) : this.full(token); 12358 SimpleIdentifier({Token token}) : this.full(token);
12341 accept(ASTVisitor visitor) => visitor.visitSimpleIdentifier(this); 12359 accept(ASTVisitor visitor) => visitor.visitSimpleIdentifier(this);
12360
12361 /**
12362 * Get the auxiliary elements, this will be `null` if the node is not in a get ter and setter
12363 * context, or if it is not yet fully resolved.
12364 */
12365 AuxiliaryElements get auxiliaryElements => _auxiliaryElements;
12342 Token get beginToken => _token; 12366 Token get beginToken => _token;
12343 Element get bestElement { 12367 Element get bestElement {
12344 if (_propagatedElement == null) { 12368 if (_propagatedElement == null) {
12345 return _staticElement; 12369 return _staticElement;
12346 } 12370 }
12347 return _propagatedElement; 12371 return _propagatedElement;
12348 } 12372 }
12349 Token get endToken => _token; 12373 Token get endToken => _token;
12350 String get name => _token.lexeme; 12374 String get name => _token.lexeme;
12351 Element get propagatedElement => _propagatedElement; 12375 Element get propagatedElement => _propagatedElement;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
12465 } else if (parent is PostfixExpression) { 12489 } else if (parent is PostfixExpression) {
12466 return true; 12490 return true;
12467 } else if (parent is AssignmentExpression) { 12491 } else if (parent is AssignmentExpression) {
12468 return identical(((parent as AssignmentExpression)).leftHandSide, target); 12492 return identical(((parent as AssignmentExpression)).leftHandSide, target);
12469 } 12493 }
12470 return false; 12494 return false;
12471 } 12495 }
12472 bool get isSynthetic => _token.isSynthetic; 12496 bool get isSynthetic => _token.isSynthetic;
12473 12497
12474 /** 12498 /**
12499 * Set the auxiliary elements.
12500 */
12501 void set auxiliaryElements(AuxiliaryElements auxiliaryElements2) {
12502 this._auxiliaryElements = auxiliaryElements2;
12503 }
12504
12505 /**
12475 * Set the element associated with this identifier based on propagated type in formation to the 12506 * Set the element associated with this identifier based on propagated type in formation to the
12476 * given element. 12507 * given element.
12477 * 12508 *
12478 * @param element the element to be associated with this identifier 12509 * @param element the element to be associated with this identifier
12479 */ 12510 */
12480 void set propagatedElement(Element element) { 12511 void set propagatedElement(Element element) {
12481 _propagatedElement = validateElement2(element); 12512 _propagatedElement = validateElement2(element);
12482 } 12513 }
12483 12514
12484 /** 12515 /**
12485 * Set the element associated with this identifier based on static type inform ation to the given 12516 * Set the element associated with this identifier based on static type inform ation to the given
12486 * element. 12517 * element.
12487 * 12518 *
12488 * @param element the element to be associated with this identifier 12519 * @param element the element to be associated with this identifier
12489 */ 12520 */
12490 void set staticElement(Element element) { 12521 void set staticElement(Element element) {
12491 _staticElement = validateElement2(element); 12522 _staticElement = validateElement2(element);
12492 } 12523 }
12493 12524
12494 /** 12525 /**
12495 * Set the token representing the identifier to the given token. 12526 * Set the token representing the identifier to the given token.
12496 * 12527 *
12497 * @param token the token representing the literal 12528 * @param token the token representing the literal
12498 */ 12529 */
12499 void set token(Token token2) { 12530 void set token(Token token2) {
12500 this._token = token2; 12531 this._token = token2;
12501 } 12532 }
12502 void visitChildren(ASTVisitor<Object> visitor) { 12533 void visitChildren(ASTVisitor visitor) {
12503 } 12534 }
12504 12535
12505 /** 12536 /**
12506 * Return the given element if it is an appropriate element based on the paren t of this 12537 * Return the given element if it is an appropriate element based on the paren t of this
12507 * identifier, or `null` if it is not appropriate. 12538 * identifier, or `null` if it is not appropriate.
12508 * 12539 *
12509 * @param element the element to be associated with this identifier 12540 * @param element the element to be associated with this identifier
12510 * @return the element to be associated with this identifier 12541 * @return the element to be associated with this identifier
12511 */ 12542 */
12512 Element validateElement(ASTNode parent, Type expectedClass, Element element) { 12543 Element validateElement(ASTNode parent, Type expectedClass, Element element) {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
12656 } 12687 }
12657 12688
12658 /** 12689 /**
12659 * Set the value of the literal to the given string. 12690 * Set the value of the literal to the given string.
12660 * 12691 *
12661 * @param string the value of the literal 12692 * @param string the value of the literal
12662 */ 12693 */
12663 void set value(String string) { 12694 void set value(String string) {
12664 _value = StringUtilities.intern(_value); 12695 _value = StringUtilities.intern(_value);
12665 } 12696 }
12666 void visitChildren(ASTVisitor<Object> visitor) { 12697 void visitChildren(ASTVisitor visitor) {
12667 } 12698 }
12668 void appendStringValue(JavaStringBuilder builder) { 12699 void appendStringValue(JavaStringBuilder builder) {
12669 builder.append(value); 12700 builder.append(value);
12670 } 12701 }
12671 } 12702 }
12672 /** 12703 /**
12673 * Instances of the class `Statement` defines the behavior common to nodes that represent a 12704 * Instances of the class `Statement` defines the behavior common to nodes that represent a
12674 * statement. 12705 * statement.
12675 * 12706 *
12676 * <pre> 12707 * <pre>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
12732 accept(ASTVisitor visitor) => visitor.visitStringInterpolation(this); 12763 accept(ASTVisitor visitor) => visitor.visitStringInterpolation(this);
12733 Token get beginToken => _elements.beginToken; 12764 Token get beginToken => _elements.beginToken;
12734 12765
12735 /** 12766 /**
12736 * Return the elements that will be composed to produce the resulting string. 12767 * Return the elements that will be composed to produce the resulting string.
12737 * 12768 *
12738 * @return the elements that will be composed to produce the resulting string 12769 * @return the elements that will be composed to produce the resulting string
12739 */ 12770 */
12740 NodeList<InterpolationElement> get elements => _elements; 12771 NodeList<InterpolationElement> get elements => _elements;
12741 Token get endToken => _elements.endToken; 12772 Token get endToken => _elements.endToken;
12742 void visitChildren(ASTVisitor<Object> visitor) { 12773 void visitChildren(ASTVisitor visitor) {
12743 _elements.accept(visitor); 12774 _elements.accept(visitor);
12744 } 12775 }
12745 void appendStringValue(JavaStringBuilder builder) { 12776 void appendStringValue(JavaStringBuilder builder) {
12746 throw new IllegalArgumentException(); 12777 throw new IllegalArgumentException();
12747 } 12778 }
12748 } 12779 }
12749 /** 12780 /**
12750 * Instances of the class `StringLiteral` represent a string literal expression. 12781 * Instances of the class `StringLiteral` represent a string literal expression.
12751 * 12782 *
12752 * <pre> 12783 * <pre>
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
12959 12990
12960 /** 12991 /**
12961 * Set the element associated with the constructor based on static type inform ation to the given 12992 * Set the element associated with the constructor based on static type inform ation to the given
12962 * element. 12993 * element.
12963 * 12994 *
12964 * @param element the element to be associated with the constructor 12995 * @param element the element to be associated with the constructor
12965 */ 12996 */
12966 void set staticElement(ConstructorElement element) { 12997 void set staticElement(ConstructorElement element) {
12967 this._staticElement = element; 12998 this._staticElement = element;
12968 } 12999 }
12969 void visitChildren(ASTVisitor<Object> visitor) { 13000 void visitChildren(ASTVisitor visitor) {
12970 safelyVisitChild(_constructorName, visitor); 13001 safelyVisitChild(_constructorName, visitor);
12971 safelyVisitChild(_argumentList, visitor); 13002 safelyVisitChild(_argumentList, visitor);
12972 } 13003 }
12973 } 13004 }
12974 /** 13005 /**
12975 * Instances of the class `SuperExpression` represent a super expression. 13006 * Instances of the class `SuperExpression` represent a super expression.
12976 * 13007 *
12977 * <pre> 13008 * <pre>
12978 * superExpression ::= 13009 * superExpression ::=
12979 * 'super' 13010 * 'super'
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
13015 Token get keyword => _keyword; 13046 Token get keyword => _keyword;
13016 13047
13017 /** 13048 /**
13018 * Set the token representing the keyword to the given token. 13049 * Set the token representing the keyword to the given token.
13019 * 13050 *
13020 * @param keyword the token representing the keyword 13051 * @param keyword the token representing the keyword
13021 */ 13052 */
13022 void set keyword(Token keyword2) { 13053 void set keyword(Token keyword2) {
13023 this._keyword = keyword2; 13054 this._keyword = keyword2;
13024 } 13055 }
13025 void visitChildren(ASTVisitor<Object> visitor) { 13056 void visitChildren(ASTVisitor visitor) {
13026 } 13057 }
13027 } 13058 }
13028 /** 13059 /**
13029 * Instances of the class `SwitchCase` represent the case in a switch statement. 13060 * Instances of the class `SwitchCase` represent the case in a switch statement.
13030 * 13061 *
13031 * <pre> 13062 * <pre>
13032 * switchCase ::= 13063 * switchCase ::=
13033 * [SimpleIdentifier]* 'case' [Expression] ':' [Statement]* 13064 * [SimpleIdentifier]* 'case' [Expression] ':' [Statement]*
13034 * </pre> 13065 * </pre>
13035 * 13066 *
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
13075 Expression get expression => _expression; 13106 Expression get expression => _expression;
13076 13107
13077 /** 13108 /**
13078 * Set the expression controlling whether the statements will be executed to t he given expression. 13109 * Set the expression controlling whether the statements will be executed to t he given expression.
13079 * 13110 *
13080 * @param expression the expression controlling whether the statements will be executed 13111 * @param expression the expression controlling whether the statements will be executed
13081 */ 13112 */
13082 void set expression(Expression expression2) { 13113 void set expression(Expression expression2) {
13083 this._expression = becomeParentOf(expression2); 13114 this._expression = becomeParentOf(expression2);
13084 } 13115 }
13085 void visitChildren(ASTVisitor<Object> visitor) { 13116 void visitChildren(ASTVisitor visitor) {
13086 labels.accept(visitor); 13117 labels.accept(visitor);
13087 safelyVisitChild(_expression, visitor); 13118 safelyVisitChild(_expression, visitor);
13088 statements.accept(visitor); 13119 statements.accept(visitor);
13089 } 13120 }
13090 } 13121 }
13091 /** 13122 /**
13092 * Instances of the class `SwitchDefault` represent the default case in a switch statement. 13123 * Instances of the class `SwitchDefault` represent the default case in a switch statement.
13093 * 13124 *
13094 * <pre> 13125 * <pre>
13095 * switchDefault ::= 13126 * switchDefault ::=
(...skipping 17 matching lines...) Expand all
13113 /** 13144 /**
13114 * Initialize a newly created switch default. 13145 * Initialize a newly created switch default.
13115 * 13146 *
13116 * @param labels the labels associated with the switch member 13147 * @param labels the labels associated with the switch member
13117 * @param keyword the token representing the 'case' or 'default' keyword 13148 * @param keyword the token representing the 'case' or 'default' keyword
13118 * @param colon the colon separating the keyword or the expression from the st atements 13149 * @param colon the colon separating the keyword or the expression from the st atements
13119 * @param statements the statements that will be executed if this switch membe r is selected 13150 * @param statements the statements that will be executed if this switch membe r is selected
13120 */ 13151 */
13121 SwitchDefault({List<Label> labels, Token keyword, Token colon, List<Statement> statements}) : this.full(labels, keyword, colon, statements); 13152 SwitchDefault({List<Label> labels, Token keyword, Token colon, List<Statement> statements}) : this.full(labels, keyword, colon, statements);
13122 accept(ASTVisitor visitor) => visitor.visitSwitchDefault(this); 13153 accept(ASTVisitor visitor) => visitor.visitSwitchDefault(this);
13123 void visitChildren(ASTVisitor<Object> visitor) { 13154 void visitChildren(ASTVisitor visitor) {
13124 labels.accept(visitor); 13155 labels.accept(visitor);
13125 statements.accept(visitor); 13156 statements.accept(visitor);
13126 } 13157 }
13127 } 13158 }
13128 /** 13159 /**
13129 * The abstract class `SwitchMember` defines the behavior common to objects repr esenting 13160 * The abstract class `SwitchMember` defines the behavior common to objects repr esenting
13130 * elements within a switch statement. 13161 * elements within a switch statement.
13131 * 13162 *
13132 * <pre> 13163 * <pre>
13133 * switchMember ::= 13164 * switchMember ::=
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
13425 } 13456 }
13426 13457
13427 /** 13458 /**
13428 * Set the right parenthesis to the given token. 13459 * Set the right parenthesis to the given token.
13429 * 13460 *
13430 * @param rightParenthesis the right parenthesis 13461 * @param rightParenthesis the right parenthesis
13431 */ 13462 */
13432 void set rightParenthesis(Token rightParenthesis2) { 13463 void set rightParenthesis(Token rightParenthesis2) {
13433 this._rightParenthesis = rightParenthesis2; 13464 this._rightParenthesis = rightParenthesis2;
13434 } 13465 }
13435 void visitChildren(ASTVisitor<Object> visitor) { 13466 void visitChildren(ASTVisitor visitor) {
13436 safelyVisitChild(_expression, visitor); 13467 safelyVisitChild(_expression, visitor);
13437 _members.accept(visitor); 13468 _members.accept(visitor);
13438 } 13469 }
13439 } 13470 }
13440 /** 13471 /**
13441 * Instances of the class `SymbolLiteral` represent a symbol literal expression. 13472 * Instances of the class `SymbolLiteral` represent a symbol literal expression.
13442 * 13473 *
13443 * <pre> 13474 * <pre>
13444 * symbolLiteral ::= 13475 * symbolLiteral ::=
13445 * '#' (operator | (identifier ('.' identifier)*)) 13476 * '#' (operator | (identifier ('.' identifier)*))
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
13496 Token get poundSign => _poundSign; 13527 Token get poundSign => _poundSign;
13497 13528
13498 /** 13529 /**
13499 * Set the token introducing the literal to the given token. 13530 * Set the token introducing the literal to the given token.
13500 * 13531 *
13501 * @param poundSign the token introducing the literal 13532 * @param poundSign the token introducing the literal
13502 */ 13533 */
13503 void set poundSign(Token poundSign2) { 13534 void set poundSign(Token poundSign2) {
13504 this._poundSign = poundSign2; 13535 this._poundSign = poundSign2;
13505 } 13536 }
13506 void visitChildren(ASTVisitor<Object> visitor) { 13537 void visitChildren(ASTVisitor visitor) {
13507 } 13538 }
13508 } 13539 }
13509 /** 13540 /**
13510 * Instances of the class `ThisExpression` represent a this expression. 13541 * Instances of the class `ThisExpression` represent a this expression.
13511 * 13542 *
13512 * <pre> 13543 * <pre>
13513 * thisExpression ::= 13544 * thisExpression ::=
13514 * 'this' 13545 * 'this'
13515 * </pre> 13546 * </pre>
13516 * 13547 *
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
13550 Token get keyword => _keyword; 13581 Token get keyword => _keyword;
13551 13582
13552 /** 13583 /**
13553 * Set the token representing the keyword to the given token. 13584 * Set the token representing the keyword to the given token.
13554 * 13585 *
13555 * @param keyword the token representing the keyword 13586 * @param keyword the token representing the keyword
13556 */ 13587 */
13557 void set keyword(Token keyword2) { 13588 void set keyword(Token keyword2) {
13558 this._keyword = keyword2; 13589 this._keyword = keyword2;
13559 } 13590 }
13560 void visitChildren(ASTVisitor<Object> visitor) { 13591 void visitChildren(ASTVisitor visitor) {
13561 } 13592 }
13562 } 13593 }
13563 /** 13594 /**
13564 * Instances of the class `ThrowExpression` represent a throw expression. 13595 * Instances of the class `ThrowExpression` represent a throw expression.
13565 * 13596 *
13566 * <pre> 13597 * <pre>
13567 * throwExpression ::= 13598 * throwExpression ::=
13568 * 'throw' [Expression] 13599 * 'throw' [Expression]
13569 * </pre> 13600 * </pre>
13570 * 13601 *
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
13633 } 13664 }
13634 13665
13635 /** 13666 /**
13636 * Set the token representing the 'throw' keyword to the given token. 13667 * Set the token representing the 'throw' keyword to the given token.
13637 * 13668 *
13638 * @param keyword the token representing the 'throw' keyword 13669 * @param keyword the token representing the 'throw' keyword
13639 */ 13670 */
13640 void set keyword(Token keyword2) { 13671 void set keyword(Token keyword2) {
13641 this._keyword = keyword2; 13672 this._keyword = keyword2;
13642 } 13673 }
13643 void visitChildren(ASTVisitor<Object> visitor) { 13674 void visitChildren(ASTVisitor visitor) {
13644 safelyVisitChild(_expression, visitor); 13675 safelyVisitChild(_expression, visitor);
13645 } 13676 }
13646 } 13677 }
13647 /** 13678 /**
13648 * Instances of the class `TopLevelVariableDeclaration` represent the declaratio n of one or 13679 * Instances of the class `TopLevelVariableDeclaration` represent the declaratio n of one or
13649 * more top-level variables of the same type. 13680 * more top-level variables of the same type.
13650 * 13681 *
13651 * <pre> 13682 * <pre>
13652 * topLevelVariableDeclaration ::= 13683 * topLevelVariableDeclaration ::=
13653 * ('final' | 'const') type? staticFinalDeclarationList ';' 13684 * ('final' | 'const') type? staticFinalDeclarationList ';'
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
13718 } 13749 }
13719 13750
13720 /** 13751 /**
13721 * Set the top-level variables being declared to the given list of variables. 13752 * Set the top-level variables being declared to the given list of variables.
13722 * 13753 *
13723 * @param variableList the top-level variables being declared 13754 * @param variableList the top-level variables being declared
13724 */ 13755 */
13725 void set variables(VariableDeclarationList variableList) { 13756 void set variables(VariableDeclarationList variableList) {
13726 variableList = becomeParentOf(variableList); 13757 variableList = becomeParentOf(variableList);
13727 } 13758 }
13728 void visitChildren(ASTVisitor<Object> visitor) { 13759 void visitChildren(ASTVisitor visitor) {
13729 super.visitChildren(visitor); 13760 super.visitChildren(visitor);
13730 safelyVisitChild(_variableList, visitor); 13761 safelyVisitChild(_variableList, visitor);
13731 } 13762 }
13732 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken; 13763 Token get firstTokenAfterCommentAndMetadata => _variableList.beginToken;
13733 } 13764 }
13734 /** 13765 /**
13735 * Instances of the class `TryStatement` represent a try statement. 13766 * Instances of the class `TryStatement` represent a try statement.
13736 * 13767 *
13737 * <pre> 13768 * <pre>
13738 * tryStatement ::= 13769 * tryStatement ::=
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
13879 } 13910 }
13880 13911
13881 /** 13912 /**
13882 * Set the token representing the 'try' keyword to the given token. 13913 * Set the token representing the 'try' keyword to the given token.
13883 * 13914 *
13884 * @param tryKeyword the token representing the 'try' keyword 13915 * @param tryKeyword the token representing the 'try' keyword
13885 */ 13916 */
13886 void set tryKeyword(Token tryKeyword2) { 13917 void set tryKeyword(Token tryKeyword2) {
13887 this._tryKeyword = tryKeyword2; 13918 this._tryKeyword = tryKeyword2;
13888 } 13919 }
13889 void visitChildren(ASTVisitor<Object> visitor) { 13920 void visitChildren(ASTVisitor visitor) {
13890 safelyVisitChild(_body, visitor); 13921 safelyVisitChild(_body, visitor);
13891 _catchClauses.accept(visitor); 13922 _catchClauses.accept(visitor);
13892 safelyVisitChild(_finallyBlock, visitor); 13923 safelyVisitChild(_finallyBlock, visitor);
13893 } 13924 }
13894 } 13925 }
13895 /** 13926 /**
13896 * The abstract class `TypeAlias` defines the behavior common to declarations of type aliases. 13927 * The abstract class `TypeAlias` defines the behavior common to declarations of type aliases.
13897 * 13928 *
13898 * <pre> 13929 * <pre>
13899 * typeAlias ::= 13930 * typeAlias ::=
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
14059 } 14090 }
14060 14091
14061 /** 14092 /**
14062 * Set the right bracket to the given token. 14093 * Set the right bracket to the given token.
14063 * 14094 *
14064 * @param rightBracket the right bracket 14095 * @param rightBracket the right bracket
14065 */ 14096 */
14066 void set rightBracket(Token rightBracket2) { 14097 void set rightBracket(Token rightBracket2) {
14067 this._rightBracket = rightBracket2; 14098 this._rightBracket = rightBracket2;
14068 } 14099 }
14069 void visitChildren(ASTVisitor<Object> visitor) { 14100 void visitChildren(ASTVisitor visitor) {
14070 _arguments.accept(visitor); 14101 _arguments.accept(visitor);
14071 } 14102 }
14072 } 14103 }
14073 /** 14104 /**
14074 * Instances of the class `TypeName` represent the name of a type, which can opt ionally 14105 * Instances of the class `TypeName` represent the name of a type, which can opt ionally
14075 * include type arguments. 14106 * include type arguments.
14076 * 14107 *
14077 * <pre> 14108 * <pre>
14078 * typeName ::= 14109 * typeName ::=
14079 * [Identifier] typeArguments? 14110 * [Identifier] typeArguments?
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
14169 } 14200 }
14170 14201
14171 /** 14202 /**
14172 * Set the type arguments associated with the type to the given type arguments . 14203 * Set the type arguments associated with the type to the given type arguments .
14173 * 14204 *
14174 * @param typeArguments the type arguments associated with the type 14205 * @param typeArguments the type arguments associated with the type
14175 */ 14206 */
14176 void set typeArguments(TypeArgumentList typeArguments2) { 14207 void set typeArguments(TypeArgumentList typeArguments2) {
14177 this._typeArguments = becomeParentOf(typeArguments2); 14208 this._typeArguments = becomeParentOf(typeArguments2);
14178 } 14209 }
14179 void visitChildren(ASTVisitor<Object> visitor) { 14210 void visitChildren(ASTVisitor visitor) {
14180 safelyVisitChild(_name, visitor); 14211 safelyVisitChild(_name, visitor);
14181 safelyVisitChild(_typeArguments, visitor); 14212 safelyVisitChild(_typeArguments, visitor);
14182 } 14213 }
14183 } 14214 }
14184 /** 14215 /**
14185 * Instances of the class `TypeParameter` represent a type parameter. 14216 * Instances of the class `TypeParameter` represent a type parameter.
14186 * 14217 *
14187 * <pre> 14218 * <pre>
14188 * typeParameter ::= 14219 * typeParameter ::=
14189 * [SimpleIdentifier] ('extends' [TypeName])? 14220 * [SimpleIdentifier] ('extends' [TypeName])?
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
14286 } 14317 }
14287 14318
14288 /** 14319 /**
14289 * Set the name of the type parameter to the given identifier. 14320 * Set the name of the type parameter to the given identifier.
14290 * 14321 *
14291 * @param identifier the name of the type parameter 14322 * @param identifier the name of the type parameter
14292 */ 14323 */
14293 void set name(SimpleIdentifier identifier) { 14324 void set name(SimpleIdentifier identifier) {
14294 _name = becomeParentOf(identifier); 14325 _name = becomeParentOf(identifier);
14295 } 14326 }
14296 void visitChildren(ASTVisitor<Object> visitor) { 14327 void visitChildren(ASTVisitor visitor) {
14297 super.visitChildren(visitor); 14328 super.visitChildren(visitor);
14298 safelyVisitChild(_name, visitor); 14329 safelyVisitChild(_name, visitor);
14299 safelyVisitChild(_bound, visitor); 14330 safelyVisitChild(_bound, visitor);
14300 } 14331 }
14301 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; 14332 Token get firstTokenAfterCommentAndMetadata => _name.beginToken;
14302 } 14333 }
14303 /** 14334 /**
14304 * Instances of the class `TypeParameterList` represent type parameters within a declaration. 14335 * Instances of the class `TypeParameterList` represent type parameters within a declaration.
14305 * 14336 *
14306 * <pre> 14337 * <pre>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
14366 * @return the right angle bracket 14397 * @return the right angle bracket
14367 */ 14398 */
14368 Token get rightBracket => _rightBracket; 14399 Token get rightBracket => _rightBracket;
14369 14400
14370 /** 14401 /**
14371 * Return the type parameters for the type. 14402 * Return the type parameters for the type.
14372 * 14403 *
14373 * @return the type parameters for the type 14404 * @return the type parameters for the type
14374 */ 14405 */
14375 NodeList<TypeParameter> get typeParameters => _typeParameters; 14406 NodeList<TypeParameter> get typeParameters => _typeParameters;
14376 void visitChildren(ASTVisitor<Object> visitor) { 14407 void visitChildren(ASTVisitor visitor) {
14377 _typeParameters.accept(visitor); 14408 _typeParameters.accept(visitor);
14378 } 14409 }
14379 } 14410 }
14380 /** 14411 /**
14381 * The abstract class `TypedLiteral` defines the behavior common to literals tha t have a type 14412 * The abstract class `TypedLiteral` defines the behavior common to literals tha t have a type
14382 * associated with them. 14413 * associated with them.
14383 * 14414 *
14384 * <pre> 14415 * <pre>
14385 * listLiteral ::= 14416 * listLiteral ::=
14386 * [ListLiteral] 14417 * [ListLiteral]
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
14448 } 14479 }
14449 14480
14450 /** 14481 /**
14451 * Set the type argument associated with this literal to the given arguments. 14482 * Set the type argument associated with this literal to the given arguments.
14452 * 14483 *
14453 * @param typeArguments the type argument associated with this literal 14484 * @param typeArguments the type argument associated with this literal
14454 */ 14485 */
14455 void set typeArguments(TypeArgumentList typeArguments2) { 14486 void set typeArguments(TypeArgumentList typeArguments2) {
14456 this._typeArguments = typeArguments2; 14487 this._typeArguments = typeArguments2;
14457 } 14488 }
14458 void visitChildren(ASTVisitor<Object> visitor) { 14489 void visitChildren(ASTVisitor visitor) {
14459 safelyVisitChild(_typeArguments, visitor); 14490 safelyVisitChild(_typeArguments, visitor);
14460 } 14491 }
14461 } 14492 }
14462 /** 14493 /**
14463 * The abstract class `UriBasedDirective` defines the behavior common to nodes t hat represent 14494 * The abstract class `UriBasedDirective` defines the behavior common to nodes t hat represent
14464 * a directive that references a URI. 14495 * a directive that references a URI.
14465 * 14496 *
14466 * <pre> 14497 * <pre>
14467 * uriBasedDirective ::= 14498 * uriBasedDirective ::=
14468 * [ExportDirective] 14499 * [ExportDirective]
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
14516 Element get uriElement; 14547 Element get uriElement;
14517 14548
14518 /** 14549 /**
14519 * Set the URI referenced by this directive to the given URI. 14550 * Set the URI referenced by this directive to the given URI.
14520 * 14551 *
14521 * @param uri the URI referenced by this directive 14552 * @param uri the URI referenced by this directive
14522 */ 14553 */
14523 void set uri(StringLiteral uri2) { 14554 void set uri(StringLiteral uri2) {
14524 this._uri = becomeParentOf(uri2); 14555 this._uri = becomeParentOf(uri2);
14525 } 14556 }
14526 void visitChildren(ASTVisitor<Object> visitor) { 14557 void visitChildren(ASTVisitor visitor) {
14527 super.visitChildren(visitor); 14558 super.visitChildren(visitor);
14528 safelyVisitChild(_uri, visitor); 14559 safelyVisitChild(_uri, visitor);
14529 } 14560 }
14530 } 14561 }
14531 /** 14562 /**
14532 * Instances of the class `VariableDeclaration` represent an identifier that has an initial 14563 * Instances of the class `VariableDeclaration` represent an identifier that has an initial
14533 * value associated with it. Instances of this class are always children of the class 14564 * value associated with it. Instances of this class are always children of the class
14534 * [VariableDeclarationList]. 14565 * [VariableDeclarationList].
14535 * 14566 *
14536 * <pre> 14567 * <pre>
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
14674 } 14705 }
14675 14706
14676 /** 14707 /**
14677 * Set the name of the variable being declared to the given identifier. 14708 * Set the name of the variable being declared to the given identifier.
14678 * 14709 *
14679 * @param name the name of the variable being declared 14710 * @param name the name of the variable being declared
14680 */ 14711 */
14681 void set name(SimpleIdentifier name2) { 14712 void set name(SimpleIdentifier name2) {
14682 this._name = becomeParentOf(name2); 14713 this._name = becomeParentOf(name2);
14683 } 14714 }
14684 void visitChildren(ASTVisitor<Object> visitor) { 14715 void visitChildren(ASTVisitor visitor) {
14685 super.visitChildren(visitor); 14716 super.visitChildren(visitor);
14686 safelyVisitChild(_name, visitor); 14717 safelyVisitChild(_name, visitor);
14687 safelyVisitChild(_initializer, visitor); 14718 safelyVisitChild(_initializer, visitor);
14688 } 14719 }
14689 Token get firstTokenAfterCommentAndMetadata => _name.beginToken; 14720 Token get firstTokenAfterCommentAndMetadata => _name.beginToken;
14690 } 14721 }
14691 /** 14722 /**
14692 * Instances of the class `VariableDeclarationList` represent the declaration of one or more 14723 * Instances of the class `VariableDeclarationList` represent the declaration of one or more
14693 * variables of the same type. 14724 * variables of the same type.
14694 * 14725 *
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
14800 } 14831 }
14801 14832
14802 /** 14833 /**
14803 * Set the type of the variables being declared to the given type name. 14834 * Set the type of the variables being declared to the given type name.
14804 * 14835 *
14805 * @param typeName the type of the variables being declared 14836 * @param typeName the type of the variables being declared
14806 */ 14837 */
14807 void set type(TypeName typeName) { 14838 void set type(TypeName typeName) {
14808 _type = becomeParentOf(typeName); 14839 _type = becomeParentOf(typeName);
14809 } 14840 }
14810 void visitChildren(ASTVisitor<Object> visitor) { 14841 void visitChildren(ASTVisitor visitor) {
14811 safelyVisitChild(_type, visitor); 14842 safelyVisitChild(_type, visitor);
14812 _variables.accept(visitor); 14843 _variables.accept(visitor);
14813 } 14844 }
14814 Token get firstTokenAfterCommentAndMetadata { 14845 Token get firstTokenAfterCommentAndMetadata {
14815 if (_keyword != null) { 14846 if (_keyword != null) {
14816 return _keyword; 14847 return _keyword;
14817 } else if (_type != null) { 14848 } else if (_type != null) {
14818 return _type.beginToken; 14849 return _type.beginToken;
14819 } 14850 }
14820 return _variables.beginToken; 14851 return _variables.beginToken;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
14889 } 14920 }
14890 14921
14891 /** 14922 /**
14892 * Set the variables being declared to the given list of variables. 14923 * Set the variables being declared to the given list of variables.
14893 * 14924 *
14894 * @param variableList the variables being declared 14925 * @param variableList the variables being declared
14895 */ 14926 */
14896 void set variables(VariableDeclarationList variableList2) { 14927 void set variables(VariableDeclarationList variableList2) {
14897 this._variableList = becomeParentOf(variableList2); 14928 this._variableList = becomeParentOf(variableList2);
14898 } 14929 }
14899 void visitChildren(ASTVisitor<Object> visitor) { 14930 void visitChildren(ASTVisitor visitor) {
14900 safelyVisitChild(_variableList, visitor); 14931 safelyVisitChild(_variableList, visitor);
14901 } 14932 }
14902 } 14933 }
14903 /** 14934 /**
14904 * Instances of the class `WhileStatement` represent a while statement. 14935 * Instances of the class `WhileStatement` represent a while statement.
14905 * 14936 *
14906 * <pre> 14937 * <pre>
14907 * whileStatement ::= 14938 * whileStatement ::=
14908 * 'while' '(' [Expression] ')' [Statement] 14939 * 'while' '(' [Expression] ')' [Statement]
14909 * </pre> 14940 * </pre>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
15041 } 15072 }
15042 15073
15043 /** 15074 /**
15044 * Set the right parenthesis to the given token. 15075 * Set the right parenthesis to the given token.
15045 * 15076 *
15046 * @param rightParenthesis the right parenthesis 15077 * @param rightParenthesis the right parenthesis
15047 */ 15078 */
15048 void set rightParenthesis(Token rightParenthesis2) { 15079 void set rightParenthesis(Token rightParenthesis2) {
15049 this._rightParenthesis = rightParenthesis2; 15080 this._rightParenthesis = rightParenthesis2;
15050 } 15081 }
15051 void visitChildren(ASTVisitor<Object> visitor) { 15082 void visitChildren(ASTVisitor visitor) {
15052 safelyVisitChild(_condition, visitor); 15083 safelyVisitChild(_condition, visitor);
15053 safelyVisitChild(_body, visitor); 15084 safelyVisitChild(_body, visitor);
15054 } 15085 }
15055 } 15086 }
15056 /** 15087 /**
15057 * Instances of the class `WithClause` represent the with clause in a class decl aration. 15088 * Instances of the class `WithClause` represent the with clause in a class decl aration.
15058 * 15089 *
15059 * <pre> 15090 * <pre>
15060 * withClause ::= 15091 * withClause ::=
15061 * 'with' [TypeName] (',' [TypeName])* 15092 * 'with' [TypeName] (',' [TypeName])*
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
15113 Token get withKeyword => _withKeyword; 15144 Token get withKeyword => _withKeyword;
15114 15145
15115 /** 15146 /**
15116 * Set the token representing the 'with' keyword to the given token. 15147 * Set the token representing the 'with' keyword to the given token.
15117 * 15148 *
15118 * @param withKeyword the token representing the 'with' keyword 15149 * @param withKeyword the token representing the 'with' keyword
15119 */ 15150 */
15120 void set mixinKeyword(Token withKeyword2) { 15151 void set mixinKeyword(Token withKeyword2) {
15121 this._withKeyword = withKeyword2; 15152 this._withKeyword = withKeyword2;
15122 } 15153 }
15123 void visitChildren(ASTVisitor<Object> visitor) { 15154 void visitChildren(ASTVisitor visitor) {
15124 _mixinTypes.accept(visitor); 15155 _mixinTypes.accept(visitor);
15125 } 15156 }
15126 } 15157 }
15127 /** 15158 /**
15128 * Instances of the class `BreadthFirstVisitor` implement an AST visitor that wi ll recursively 15159 * Instances of the class `BreadthFirstVisitor` implement an AST visitor that wi ll recursively
15129 * visit all of the nodes in an AST structure, similar to [GeneralizingASTVisito r]. This 15160 * visit all of the nodes in an AST structure, similar to [GeneralizingASTVisito r]. This
15130 * visitor uses a breadth-first ordering rather than the depth-first ordering of 15161 * visitor uses a breadth-first ordering rather than the depth-first ordering of
15131 * [GeneralizingASTVisitor]. 15162 * [GeneralizingASTVisitor].
15132 * 15163 *
15133 * Subclasses that override a visit method must either invoke the overridden vis it method or 15164 * Subclasses that override a visit method must either invoke the overridden vis it method or
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
15277 } else if (node.operator.type == TokenType.BAR_BAR) { 15308 } else if (node.operator.type == TokenType.BAR_BAR) {
15278 if (leftOperand is bool && rightOperand is bool) { 15309 if (leftOperand is bool && rightOperand is bool) {
15279 return ((leftOperand as bool)) || ((rightOperand as bool)); 15310 return ((leftOperand as bool)) || ((rightOperand as bool));
15280 } 15311 }
15281 } else if (node.operator.type == TokenType.CARET) { 15312 } else if (node.operator.type == TokenType.CARET) {
15282 if (leftOperand is int && rightOperand is int) { 15313 if (leftOperand is int && rightOperand is int) {
15283 return ((leftOperand as int)) ^ (rightOperand as int); 15314 return ((leftOperand as int)) ^ (rightOperand as int);
15284 } 15315 }
15285 } else if (node.operator.type == TokenType.EQ_EQ) { 15316 } else if (node.operator.type == TokenType.EQ_EQ) {
15286 if (leftOperand is bool && rightOperand is bool) { 15317 if (leftOperand is bool && rightOperand is bool) {
15287 return identical(((leftOperand as bool)), ((rightOperand as bool))); 15318 return identical(leftOperand as bool, rightOperand as bool);
15288 } else if (leftOperand is int && rightOperand is int) { 15319 } else if (leftOperand is int && rightOperand is int) {
15289 return ((leftOperand as int)) == rightOperand; 15320 return ((leftOperand as int)) == rightOperand;
15290 } else if (leftOperand is double && rightOperand is double) { 15321 } else if (leftOperand is double && rightOperand is double) {
15291 return ((leftOperand as double)) == rightOperand; 15322 return ((leftOperand as double)) == rightOperand;
15292 } else if (leftOperand is String && rightOperand is String) { 15323 } else if (leftOperand is String && rightOperand is String) {
15293 return ((leftOperand as String)) == rightOperand; 15324 return ((leftOperand as String)) == rightOperand;
15294 } 15325 }
15295 } else if (node.operator.type == TokenType.GT) { 15326 } else if (node.operator.type == TokenType.GT) {
15296 if (leftOperand is int && rightOperand is int) { 15327 if (leftOperand is int && rightOperand is int) {
15297 return ((leftOperand as int)).compareTo((rightOperand as int)) > 0; 15328 return ((leftOperand as int)).compareTo(rightOperand as int) > 0;
15298 } else if (leftOperand is double && rightOperand is double) { 15329 } else if (leftOperand is double && rightOperand is double) {
15299 return ((leftOperand as double)).compareTo((rightOperand as double)) > 0; 15330 return ((leftOperand as double)).compareTo(rightOperand as double) > 0 ;
15300 } 15331 }
15301 } else if (node.operator.type == TokenType.GT_EQ) { 15332 } else if (node.operator.type == TokenType.GT_EQ) {
15302 if (leftOperand is int && rightOperand is int) { 15333 if (leftOperand is int && rightOperand is int) {
15303 return ((leftOperand as int)).compareTo((rightOperand as int)) >= 0; 15334 return ((leftOperand as int)).compareTo(rightOperand as int) >= 0;
15304 } else if (leftOperand is double && rightOperand is double) { 15335 } else if (leftOperand is double && rightOperand is double) {
15305 return ((leftOperand as double)).compareTo((rightOperand as double)) > = 0; 15336 return ((leftOperand as double)).compareTo(rightOperand as double) >= 0;
15306 } 15337 }
15307 } else if (node.operator.type == TokenType.GT_GT) { 15338 } else if (node.operator.type == TokenType.GT_GT) {
15308 if (leftOperand is int && rightOperand is int) { 15339 if (leftOperand is int && rightOperand is int) {
15309 return ((leftOperand as int)) >> ((rightOperand as int)); 15340 return ((leftOperand as int)) >> ((rightOperand as int));
15310 } 15341 }
15311 } else if (node.operator.type == TokenType.LT) { 15342 } else if (node.operator.type == TokenType.LT) {
15312 if (leftOperand is int && rightOperand is int) { 15343 if (leftOperand is int && rightOperand is int) {
15313 return ((leftOperand as int)).compareTo((rightOperand as int)) < 0; 15344 return ((leftOperand as int)).compareTo(rightOperand as int) < 0;
15314 } else if (leftOperand is double && rightOperand is double) { 15345 } else if (leftOperand is double && rightOperand is double) {
15315 return ((leftOperand as double)).compareTo((rightOperand as double)) < 0; 15346 return ((leftOperand as double)).compareTo(rightOperand as double) < 0 ;
15316 } 15347 }
15317 } else if (node.operator.type == TokenType.LT_EQ) { 15348 } else if (node.operator.type == TokenType.LT_EQ) {
15318 if (leftOperand is int && rightOperand is int) { 15349 if (leftOperand is int && rightOperand is int) {
15319 return ((leftOperand as int)).compareTo((rightOperand as int)) <= 0; 15350 return ((leftOperand as int)).compareTo(rightOperand as int) <= 0;
15320 } else if (leftOperand is double && rightOperand is double) { 15351 } else if (leftOperand is double && rightOperand is double) {
15321 return ((leftOperand as double)).compareTo((rightOperand as double)) < = 0; 15352 return ((leftOperand as double)).compareTo(rightOperand as double) <= 0;
15322 } 15353 }
15323 } else if (node.operator.type == TokenType.LT_LT) { 15354 } else if (node.operator.type == TokenType.LT_LT) {
15324 if (leftOperand is int && rightOperand is int) { 15355 if (leftOperand is int && rightOperand is int) {
15325 return ((leftOperand as int)) << ((rightOperand as int)); 15356 return ((leftOperand as int)) << ((rightOperand as int));
15326 } 15357 }
15327 } else if (node.operator.type == TokenType.MINUS) { 15358 } else if (node.operator.type == TokenType.MINUS) {
15328 if (leftOperand is int && rightOperand is int) { 15359 if (leftOperand is int && rightOperand is int) {
15329 return ((leftOperand as int)) - (rightOperand as int); 15360 return ((leftOperand as int)) - (rightOperand as int);
15330 } else if (leftOperand is double && rightOperand is double) { 15361 } else if (leftOperand is double && rightOperand is double) {
15331 return ((leftOperand as double)) - ((rightOperand as double)); 15362 return ((leftOperand as double)) - ((rightOperand as double));
15332 } 15363 }
15333 } else if (node.operator.type == TokenType.PERCENT) { 15364 } else if (node.operator.type == TokenType.PERCENT) {
15334 if (leftOperand is int && rightOperand is int) { 15365 if (leftOperand is int && rightOperand is int) {
15335 return ((leftOperand as int)).remainder((rightOperand as int)); 15366 return ((leftOperand as int)).remainder(rightOperand as int);
15336 } else if (leftOperand is double && rightOperand is double) { 15367 } else if (leftOperand is double && rightOperand is double) {
15337 return ((leftOperand as double)) % ((rightOperand as double)); 15368 return ((leftOperand as double)) % ((rightOperand as double));
15338 } 15369 }
15339 } else if (node.operator.type == TokenType.PLUS) { 15370 } else if (node.operator.type == TokenType.PLUS) {
15340 if (leftOperand is int && rightOperand is int) { 15371 if (leftOperand is int && rightOperand is int) {
15341 return ((leftOperand as int)) + (rightOperand as int); 15372 return ((leftOperand as int)) + (rightOperand as int);
15342 } else if (leftOperand is double && rightOperand is double) { 15373 } else if (leftOperand is double && rightOperand is double) {
15343 return ((leftOperand as double)) + ((rightOperand as double)); 15374 return ((leftOperand as double)) + ((rightOperand as double));
15344 } 15375 }
15345 } else if (node.operator.type == TokenType.STAR) { 15376 } else if (node.operator.type == TokenType.STAR) {
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after
17343 WithClause visitWithClause(WithClause node) => new WithClause.full(node.withKe yword, clone3(node.mixinTypes)); 17374 WithClause visitWithClause(WithClause node) => new WithClause.full(node.withKe yword, clone3(node.mixinTypes));
17344 ASTNode clone2(ASTNode node) { 17375 ASTNode clone2(ASTNode node) {
17345 if (node == null) { 17376 if (node == null) {
17346 return null; 17377 return null;
17347 } 17378 }
17348 return node.accept(this) as ASTNode; 17379 return node.accept(this) as ASTNode;
17349 } 17380 }
17350 List clone3(NodeList nodes) { 17381 List clone3(NodeList nodes) {
17351 List clonedNodes = new List(); 17382 List clonedNodes = new List();
17352 for (ASTNode node in nodes) { 17383 for (ASTNode node in nodes) {
17353 clonedNodes.add((node.accept(this) as ASTNode)); 17384 clonedNodes.add(node.accept(this) as ASTNode);
17354 } 17385 }
17355 return clonedNodes; 17386 return clonedNodes;
17356 } 17387 }
17357 } 17388 }
17358 /** 17389 /**
17359 * Traverse the AST from initial child node to successive parents, building a co llection of local 17390 * Traverse the AST from initial child node to successive parents, building a co llection of local
17360 * variable and parameter names visible to the initial child node. In case of na me shadowing, the 17391 * variable and parameter names visible to the initial child node. In case of na me shadowing, the
17361 * first name seen is the most specific one so names are not redefined. 17392 * first name seen is the most specific one so names are not redefined.
17362 * 17393 *
17363 * Completion test code coverage is 95%. The two basic blocks that are not execu ted cannot be 17394 * Completion test code coverage is 95%. The two basic blocks that are not execu ted cannot be
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
17556 return elements[elements.length - 1].endToken; 17587 return elements[elements.length - 1].endToken;
17557 } 17588 }
17558 /** 17589 /**
17559 * Return the node that is the parent of each of the elements in the list. 17590 * Return the node that is the parent of each of the elements in the list.
17560 * @return the node that is the parent of each of the elements in the list 17591 * @return the node that is the parent of each of the elements in the list
17561 */ 17592 */
17562 ASTNode getOwner() { 17593 ASTNode getOwner() {
17563 return owner; 17594 return owner;
17564 } 17595 }
17565 } 17596 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698