| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.ast; | 8 library engine.ast; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 * @param atSign the at sign that introduced the annotation | 263 * @param atSign the at sign that introduced the annotation |
| 264 * @param name the name of the class defining the constructor that is being in
voked or the name of | 264 * @param name the name of the class defining the constructor that is being in
voked or the name of |
| 265 * the field that is being referenced | 265 * the field that is being referenced |
| 266 * @param period the period before the constructor name, or `null` if this ann
otation is not | 266 * @param period the period before the constructor name, or `null` if this ann
otation is not |
| 267 * the invocation of a named constructor | 267 * the invocation of a named constructor |
| 268 * @param constructorName the name of the constructor being invoked, or `null`
if this | 268 * @param constructorName the name of the constructor being invoked, or `null`
if this |
| 269 * annotation is not the invocation of a named constructor | 269 * annotation is not the invocation of a named constructor |
| 270 * @param arguments the arguments to the constructor being invoked, or `null`
if this | 270 * @param arguments the arguments to the constructor being invoked, or `null`
if this |
| 271 * annotation is not the invocation of a constructor | 271 * annotation is not the invocation of a constructor |
| 272 */ | 272 */ |
| 273 Annotation(this.atSign, Identifier name, this.period, SimpleIdentifier constru
ctorName, ArgumentList arguments) { | 273 Annotation(Token atSign, Identifier name, Token period, SimpleIdentifier const
ructorName, ArgumentList arguments) { |
| 274 this.atSign = atSign; |
| 274 this._name = becomeParentOf(name); | 275 this._name = becomeParentOf(name); |
| 276 this.period = period; |
| 275 this._constructorName = becomeParentOf(constructorName); | 277 this._constructorName = becomeParentOf(constructorName); |
| 276 this._arguments = becomeParentOf(arguments); | 278 this._arguments = becomeParentOf(arguments); |
| 277 } | 279 } |
| 278 | 280 |
| 279 @override | 281 @override |
| 280 accept(AstVisitor visitor) => visitor.visitAnnotation(this); | 282 accept(AstVisitor visitor) => visitor.visitAnnotation(this); |
| 281 | 283 |
| 282 /** | 284 /** |
| 283 * Return the arguments to the constructor being invoked, or `null` if this an
notation is | 285 * Return the arguments to the constructor being invoked, or `null` if this an
notation is |
| 284 * not the invocation of a constructor. | 286 * not the invocation of a constructor. |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 * The identifier representing the argument being tested. | 397 * The identifier representing the argument being tested. |
| 396 */ | 398 */ |
| 397 SimpleIdentifier _identifier; | 399 SimpleIdentifier _identifier; |
| 398 | 400 |
| 399 /** | 401 /** |
| 400 * Initialize a newly created argument definition test. | 402 * Initialize a newly created argument definition test. |
| 401 * | 403 * |
| 402 * @param question the token representing the question mark | 404 * @param question the token representing the question mark |
| 403 * @param identifier the identifier representing the argument being tested | 405 * @param identifier the identifier representing the argument being tested |
| 404 */ | 406 */ |
| 405 ArgumentDefinitionTest(this.question, SimpleIdentifier identifier) { | 407 ArgumentDefinitionTest(Token question, SimpleIdentifier identifier) { |
| 408 this.question = question; |
| 406 this._identifier = becomeParentOf(identifier); | 409 this._identifier = becomeParentOf(identifier); |
| 407 } | 410 } |
| 408 | 411 |
| 409 @override | 412 @override |
| 410 accept(AstVisitor visitor) => visitor.visitArgumentDefinitionTest(this); | 413 accept(AstVisitor visitor) => visitor.visitArgumentDefinitionTest(this); |
| 411 | 414 |
| 412 @override | 415 @override |
| 413 Token get beginToken => question; | 416 Token get beginToken => question; |
| 414 | 417 |
| 415 @override | 418 @override |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 | 768 |
| 766 /** | 769 /** |
| 767 * Initialize a newly created assert statement. | 770 * Initialize a newly created assert statement. |
| 768 * | 771 * |
| 769 * @param keyword the token representing the 'assert' keyword | 772 * @param keyword the token representing the 'assert' keyword |
| 770 * @param leftParenthesis the left parenthesis | 773 * @param leftParenthesis the left parenthesis |
| 771 * @param condition the condition that is being asserted to be `true` | 774 * @param condition the condition that is being asserted to be `true` |
| 772 * @param rightParenthesis the right parenthesis | 775 * @param rightParenthesis the right parenthesis |
| 773 * @param semicolon the semicolon terminating the statement | 776 * @param semicolon the semicolon terminating the statement |
| 774 */ | 777 */ |
| 775 AssertStatement(this.keyword, this.leftParenthesis, Expression condition, this
.rightParenthesis, this.semicolon) { | 778 AssertStatement(Token keyword, Token leftParenthesis, Expression condition, To
ken rightParenthesis, Token semicolon) { |
| 779 this.keyword = keyword; |
| 780 this.leftParenthesis = leftParenthesis; |
| 776 this._condition = becomeParentOf(condition); | 781 this._condition = becomeParentOf(condition); |
| 782 this.rightParenthesis = rightParenthesis; |
| 783 this.semicolon = semicolon; |
| 777 } | 784 } |
| 778 | 785 |
| 779 @override | 786 @override |
| 780 accept(AstVisitor visitor) => visitor.visitAssertStatement(this); | 787 accept(AstVisitor visitor) => visitor.visitAssertStatement(this); |
| 781 | 788 |
| 782 @override | 789 @override |
| 783 Token get beginToken => keyword; | 790 Token get beginToken => keyword; |
| 784 | 791 |
| 785 /** | 792 /** |
| 786 * Return the condition that is being asserted to be `true`. | 793 * Return the condition that is being asserted to be `true`. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 */ | 852 */ |
| 846 MethodElement _propagatedElement; | 853 MethodElement _propagatedElement; |
| 847 | 854 |
| 848 /** | 855 /** |
| 849 * Initialize a newly created assignment expression. | 856 * Initialize a newly created assignment expression. |
| 850 * | 857 * |
| 851 * @param leftHandSide the expression used to compute the left hand side | 858 * @param leftHandSide the expression used to compute the left hand side |
| 852 * @param operator the assignment operator being applied | 859 * @param operator the assignment operator being applied |
| 853 * @param rightHandSide the expression used to compute the right hand side | 860 * @param rightHandSide the expression used to compute the right hand side |
| 854 */ | 861 */ |
| 855 AssignmentExpression(Expression leftHandSide, this.operator, Expression rightH
andSide) { | 862 AssignmentExpression(Expression leftHandSide, Token operator, Expression right
HandSide) { |
| 856 this._leftHandSide = becomeParentOf(leftHandSide); | 863 this._leftHandSide = becomeParentOf(leftHandSide); |
| 864 this.operator = operator; |
| 857 this._rightHandSide = becomeParentOf(rightHandSide); | 865 this._rightHandSide = becomeParentOf(rightHandSide); |
| 858 } | 866 } |
| 859 | 867 |
| 860 @override | 868 @override |
| 861 accept(AstVisitor visitor) => visitor.visitAssignmentExpression(this); | 869 accept(AstVisitor visitor) => visitor.visitAssignmentExpression(this); |
| 862 | 870 |
| 863 @override | 871 @override |
| 864 Token get beginToken => _leftHandSide.beginToken; | 872 Token get beginToken => _leftHandSide.beginToken; |
| 865 | 873 |
| 866 /** | 874 /** |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 */ | 1499 */ |
| 1492 MethodElement _propagatedElement; | 1500 MethodElement _propagatedElement; |
| 1493 | 1501 |
| 1494 /** | 1502 /** |
| 1495 * Initialize a newly created binary expression. | 1503 * Initialize a newly created binary expression. |
| 1496 * | 1504 * |
| 1497 * @param leftOperand the expression used to compute the left operand | 1505 * @param leftOperand the expression used to compute the left operand |
| 1498 * @param operator the binary operator being applied | 1506 * @param operator the binary operator being applied |
| 1499 * @param rightOperand the expression used to compute the right operand | 1507 * @param rightOperand the expression used to compute the right operand |
| 1500 */ | 1508 */ |
| 1501 BinaryExpression(Expression leftOperand, this.operator, Expression rightOperan
d) { | 1509 BinaryExpression(Expression leftOperand, Token operator, Expression rightOpera
nd) { |
| 1502 this._leftOperand = becomeParentOf(leftOperand); | 1510 this._leftOperand = becomeParentOf(leftOperand); |
| 1511 this.operator = operator; |
| 1503 this._rightOperand = becomeParentOf(rightOperand); | 1512 this._rightOperand = becomeParentOf(rightOperand); |
| 1504 } | 1513 } |
| 1505 | 1514 |
| 1506 @override | 1515 @override |
| 1507 accept(AstVisitor visitor) => visitor.visitBinaryExpression(this); | 1516 accept(AstVisitor visitor) => visitor.visitBinaryExpression(this); |
| 1508 | 1517 |
| 1509 @override | 1518 @override |
| 1510 Token get beginToken => _leftOperand.beginToken; | 1519 Token get beginToken => _leftOperand.beginToken; |
| 1511 | 1520 |
| 1512 /** | 1521 /** |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1676 */ | 1685 */ |
| 1677 Token rightBracket; | 1686 Token rightBracket; |
| 1678 | 1687 |
| 1679 /** | 1688 /** |
| 1680 * Initialize a newly created block of code. | 1689 * Initialize a newly created block of code. |
| 1681 * | 1690 * |
| 1682 * @param leftBracket the left curly bracket | 1691 * @param leftBracket the left curly bracket |
| 1683 * @param statements the statements contained in the block | 1692 * @param statements the statements contained in the block |
| 1684 * @param rightBracket the right curly bracket | 1693 * @param rightBracket the right curly bracket |
| 1685 */ | 1694 */ |
| 1686 Block(this.leftBracket, List<Statement> statements, this.rightBracket) { | 1695 Block(Token leftBracket, List<Statement> statements, Token rightBracket) { |
| 1687 this._statements = new NodeList<Statement>(this); | 1696 this._statements = new NodeList<Statement>(this); |
| 1697 this.leftBracket = leftBracket; |
| 1688 this._statements.addAll(statements); | 1698 this._statements.addAll(statements); |
| 1699 this.rightBracket = rightBracket; |
| 1689 } | 1700 } |
| 1690 | 1701 |
| 1691 @override | 1702 @override |
| 1692 accept(AstVisitor visitor) => visitor.visitBlock(this); | 1703 accept(AstVisitor visitor) => visitor.visitBlock(this); |
| 1693 | 1704 |
| 1694 @override | 1705 @override |
| 1695 Token get beginToken => leftBracket; | 1706 Token get beginToken => leftBracket; |
| 1696 | 1707 |
| 1697 @override | 1708 @override |
| 1698 Token get endToken => rightBracket; | 1709 Token get endToken => rightBracket; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1783 * The value of the literal. | 1794 * The value of the literal. |
| 1784 */ | 1795 */ |
| 1785 bool value = false; | 1796 bool value = false; |
| 1786 | 1797 |
| 1787 /** | 1798 /** |
| 1788 * Initialize a newly created boolean literal. | 1799 * Initialize a newly created boolean literal. |
| 1789 * | 1800 * |
| 1790 * @param literal the token representing the literal | 1801 * @param literal the token representing the literal |
| 1791 * @param value the value of the literal | 1802 * @param value the value of the literal |
| 1792 */ | 1803 */ |
| 1793 BooleanLiteral(this.literal, this.value); | 1804 BooleanLiteral(Token literal, bool value) { |
| 1805 this.literal = literal; |
| 1806 this.value = value; |
| 1807 } |
| 1794 | 1808 |
| 1795 @override | 1809 @override |
| 1796 accept(AstVisitor visitor) => visitor.visitBooleanLiteral(this); | 1810 accept(AstVisitor visitor) => visitor.visitBooleanLiteral(this); |
| 1797 | 1811 |
| 1798 @override | 1812 @override |
| 1799 Token get beginToken => literal; | 1813 Token get beginToken => literal; |
| 1800 | 1814 |
| 1801 @override | 1815 @override |
| 1802 Token get endToken => literal; | 1816 Token get endToken => literal; |
| 1803 | 1817 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1833 */ | 1847 */ |
| 1834 Token semicolon; | 1848 Token semicolon; |
| 1835 | 1849 |
| 1836 /** | 1850 /** |
| 1837 * Initialize a newly created break statement. | 1851 * Initialize a newly created break statement. |
| 1838 * | 1852 * |
| 1839 * @param keyword the token representing the 'break' keyword | 1853 * @param keyword the token representing the 'break' keyword |
| 1840 * @param label the label associated with the statement | 1854 * @param label the label associated with the statement |
| 1841 * @param semicolon the semicolon terminating the statement | 1855 * @param semicolon the semicolon terminating the statement |
| 1842 */ | 1856 */ |
| 1843 BreakStatement(this.keyword, SimpleIdentifier label, this.semicolon) { | 1857 BreakStatement(Token keyword, SimpleIdentifier label, Token semicolon) { |
| 1858 this.keyword = keyword; |
| 1844 this._label = becomeParentOf(label); | 1859 this._label = becomeParentOf(label); |
| 1860 this.semicolon = semicolon; |
| 1845 } | 1861 } |
| 1846 | 1862 |
| 1847 @override | 1863 @override |
| 1848 accept(AstVisitor visitor) => visitor.visitBreakStatement(this); | 1864 accept(AstVisitor visitor) => visitor.visitBreakStatement(this); |
| 1849 | 1865 |
| 1850 @override | 1866 @override |
| 1851 Token get beginToken => keyword; | 1867 Token get beginToken => keyword; |
| 1852 | 1868 |
| 1853 @override | 1869 @override |
| 1854 Token get endToken => semicolon; | 1870 Token get endToken => semicolon; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2025 * @param onKeyword the token representing the 'on' keyword | 2041 * @param onKeyword the token representing the 'on' keyword |
| 2026 * @param exceptionType the type of exceptions caught by this catch clause | 2042 * @param exceptionType the type of exceptions caught by this catch clause |
| 2027 * @param leftParenthesis the left parenthesis | 2043 * @param leftParenthesis the left parenthesis |
| 2028 * @param exceptionParameter the parameter whose value will be the exception t
hat was thrown | 2044 * @param exceptionParameter the parameter whose value will be the exception t
hat was thrown |
| 2029 * @param comma the comma separating the exception parameter from the stack tr
ace parameter | 2045 * @param comma the comma separating the exception parameter from the stack tr
ace parameter |
| 2030 * @param stackTraceParameter the parameter whose value will be the stack trac
e associated with | 2046 * @param stackTraceParameter the parameter whose value will be the stack trac
e associated with |
| 2031 * the exception | 2047 * the exception |
| 2032 * @param rightParenthesis the right parenthesis | 2048 * @param rightParenthesis the right parenthesis |
| 2033 * @param body the body of the catch block | 2049 * @param body the body of the catch block |
| 2034 */ | 2050 */ |
| 2035 CatchClause(this.onKeyword, TypeName exceptionType, this.catchKeyword, Token l
eftParenthesis, SimpleIdentifier exceptionParameter, this.comma, SimpleIdentifie
r stackTraceParameter, Token rightParenthesis, Block body) { | 2051 CatchClause(Token onKeyword, TypeName exceptionType, Token catchKeyword, Token
leftParenthesis, SimpleIdentifier exceptionParameter, Token comma, SimpleIdenti
fier stackTraceParameter, Token rightParenthesis, Block body) { |
| 2052 this.onKeyword = onKeyword; |
| 2036 this.exceptionType = becomeParentOf(exceptionType); | 2053 this.exceptionType = becomeParentOf(exceptionType); |
| 2054 this.catchKeyword = catchKeyword; |
| 2037 this._leftParenthesis = leftParenthesis; | 2055 this._leftParenthesis = leftParenthesis; |
| 2038 this._exceptionParameter = becomeParentOf(exceptionParameter); | 2056 this._exceptionParameter = becomeParentOf(exceptionParameter); |
| 2057 this.comma = comma; |
| 2039 this._stackTraceParameter = becomeParentOf(stackTraceParameter); | 2058 this._stackTraceParameter = becomeParentOf(stackTraceParameter); |
| 2040 this._rightParenthesis = rightParenthesis; | 2059 this._rightParenthesis = rightParenthesis; |
| 2041 this._body = becomeParentOf(body); | 2060 this._body = becomeParentOf(body); |
| 2042 } | 2061 } |
| 2043 | 2062 |
| 2044 @override | 2063 @override |
| 2045 accept(AstVisitor visitor) => visitor.visitCatchClause(this); | 2064 accept(AstVisitor visitor) => visitor.visitCatchClause(this); |
| 2046 | 2065 |
| 2047 @override | 2066 @override |
| 2048 Token get beginToken { | 2067 Token get beginToken { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2225 * @param classKeyword the token representing the 'class' keyword | 2244 * @param classKeyword the token representing the 'class' keyword |
| 2226 * @param name the name of the class being declared | 2245 * @param name the name of the class being declared |
| 2227 * @param typeParameters the type parameters for the class | 2246 * @param typeParameters the type parameters for the class |
| 2228 * @param extendsClause the extends clause for the class | 2247 * @param extendsClause the extends clause for the class |
| 2229 * @param withClause the with clause for the class | 2248 * @param withClause the with clause for the class |
| 2230 * @param implementsClause the implements clause for the class | 2249 * @param implementsClause the implements clause for the class |
| 2231 * @param leftBracket the left curly bracket | 2250 * @param leftBracket the left curly bracket |
| 2232 * @param members the members defined by the class | 2251 * @param members the members defined by the class |
| 2233 * @param rightBracket the right curly bracket | 2252 * @param rightBracket the right curly bracket |
| 2234 */ | 2253 */ |
| 2235 ClassDeclaration(Comment comment, List<Annotation> metadata, this.abstractKeyw
ord, this.classKeyword, SimpleIdentifier name, TypeParameterList typeParameters,
ExtendsClause extendsClause, WithClause withClause, ImplementsClause implements
Clause, this.leftBracket, List<ClassMember> members, this.rightBracket) : super(
comment, metadata) { | 2254 ClassDeclaration(Comment comment, List<Annotation> metadata, Token abstractKey
word, Token classKeyword, SimpleIdentifier name, TypeParameterList typeParameter
s, ExtendsClause extendsClause, WithClause withClause, ImplementsClause implemen
tsClause, Token leftBracket, List<ClassMember> members, Token rightBracket) : su
per(comment, metadata) { |
| 2236 this._members = new NodeList<ClassMember>(this); | 2255 this._members = new NodeList<ClassMember>(this); |
| 2256 this.abstractKeyword = abstractKeyword; |
| 2257 this.classKeyword = classKeyword; |
| 2237 this._name = becomeParentOf(name); | 2258 this._name = becomeParentOf(name); |
| 2238 this.typeParameters = becomeParentOf(typeParameters); | 2259 this.typeParameters = becomeParentOf(typeParameters); |
| 2239 this._extendsClause = becomeParentOf(extendsClause); | 2260 this._extendsClause = becomeParentOf(extendsClause); |
| 2240 this._withClause = becomeParentOf(withClause); | 2261 this._withClause = becomeParentOf(withClause); |
| 2241 this._implementsClause = becomeParentOf(implementsClause); | 2262 this._implementsClause = becomeParentOf(implementsClause); |
| 2263 this.leftBracket = leftBracket; |
| 2242 this._members.addAll(members); | 2264 this._members.addAll(members); |
| 2265 this.rightBracket = rightBracket; |
| 2243 } | 2266 } |
| 2244 | 2267 |
| 2245 @override | 2268 @override |
| 2246 accept(AstVisitor visitor) => visitor.visitClassDeclaration(this); | 2269 accept(AstVisitor visitor) => visitor.visitClassDeclaration(this); |
| 2247 | 2270 |
| 2248 /** | 2271 /** |
| 2249 * Return the constructor declared in the class with the given name. | 2272 * Return the constructor declared in the class with the given name. |
| 2250 * | 2273 * |
| 2251 * @param name the name of the constructor to find, `null` for default | 2274 * @param name the name of the constructor to find, `null` for default |
| 2252 * @return the found constructor or `null` if not found | 2275 * @return the found constructor or `null` if not found |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2479 * @param keyword the token representing the 'typedef' keyword | 2502 * @param keyword the token representing the 'typedef' keyword |
| 2480 * @param name the name of the class being declared | 2503 * @param name the name of the class being declared |
| 2481 * @param typeParameters the type parameters for the class | 2504 * @param typeParameters the type parameters for the class |
| 2482 * @param equals the token for the '=' separating the name from the definition | 2505 * @param equals the token for the '=' separating the name from the definition |
| 2483 * @param abstractKeyword the token for the 'abstract' keyword | 2506 * @param abstractKeyword the token for the 'abstract' keyword |
| 2484 * @param superclass the name of the superclass of the class being declared | 2507 * @param superclass the name of the superclass of the class being declared |
| 2485 * @param withClause the with clause for this class | 2508 * @param withClause the with clause for this class |
| 2486 * @param implementsClause the implements clause for this class | 2509 * @param implementsClause the implements clause for this class |
| 2487 * @param semicolon the semicolon terminating the declaration | 2510 * @param semicolon the semicolon terminating the declaration |
| 2488 */ | 2511 */ |
| 2489 ClassTypeAlias(Comment comment, List<Annotation> metadata, Token keyword, Simp
leIdentifier name, TypeParameterList typeParameters, this.equals, this.abstractK
eyword, TypeName superclass, WithClause withClause, ImplementsClause implementsC
lause, Token semicolon) : super(comment, metadata, keyword, semicolon) { | 2512 ClassTypeAlias(Comment comment, List<Annotation> metadata, Token keyword, Simp
leIdentifier name, TypeParameterList typeParameters, Token equals, Token abstrac
tKeyword, TypeName superclass, WithClause withClause, ImplementsClause implement
sClause, Token semicolon) : super(comment, metadata, keyword, semicolon) { |
| 2490 this._name = becomeParentOf(name); | 2513 this._name = becomeParentOf(name); |
| 2491 this._typeParameters = becomeParentOf(typeParameters); | 2514 this._typeParameters = becomeParentOf(typeParameters); |
| 2515 this.equals = equals; |
| 2516 this.abstractKeyword = abstractKeyword; |
| 2492 this._superclass = becomeParentOf(superclass); | 2517 this._superclass = becomeParentOf(superclass); |
| 2493 this._withClause = becomeParentOf(withClause); | 2518 this._withClause = becomeParentOf(withClause); |
| 2494 this._implementsClause = becomeParentOf(implementsClause); | 2519 this._implementsClause = becomeParentOf(implementsClause); |
| 2495 } | 2520 } |
| 2496 | 2521 |
| 2497 @override | 2522 @override |
| 2498 accept(AstVisitor visitor) => visitor.visitClassTypeAlias(this); | 2523 accept(AstVisitor visitor) => visitor.visitClassTypeAlias(this); |
| 2499 | 2524 |
| 2500 @override | 2525 @override |
| 2501 ClassElement get element => _name != null ? (_name.staticElement as ClassEleme
nt) : null; | 2526 ClassElement get element => _name != null ? (_name.staticElement as ClassEleme
nt) : null; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2607 * The keyword specifying what kind of processing is to be done on the importe
d names. | 2632 * The keyword specifying what kind of processing is to be done on the importe
d names. |
| 2608 */ | 2633 */ |
| 2609 Token keyword; | 2634 Token keyword; |
| 2610 | 2635 |
| 2611 /** | 2636 /** |
| 2612 * Initialize a newly created import combinator. | 2637 * Initialize a newly created import combinator. |
| 2613 * | 2638 * |
| 2614 * @param keyword the keyword specifying what kind of processing is to be done
on the imported | 2639 * @param keyword the keyword specifying what kind of processing is to be done
on the imported |
| 2615 * names | 2640 * names |
| 2616 */ | 2641 */ |
| 2617 Combinator(this.keyword); | 2642 Combinator(Token keyword) { |
| 2643 this.keyword = keyword; |
| 2644 } |
| 2618 | 2645 |
| 2619 @override | 2646 @override |
| 2620 Token get beginToken => keyword; | 2647 Token get beginToken => keyword; |
| 2621 } | 2648 } |
| 2622 | 2649 |
| 2623 /** | 2650 /** |
| 2624 * Instances of the class `Comment` represent a comment within the source code. | 2651 * Instances of the class `Comment` represent a comment within the source code. |
| 2625 * | 2652 * |
| 2626 * <pre> | 2653 * <pre> |
| 2627 * comment ::= | 2654 * comment ::= |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2670 * Create an end-of-line comment. | 2697 * Create an end-of-line comment. |
| 2671 * | 2698 * |
| 2672 * @param tokens the tokens representing the comment | 2699 * @param tokens the tokens representing the comment |
| 2673 * @return the end-of-line comment that was created | 2700 * @return the end-of-line comment that was created |
| 2674 */ | 2701 */ |
| 2675 static Comment createEndOfLineComment(List<Token> tokens) => new Comment(token
s, CommentType.END_OF_LINE, null); | 2702 static Comment createEndOfLineComment(List<Token> tokens) => new Comment(token
s, CommentType.END_OF_LINE, null); |
| 2676 | 2703 |
| 2677 /** | 2704 /** |
| 2678 * The tokens representing the comment. | 2705 * The tokens representing the comment. |
| 2679 */ | 2706 */ |
| 2680 final List<Token> tokens; | 2707 List<Token> tokens; |
| 2681 | 2708 |
| 2682 /** | 2709 /** |
| 2683 * The type of the comment. | 2710 * The type of the comment. |
| 2684 */ | 2711 */ |
| 2685 final CommentType _type; | 2712 CommentType _type; |
| 2686 | 2713 |
| 2687 /** | 2714 /** |
| 2688 * The references embedded within the documentation comment. This list will be
empty unless this | 2715 * The references embedded within the documentation comment. This list will be
empty unless this |
| 2689 * is a documentation comment that has references embedded within it. | 2716 * is a documentation comment that has references embedded within it. |
| 2690 */ | 2717 */ |
| 2691 NodeList<CommentReference> _references; | 2718 NodeList<CommentReference> _references; |
| 2692 | 2719 |
| 2693 /** | 2720 /** |
| 2694 * Initialize a newly created comment. | 2721 * Initialize a newly created comment. |
| 2695 * | 2722 * |
| 2696 * @param tokens the tokens representing the comment | 2723 * @param tokens the tokens representing the comment |
| 2697 * @param type the type of the comment | 2724 * @param type the type of the comment |
| 2698 * @param references the references embedded within the documentation comment | 2725 * @param references the references embedded within the documentation comment |
| 2699 */ | 2726 */ |
| 2700 Comment(this.tokens, this._type, List<CommentReference> references) { | 2727 Comment(List<Token> tokens, CommentType type, List<CommentReference> reference
s) { |
| 2701 this._references = new NodeList<CommentReference>(this); | 2728 this._references = new NodeList<CommentReference>(this); |
| 2729 this.tokens = tokens; |
| 2730 this._type = type; |
| 2702 this._references.addAll(references); | 2731 this._references.addAll(references); |
| 2703 } | 2732 } |
| 2704 | 2733 |
| 2705 @override | 2734 @override |
| 2706 accept(AstVisitor visitor) => visitor.visitComment(this); | 2735 accept(AstVisitor visitor) => visitor.visitComment(this); |
| 2707 | 2736 |
| 2708 @override | 2737 @override |
| 2709 Token get beginToken => tokens[0]; | 2738 Token get beginToken => tokens[0]; |
| 2710 | 2739 |
| 2711 @override | 2740 @override |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2746 } | 2775 } |
| 2747 | 2776 |
| 2748 /** | 2777 /** |
| 2749 * The enumeration `CommentType` encodes all the different types of comments tha
t are | 2778 * The enumeration `CommentType` encodes all the different types of comments tha
t are |
| 2750 * recognized by the parser. | 2779 * recognized by the parser. |
| 2751 */ | 2780 */ |
| 2752 class CommentType extends Enum<CommentType> { | 2781 class CommentType extends Enum<CommentType> { |
| 2753 /** | 2782 /** |
| 2754 * An end-of-line comment. | 2783 * An end-of-line comment. |
| 2755 */ | 2784 */ |
| 2756 static const CommentType END_OF_LINE = const CommentType('END_OF_LINE', 0); | 2785 static final CommentType END_OF_LINE = new CommentType('END_OF_LINE', 0); |
| 2757 | 2786 |
| 2758 /** | 2787 /** |
| 2759 * A block comment. | 2788 * A block comment. |
| 2760 */ | 2789 */ |
| 2761 static const CommentType BLOCK = const CommentType('BLOCK', 1); | 2790 static final CommentType BLOCK = new CommentType('BLOCK', 1); |
| 2762 | 2791 |
| 2763 /** | 2792 /** |
| 2764 * A documentation comment. | 2793 * A documentation comment. |
| 2765 */ | 2794 */ |
| 2766 static const CommentType DOCUMENTATION = const CommentType('DOCUMENTATION', 2)
; | 2795 static final CommentType DOCUMENTATION = new CommentType('DOCUMENTATION', 2); |
| 2767 | 2796 |
| 2768 static const List<CommentType> values = const [END_OF_LINE, BLOCK, DOCUMENTATI
ON]; | 2797 static final List<CommentType> values = [END_OF_LINE, BLOCK, DOCUMENTATION]; |
| 2769 | 2798 |
| 2770 const CommentType(String name, int ordinal) : super(name, ordinal); | 2799 CommentType(String name, int ordinal) : super(name, ordinal); |
| 2771 } | 2800 } |
| 2772 | 2801 |
| 2773 /** | 2802 /** |
| 2774 * Instances of the class `CommentReference` represent a reference to a Dart ele
ment that is | 2803 * Instances of the class `CommentReference` represent a reference to a Dart ele
ment that is |
| 2775 * found within a documentation comment. | 2804 * found within a documentation comment. |
| 2776 * | 2805 * |
| 2777 * <pre> | 2806 * <pre> |
| 2778 * commentReference ::= | 2807 * commentReference ::= |
| 2779 * '[' 'new'? [Identifier] ']' | 2808 * '[' 'new'? [Identifier] ']' |
| 2780 * </pre> | 2809 * </pre> |
| 2781 */ | 2810 */ |
| 2782 class CommentReference extends AstNode { | 2811 class CommentReference extends AstNode { |
| 2783 /** | 2812 /** |
| 2784 * The token representing the 'new' keyword, or `null` if there was no 'new' k
eyword. | 2813 * The token representing the 'new' keyword, or `null` if there was no 'new' k
eyword. |
| 2785 */ | 2814 */ |
| 2786 Token newKeyword; | 2815 Token newKeyword; |
| 2787 | 2816 |
| 2788 /** | 2817 /** |
| 2789 * The identifier being referenced. | 2818 * The identifier being referenced. |
| 2790 */ | 2819 */ |
| 2791 Identifier _identifier; | 2820 Identifier _identifier; |
| 2792 | 2821 |
| 2793 /** | 2822 /** |
| 2794 * Initialize a newly created reference to a Dart element. | 2823 * Initialize a newly created reference to a Dart element. |
| 2795 * | 2824 * |
| 2796 * @param newKeyword the token representing the 'new' keyword | 2825 * @param newKeyword the token representing the 'new' keyword |
| 2797 * @param identifier the identifier being referenced | 2826 * @param identifier the identifier being referenced |
| 2798 */ | 2827 */ |
| 2799 CommentReference(this.newKeyword, Identifier identifier) { | 2828 CommentReference(Token newKeyword, Identifier identifier) { |
| 2829 this.newKeyword = newKeyword; |
| 2800 this._identifier = becomeParentOf(identifier); | 2830 this._identifier = becomeParentOf(identifier); |
| 2801 } | 2831 } |
| 2802 | 2832 |
| 2803 @override | 2833 @override |
| 2804 accept(AstVisitor visitor) => visitor.visitCommentReference(this); | 2834 accept(AstVisitor visitor) => visitor.visitCommentReference(this); |
| 2805 | 2835 |
| 2806 @override | 2836 @override |
| 2807 Token get beginToken => _identifier.beginToken; | 2837 Token get beginToken => _identifier.beginToken; |
| 2808 | 2838 |
| 2809 @override | 2839 @override |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2852 * | [ExportDirective] | 2882 * | [ExportDirective] |
| 2853 * | 2883 * |
| 2854 * declarations ::= | 2884 * declarations ::= |
| 2855 * [CompilationUnitMember]* | 2885 * [CompilationUnitMember]* |
| 2856 * </pre> | 2886 * </pre> |
| 2857 */ | 2887 */ |
| 2858 class CompilationUnit extends AstNode { | 2888 class CompilationUnit extends AstNode { |
| 2859 /** | 2889 /** |
| 2860 * The first token in the token stream that was parsed to form this compilatio
n unit. | 2890 * The first token in the token stream that was parsed to form this compilatio
n unit. |
| 2861 */ | 2891 */ |
| 2862 final Token beginToken; | 2892 Token beginToken; |
| 2863 | 2893 |
| 2864 /** | 2894 /** |
| 2865 * The script tag at the beginning of the compilation unit, or `null` if there
is no script | 2895 * The script tag at the beginning of the compilation unit, or `null` if there
is no script |
| 2866 * tag in this compilation unit. | 2896 * tag in this compilation unit. |
| 2867 */ | 2897 */ |
| 2868 ScriptTag _scriptTag; | 2898 ScriptTag _scriptTag; |
| 2869 | 2899 |
| 2870 /** | 2900 /** |
| 2871 * The directives contained in this compilation unit. | 2901 * The directives contained in this compilation unit. |
| 2872 */ | 2902 */ |
| 2873 NodeList<Directive> _directives; | 2903 NodeList<Directive> _directives; |
| 2874 | 2904 |
| 2875 /** | 2905 /** |
| 2876 * The declarations contained in this compilation unit. | 2906 * The declarations contained in this compilation unit. |
| 2877 */ | 2907 */ |
| 2878 NodeList<CompilationUnitMember> _declarations; | 2908 NodeList<CompilationUnitMember> _declarations; |
| 2879 | 2909 |
| 2880 /** | 2910 /** |
| 2881 * The last token in the token stream that was parsed to form this compilation
unit. This token | 2911 * The last token in the token stream that was parsed to form this compilation
unit. This token |
| 2882 * should always have a type of [TokenType.EOF]. | 2912 * should always have a type of [TokenType.EOF]. |
| 2883 */ | 2913 */ |
| 2884 final Token endToken; | 2914 Token endToken; |
| 2885 | 2915 |
| 2886 /** | 2916 /** |
| 2887 * The element associated with this compilation unit, or `null` if the AST str
ucture has not | 2917 * The element associated with this compilation unit, or `null` if the AST str
ucture has not |
| 2888 * been resolved. | 2918 * been resolved. |
| 2889 */ | 2919 */ |
| 2890 CompilationUnitElement element; | 2920 CompilationUnitElement element; |
| 2891 | 2921 |
| 2892 /** | 2922 /** |
| 2893 * The line information for this compilation unit. | 2923 * The line information for this compilation unit. |
| 2894 */ | 2924 */ |
| 2895 LineInfo lineInfo; | 2925 LineInfo lineInfo; |
| 2896 | 2926 |
| 2897 /** | 2927 /** |
| 2898 * Initialize a newly created compilation unit to have the given directives an
d declarations. | 2928 * Initialize a newly created compilation unit to have the given directives an
d declarations. |
| 2899 * | 2929 * |
| 2900 * @param beginToken the first token in the token stream | 2930 * @param beginToken the first token in the token stream |
| 2901 * @param scriptTag the script tag at the beginning of the compilation unit | 2931 * @param scriptTag the script tag at the beginning of the compilation unit |
| 2902 * @param directives the directives contained in this compilation unit | 2932 * @param directives the directives contained in this compilation unit |
| 2903 * @param declarations the declarations contained in this compilation unit | 2933 * @param declarations the declarations contained in this compilation unit |
| 2904 * @param endToken the last token in the token stream | 2934 * @param endToken the last token in the token stream |
| 2905 */ | 2935 */ |
| 2906 CompilationUnit(this.beginToken, ScriptTag scriptTag, List<Directive> directiv
es, List<CompilationUnitMember> declarations, this.endToken) { | 2936 CompilationUnit(Token beginToken, ScriptTag scriptTag, List<Directive> directi
ves, List<CompilationUnitMember> declarations, Token endToken) { |
| 2907 this._directives = new NodeList<Directive>(this); | 2937 this._directives = new NodeList<Directive>(this); |
| 2908 this._declarations = new NodeList<CompilationUnitMember>(this); | 2938 this._declarations = new NodeList<CompilationUnitMember>(this); |
| 2939 this.beginToken = beginToken; |
| 2909 this._scriptTag = becomeParentOf(scriptTag); | 2940 this._scriptTag = becomeParentOf(scriptTag); |
| 2910 this._directives.addAll(directives); | 2941 this._directives.addAll(directives); |
| 2911 this._declarations.addAll(declarations); | 2942 this._declarations.addAll(declarations); |
| 2943 this.endToken = endToken; |
| 2912 } | 2944 } |
| 2913 | 2945 |
| 2914 @override | 2946 @override |
| 2915 accept(AstVisitor visitor) => visitor.visitCompilationUnit(this); | 2947 accept(AstVisitor visitor) => visitor.visitCompilationUnit(this); |
| 2916 | 2948 |
| 2917 /** | 2949 /** |
| 2918 * Return the declarations contained in this compilation unit. | 2950 * Return the declarations contained in this compilation unit. |
| 2919 * | 2951 * |
| 2920 * @return the declarations contained in this compilation unit | 2952 * @return the declarations contained in this compilation unit |
| 2921 */ | 2953 */ |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3063 * Initialize a newly created conditional expression. | 3095 * Initialize a newly created conditional expression. |
| 3064 * | 3096 * |
| 3065 * @param condition the condition used to determine which expression is execut
ed next | 3097 * @param condition the condition used to determine which expression is execut
ed next |
| 3066 * @param question the token used to separate the condition from the then expr
ession | 3098 * @param question the token used to separate the condition from the then expr
ession |
| 3067 * @param thenExpression the expression that is executed if the condition eval
uates to | 3099 * @param thenExpression the expression that is executed if the condition eval
uates to |
| 3068 * `true` | 3100 * `true` |
| 3069 * @param colon the token used to separate the then expression from the else e
xpression | 3101 * @param colon the token used to separate the then expression from the else e
xpression |
| 3070 * @param elseExpression the expression that is executed if the condition eval
uates to | 3102 * @param elseExpression the expression that is executed if the condition eval
uates to |
| 3071 * `false` | 3103 * `false` |
| 3072 */ | 3104 */ |
| 3073 ConditionalExpression(Expression condition, this.question, Expression thenExpr
ession, this.colon, Expression elseExpression) { | 3105 ConditionalExpression(Expression condition, Token question, Expression thenExp
ression, Token colon, Expression elseExpression) { |
| 3074 this._condition = becomeParentOf(condition); | 3106 this._condition = becomeParentOf(condition); |
| 3107 this.question = question; |
| 3075 this._thenExpression = becomeParentOf(thenExpression); | 3108 this._thenExpression = becomeParentOf(thenExpression); |
| 3109 this.colon = colon; |
| 3076 this._elseExpression = becomeParentOf(elseExpression); | 3110 this._elseExpression = becomeParentOf(elseExpression); |
| 3077 } | 3111 } |
| 3078 | 3112 |
| 3079 @override | 3113 @override |
| 3080 accept(AstVisitor visitor) => visitor.visitConditionalExpression(this); | 3114 accept(AstVisitor visitor) => visitor.visitConditionalExpression(this); |
| 3081 | 3115 |
| 3082 @override | 3116 @override |
| 3083 Token get beginToken => _condition.beginToken; | 3117 Token get beginToken => _condition.beginToken; |
| 3084 | 3118 |
| 3085 /** | 3119 /** |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3249 * @param returnType the return type of the constructor | 3283 * @param returnType the return type of the constructor |
| 3250 * @param period the token for the period before the constructor name | 3284 * @param period the token for the period before the constructor name |
| 3251 * @param name the name of the constructor | 3285 * @param name the name of the constructor |
| 3252 * @param parameters the parameters associated with the constructor | 3286 * @param parameters the parameters associated with the constructor |
| 3253 * @param separator the token for the colon or equals before the initializers | 3287 * @param separator the token for the colon or equals before the initializers |
| 3254 * @param initializers the initializers associated with the constructor | 3288 * @param initializers the initializers associated with the constructor |
| 3255 * @param redirectedConstructor the name of the constructor to which this cons
tructor will be | 3289 * @param redirectedConstructor the name of the constructor to which this cons
tructor will be |
| 3256 * redirected | 3290 * redirected |
| 3257 * @param body the body of the constructor | 3291 * @param body the body of the constructor |
| 3258 */ | 3292 */ |
| 3259 ConstructorDeclaration(Comment comment, List<Annotation> metadata, this.extern
alKeyword, this.constKeyword, this.factoryKeyword, Identifier returnType, this.p
eriod, SimpleIdentifier name, FormalParameterList parameters, this.separator, Li
st<ConstructorInitializer> initializers, ConstructorName redirectedConstructor,
FunctionBody body) : super(comment, metadata) { | 3293 ConstructorDeclaration(Comment comment, List<Annotation> metadata, Token exter
nalKeyword, Token constKeyword, Token factoryKeyword, Identifier returnType, Tok
en period, SimpleIdentifier name, FormalParameterList parameters, Token separato
r, List<ConstructorInitializer> initializers, ConstructorName redirectedConstruc
tor, FunctionBody body) : super(comment, metadata) { |
| 3260 this._initializers = new NodeList<ConstructorInitializer>(this); | 3294 this._initializers = new NodeList<ConstructorInitializer>(this); |
| 3295 this.externalKeyword = externalKeyword; |
| 3296 this.constKeyword = constKeyword; |
| 3297 this.factoryKeyword = factoryKeyword; |
| 3261 this._returnType = becomeParentOf(returnType); | 3298 this._returnType = becomeParentOf(returnType); |
| 3299 this.period = period; |
| 3262 this._name = becomeParentOf(name); | 3300 this._name = becomeParentOf(name); |
| 3263 this._parameters = becomeParentOf(parameters); | 3301 this._parameters = becomeParentOf(parameters); |
| 3302 this.separator = separator; |
| 3264 this._initializers.addAll(initializers); | 3303 this._initializers.addAll(initializers); |
| 3265 this._redirectedConstructor = becomeParentOf(redirectedConstructor); | 3304 this._redirectedConstructor = becomeParentOf(redirectedConstructor); |
| 3266 this._body = becomeParentOf(body); | 3305 this._body = becomeParentOf(body); |
| 3267 } | 3306 } |
| 3268 | 3307 |
| 3269 @override | 3308 @override |
| 3270 accept(AstVisitor visitor) => visitor.visitConstructorDeclaration(this); | 3309 accept(AstVisitor visitor) => visitor.visitConstructorDeclaration(this); |
| 3271 | 3310 |
| 3272 /** | 3311 /** |
| 3273 * Return the body of the constructor, or `null` if the constructor does not h
ave a body. | 3312 * Return the body of the constructor, or `null` if the constructor does not h
ave a body. |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3450 /** | 3489 /** |
| 3451 * Initialize a newly created field initializer to initialize the field with t
he given name to the | 3490 * Initialize a newly created field initializer to initialize the field with t
he given name to the |
| 3452 * value of the given expression. | 3491 * value of the given expression. |
| 3453 * | 3492 * |
| 3454 * @param keyword the token for the 'this' keyword | 3493 * @param keyword the token for the 'this' keyword |
| 3455 * @param period the token for the period after the 'this' keyword | 3494 * @param period the token for the period after the 'this' keyword |
| 3456 * @param fieldName the name of the field being initialized | 3495 * @param fieldName the name of the field being initialized |
| 3457 * @param equals the token for the equal sign between the field name and the e
xpression | 3496 * @param equals the token for the equal sign between the field name and the e
xpression |
| 3458 * @param expression the expression computing the value to which the field wil
l be initialized | 3497 * @param expression the expression computing the value to which the field wil
l be initialized |
| 3459 */ | 3498 */ |
| 3460 ConstructorFieldInitializer(this.keyword, this.period, SimpleIdentifier fieldN
ame, this.equals, Expression expression) { | 3499 ConstructorFieldInitializer(Token keyword, Token period, SimpleIdentifier fiel
dName, Token equals, Expression expression) { |
| 3500 this.keyword = keyword; |
| 3501 this.period = period; |
| 3461 this._fieldName = becomeParentOf(fieldName); | 3502 this._fieldName = becomeParentOf(fieldName); |
| 3503 this.equals = equals; |
| 3462 this._expression = becomeParentOf(expression); | 3504 this._expression = becomeParentOf(expression); |
| 3463 } | 3505 } |
| 3464 | 3506 |
| 3465 @override | 3507 @override |
| 3466 accept(AstVisitor visitor) => visitor.visitConstructorFieldInitializer(this); | 3508 accept(AstVisitor visitor) => visitor.visitConstructorFieldInitializer(this); |
| 3467 | 3509 |
| 3468 @override | 3510 @override |
| 3469 Token get beginToken { | 3511 Token get beginToken { |
| 3470 if (keyword != null) { | 3512 if (keyword != null) { |
| 3471 return keyword; | 3513 return keyword; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3562 */ | 3604 */ |
| 3563 ConstructorElement _staticElement; | 3605 ConstructorElement _staticElement; |
| 3564 | 3606 |
| 3565 /** | 3607 /** |
| 3566 * Initialize a newly created constructor name. | 3608 * Initialize a newly created constructor name. |
| 3567 * | 3609 * |
| 3568 * @param type the name of the type defining the constructor | 3610 * @param type the name of the type defining the constructor |
| 3569 * @param period the token for the period before the constructor name | 3611 * @param period the token for the period before the constructor name |
| 3570 * @param name the name of the constructor | 3612 * @param name the name of the constructor |
| 3571 */ | 3613 */ |
| 3572 ConstructorName(TypeName type, this.period, SimpleIdentifier name) { | 3614 ConstructorName(TypeName type, Token period, SimpleIdentifier name) { |
| 3573 this._type = becomeParentOf(type); | 3615 this._type = becomeParentOf(type); |
| 3616 this.period = period; |
| 3574 this._name = becomeParentOf(name); | 3617 this._name = becomeParentOf(name); |
| 3575 } | 3618 } |
| 3576 | 3619 |
| 3577 @override | 3620 @override |
| 3578 accept(AstVisitor visitor) => visitor.visitConstructorName(this); | 3621 accept(AstVisitor visitor) => visitor.visitConstructorName(this); |
| 3579 | 3622 |
| 3580 @override | 3623 @override |
| 3581 Token get beginToken => _type.beginToken; | 3624 Token get beginToken => _type.beginToken; |
| 3582 | 3625 |
| 3583 @override | 3626 @override |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3671 */ | 3714 */ |
| 3672 Token semicolon; | 3715 Token semicolon; |
| 3673 | 3716 |
| 3674 /** | 3717 /** |
| 3675 * Initialize a newly created continue statement. | 3718 * Initialize a newly created continue statement. |
| 3676 * | 3719 * |
| 3677 * @param keyword the token representing the 'continue' keyword | 3720 * @param keyword the token representing the 'continue' keyword |
| 3678 * @param label the label associated with the statement | 3721 * @param label the label associated with the statement |
| 3679 * @param semicolon the semicolon terminating the statement | 3722 * @param semicolon the semicolon terminating the statement |
| 3680 */ | 3723 */ |
| 3681 ContinueStatement(this.keyword, SimpleIdentifier label, this.semicolon) { | 3724 ContinueStatement(Token keyword, SimpleIdentifier label, Token semicolon) { |
| 3725 this.keyword = keyword; |
| 3682 this._label = becomeParentOf(label); | 3726 this._label = becomeParentOf(label); |
| 3727 this.semicolon = semicolon; |
| 3683 } | 3728 } |
| 3684 | 3729 |
| 3685 @override | 3730 @override |
| 3686 accept(AstVisitor visitor) => visitor.visitContinueStatement(this); | 3731 accept(AstVisitor visitor) => visitor.visitContinueStatement(this); |
| 3687 | 3732 |
| 3688 @override | 3733 @override |
| 3689 Token get beginToken => keyword; | 3734 Token get beginToken => keyword; |
| 3690 | 3735 |
| 3691 @override | 3736 @override |
| 3692 Token get endToken => semicolon; | 3737 Token get endToken => semicolon; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3764 | 3809 |
| 3765 /** | 3810 /** |
| 3766 * Initialize a newly created formal parameter. | 3811 * Initialize a newly created formal parameter. |
| 3767 * | 3812 * |
| 3768 * @param comment the documentation comment associated with this parameter | 3813 * @param comment the documentation comment associated with this parameter |
| 3769 * @param metadata the annotations associated with this parameter | 3814 * @param metadata the annotations associated with this parameter |
| 3770 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword | 3815 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword |
| 3771 * @param type the name of the declared type of the parameter | 3816 * @param type the name of the declared type of the parameter |
| 3772 * @param identifier the name of the parameter being declared | 3817 * @param identifier the name of the parameter being declared |
| 3773 */ | 3818 */ |
| 3774 DeclaredIdentifier(Comment comment, List<Annotation> metadata, this.keyword, T
ypeName type, SimpleIdentifier identifier) : super(comment, metadata) { | 3819 DeclaredIdentifier(Comment comment, List<Annotation> metadata, Token keyword,
TypeName type, SimpleIdentifier identifier) : super(comment, metadata) { |
| 3820 this.keyword = keyword; |
| 3775 this._type = becomeParentOf(type); | 3821 this._type = becomeParentOf(type); |
| 3776 this._identifier = becomeParentOf(identifier); | 3822 this._identifier = becomeParentOf(identifier); |
| 3777 } | 3823 } |
| 3778 | 3824 |
| 3779 @override | 3825 @override |
| 3780 accept(AstVisitor visitor) => visitor.visitDeclaredIdentifier(this); | 3826 accept(AstVisitor visitor) => visitor.visitDeclaredIdentifier(this); |
| 3781 | 3827 |
| 3782 @override | 3828 @override |
| 3783 LocalVariableElement get element { | 3829 LocalVariableElement get element { |
| 3784 SimpleIdentifier identifier = this.identifier; | 3830 SimpleIdentifier identifier = this.identifier; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3886 Expression _defaultValue; | 3932 Expression _defaultValue; |
| 3887 | 3933 |
| 3888 /** | 3934 /** |
| 3889 * Initialize a newly created default formal parameter. | 3935 * Initialize a newly created default formal parameter. |
| 3890 * | 3936 * |
| 3891 * @param parameter the formal parameter with which the default value is assoc
iated | 3937 * @param parameter the formal parameter with which the default value is assoc
iated |
| 3892 * @param kind the kind of this parameter | 3938 * @param kind the kind of this parameter |
| 3893 * @param separator the token separating the parameter from the default value | 3939 * @param separator the token separating the parameter from the default value |
| 3894 * @param defaultValue the expression computing the default value for the para
meter | 3940 * @param defaultValue the expression computing the default value for the para
meter |
| 3895 */ | 3941 */ |
| 3896 DefaultFormalParameter(NormalFormalParameter parameter, this.kind, this.separa
tor, Expression defaultValue) { | 3942 DefaultFormalParameter(NormalFormalParameter parameter, ParameterKind kind, To
ken separator, Expression defaultValue) { |
| 3897 this._parameter = becomeParentOf(parameter); | 3943 this._parameter = becomeParentOf(parameter); |
| 3944 this.kind = kind; |
| 3945 this.separator = separator; |
| 3898 this._defaultValue = becomeParentOf(defaultValue); | 3946 this._defaultValue = becomeParentOf(defaultValue); |
| 3899 } | 3947 } |
| 3900 | 3948 |
| 3901 @override | 3949 @override |
| 3902 accept(AstVisitor visitor) => visitor.visitDefaultFormalParameter(this); | 3950 accept(AstVisitor visitor) => visitor.visitDefaultFormalParameter(this); |
| 3903 | 3951 |
| 3904 @override | 3952 @override |
| 3905 Token get beginToken => _parameter.beginToken; | 3953 Token get beginToken => _parameter.beginToken; |
| 3906 | 3954 |
| 3907 /** | 3955 /** |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4064 * Initialize a newly created do loop. | 4112 * Initialize a newly created do loop. |
| 4065 * | 4113 * |
| 4066 * @param doKeyword the token representing the 'do' keyword | 4114 * @param doKeyword the token representing the 'do' keyword |
| 4067 * @param body the body of the loop | 4115 * @param body the body of the loop |
| 4068 * @param whileKeyword the token representing the 'while' keyword | 4116 * @param whileKeyword the token representing the 'while' keyword |
| 4069 * @param leftParenthesis the left parenthesis | 4117 * @param leftParenthesis the left parenthesis |
| 4070 * @param condition the condition that determines when the loop will terminate | 4118 * @param condition the condition that determines when the loop will terminate |
| 4071 * @param rightParenthesis the right parenthesis | 4119 * @param rightParenthesis the right parenthesis |
| 4072 * @param semicolon the semicolon terminating the statement | 4120 * @param semicolon the semicolon terminating the statement |
| 4073 */ | 4121 */ |
| 4074 DoStatement(this.doKeyword, Statement body, this.whileKeyword, Token leftParen
thesis, Expression condition, Token rightParenthesis, this.semicolon) { | 4122 DoStatement(Token doKeyword, Statement body, Token whileKeyword, Token leftPar
enthesis, Expression condition, Token rightParenthesis, Token semicolon) { |
| 4123 this.doKeyword = doKeyword; |
| 4075 this._body = becomeParentOf(body); | 4124 this._body = becomeParentOf(body); |
| 4125 this.whileKeyword = whileKeyword; |
| 4076 this._leftParenthesis = leftParenthesis; | 4126 this._leftParenthesis = leftParenthesis; |
| 4077 this._condition = becomeParentOf(condition); | 4127 this._condition = becomeParentOf(condition); |
| 4078 this._rightParenthesis = rightParenthesis; | 4128 this._rightParenthesis = rightParenthesis; |
| 4129 this.semicolon = semicolon; |
| 4079 } | 4130 } |
| 4080 | 4131 |
| 4081 @override | 4132 @override |
| 4082 accept(AstVisitor visitor) => visitor.visitDoStatement(this); | 4133 accept(AstVisitor visitor) => visitor.visitDoStatement(this); |
| 4083 | 4134 |
| 4084 @override | 4135 @override |
| 4085 Token get beginToken => doKeyword; | 4136 Token get beginToken => doKeyword; |
| 4086 | 4137 |
| 4087 /** | 4138 /** |
| 4088 * Return the body of the loop. | 4139 * Return the body of the loop. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4180 * The value of the literal. | 4231 * The value of the literal. |
| 4181 */ | 4232 */ |
| 4182 double value = 0.0; | 4233 double value = 0.0; |
| 4183 | 4234 |
| 4184 /** | 4235 /** |
| 4185 * Initialize a newly created floating point literal. | 4236 * Initialize a newly created floating point literal. |
| 4186 * | 4237 * |
| 4187 * @param literal the token representing the literal | 4238 * @param literal the token representing the literal |
| 4188 * @param value the value of the literal | 4239 * @param value the value of the literal |
| 4189 */ | 4240 */ |
| 4190 DoubleLiteral(this.literal, this.value); | 4241 DoubleLiteral(Token literal, double value) { |
| 4242 this.literal = literal; |
| 4243 this.value = value; |
| 4244 } |
| 4191 | 4245 |
| 4192 @override | 4246 @override |
| 4193 accept(AstVisitor visitor) => visitor.visitDoubleLiteral(this); | 4247 accept(AstVisitor visitor) => visitor.visitDoubleLiteral(this); |
| 4194 | 4248 |
| 4195 @override | 4249 @override |
| 4196 Token get beginToken => literal; | 4250 Token get beginToken => literal; |
| 4197 | 4251 |
| 4198 @override | 4252 @override |
| 4199 Token get endToken => literal; | 4253 Token get endToken => literal; |
| 4200 | 4254 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 4216 /** | 4270 /** |
| 4217 * The token representing the semicolon that marks the end of the function bod
y. | 4271 * The token representing the semicolon that marks the end of the function bod
y. |
| 4218 */ | 4272 */ |
| 4219 Token semicolon; | 4273 Token semicolon; |
| 4220 | 4274 |
| 4221 /** | 4275 /** |
| 4222 * Initialize a newly created function body. | 4276 * Initialize a newly created function body. |
| 4223 * | 4277 * |
| 4224 * @param semicolon the token representing the semicolon that marks the end of
the function body | 4278 * @param semicolon the token representing the semicolon that marks the end of
the function body |
| 4225 */ | 4279 */ |
| 4226 EmptyFunctionBody(this.semicolon); | 4280 EmptyFunctionBody(Token semicolon) { |
| 4281 this.semicolon = semicolon; |
| 4282 } |
| 4227 | 4283 |
| 4228 @override | 4284 @override |
| 4229 accept(AstVisitor visitor) => visitor.visitEmptyFunctionBody(this); | 4285 accept(AstVisitor visitor) => visitor.visitEmptyFunctionBody(this); |
| 4230 | 4286 |
| 4231 @override | 4287 @override |
| 4232 Token get beginToken => semicolon; | 4288 Token get beginToken => semicolon; |
| 4233 | 4289 |
| 4234 @override | 4290 @override |
| 4235 Token get endToken => semicolon; | 4291 Token get endToken => semicolon; |
| 4236 | 4292 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4251 /** | 4307 /** |
| 4252 * The semicolon terminating the statement. | 4308 * The semicolon terminating the statement. |
| 4253 */ | 4309 */ |
| 4254 Token semicolon; | 4310 Token semicolon; |
| 4255 | 4311 |
| 4256 /** | 4312 /** |
| 4257 * Initialize a newly created empty statement. | 4313 * Initialize a newly created empty statement. |
| 4258 * | 4314 * |
| 4259 * @param semicolon the semicolon terminating the statement | 4315 * @param semicolon the semicolon terminating the statement |
| 4260 */ | 4316 */ |
| 4261 EmptyStatement(this.semicolon); | 4317 EmptyStatement(Token semicolon) { |
| 4318 this.semicolon = semicolon; |
| 4319 } |
| 4262 | 4320 |
| 4263 @override | 4321 @override |
| 4264 accept(AstVisitor visitor) => visitor.visitEmptyStatement(this); | 4322 accept(AstVisitor visitor) => visitor.visitEmptyStatement(this); |
| 4265 | 4323 |
| 4266 @override | 4324 @override |
| 4267 Token get beginToken => semicolon; | 4325 Token get beginToken => semicolon; |
| 4268 | 4326 |
| 4269 @override | 4327 @override |
| 4270 Token get endToken => semicolon; | 4328 Token get endToken => semicolon; |
| 4271 | 4329 |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4509 Token semicolon; | 4567 Token semicolon; |
| 4510 | 4568 |
| 4511 /** | 4569 /** |
| 4512 * Initialize a newly created function body consisting of a block of statement
s. | 4570 * Initialize a newly created function body consisting of a block of statement
s. |
| 4513 * | 4571 * |
| 4514 * @param functionDefinition the token introducing the expression that represe
nts the body of the | 4572 * @param functionDefinition the token introducing the expression that represe
nts the body of the |
| 4515 * function | 4573 * function |
| 4516 * @param expression the expression representing the body of the function | 4574 * @param expression the expression representing the body of the function |
| 4517 * @param semicolon the semicolon terminating the statement | 4575 * @param semicolon the semicolon terminating the statement |
| 4518 */ | 4576 */ |
| 4519 ExpressionFunctionBody(this.functionDefinition, Expression expression, this.se
micolon) { | 4577 ExpressionFunctionBody(Token functionDefinition, Expression expression, Token
semicolon) { |
| 4578 this.functionDefinition = functionDefinition; |
| 4520 this._expression = becomeParentOf(expression); | 4579 this._expression = becomeParentOf(expression); |
| 4580 this.semicolon = semicolon; |
| 4521 } | 4581 } |
| 4522 | 4582 |
| 4523 @override | 4583 @override |
| 4524 accept(AstVisitor visitor) => visitor.visitExpressionFunctionBody(this); | 4584 accept(AstVisitor visitor) => visitor.visitExpressionFunctionBody(this); |
| 4525 | 4585 |
| 4526 @override | 4586 @override |
| 4527 Token get beginToken => functionDefinition; | 4587 Token get beginToken => functionDefinition; |
| 4528 | 4588 |
| 4529 @override | 4589 @override |
| 4530 Token get endToken { | 4590 Token get endToken { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4575 * expression and therefore isn't followed by a semicolon. | 4635 * expression and therefore isn't followed by a semicolon. |
| 4576 */ | 4636 */ |
| 4577 Token semicolon; | 4637 Token semicolon; |
| 4578 | 4638 |
| 4579 /** | 4639 /** |
| 4580 * Initialize a newly created expression statement. | 4640 * Initialize a newly created expression statement. |
| 4581 * | 4641 * |
| 4582 * @param expression the expression that comprises the statement | 4642 * @param expression the expression that comprises the statement |
| 4583 * @param semicolon the semicolon terminating the statement | 4643 * @param semicolon the semicolon terminating the statement |
| 4584 */ | 4644 */ |
| 4585 ExpressionStatement(Expression expression, this.semicolon) { | 4645 ExpressionStatement(Expression expression, Token semicolon) { |
| 4586 this._expression = becomeParentOf(expression); | 4646 this._expression = becomeParentOf(expression); |
| 4647 this.semicolon = semicolon; |
| 4587 } | 4648 } |
| 4588 | 4649 |
| 4589 @override | 4650 @override |
| 4590 accept(AstVisitor visitor) => visitor.visitExpressionStatement(this); | 4651 accept(AstVisitor visitor) => visitor.visitExpressionStatement(this); |
| 4591 | 4652 |
| 4592 @override | 4653 @override |
| 4593 Token get beginToken => _expression.beginToken; | 4654 Token get beginToken => _expression.beginToken; |
| 4594 | 4655 |
| 4595 @override | 4656 @override |
| 4596 Token get endToken { | 4657 Token get endToken { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4644 * The name of the class that is being extended. | 4705 * The name of the class that is being extended. |
| 4645 */ | 4706 */ |
| 4646 TypeName _superclass; | 4707 TypeName _superclass; |
| 4647 | 4708 |
| 4648 /** | 4709 /** |
| 4649 * Initialize a newly created extends clause. | 4710 * Initialize a newly created extends clause. |
| 4650 * | 4711 * |
| 4651 * @param keyword the token representing the 'extends' keyword | 4712 * @param keyword the token representing the 'extends' keyword |
| 4652 * @param superclass the name of the class that is being extended | 4713 * @param superclass the name of the class that is being extended |
| 4653 */ | 4714 */ |
| 4654 ExtendsClause(this.keyword, TypeName superclass) { | 4715 ExtendsClause(Token keyword, TypeName superclass) { |
| 4716 this.keyword = keyword; |
| 4655 this._superclass = becomeParentOf(superclass); | 4717 this._superclass = becomeParentOf(superclass); |
| 4656 } | 4718 } |
| 4657 | 4719 |
| 4658 @override | 4720 @override |
| 4659 accept(AstVisitor visitor) => visitor.visitExtendsClause(this); | 4721 accept(AstVisitor visitor) => visitor.visitExtendsClause(this); |
| 4660 | 4722 |
| 4661 @override | 4723 @override |
| 4662 Token get beginToken => keyword; | 4724 Token get beginToken => keyword; |
| 4663 | 4725 |
| 4664 @override | 4726 @override |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4713 | 4775 |
| 4714 /** | 4776 /** |
| 4715 * Initialize a newly created field declaration. | 4777 * Initialize a newly created field declaration. |
| 4716 * | 4778 * |
| 4717 * @param comment the documentation comment associated with this field | 4779 * @param comment the documentation comment associated with this field |
| 4718 * @param metadata the annotations associated with this field | 4780 * @param metadata the annotations associated with this field |
| 4719 * @param staticKeyword the token representing the 'static' keyword | 4781 * @param staticKeyword the token representing the 'static' keyword |
| 4720 * @param fieldList the fields being declared | 4782 * @param fieldList the fields being declared |
| 4721 * @param semicolon the semicolon terminating the declaration | 4783 * @param semicolon the semicolon terminating the declaration |
| 4722 */ | 4784 */ |
| 4723 FieldDeclaration(Comment comment, List<Annotation> metadata, this.staticKeywor
d, VariableDeclarationList fieldList, this.semicolon) : super(comment, metadata)
{ | 4785 FieldDeclaration(Comment comment, List<Annotation> metadata, Token staticKeywo
rd, VariableDeclarationList fieldList, Token semicolon) : super(comment, metadat
a) { |
| 4786 this.staticKeyword = staticKeyword; |
| 4724 this._fieldList = becomeParentOf(fieldList); | 4787 this._fieldList = becomeParentOf(fieldList); |
| 4788 this.semicolon = semicolon; |
| 4725 } | 4789 } |
| 4726 | 4790 |
| 4727 @override | 4791 @override |
| 4728 accept(AstVisitor visitor) => visitor.visitFieldDeclaration(this); | 4792 accept(AstVisitor visitor) => visitor.visitFieldDeclaration(this); |
| 4729 | 4793 |
| 4730 @override | 4794 @override |
| 4731 Element get element => null; | 4795 Element get element => null; |
| 4732 | 4796 |
| 4733 @override | 4797 @override |
| 4734 Token get endToken => semicolon; | 4798 Token get endToken => semicolon; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4814 * @param comment the documentation comment associated with this parameter | 4878 * @param comment the documentation comment associated with this parameter |
| 4815 * @param metadata the annotations associated with this parameter | 4879 * @param metadata the annotations associated with this parameter |
| 4816 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword | 4880 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword |
| 4817 * @param type the name of the declared type of the parameter | 4881 * @param type the name of the declared type of the parameter |
| 4818 * @param thisToken the token representing the 'this' keyword | 4882 * @param thisToken the token representing the 'this' keyword |
| 4819 * @param period the token representing the period | 4883 * @param period the token representing the period |
| 4820 * @param identifier the name of the parameter being declared | 4884 * @param identifier the name of the parameter being declared |
| 4821 * @param parameters the parameters of the function-typed parameter, or `null`
if this is | 4885 * @param parameters the parameters of the function-typed parameter, or `null`
if this is |
| 4822 * not a function-typed field formal parameter | 4886 * not a function-typed field formal parameter |
| 4823 */ | 4887 */ |
| 4824 FieldFormalParameter(Comment comment, List<Annotation> metadata, this.keyword,
TypeName type, this.thisToken, this.period, SimpleIdentifier identifier, Formal
ParameterList parameters) : super(comment, metadata, identifier) { | 4888 FieldFormalParameter(Comment comment, List<Annotation> metadata, Token keyword
, TypeName type, Token thisToken, Token period, SimpleIdentifier identifier, For
malParameterList parameters) : super(comment, metadata, identifier) { |
| 4889 this.keyword = keyword; |
| 4825 this._type = becomeParentOf(type); | 4890 this._type = becomeParentOf(type); |
| 4891 this.thisToken = thisToken; |
| 4892 this.period = period; |
| 4826 this._parameters = becomeParentOf(parameters); | 4893 this._parameters = becomeParentOf(parameters); |
| 4827 } | 4894 } |
| 4828 | 4895 |
| 4829 @override | 4896 @override |
| 4830 accept(AstVisitor visitor) => visitor.visitFieldFormalParameter(this); | 4897 accept(AstVisitor visitor) => visitor.visitFieldFormalParameter(this); |
| 4831 | 4898 |
| 4832 @override | 4899 @override |
| 4833 Token get beginToken { | 4900 Token get beginToken { |
| 4834 if (keyword != null) { | 4901 if (keyword != null) { |
| 4835 return keyword; | 4902 return keyword; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4946 /** | 5013 /** |
| 4947 * Initialize a newly created for-each statement. | 5014 * Initialize a newly created for-each statement. |
| 4948 * | 5015 * |
| 4949 * @param forKeyword the token representing the 'for' keyword | 5016 * @param forKeyword the token representing the 'for' keyword |
| 4950 * @param leftParenthesis the left parenthesis | 5017 * @param leftParenthesis the left parenthesis |
| 4951 * @param loopVariable the declaration of the loop variable | 5018 * @param loopVariable the declaration of the loop variable |
| 4952 * @param iterator the expression evaluated to produce the iterator | 5019 * @param iterator the expression evaluated to produce the iterator |
| 4953 * @param rightParenthesis the right parenthesis | 5020 * @param rightParenthesis the right parenthesis |
| 4954 * @param body the body of the loop | 5021 * @param body the body of the loop |
| 4955 */ | 5022 */ |
| 4956 ForEachStatement.con1(this.forKeyword, this.leftParenthesis, DeclaredIdentifie
r loopVariable, this.inKeyword, Expression iterator, this.rightParenthesis, Stat
ement body) { | 5023 ForEachStatement.con1(Token forKeyword, Token leftParenthesis, DeclaredIdentif
ier loopVariable, Token inKeyword, Expression iterator, Token rightParenthesis,
Statement body) { |
| 5024 this.forKeyword = forKeyword; |
| 5025 this.leftParenthesis = leftParenthesis; |
| 4957 this._loopVariable = becomeParentOf(loopVariable); | 5026 this._loopVariable = becomeParentOf(loopVariable); |
| 5027 this.inKeyword = inKeyword; |
| 4958 this._iterator = becomeParentOf(iterator); | 5028 this._iterator = becomeParentOf(iterator); |
| 5029 this.rightParenthesis = rightParenthesis; |
| 4959 this._body = becomeParentOf(body); | 5030 this._body = becomeParentOf(body); |
| 4960 } | 5031 } |
| 4961 | 5032 |
| 4962 /** | 5033 /** |
| 4963 * Initialize a newly created for-each statement. | 5034 * Initialize a newly created for-each statement. |
| 4964 * | 5035 * |
| 4965 * @param forKeyword the token representing the 'for' keyword | 5036 * @param forKeyword the token representing the 'for' keyword |
| 4966 * @param leftParenthesis the left parenthesis | 5037 * @param leftParenthesis the left parenthesis |
| 4967 * @param identifier the loop variable | 5038 * @param identifier the loop variable |
| 4968 * @param iterator the expression evaluated to produce the iterator | 5039 * @param iterator the expression evaluated to produce the iterator |
| 4969 * @param rightParenthesis the right parenthesis | 5040 * @param rightParenthesis the right parenthesis |
| 4970 * @param body the body of the loop | 5041 * @param body the body of the loop |
| 4971 */ | 5042 */ |
| 4972 ForEachStatement.con2(this.forKeyword, this.leftParenthesis, SimpleIdentifier
identifier, this.inKeyword, Expression iterator, this.rightParenthesis, Statemen
t body) { | 5043 ForEachStatement.con2(Token forKeyword, Token leftParenthesis, SimpleIdentifie
r identifier, Token inKeyword, Expression iterator, Token rightParenthesis, Stat
ement body) { |
| 5044 this.forKeyword = forKeyword; |
| 5045 this.leftParenthesis = leftParenthesis; |
| 4973 this._identifier = becomeParentOf(identifier); | 5046 this._identifier = becomeParentOf(identifier); |
| 5047 this.inKeyword = inKeyword; |
| 4974 this._iterator = becomeParentOf(iterator); | 5048 this._iterator = becomeParentOf(iterator); |
| 5049 this.rightParenthesis = rightParenthesis; |
| 4975 this._body = becomeParentOf(body); | 5050 this._body = becomeParentOf(body); |
| 4976 } | 5051 } |
| 4977 | 5052 |
| 4978 @override | 5053 @override |
| 4979 accept(AstVisitor visitor) => visitor.visitForEachStatement(this); | 5054 accept(AstVisitor visitor) => visitor.visitForEachStatement(this); |
| 4980 | 5055 |
| 4981 @override | 5056 @override |
| 4982 Token get beginToken => forKeyword; | 5057 Token get beginToken => forKeyword; |
| 4983 | 5058 |
| 4984 /** | 5059 /** |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5136 * @param leftParenthesis the left parenthesis | 5211 * @param leftParenthesis the left parenthesis |
| 5137 * @param variableList the declaration of the loop variables | 5212 * @param variableList the declaration of the loop variables |
| 5138 * @param initialization the initialization expression | 5213 * @param initialization the initialization expression |
| 5139 * @param leftSeparator the semicolon separating the initializer and the condi
tion | 5214 * @param leftSeparator the semicolon separating the initializer and the condi
tion |
| 5140 * @param condition the condition used to determine when to terminate the loop | 5215 * @param condition the condition used to determine when to terminate the loop |
| 5141 * @param rightSeparator the semicolon separating the condition and the update
r | 5216 * @param rightSeparator the semicolon separating the condition and the update
r |
| 5142 * @param updaters the list of expressions run after each execution of the loo
p body | 5217 * @param updaters the list of expressions run after each execution of the loo
p body |
| 5143 * @param rightParenthesis the right parenthesis | 5218 * @param rightParenthesis the right parenthesis |
| 5144 * @param body the body of the loop | 5219 * @param body the body of the loop |
| 5145 */ | 5220 */ |
| 5146 ForStatement(this.forKeyword, this.leftParenthesis, VariableDeclarationList va
riableList, Expression initialization, this.leftSeparator, Expression condition,
this.rightSeparator, List<Expression> updaters, this.rightParenthesis, Statemen
t body) { | 5221 ForStatement(Token forKeyword, Token leftParenthesis, VariableDeclarationList
variableList, Expression initialization, Token leftSeparator, Expression conditi
on, Token rightSeparator, List<Expression> updaters, Token rightParenthesis, Sta
tement body) { |
| 5147 this._updaters = new NodeList<Expression>(this); | 5222 this._updaters = new NodeList<Expression>(this); |
| 5223 this.forKeyword = forKeyword; |
| 5224 this.leftParenthesis = leftParenthesis; |
| 5148 this._variableList = becomeParentOf(variableList); | 5225 this._variableList = becomeParentOf(variableList); |
| 5149 this._initialization = becomeParentOf(initialization); | 5226 this._initialization = becomeParentOf(initialization); |
| 5227 this.leftSeparator = leftSeparator; |
| 5150 this._condition = becomeParentOf(condition); | 5228 this._condition = becomeParentOf(condition); |
| 5229 this.rightSeparator = rightSeparator; |
| 5151 this._updaters.addAll(updaters); | 5230 this._updaters.addAll(updaters); |
| 5231 this.rightParenthesis = rightParenthesis; |
| 5152 this._body = becomeParentOf(body); | 5232 this._body = becomeParentOf(body); |
| 5153 } | 5233 } |
| 5154 | 5234 |
| 5155 @override | 5235 @override |
| 5156 accept(AstVisitor visitor) => visitor.visitForStatement(this); | 5236 accept(AstVisitor visitor) => visitor.visitForStatement(this); |
| 5157 | 5237 |
| 5158 @override | 5238 @override |
| 5159 Token get beginToken => forKeyword; | 5239 Token get beginToken => forKeyword; |
| 5160 | 5240 |
| 5161 /** | 5241 /** |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5540 * Initialize a newly created function declaration. | 5620 * Initialize a newly created function declaration. |
| 5541 * | 5621 * |
| 5542 * @param comment the documentation comment associated with this function | 5622 * @param comment the documentation comment associated with this function |
| 5543 * @param metadata the annotations associated with this function | 5623 * @param metadata the annotations associated with this function |
| 5544 * @param externalKeyword the token representing the 'external' keyword | 5624 * @param externalKeyword the token representing the 'external' keyword |
| 5545 * @param returnType the return type of the function | 5625 * @param returnType the return type of the function |
| 5546 * @param propertyKeyword the token representing the 'get' or 'set' keyword | 5626 * @param propertyKeyword the token representing the 'get' or 'set' keyword |
| 5547 * @param name the name of the function | 5627 * @param name the name of the function |
| 5548 * @param functionExpression the function expression being wrapped | 5628 * @param functionExpression the function expression being wrapped |
| 5549 */ | 5629 */ |
| 5550 FunctionDeclaration(Comment comment, List<Annotation> metadata, this.externalK
eyword, TypeName returnType, this.propertyKeyword, SimpleIdentifier name, Functi
onExpression functionExpression) : super(comment, metadata) { | 5630 FunctionDeclaration(Comment comment, List<Annotation> metadata, Token external
Keyword, TypeName returnType, Token propertyKeyword, SimpleIdentifier name, Func
tionExpression functionExpression) : super(comment, metadata) { |
| 5631 this.externalKeyword = externalKeyword; |
| 5551 this._returnType = becomeParentOf(returnType); | 5632 this._returnType = becomeParentOf(returnType); |
| 5633 this.propertyKeyword = propertyKeyword; |
| 5552 this._name = becomeParentOf(name); | 5634 this._name = becomeParentOf(name); |
| 5553 this._functionExpression = becomeParentOf(functionExpression); | 5635 this._functionExpression = becomeParentOf(functionExpression); |
| 5554 } | 5636 } |
| 5555 | 5637 |
| 5556 @override | 5638 @override |
| 5557 accept(AstVisitor visitor) => visitor.visitFunctionDeclaration(this); | 5639 accept(AstVisitor visitor) => visitor.visitFunctionDeclaration(this); |
| 5558 | 5640 |
| 5559 @override | 5641 @override |
| 5560 ExecutableElement get element => _name != null ? (_name.staticElement as Execu
tableElement) : null; | 5642 ExecutableElement get element => _name != null ? (_name.staticElement as Execu
tableElement) : null; |
| 5561 | 5643 |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6323 * Initialize a newly created if statement. | 6405 * Initialize a newly created if statement. |
| 6324 * | 6406 * |
| 6325 * @param ifKeyword the token representing the 'if' keyword | 6407 * @param ifKeyword the token representing the 'if' keyword |
| 6326 * @param leftParenthesis the left parenthesis | 6408 * @param leftParenthesis the left parenthesis |
| 6327 * @param condition the condition used to determine which of the statements is
executed next | 6409 * @param condition the condition used to determine which of the statements is
executed next |
| 6328 * @param rightParenthesis the right parenthesis | 6410 * @param rightParenthesis the right parenthesis |
| 6329 * @param thenStatement the statement that is executed if the condition evalua
tes to `true` | 6411 * @param thenStatement the statement that is executed if the condition evalua
tes to `true` |
| 6330 * @param elseKeyword the token representing the 'else' keyword | 6412 * @param elseKeyword the token representing the 'else' keyword |
| 6331 * @param elseStatement the statement that is executed if the condition evalua
tes to `false` | 6413 * @param elseStatement the statement that is executed if the condition evalua
tes to `false` |
| 6332 */ | 6414 */ |
| 6333 IfStatement(this.ifKeyword, this.leftParenthesis, Expression condition, this.r
ightParenthesis, Statement thenStatement, this.elseKeyword, Statement elseStatem
ent) { | 6415 IfStatement(Token ifKeyword, Token leftParenthesis, Expression condition, Toke
n rightParenthesis, Statement thenStatement, Token elseKeyword, Statement elseSt
atement) { |
| 6416 this.ifKeyword = ifKeyword; |
| 6417 this.leftParenthesis = leftParenthesis; |
| 6334 this._condition = becomeParentOf(condition); | 6418 this._condition = becomeParentOf(condition); |
| 6419 this.rightParenthesis = rightParenthesis; |
| 6335 this._thenStatement = becomeParentOf(thenStatement); | 6420 this._thenStatement = becomeParentOf(thenStatement); |
| 6421 this.elseKeyword = elseKeyword; |
| 6336 this._elseStatement = becomeParentOf(elseStatement); | 6422 this._elseStatement = becomeParentOf(elseStatement); |
| 6337 } | 6423 } |
| 6338 | 6424 |
| 6339 @override | 6425 @override |
| 6340 accept(AstVisitor visitor) => visitor.visitIfStatement(this); | 6426 accept(AstVisitor visitor) => visitor.visitIfStatement(this); |
| 6341 | 6427 |
| 6342 @override | 6428 @override |
| 6343 Token get beginToken => ifKeyword; | 6429 Token get beginToken => ifKeyword; |
| 6344 | 6430 |
| 6345 /** | 6431 /** |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6429 * The interfaces that are being implemented. | 6515 * The interfaces that are being implemented. |
| 6430 */ | 6516 */ |
| 6431 NodeList<TypeName> _interfaces; | 6517 NodeList<TypeName> _interfaces; |
| 6432 | 6518 |
| 6433 /** | 6519 /** |
| 6434 * Initialize a newly created implements clause. | 6520 * Initialize a newly created implements clause. |
| 6435 * | 6521 * |
| 6436 * @param keyword the token representing the 'implements' keyword | 6522 * @param keyword the token representing the 'implements' keyword |
| 6437 * @param interfaces the interfaces that are being implemented | 6523 * @param interfaces the interfaces that are being implemented |
| 6438 */ | 6524 */ |
| 6439 ImplementsClause(this.keyword, List<TypeName> interfaces) { | 6525 ImplementsClause(Token keyword, List<TypeName> interfaces) { |
| 6440 this._interfaces = new NodeList<TypeName>(this); | 6526 this._interfaces = new NodeList<TypeName>(this); |
| 6527 this.keyword = keyword; |
| 6441 this._interfaces.addAll(interfaces); | 6528 this._interfaces.addAll(interfaces); |
| 6442 } | 6529 } |
| 6443 | 6530 |
| 6444 @override | 6531 @override |
| 6445 accept(AstVisitor visitor) => visitor.visitImplementsClause(this); | 6532 accept(AstVisitor visitor) => visitor.visitImplementsClause(this); |
| 6446 | 6533 |
| 6447 @override | 6534 @override |
| 6448 Token get beginToken => keyword; | 6535 Token get beginToken => keyword; |
| 6449 | 6536 |
| 6450 @override | 6537 @override |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6579 * | 6666 * |
| 6580 * @param comment the documentation comment associated with this directive | 6667 * @param comment the documentation comment associated with this directive |
| 6581 * @param metadata the annotations associated with the directive | 6668 * @param metadata the annotations associated with the directive |
| 6582 * @param keyword the token representing the 'import' keyword | 6669 * @param keyword the token representing the 'import' keyword |
| 6583 * @param libraryUri the URI of the library being imported | 6670 * @param libraryUri the URI of the library being imported |
| 6584 * @param asToken the token representing the 'as' token | 6671 * @param asToken the token representing the 'as' token |
| 6585 * @param prefix the prefix to be used with the imported names | 6672 * @param prefix the prefix to be used with the imported names |
| 6586 * @param combinators the combinators used to control how names are imported | 6673 * @param combinators the combinators used to control how names are imported |
| 6587 * @param semicolon the semicolon terminating the directive | 6674 * @param semicolon the semicolon terminating the directive |
| 6588 */ | 6675 */ |
| 6589 ImportDirective(Comment comment, List<Annotation> metadata, Token keyword, Str
ingLiteral libraryUri, this.asToken, SimpleIdentifier prefix, List<Combinator> c
ombinators, Token semicolon) : super(comment, metadata, keyword, libraryUri, com
binators, semicolon) { | 6676 ImportDirective(Comment comment, List<Annotation> metadata, Token keyword, Str
ingLiteral libraryUri, Token asToken, SimpleIdentifier prefix, List<Combinator>
combinators, Token semicolon) : super(comment, metadata, keyword, libraryUri, co
mbinators, semicolon) { |
| 6677 this.asToken = asToken; |
| 6590 this._prefix = becomeParentOf(prefix); | 6678 this._prefix = becomeParentOf(prefix); |
| 6591 } | 6679 } |
| 6592 | 6680 |
| 6593 @override | 6681 @override |
| 6594 accept(AstVisitor visitor) => visitor.visitImportDirective(this); | 6682 accept(AstVisitor visitor) => visitor.visitImportDirective(this); |
| 6595 | 6683 |
| 6596 @override | 6684 @override |
| 6597 ImportElement get element => super.element as ImportElement; | 6685 ImportElement get element => super.element as ImportElement; |
| 6598 | 6686 |
| 6599 /** | 6687 /** |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6703 } | 6791 } |
| 6704 | 6792 |
| 6705 /** | 6793 /** |
| 6706 * Initialize a newly created index expression. | 6794 * Initialize a newly created index expression. |
| 6707 * | 6795 * |
| 6708 * @param period the period ("..") before a cascaded index expression | 6796 * @param period the period ("..") before a cascaded index expression |
| 6709 * @param leftBracket the left square bracket | 6797 * @param leftBracket the left square bracket |
| 6710 * @param index the expression used to compute the index | 6798 * @param index the expression used to compute the index |
| 6711 * @param rightBracket the right square bracket | 6799 * @param rightBracket the right square bracket |
| 6712 */ | 6800 */ |
| 6713 IndexExpression.forCascade(this.period, Token leftBracket, Expression index, T
oken rightBracket) { | 6801 IndexExpression.forCascade(Token period, Token leftBracket, Expression index,
Token rightBracket) { |
| 6802 this.period = period; |
| 6714 this._leftBracket = leftBracket; | 6803 this._leftBracket = leftBracket; |
| 6715 this._index = becomeParentOf(index); | 6804 this._index = becomeParentOf(index); |
| 6716 this._rightBracket = rightBracket; | 6805 this._rightBracket = rightBracket; |
| 6717 } | 6806 } |
| 6718 | 6807 |
| 6719 @override | 6808 @override |
| 6720 accept(AstVisitor visitor) => visitor.visitIndexExpression(this); | 6809 accept(AstVisitor visitor) => visitor.visitIndexExpression(this); |
| 6721 | 6810 |
| 6722 @override | 6811 @override |
| 6723 Token get beginToken { | 6812 Token get beginToken { |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7012 */ | 7101 */ |
| 7013 ConstructorElement staticElement; | 7102 ConstructorElement staticElement; |
| 7014 | 7103 |
| 7015 /** | 7104 /** |
| 7016 * Initialize a newly created instance creation expression. | 7105 * Initialize a newly created instance creation expression. |
| 7017 * | 7106 * |
| 7018 * @param keyword the keyword used to indicate how an object should be created | 7107 * @param keyword the keyword used to indicate how an object should be created |
| 7019 * @param constructorName the name of the constructor to be invoked | 7108 * @param constructorName the name of the constructor to be invoked |
| 7020 * @param argumentList the list of arguments to the constructor | 7109 * @param argumentList the list of arguments to the constructor |
| 7021 */ | 7110 */ |
| 7022 InstanceCreationExpression(this.keyword, ConstructorName constructorName, Argu
mentList argumentList) { | 7111 InstanceCreationExpression(Token keyword, ConstructorName constructorName, Arg
umentList argumentList) { |
| 7112 this.keyword = keyword; |
| 7023 this.constructorName = becomeParentOf(constructorName); | 7113 this.constructorName = becomeParentOf(constructorName); |
| 7024 this._argumentList = becomeParentOf(argumentList); | 7114 this._argumentList = becomeParentOf(argumentList); |
| 7025 } | 7115 } |
| 7026 | 7116 |
| 7027 @override | 7117 @override |
| 7028 accept(AstVisitor visitor) => visitor.visitInstanceCreationExpression(this); | 7118 accept(AstVisitor visitor) => visitor.visitInstanceCreationExpression(this); |
| 7029 | 7119 |
| 7030 /** | 7120 /** |
| 7031 * Return the list of arguments to the constructor. | 7121 * Return the list of arguments to the constructor. |
| 7032 * | 7122 * |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7092 * The value of the literal. | 7182 * The value of the literal. |
| 7093 */ | 7183 */ |
| 7094 int value = 0; | 7184 int value = 0; |
| 7095 | 7185 |
| 7096 /** | 7186 /** |
| 7097 * Initialize a newly created integer literal. | 7187 * Initialize a newly created integer literal. |
| 7098 * | 7188 * |
| 7099 * @param literal the token representing the literal | 7189 * @param literal the token representing the literal |
| 7100 * @param value the value of the literal | 7190 * @param value the value of the literal |
| 7101 */ | 7191 */ |
| 7102 IntegerLiteral(this.literal, this.value); | 7192 IntegerLiteral(Token literal, int value) { |
| 7193 this.literal = literal; |
| 7194 this.value = value; |
| 7195 } |
| 7103 | 7196 |
| 7104 @override | 7197 @override |
| 7105 accept(AstVisitor visitor) => visitor.visitIntegerLiteral(this); | 7198 accept(AstVisitor visitor) => visitor.visitIntegerLiteral(this); |
| 7106 | 7199 |
| 7107 @override | 7200 @override |
| 7108 Token get beginToken => literal; | 7201 Token get beginToken => literal; |
| 7109 | 7202 |
| 7110 @override | 7203 @override |
| 7111 Token get endToken => literal; | 7204 Token get endToken => literal; |
| 7112 | 7205 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7155 */ | 7248 */ |
| 7156 Token rightBracket; | 7249 Token rightBracket; |
| 7157 | 7250 |
| 7158 /** | 7251 /** |
| 7159 * Initialize a newly created interpolation expression. | 7252 * Initialize a newly created interpolation expression. |
| 7160 * | 7253 * |
| 7161 * @param leftBracket the left curly bracket | 7254 * @param leftBracket the left curly bracket |
| 7162 * @param expression the expression to be evaluated for the value to be conver
ted into a string | 7255 * @param expression the expression to be evaluated for the value to be conver
ted into a string |
| 7163 * @param rightBracket the right curly bracket | 7256 * @param rightBracket the right curly bracket |
| 7164 */ | 7257 */ |
| 7165 InterpolationExpression(this.leftBracket, Expression expression, this.rightBra
cket) { | 7258 InterpolationExpression(Token leftBracket, Expression expression, Token rightB
racket) { |
| 7259 this.leftBracket = leftBracket; |
| 7166 this._expression = becomeParentOf(expression); | 7260 this._expression = becomeParentOf(expression); |
| 7261 this.rightBracket = rightBracket; |
| 7167 } | 7262 } |
| 7168 | 7263 |
| 7169 @override | 7264 @override |
| 7170 accept(AstVisitor visitor) => visitor.visitInterpolationExpression(this); | 7265 accept(AstVisitor visitor) => visitor.visitInterpolationExpression(this); |
| 7171 | 7266 |
| 7172 @override | 7267 @override |
| 7173 Token get beginToken => leftBracket; | 7268 Token get beginToken => leftBracket; |
| 7174 | 7269 |
| 7175 @override | 7270 @override |
| 7176 Token get endToken { | 7271 Token get endToken { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7310 TypeName _type; | 7405 TypeName _type; |
| 7311 | 7406 |
| 7312 /** | 7407 /** |
| 7313 * Initialize a newly created is expression. | 7408 * Initialize a newly created is expression. |
| 7314 * | 7409 * |
| 7315 * @param expression the expression used to compute the value whose type is be
ing tested | 7410 * @param expression the expression used to compute the value whose type is be
ing tested |
| 7316 * @param isOperator the is operator | 7411 * @param isOperator the is operator |
| 7317 * @param notOperator the not operator, or `null` if the sense of the test is
not negated | 7412 * @param notOperator the not operator, or `null` if the sense of the test is
not negated |
| 7318 * @param type the name of the type being tested for | 7413 * @param type the name of the type being tested for |
| 7319 */ | 7414 */ |
| 7320 IsExpression(Expression expression, this.isOperator, this.notOperator, TypeNam
e type) { | 7415 IsExpression(Expression expression, Token isOperator, Token notOperator, TypeN
ame type) { |
| 7321 this._expression = becomeParentOf(expression); | 7416 this._expression = becomeParentOf(expression); |
| 7417 this.isOperator = isOperator; |
| 7418 this.notOperator = notOperator; |
| 7322 this._type = becomeParentOf(type); | 7419 this._type = becomeParentOf(type); |
| 7323 } | 7420 } |
| 7324 | 7421 |
| 7325 @override | 7422 @override |
| 7326 accept(AstVisitor visitor) => visitor.visitIsExpression(this); | 7423 accept(AstVisitor visitor) => visitor.visitIsExpression(this); |
| 7327 | 7424 |
| 7328 @override | 7425 @override |
| 7329 Token get beginToken => _expression.beginToken; | 7426 Token get beginToken => _expression.beginToken; |
| 7330 | 7427 |
| 7331 @override | 7428 @override |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7392 * The colon that separates the label from the statement. | 7489 * The colon that separates the label from the statement. |
| 7393 */ | 7490 */ |
| 7394 Token colon; | 7491 Token colon; |
| 7395 | 7492 |
| 7396 /** | 7493 /** |
| 7397 * Initialize a newly created label. | 7494 * Initialize a newly created label. |
| 7398 * | 7495 * |
| 7399 * @param label the label being applied | 7496 * @param label the label being applied |
| 7400 * @param colon the colon that separates the label from whatever follows | 7497 * @param colon the colon that separates the label from whatever follows |
| 7401 */ | 7498 */ |
| 7402 Label(SimpleIdentifier label, this.colon) { | 7499 Label(SimpleIdentifier label, Token colon) { |
| 7403 this._label = becomeParentOf(label); | 7500 this._label = becomeParentOf(label); |
| 7501 this.colon = colon; |
| 7404 } | 7502 } |
| 7405 | 7503 |
| 7406 @override | 7504 @override |
| 7407 accept(AstVisitor visitor) => visitor.visitLabel(this); | 7505 accept(AstVisitor visitor) => visitor.visitLabel(this); |
| 7408 | 7506 |
| 7409 @override | 7507 @override |
| 7410 Token get beginToken => _label.beginToken; | 7508 Token get beginToken => _label.beginToken; |
| 7411 | 7509 |
| 7412 @override | 7510 @override |
| 7413 Token get endToken => colon; | 7511 Token get endToken => colon; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7536 | 7634 |
| 7537 /** | 7635 /** |
| 7538 * Initialize a newly created library directive. | 7636 * Initialize a newly created library directive. |
| 7539 * | 7637 * |
| 7540 * @param comment the documentation comment associated with this directive | 7638 * @param comment the documentation comment associated with this directive |
| 7541 * @param metadata the annotations associated with the directive | 7639 * @param metadata the annotations associated with the directive |
| 7542 * @param libraryToken the token representing the 'library' token | 7640 * @param libraryToken the token representing the 'library' token |
| 7543 * @param name the name of the library being defined | 7641 * @param name the name of the library being defined |
| 7544 * @param semicolon the semicolon terminating the directive | 7642 * @param semicolon the semicolon terminating the directive |
| 7545 */ | 7643 */ |
| 7546 LibraryDirective(Comment comment, List<Annotation> metadata, this.libraryToken
, LibraryIdentifier name, this.semicolon) : super(comment, metadata) { | 7644 LibraryDirective(Comment comment, List<Annotation> metadata, Token libraryToke
n, LibraryIdentifier name, Token semicolon) : super(comment, metadata) { |
| 7645 this.libraryToken = libraryToken; |
| 7547 this._name = becomeParentOf(name); | 7646 this._name = becomeParentOf(name); |
| 7647 this.semicolon = semicolon; |
| 7548 } | 7648 } |
| 7549 | 7649 |
| 7550 @override | 7650 @override |
| 7551 accept(AstVisitor visitor) => visitor.visitLibraryDirective(this); | 7651 accept(AstVisitor visitor) => visitor.visitLibraryDirective(this); |
| 7552 | 7652 |
| 7553 @override | 7653 @override |
| 7554 Token get endToken => semicolon; | 7654 Token get endToken => semicolon; |
| 7555 | 7655 |
| 7556 @override | 7656 @override |
| 7557 Token get keyword => libraryToken; | 7657 Token get keyword => libraryToken; |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7912 */ | 8012 */ |
| 7913 Expression _value; | 8013 Expression _value; |
| 7914 | 8014 |
| 7915 /** | 8015 /** |
| 7916 * Initialize a newly created map literal entry. | 8016 * Initialize a newly created map literal entry. |
| 7917 * | 8017 * |
| 7918 * @param key the expression computing the key with which the value will be as
sociated | 8018 * @param key the expression computing the key with which the value will be as
sociated |
| 7919 * @param separator the colon that separates the key from the value | 8019 * @param separator the colon that separates the key from the value |
| 7920 * @param value the expression computing the value that will be associated wit
h the key | 8020 * @param value the expression computing the value that will be associated wit
h the key |
| 7921 */ | 8021 */ |
| 7922 MapLiteralEntry(Expression key, this.separator, Expression value) { | 8022 MapLiteralEntry(Expression key, Token separator, Expression value) { |
| 7923 this._key = becomeParentOf(key); | 8023 this._key = becomeParentOf(key); |
| 8024 this.separator = separator; |
| 7924 this._value = becomeParentOf(value); | 8025 this._value = becomeParentOf(value); |
| 7925 } | 8026 } |
| 7926 | 8027 |
| 7927 @override | 8028 @override |
| 7928 accept(AstVisitor visitor) => visitor.visitMapLiteralEntry(this); | 8029 accept(AstVisitor visitor) => visitor.visitMapLiteralEntry(this); |
| 7929 | 8030 |
| 7930 @override | 8031 @override |
| 7931 Token get beginToken => _key.beginToken; | 8032 Token get beginToken => _key.beginToken; |
| 7932 | 8033 |
| 7933 @override | 8034 @override |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8042 * @param metadata the annotations associated with this method | 8143 * @param metadata the annotations associated with this method |
| 8043 * @param modifierKeyword the token representing the 'abstract' or 'static' ke
yword | 8144 * @param modifierKeyword the token representing the 'abstract' or 'static' ke
yword |
| 8044 * @param returnType the return type of the method | 8145 * @param returnType the return type of the method |
| 8045 * @param propertyKeyword the token representing the 'get' or 'set' keyword | 8146 * @param propertyKeyword the token representing the 'get' or 'set' keyword |
| 8046 * @param operatorKeyword the token representing the 'operator' keyword | 8147 * @param operatorKeyword the token representing the 'operator' keyword |
| 8047 * @param name the name of the method | 8148 * @param name the name of the method |
| 8048 * @param parameters the parameters associated with the method, or `null` if t
his method | 8149 * @param parameters the parameters associated with the method, or `null` if t
his method |
| 8049 * declares a getter | 8150 * declares a getter |
| 8050 * @param body the body of the method | 8151 * @param body the body of the method |
| 8051 */ | 8152 */ |
| 8052 MethodDeclaration(Comment comment, List<Annotation> metadata, this.externalKey
word, this.modifierKeyword, TypeName returnType, this.propertyKeyword, this.oper
atorKeyword, SimpleIdentifier name, FormalParameterList parameters, FunctionBody
body) : super(comment, metadata) { | 8153 MethodDeclaration(Comment comment, List<Annotation> metadata, Token externalKe
yword, Token modifierKeyword, TypeName returnType, Token propertyKeyword, Token
operatorKeyword, SimpleIdentifier name, FormalParameterList parameters, Function
Body body) : super(comment, metadata) { |
| 8154 this.externalKeyword = externalKeyword; |
| 8155 this.modifierKeyword = modifierKeyword; |
| 8053 this._returnType = becomeParentOf(returnType); | 8156 this._returnType = becomeParentOf(returnType); |
| 8157 this.propertyKeyword = propertyKeyword; |
| 8158 this.operatorKeyword = operatorKeyword; |
| 8054 this._name = becomeParentOf(name); | 8159 this._name = becomeParentOf(name); |
| 8055 this._parameters = becomeParentOf(parameters); | 8160 this._parameters = becomeParentOf(parameters); |
| 8056 this._body = becomeParentOf(body); | 8161 this._body = becomeParentOf(body); |
| 8057 } | 8162 } |
| 8058 | 8163 |
| 8059 @override | 8164 @override |
| 8060 accept(AstVisitor visitor) => visitor.visitMethodDeclaration(this); | 8165 accept(AstVisitor visitor) => visitor.visitMethodDeclaration(this); |
| 8061 | 8166 |
| 8062 /** | 8167 /** |
| 8063 * Return the body of the method. | 8168 * Return the body of the method. |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8233 ArgumentList _argumentList; | 8338 ArgumentList _argumentList; |
| 8234 | 8339 |
| 8235 /** | 8340 /** |
| 8236 * Initialize a newly created method invocation. | 8341 * Initialize a newly created method invocation. |
| 8237 * | 8342 * |
| 8238 * @param target the expression producing the object on which the method is de
fined | 8343 * @param target the expression producing the object on which the method is de
fined |
| 8239 * @param period the period that separates the target from the method name | 8344 * @param period the period that separates the target from the method name |
| 8240 * @param methodName the name of the method being invoked | 8345 * @param methodName the name of the method being invoked |
| 8241 * @param argumentList the list of arguments to the method | 8346 * @param argumentList the list of arguments to the method |
| 8242 */ | 8347 */ |
| 8243 MethodInvocation(Expression target, this.period, SimpleIdentifier methodName,
ArgumentList argumentList) { | 8348 MethodInvocation(Expression target, Token period, SimpleIdentifier methodName,
ArgumentList argumentList) { |
| 8244 this._target = becomeParentOf(target); | 8349 this._target = becomeParentOf(target); |
| 8350 this.period = period; |
| 8245 this._methodName = becomeParentOf(methodName); | 8351 this._methodName = becomeParentOf(methodName); |
| 8246 this._argumentList = becomeParentOf(argumentList); | 8352 this._argumentList = becomeParentOf(argumentList); |
| 8247 } | 8353 } |
| 8248 | 8354 |
| 8249 @override | 8355 @override |
| 8250 accept(AstVisitor visitor) => visitor.visitMethodInvocation(this); | 8356 accept(AstVisitor visitor) => visitor.visitMethodInvocation(this); |
| 8251 | 8357 |
| 8252 /** | 8358 /** |
| 8253 * Return the list of arguments to the method. | 8359 * Return the list of arguments to the method. |
| 8254 * | 8360 * |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8482 /** | 8588 /** |
| 8483 * Initialize a newly created namespace directive. | 8589 * Initialize a newly created namespace directive. |
| 8484 * | 8590 * |
| 8485 * @param comment the documentation comment associated with this directive | 8591 * @param comment the documentation comment associated with this directive |
| 8486 * @param metadata the annotations associated with the directive | 8592 * @param metadata the annotations associated with the directive |
| 8487 * @param keyword the token representing the 'import' or 'export' keyword | 8593 * @param keyword the token representing the 'import' or 'export' keyword |
| 8488 * @param libraryUri the URI of the library being imported or exported | 8594 * @param libraryUri the URI of the library being imported or exported |
| 8489 * @param combinators the combinators used to control which names are imported
or exported | 8595 * @param combinators the combinators used to control which names are imported
or exported |
| 8490 * @param semicolon the semicolon terminating the directive | 8596 * @param semicolon the semicolon terminating the directive |
| 8491 */ | 8597 */ |
| 8492 NamespaceDirective(Comment comment, List<Annotation> metadata, this.keyword, S
tringLiteral libraryUri, List<Combinator> combinators, this.semicolon) : super(c
omment, metadata, libraryUri) { | 8598 NamespaceDirective(Comment comment, List<Annotation> metadata, Token keyword,
StringLiteral libraryUri, List<Combinator> combinators, Token semicolon) : super
(comment, metadata, libraryUri) { |
| 8493 this._combinators = new NodeList<Combinator>(this); | 8599 this._combinators = new NodeList<Combinator>(this); |
| 8600 this.keyword = keyword; |
| 8494 this._combinators.addAll(combinators); | 8601 this._combinators.addAll(combinators); |
| 8602 this.semicolon = semicolon; |
| 8495 } | 8603 } |
| 8496 | 8604 |
| 8497 /** | 8605 /** |
| 8498 * Return the combinators used to control how names are imported or exported. | 8606 * Return the combinators used to control how names are imported or exported. |
| 8499 * | 8607 * |
| 8500 * @return the combinators used to control how names are imported or exported | 8608 * @return the combinators used to control how names are imported or exported |
| 8501 */ | 8609 */ |
| 8502 NodeList<Combinator> get combinators => _combinators; | 8610 NodeList<Combinator> get combinators => _combinators; |
| 8503 | 8611 |
| 8504 @override | 8612 @override |
| (...skipping 25 matching lines...) Expand all Loading... |
| 8530 * The name of the native object that implements the class. | 8638 * The name of the native object that implements the class. |
| 8531 */ | 8639 */ |
| 8532 StringLiteral name; | 8640 StringLiteral name; |
| 8533 | 8641 |
| 8534 /** | 8642 /** |
| 8535 * Initialize a newly created native clause. | 8643 * Initialize a newly created native clause. |
| 8536 * | 8644 * |
| 8537 * @param keyword the token representing the 'native' keyword | 8645 * @param keyword the token representing the 'native' keyword |
| 8538 * @param name the name of the native object that implements the class. | 8646 * @param name the name of the native object that implements the class. |
| 8539 */ | 8647 */ |
| 8540 NativeClause(this.keyword, this.name); | 8648 NativeClause(Token keyword, StringLiteral name) { |
| 8649 this.keyword = keyword; |
| 8650 this.name = name; |
| 8651 } |
| 8541 | 8652 |
| 8542 @override | 8653 @override |
| 8543 accept(AstVisitor visitor) => visitor.visitNativeClause(this); | 8654 accept(AstVisitor visitor) => visitor.visitNativeClause(this); |
| 8544 | 8655 |
| 8545 @override | 8656 @override |
| 8546 Token get beginToken => keyword; | 8657 Token get beginToken => keyword; |
| 8547 | 8658 |
| 8548 @override | 8659 @override |
| 8549 Token get endToken => name.endToken; | 8660 Token get endToken => name.endToken; |
| 8550 | 8661 |
| 8551 @override | 8662 @override |
| 8552 void visitChildren(AstVisitor visitor) { | 8663 void visitChildren(AstVisitor visitor) { |
| 8553 safelyVisitChild(name, visitor); | 8664 safelyVisitChild(name, visitor); |
| 8554 } | 8665 } |
| 8555 } | 8666 } |
| 8556 | 8667 |
| 8557 /** | 8668 /** |
| 8558 * Instances of the class `NativeFunctionBody` represent a function body that co
nsists of a | 8669 * Instances of the class `NativeFunctionBody` represent a function body that co
nsists of a |
| 8559 * native keyword followed by a string literal. | 8670 * native keyword followed by a string literal. |
| 8560 * | 8671 * |
| 8561 * <pre> | 8672 * <pre> |
| 8562 * nativeFunctionBody ::= | 8673 * nativeFunctionBody ::= |
| 8563 * 'native' [SimpleStringLiteral] ';' | 8674 * 'native' [SimpleStringLiteral] ';' |
| 8564 * </pre> | 8675 * </pre> |
| 8565 */ | 8676 */ |
| 8566 class NativeFunctionBody extends FunctionBody { | 8677 class NativeFunctionBody extends FunctionBody { |
| 8567 /** | 8678 /** |
| 8568 * The token representing 'native' that marks the start of the function body. | 8679 * The token representing 'native' that marks the start of the function body. |
| 8569 */ | 8680 */ |
| 8570 final Token nativeToken; | 8681 Token nativeToken; |
| 8571 | 8682 |
| 8572 /** | 8683 /** |
| 8573 * The string literal, after the 'native' token. | 8684 * The string literal, after the 'native' token. |
| 8574 */ | 8685 */ |
| 8575 StringLiteral _stringLiteral; | 8686 StringLiteral _stringLiteral; |
| 8576 | 8687 |
| 8577 /** | 8688 /** |
| 8578 * The token representing the semicolon that marks the end of the function bod
y. | 8689 * The token representing the semicolon that marks the end of the function bod
y. |
| 8579 */ | 8690 */ |
| 8580 final Token semicolon; | 8691 Token semicolon; |
| 8581 | 8692 |
| 8582 /** | 8693 /** |
| 8583 * Initialize a newly created function body consisting of the 'native' token,
a string literal, | 8694 * Initialize a newly created function body consisting of the 'native' token,
a string literal, |
| 8584 * and a semicolon. | 8695 * and a semicolon. |
| 8585 * | 8696 * |
| 8586 * @param nativeToken the token representing 'native' that marks the start of
the function body | 8697 * @param nativeToken the token representing 'native' that marks the start of
the function body |
| 8587 * @param stringLiteral the string literal | 8698 * @param stringLiteral the string literal |
| 8588 * @param semicolon the token representing the semicolon that marks the end of
the function body | 8699 * @param semicolon the token representing the semicolon that marks the end of
the function body |
| 8589 */ | 8700 */ |
| 8590 NativeFunctionBody(this.nativeToken, StringLiteral stringLiteral, this.semicol
on) { | 8701 NativeFunctionBody(Token nativeToken, StringLiteral stringLiteral, Token semic
olon) { |
| 8702 this.nativeToken = nativeToken; |
| 8591 this._stringLiteral = becomeParentOf(stringLiteral); | 8703 this._stringLiteral = becomeParentOf(stringLiteral); |
| 8704 this.semicolon = semicolon; |
| 8592 } | 8705 } |
| 8593 | 8706 |
| 8594 @override | 8707 @override |
| 8595 accept(AstVisitor visitor) => visitor.visitNativeFunctionBody(this); | 8708 accept(AstVisitor visitor) => visitor.visitNativeFunctionBody(this); |
| 8596 | 8709 |
| 8597 @override | 8710 @override |
| 8598 Token get beginToken => nativeToken; | 8711 Token get beginToken => nativeToken; |
| 8599 | 8712 |
| 8600 @override | 8713 @override |
| 8601 Token get endToken => semicolon; | 8714 Token get endToken => semicolon; |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8907 | 9020 |
| 8908 /** | 9021 /** |
| 8909 * Initialize a newly created part directive. | 9022 * Initialize a newly created part directive. |
| 8910 * | 9023 * |
| 8911 * @param comment the documentation comment associated with this directive | 9024 * @param comment the documentation comment associated with this directive |
| 8912 * @param metadata the annotations associated with the directive | 9025 * @param metadata the annotations associated with the directive |
| 8913 * @param partToken the token representing the 'part' token | 9026 * @param partToken the token representing the 'part' token |
| 8914 * @param partUri the URI of the part being included | 9027 * @param partUri the URI of the part being included |
| 8915 * @param semicolon the semicolon terminating the directive | 9028 * @param semicolon the semicolon terminating the directive |
| 8916 */ | 9029 */ |
| 8917 PartDirective(Comment comment, List<Annotation> metadata, this.partToken, Stri
ngLiteral partUri, this.semicolon) : super(comment, metadata, partUri); | 9030 PartDirective(Comment comment, List<Annotation> metadata, Token partToken, Str
ingLiteral partUri, Token semicolon) : super(comment, metadata, partUri) { |
| 9031 this.partToken = partToken; |
| 9032 this.semicolon = semicolon; |
| 9033 } |
| 8918 | 9034 |
| 8919 @override | 9035 @override |
| 8920 accept(AstVisitor visitor) => visitor.visitPartDirective(this); | 9036 accept(AstVisitor visitor) => visitor.visitPartDirective(this); |
| 8921 | 9037 |
| 8922 @override | 9038 @override |
| 8923 Token get endToken => semicolon; | 9039 Token get endToken => semicolon; |
| 8924 | 9040 |
| 8925 @override | 9041 @override |
| 8926 Token get keyword => partToken; | 9042 Token get keyword => partToken; |
| 8927 | 9043 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8964 /** | 9080 /** |
| 8965 * Initialize a newly created part-of directive. | 9081 * Initialize a newly created part-of directive. |
| 8966 * | 9082 * |
| 8967 * @param comment the documentation comment associated with this directive | 9083 * @param comment the documentation comment associated with this directive |
| 8968 * @param metadata the annotations associated with the directive | 9084 * @param metadata the annotations associated with the directive |
| 8969 * @param partToken the token representing the 'part' token | 9085 * @param partToken the token representing the 'part' token |
| 8970 * @param ofToken the token representing the 'of' token | 9086 * @param ofToken the token representing the 'of' token |
| 8971 * @param libraryName the name of the library that the containing compilation
unit is part of | 9087 * @param libraryName the name of the library that the containing compilation
unit is part of |
| 8972 * @param semicolon the semicolon terminating the directive | 9088 * @param semicolon the semicolon terminating the directive |
| 8973 */ | 9089 */ |
| 8974 PartOfDirective(Comment comment, List<Annotation> metadata, this.partToken, th
is.ofToken, LibraryIdentifier libraryName, this.semicolon) : super(comment, meta
data) { | 9090 PartOfDirective(Comment comment, List<Annotation> metadata, Token partToken, T
oken ofToken, LibraryIdentifier libraryName, Token semicolon) : super(comment, m
etadata) { |
| 9091 this.partToken = partToken; |
| 9092 this.ofToken = ofToken; |
| 8975 this._libraryName = becomeParentOf(libraryName); | 9093 this._libraryName = becomeParentOf(libraryName); |
| 9094 this.semicolon = semicolon; |
| 8976 } | 9095 } |
| 8977 | 9096 |
| 8978 @override | 9097 @override |
| 8979 accept(AstVisitor visitor) => visitor.visitPartOfDirective(this); | 9098 accept(AstVisitor visitor) => visitor.visitPartOfDirective(this); |
| 8980 | 9099 |
| 8981 @override | 9100 @override |
| 8982 Token get endToken => semicolon; | 9101 Token get endToken => semicolon; |
| 8983 | 9102 |
| 8984 @override | 9103 @override |
| 8985 Token get keyword => partToken; | 9104 Token get keyword => partToken; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9042 * or if the operator could not be resolved. | 9161 * or if the operator could not be resolved. |
| 9043 */ | 9162 */ |
| 9044 MethodElement _staticElement; | 9163 MethodElement _staticElement; |
| 9045 | 9164 |
| 9046 /** | 9165 /** |
| 9047 * Initialize a newly created postfix expression. | 9166 * Initialize a newly created postfix expression. |
| 9048 * | 9167 * |
| 9049 * @param operand the expression computing the operand for the operator | 9168 * @param operand the expression computing the operand for the operator |
| 9050 * @param operator the postfix operator being applied to the operand | 9169 * @param operator the postfix operator being applied to the operand |
| 9051 */ | 9170 */ |
| 9052 PostfixExpression(Expression operand, this.operator) { | 9171 PostfixExpression(Expression operand, Token operator) { |
| 9053 this._operand = becomeParentOf(operand); | 9172 this._operand = becomeParentOf(operand); |
| 9173 this.operator = operator; |
| 9054 } | 9174 } |
| 9055 | 9175 |
| 9056 @override | 9176 @override |
| 9057 accept(AstVisitor visitor) => visitor.visitPostfixExpression(this); | 9177 accept(AstVisitor visitor) => visitor.visitPostfixExpression(this); |
| 9058 | 9178 |
| 9059 @override | 9179 @override |
| 9060 Token get beginToken => _operand.beginToken; | 9180 Token get beginToken => _operand.beginToken; |
| 9061 | 9181 |
| 9062 /** | 9182 /** |
| 9063 * Return the best element available for this operator. If resolution was able
to find a better | 9183 * Return the best element available for this operator. If resolution was able
to find a better |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9217 * or if the operator could not be resolved. | 9337 * or if the operator could not be resolved. |
| 9218 */ | 9338 */ |
| 9219 MethodElement _propagatedElement; | 9339 MethodElement _propagatedElement; |
| 9220 | 9340 |
| 9221 /** | 9341 /** |
| 9222 * Initialize a newly created prefix expression. | 9342 * Initialize a newly created prefix expression. |
| 9223 * | 9343 * |
| 9224 * @param operator the prefix operator being applied to the operand | 9344 * @param operator the prefix operator being applied to the operand |
| 9225 * @param operand the expression computing the operand for the operator | 9345 * @param operand the expression computing the operand for the operator |
| 9226 */ | 9346 */ |
| 9227 PrefixExpression(this.operator, Expression operand) { | 9347 PrefixExpression(Token operator, Expression operand) { |
| 9348 this.operator = operator; |
| 9228 this._operand = becomeParentOf(operand); | 9349 this._operand = becomeParentOf(operand); |
| 9229 } | 9350 } |
| 9230 | 9351 |
| 9231 @override | 9352 @override |
| 9232 accept(AstVisitor visitor) => visitor.visitPrefixExpression(this); | 9353 accept(AstVisitor visitor) => visitor.visitPrefixExpression(this); |
| 9233 | 9354 |
| 9234 @override | 9355 @override |
| 9235 Token get beginToken => operator; | 9356 Token get beginToken => operator; |
| 9236 | 9357 |
| 9237 /** | 9358 /** |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9386 */ | 9507 */ |
| 9387 SimpleIdentifier _identifier; | 9508 SimpleIdentifier _identifier; |
| 9388 | 9509 |
| 9389 /** | 9510 /** |
| 9390 * Initialize a newly created prefixed identifier. | 9511 * Initialize a newly created prefixed identifier. |
| 9391 * | 9512 * |
| 9392 * @param prefix the identifier being prefixed | 9513 * @param prefix the identifier being prefixed |
| 9393 * @param period the period used to separate the prefix from the identifier | 9514 * @param period the period used to separate the prefix from the identifier |
| 9394 * @param identifier the prefix associated with the library in which the ident
ifier is defined | 9515 * @param identifier the prefix associated with the library in which the ident
ifier is defined |
| 9395 */ | 9516 */ |
| 9396 PrefixedIdentifier(SimpleIdentifier prefix, this.period, SimpleIdentifier iden
tifier) { | 9517 PrefixedIdentifier(SimpleIdentifier prefix, Token period, SimpleIdentifier ide
ntifier) { |
| 9397 this._prefix = becomeParentOf(prefix); | 9518 this._prefix = becomeParentOf(prefix); |
| 9519 this.period = period; |
| 9398 this._identifier = becomeParentOf(identifier); | 9520 this._identifier = becomeParentOf(identifier); |
| 9399 } | 9521 } |
| 9400 | 9522 |
| 9401 @override | 9523 @override |
| 9402 accept(AstVisitor visitor) => visitor.visitPrefixedIdentifier(this); | 9524 accept(AstVisitor visitor) => visitor.visitPrefixedIdentifier(this); |
| 9403 | 9525 |
| 9404 @override | 9526 @override |
| 9405 Token get beginToken => _prefix.beginToken; | 9527 Token get beginToken => _prefix.beginToken; |
| 9406 | 9528 |
| 9407 @override | 9529 @override |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9505 */ | 9627 */ |
| 9506 SimpleIdentifier _propertyName; | 9628 SimpleIdentifier _propertyName; |
| 9507 | 9629 |
| 9508 /** | 9630 /** |
| 9509 * Initialize a newly created property access expression. | 9631 * Initialize a newly created property access expression. |
| 9510 * | 9632 * |
| 9511 * @param target the expression computing the object defining the property bei
ng accessed | 9633 * @param target the expression computing the object defining the property bei
ng accessed |
| 9512 * @param operator the property access operator | 9634 * @param operator the property access operator |
| 9513 * @param propertyName the name of the property being accessed | 9635 * @param propertyName the name of the property being accessed |
| 9514 */ | 9636 */ |
| 9515 PropertyAccess(Expression target, this.operator, SimpleIdentifier propertyName
) { | 9637 PropertyAccess(Expression target, Token operator, SimpleIdentifier propertyNam
e) { |
| 9516 this._target = becomeParentOf(target); | 9638 this._target = becomeParentOf(target); |
| 9639 this.operator = operator; |
| 9517 this._propertyName = becomeParentOf(propertyName); | 9640 this._propertyName = becomeParentOf(propertyName); |
| 9518 } | 9641 } |
| 9519 | 9642 |
| 9520 @override | 9643 @override |
| 9521 accept(AstVisitor visitor) => visitor.visitPropertyAccess(this); | 9644 accept(AstVisitor visitor) => visitor.visitPropertyAccess(this); |
| 9522 | 9645 |
| 9523 @override | 9646 @override |
| 9524 Token get beginToken { | 9647 Token get beginToken { |
| 9525 if (_target != null) { | 9648 if (_target != null) { |
| 9526 return _target.beginToken; | 9649 return _target.beginToken; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9651 | 9774 |
| 9652 /** | 9775 /** |
| 9653 * Initialize a newly created redirecting invocation to invoke the constructor
with the given name | 9776 * Initialize a newly created redirecting invocation to invoke the constructor
with the given name |
| 9654 * with the given arguments. | 9777 * with the given arguments. |
| 9655 * | 9778 * |
| 9656 * @param keyword the token for the 'this' keyword | 9779 * @param keyword the token for the 'this' keyword |
| 9657 * @param period the token for the period before the name of the constructor t
hat is being invoked | 9780 * @param period the token for the period before the name of the constructor t
hat is being invoked |
| 9658 * @param constructorName the name of the constructor that is being invoked | 9781 * @param constructorName the name of the constructor that is being invoked |
| 9659 * @param argumentList the list of arguments to the constructor | 9782 * @param argumentList the list of arguments to the constructor |
| 9660 */ | 9783 */ |
| 9661 RedirectingConstructorInvocation(this.keyword, this.period, SimpleIdentifier c
onstructorName, ArgumentList argumentList) { | 9784 RedirectingConstructorInvocation(Token keyword, Token period, SimpleIdentifier
constructorName, ArgumentList argumentList) { |
| 9785 this.keyword = keyword; |
| 9786 this.period = period; |
| 9662 this._constructorName = becomeParentOf(constructorName); | 9787 this._constructorName = becomeParentOf(constructorName); |
| 9663 this._argumentList = becomeParentOf(argumentList); | 9788 this._argumentList = becomeParentOf(argumentList); |
| 9664 } | 9789 } |
| 9665 | 9790 |
| 9666 @override | 9791 @override |
| 9667 accept(AstVisitor visitor) => visitor.visitRedirectingConstructorInvocation(th
is); | 9792 accept(AstVisitor visitor) => visitor.visitRedirectingConstructorInvocation(th
is); |
| 9668 | 9793 |
| 9669 /** | 9794 /** |
| 9670 * Return the list of arguments to the constructor. | 9795 * Return the list of arguments to the constructor. |
| 9671 * | 9796 * |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9724 /** | 9849 /** |
| 9725 * The token representing the 'rethrow' keyword. | 9850 * The token representing the 'rethrow' keyword. |
| 9726 */ | 9851 */ |
| 9727 Token keyword; | 9852 Token keyword; |
| 9728 | 9853 |
| 9729 /** | 9854 /** |
| 9730 * Initialize a newly created rethrow expression. | 9855 * Initialize a newly created rethrow expression. |
| 9731 * | 9856 * |
| 9732 * @param keyword the token representing the 'rethrow' keyword | 9857 * @param keyword the token representing the 'rethrow' keyword |
| 9733 */ | 9858 */ |
| 9734 RethrowExpression(this.keyword); | 9859 RethrowExpression(Token keyword) { |
| 9860 this.keyword = keyword; |
| 9861 } |
| 9735 | 9862 |
| 9736 @override | 9863 @override |
| 9737 accept(AstVisitor visitor) => visitor.visitRethrowExpression(this); | 9864 accept(AstVisitor visitor) => visitor.visitRethrowExpression(this); |
| 9738 | 9865 |
| 9739 @override | 9866 @override |
| 9740 Token get beginToken => keyword; | 9867 Token get beginToken => keyword; |
| 9741 | 9868 |
| 9742 @override | 9869 @override |
| 9743 Token get endToken => keyword; | 9870 Token get endToken => keyword; |
| 9744 | 9871 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 9775 */ | 9902 */ |
| 9776 Token semicolon; | 9903 Token semicolon; |
| 9777 | 9904 |
| 9778 /** | 9905 /** |
| 9779 * Initialize a newly created return statement. | 9906 * Initialize a newly created return statement. |
| 9780 * | 9907 * |
| 9781 * @param keyword the token representing the 'return' keyword | 9908 * @param keyword the token representing the 'return' keyword |
| 9782 * @param expression the expression computing the value to be returned | 9909 * @param expression the expression computing the value to be returned |
| 9783 * @param semicolon the semicolon terminating the statement | 9910 * @param semicolon the semicolon terminating the statement |
| 9784 */ | 9911 */ |
| 9785 ReturnStatement(this.keyword, Expression expression, this.semicolon) { | 9912 ReturnStatement(Token keyword, Expression expression, Token semicolon) { |
| 9913 this.keyword = keyword; |
| 9786 this._expression = becomeParentOf(expression); | 9914 this._expression = becomeParentOf(expression); |
| 9915 this.semicolon = semicolon; |
| 9787 } | 9916 } |
| 9788 | 9917 |
| 9789 @override | 9918 @override |
| 9790 accept(AstVisitor visitor) => visitor.visitReturnStatement(this); | 9919 accept(AstVisitor visitor) => visitor.visitReturnStatement(this); |
| 9791 | 9920 |
| 9792 @override | 9921 @override |
| 9793 Token get beginToken => keyword; | 9922 Token get beginToken => keyword; |
| 9794 | 9923 |
| 9795 @override | 9924 @override |
| 9796 Token get endToken => semicolon; | 9925 Token get endToken => semicolon; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9831 /** | 9960 /** |
| 9832 * The token representing this script tag. | 9961 * The token representing this script tag. |
| 9833 */ | 9962 */ |
| 9834 Token scriptTag; | 9963 Token scriptTag; |
| 9835 | 9964 |
| 9836 /** | 9965 /** |
| 9837 * Initialize a newly created script tag. | 9966 * Initialize a newly created script tag. |
| 9838 * | 9967 * |
| 9839 * @param scriptTag the token representing this script tag | 9968 * @param scriptTag the token representing this script tag |
| 9840 */ | 9969 */ |
| 9841 ScriptTag(this.scriptTag); | 9970 ScriptTag(Token scriptTag) { |
| 9971 this.scriptTag = scriptTag; |
| 9972 } |
| 9842 | 9973 |
| 9843 @override | 9974 @override |
| 9844 accept(AstVisitor visitor) => visitor.visitScriptTag(this); | 9975 accept(AstVisitor visitor) => visitor.visitScriptTag(this); |
| 9845 | 9976 |
| 9846 @override | 9977 @override |
| 9847 Token get beginToken => scriptTag; | 9978 Token get beginToken => scriptTag; |
| 9848 | 9979 |
| 9849 @override | 9980 @override |
| 9850 Token get endToken => scriptTag; | 9981 Token get endToken => scriptTag; |
| 9851 | 9982 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9922 | 10053 |
| 9923 /** | 10054 /** |
| 9924 * Initialize a newly created formal parameter. | 10055 * Initialize a newly created formal parameter. |
| 9925 * | 10056 * |
| 9926 * @param comment the documentation comment associated with this parameter | 10057 * @param comment the documentation comment associated with this parameter |
| 9927 * @param metadata the annotations associated with this parameter | 10058 * @param metadata the annotations associated with this parameter |
| 9928 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword | 10059 * @param keyword the token representing either the 'final', 'const' or 'var'
keyword |
| 9929 * @param type the name of the declared type of the parameter | 10060 * @param type the name of the declared type of the parameter |
| 9930 * @param identifier the name of the parameter being declared | 10061 * @param identifier the name of the parameter being declared |
| 9931 */ | 10062 */ |
| 9932 SimpleFormalParameter(Comment comment, List<Annotation> metadata, this.keyword
, TypeName type, SimpleIdentifier identifier) : super(comment, metadata, identif
ier) { | 10063 SimpleFormalParameter(Comment comment, List<Annotation> metadata, Token keywor
d, TypeName type, SimpleIdentifier identifier) : super(comment, metadata, identi
fier) { |
| 10064 this.keyword = keyword; |
| 9933 this._type = becomeParentOf(type); | 10065 this._type = becomeParentOf(type); |
| 9934 } | 10066 } |
| 9935 | 10067 |
| 9936 @override | 10068 @override |
| 9937 accept(AstVisitor visitor) => visitor.visitSimpleFormalParameter(this); | 10069 accept(AstVisitor visitor) => visitor.visitSimpleFormalParameter(this); |
| 9938 | 10070 |
| 9939 @override | 10071 @override |
| 9940 Token get beginToken { | 10072 Token get beginToken { |
| 9941 if (keyword != null) { | 10073 if (keyword != null) { |
| 9942 return keyword; | 10074 return keyword; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10016 * be set to hold onto the static and propagated information. The auxiliary el
ement will hold onto | 10148 * be set to hold onto the static and propagated information. The auxiliary el
ement will hold onto |
| 10017 * the elements from the getter context. | 10149 * the elements from the getter context. |
| 10018 */ | 10150 */ |
| 10019 AuxiliaryElements auxiliaryElements = null; | 10151 AuxiliaryElements auxiliaryElements = null; |
| 10020 | 10152 |
| 10021 /** | 10153 /** |
| 10022 * Initialize a newly created identifier. | 10154 * Initialize a newly created identifier. |
| 10023 * | 10155 * |
| 10024 * @param token the token representing the identifier | 10156 * @param token the token representing the identifier |
| 10025 */ | 10157 */ |
| 10026 SimpleIdentifier(this.token); | 10158 SimpleIdentifier(Token token) { |
| 10159 this.token = token; |
| 10160 } |
| 10027 | 10161 |
| 10028 @override | 10162 @override |
| 10029 accept(AstVisitor visitor) => visitor.visitSimpleIdentifier(this); | 10163 accept(AstVisitor visitor) => visitor.visitSimpleIdentifier(this); |
| 10030 | 10164 |
| 10031 @override | 10165 @override |
| 10032 Token get beginToken => token; | 10166 Token get beginToken => token; |
| 10033 | 10167 |
| 10034 @override | 10168 @override |
| 10035 Element get bestElement { | 10169 Element get bestElement { |
| 10036 if (_propagatedElement == null) { | 10170 if (_propagatedElement == null) { |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10291 * The toolkit specific element associated with this literal, or `null`. | 10425 * The toolkit specific element associated with this literal, or `null`. |
| 10292 */ | 10426 */ |
| 10293 Element _toolkitElement; | 10427 Element _toolkitElement; |
| 10294 | 10428 |
| 10295 /** | 10429 /** |
| 10296 * Initialize a newly created simple string literal. | 10430 * Initialize a newly created simple string literal. |
| 10297 * | 10431 * |
| 10298 * @param literal the token representing the literal | 10432 * @param literal the token representing the literal |
| 10299 * @param value the value of the literal | 10433 * @param value the value of the literal |
| 10300 */ | 10434 */ |
| 10301 SimpleStringLiteral(this.literal, String value) { | 10435 SimpleStringLiteral(Token literal, String value) { |
| 10436 this.literal = literal; |
| 10302 this._value = StringUtilities.intern(value); | 10437 this._value = StringUtilities.intern(value); |
| 10303 } | 10438 } |
| 10304 | 10439 |
| 10305 @override | 10440 @override |
| 10306 accept(AstVisitor visitor) => visitor.visitSimpleStringLiteral(this); | 10441 accept(AstVisitor visitor) => visitor.visitSimpleStringLiteral(this); |
| 10307 | 10442 |
| 10308 @override | 10443 @override |
| 10309 Token get beginToken => literal; | 10444 Token get beginToken => literal; |
| 10310 | 10445 |
| 10311 @override | 10446 @override |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10548 | 10683 |
| 10549 /** | 10684 /** |
| 10550 * Initialize a newly created super invocation to invoke the inherited constru
ctor with the given | 10685 * Initialize a newly created super invocation to invoke the inherited constru
ctor with the given |
| 10551 * name with the given arguments. | 10686 * name with the given arguments. |
| 10552 * | 10687 * |
| 10553 * @param keyword the token for the 'super' keyword | 10688 * @param keyword the token for the 'super' keyword |
| 10554 * @param period the token for the period before the name of the constructor t
hat is being invoked | 10689 * @param period the token for the period before the name of the constructor t
hat is being invoked |
| 10555 * @param constructorName the name of the constructor that is being invoked | 10690 * @param constructorName the name of the constructor that is being invoked |
| 10556 * @param argumentList the list of arguments to the constructor | 10691 * @param argumentList the list of arguments to the constructor |
| 10557 */ | 10692 */ |
| 10558 SuperConstructorInvocation(this.keyword, this.period, SimpleIdentifier constru
ctorName, ArgumentList argumentList) { | 10693 SuperConstructorInvocation(Token keyword, Token period, SimpleIdentifier const
ructorName, ArgumentList argumentList) { |
| 10694 this.keyword = keyword; |
| 10695 this.period = period; |
| 10559 this._constructorName = becomeParentOf(constructorName); | 10696 this._constructorName = becomeParentOf(constructorName); |
| 10560 this._argumentList = becomeParentOf(argumentList); | 10697 this._argumentList = becomeParentOf(argumentList); |
| 10561 } | 10698 } |
| 10562 | 10699 |
| 10563 @override | 10700 @override |
| 10564 accept(AstVisitor visitor) => visitor.visitSuperConstructorInvocation(this); | 10701 accept(AstVisitor visitor) => visitor.visitSuperConstructorInvocation(this); |
| 10565 | 10702 |
| 10566 /** | 10703 /** |
| 10567 * Return the list of arguments to the constructor. | 10704 * Return the list of arguments to the constructor. |
| 10568 * | 10705 * |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10621 /** | 10758 /** |
| 10622 * The token representing the keyword. | 10759 * The token representing the keyword. |
| 10623 */ | 10760 */ |
| 10624 Token keyword; | 10761 Token keyword; |
| 10625 | 10762 |
| 10626 /** | 10763 /** |
| 10627 * Initialize a newly created super expression. | 10764 * Initialize a newly created super expression. |
| 10628 * | 10765 * |
| 10629 * @param keyword the token representing the keyword | 10766 * @param keyword the token representing the keyword |
| 10630 */ | 10767 */ |
| 10631 SuperExpression(this.keyword); | 10768 SuperExpression(Token keyword) { |
| 10769 this.keyword = keyword; |
| 10770 } |
| 10632 | 10771 |
| 10633 @override | 10772 @override |
| 10634 accept(AstVisitor visitor) => visitor.visitSuperExpression(this); | 10773 accept(AstVisitor visitor) => visitor.visitSuperExpression(this); |
| 10635 | 10774 |
| 10636 @override | 10775 @override |
| 10637 Token get beginToken => keyword; | 10776 Token get beginToken => keyword; |
| 10638 | 10777 |
| 10639 @override | 10778 @override |
| 10640 Token get endToken => keyword; | 10779 Token get endToken => keyword; |
| 10641 | 10780 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10762 NodeList<Statement> _statements; | 10901 NodeList<Statement> _statements; |
| 10763 | 10902 |
| 10764 /** | 10903 /** |
| 10765 * Initialize a newly created switch member. | 10904 * Initialize a newly created switch member. |
| 10766 * | 10905 * |
| 10767 * @param labels the labels associated with the switch member | 10906 * @param labels the labels associated with the switch member |
| 10768 * @param keyword the token representing the 'case' or 'default' keyword | 10907 * @param keyword the token representing the 'case' or 'default' keyword |
| 10769 * @param colon the colon separating the keyword or the expression from the st
atements | 10908 * @param colon the colon separating the keyword or the expression from the st
atements |
| 10770 * @param statements the statements that will be executed if this switch membe
r is selected | 10909 * @param statements the statements that will be executed if this switch membe
r is selected |
| 10771 */ | 10910 */ |
| 10772 SwitchMember(List<Label> labels, this.keyword, this.colon, List<Statement> sta
tements) { | 10911 SwitchMember(List<Label> labels, Token keyword, Token colon, List<Statement> s
tatements) { |
| 10773 this._labels = new NodeList<Label>(this); | 10912 this._labels = new NodeList<Label>(this); |
| 10774 this._statements = new NodeList<Statement>(this); | 10913 this._statements = new NodeList<Statement>(this); |
| 10775 this._labels.addAll(labels); | 10914 this._labels.addAll(labels); |
| 10915 this.keyword = keyword; |
| 10916 this.colon = colon; |
| 10776 this._statements.addAll(statements); | 10917 this._statements.addAll(statements); |
| 10777 } | 10918 } |
| 10778 | 10919 |
| 10779 @override | 10920 @override |
| 10780 Token get beginToken { | 10921 Token get beginToken { |
| 10781 if (!_labels.isEmpty) { | 10922 if (!_labels.isEmpty) { |
| 10782 return _labels.beginToken; | 10923 return _labels.beginToken; |
| 10783 } | 10924 } |
| 10784 return keyword; | 10925 return keyword; |
| 10785 } | 10926 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10855 * Initialize a newly created switch statement. | 10996 * Initialize a newly created switch statement. |
| 10856 * | 10997 * |
| 10857 * @param keyword the token representing the 'switch' keyword | 10998 * @param keyword the token representing the 'switch' keyword |
| 10858 * @param leftParenthesis the left parenthesis | 10999 * @param leftParenthesis the left parenthesis |
| 10859 * @param expression the expression used to determine which of the switch memb
ers will be selected | 11000 * @param expression the expression used to determine which of the switch memb
ers will be selected |
| 10860 * @param rightParenthesis the right parenthesis | 11001 * @param rightParenthesis the right parenthesis |
| 10861 * @param leftBracket the left curly bracket | 11002 * @param leftBracket the left curly bracket |
| 10862 * @param members the switch members that can be selected by the expression | 11003 * @param members the switch members that can be selected by the expression |
| 10863 * @param rightBracket the right curly bracket | 11004 * @param rightBracket the right curly bracket |
| 10864 */ | 11005 */ |
| 10865 SwitchStatement(this.keyword, this.leftParenthesis, Expression expression, thi
s.rightParenthesis, this.leftBracket, List<SwitchMember> members, this.rightBrac
ket) { | 11006 SwitchStatement(Token keyword, Token leftParenthesis, Expression expression, T
oken rightParenthesis, Token leftBracket, List<SwitchMember> members, Token righ
tBracket) { |
| 10866 this._members = new NodeList<SwitchMember>(this); | 11007 this._members = new NodeList<SwitchMember>(this); |
| 11008 this.keyword = keyword; |
| 11009 this.leftParenthesis = leftParenthesis; |
| 10867 this._expression = becomeParentOf(expression); | 11010 this._expression = becomeParentOf(expression); |
| 11011 this.rightParenthesis = rightParenthesis; |
| 11012 this.leftBracket = leftBracket; |
| 10868 this._members.addAll(members); | 11013 this._members.addAll(members); |
| 11014 this.rightBracket = rightBracket; |
| 10869 } | 11015 } |
| 10870 | 11016 |
| 10871 @override | 11017 @override |
| 10872 accept(AstVisitor visitor) => visitor.visitSwitchStatement(this); | 11018 accept(AstVisitor visitor) => visitor.visitSwitchStatement(this); |
| 10873 | 11019 |
| 10874 @override | 11020 @override |
| 10875 Token get beginToken => keyword; | 11021 Token get beginToken => keyword; |
| 10876 | 11022 |
| 10877 @override | 11023 @override |
| 10878 Token get endToken => rightBracket; | 11024 Token get endToken => rightBracket; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10918 */ | 11064 */ |
| 10919 class SymbolLiteral extends Literal { | 11065 class SymbolLiteral extends Literal { |
| 10920 /** | 11066 /** |
| 10921 * The token introducing the literal. | 11067 * The token introducing the literal. |
| 10922 */ | 11068 */ |
| 10923 Token poundSign; | 11069 Token poundSign; |
| 10924 | 11070 |
| 10925 /** | 11071 /** |
| 10926 * The components of the literal. | 11072 * The components of the literal. |
| 10927 */ | 11073 */ |
| 10928 final List<Token> components; | 11074 List<Token> components; |
| 10929 | 11075 |
| 10930 /** | 11076 /** |
| 10931 * Initialize a newly created symbol literal. | 11077 * Initialize a newly created symbol literal. |
| 10932 * | 11078 * |
| 10933 * @param poundSign the token introducing the literal | 11079 * @param poundSign the token introducing the literal |
| 10934 * @param components the components of the literal | 11080 * @param components the components of the literal |
| 10935 */ | 11081 */ |
| 10936 SymbolLiteral(this.poundSign, this.components); | 11082 SymbolLiteral(Token poundSign, List<Token> components) { |
| 11083 this.poundSign = poundSign; |
| 11084 this.components = components; |
| 11085 } |
| 10937 | 11086 |
| 10938 @override | 11087 @override |
| 10939 accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this); | 11088 accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this); |
| 10940 | 11089 |
| 10941 @override | 11090 @override |
| 10942 Token get beginToken => poundSign; | 11091 Token get beginToken => poundSign; |
| 10943 | 11092 |
| 10944 @override | 11093 @override |
| 10945 Token get endToken => components[components.length - 1]; | 11094 Token get endToken => components[components.length - 1]; |
| 10946 | 11095 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 10961 /** | 11110 /** |
| 10962 * The token representing the keyword. | 11111 * The token representing the keyword. |
| 10963 */ | 11112 */ |
| 10964 Token keyword; | 11113 Token keyword; |
| 10965 | 11114 |
| 10966 /** | 11115 /** |
| 10967 * Initialize a newly created this expression. | 11116 * Initialize a newly created this expression. |
| 10968 * | 11117 * |
| 10969 * @param keyword the token representing the keyword | 11118 * @param keyword the token representing the keyword |
| 10970 */ | 11119 */ |
| 10971 ThisExpression(this.keyword); | 11120 ThisExpression(Token keyword) { |
| 11121 this.keyword = keyword; |
| 11122 } |
| 10972 | 11123 |
| 10973 @override | 11124 @override |
| 10974 accept(AstVisitor visitor) => visitor.visitThisExpression(this); | 11125 accept(AstVisitor visitor) => visitor.visitThisExpression(this); |
| 10975 | 11126 |
| 10976 @override | 11127 @override |
| 10977 Token get beginToken => keyword; | 11128 Token get beginToken => keyword; |
| 10978 | 11129 |
| 10979 @override | 11130 @override |
| 10980 Token get endToken => keyword; | 11131 Token get endToken => keyword; |
| 10981 | 11132 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 11005 * The expression computing the exception to be thrown. | 11156 * The expression computing the exception to be thrown. |
| 11006 */ | 11157 */ |
| 11007 Expression _expression; | 11158 Expression _expression; |
| 11008 | 11159 |
| 11009 /** | 11160 /** |
| 11010 * Initialize a newly created throw expression. | 11161 * Initialize a newly created throw expression. |
| 11011 * | 11162 * |
| 11012 * @param keyword the token representing the 'throw' keyword | 11163 * @param keyword the token representing the 'throw' keyword |
| 11013 * @param expression the expression computing the exception to be thrown | 11164 * @param expression the expression computing the exception to be thrown |
| 11014 */ | 11165 */ |
| 11015 ThrowExpression(this.keyword, Expression expression) { | 11166 ThrowExpression(Token keyword, Expression expression) { |
| 11167 this.keyword = keyword; |
| 11016 this._expression = becomeParentOf(expression); | 11168 this._expression = becomeParentOf(expression); |
| 11017 } | 11169 } |
| 11018 | 11170 |
| 11019 @override | 11171 @override |
| 11020 accept(AstVisitor visitor) => visitor.visitThrowExpression(this); | 11172 accept(AstVisitor visitor) => visitor.visitThrowExpression(this); |
| 11021 | 11173 |
| 11022 @override | 11174 @override |
| 11023 Token get beginToken => keyword; | 11175 Token get beginToken => keyword; |
| 11024 | 11176 |
| 11025 @override | 11177 @override |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11077 Token semicolon; | 11229 Token semicolon; |
| 11078 | 11230 |
| 11079 /** | 11231 /** |
| 11080 * Initialize a newly created top-level variable declaration. | 11232 * Initialize a newly created top-level variable declaration. |
| 11081 * | 11233 * |
| 11082 * @param comment the documentation comment associated with this variable | 11234 * @param comment the documentation comment associated with this variable |
| 11083 * @param metadata the annotations associated with this variable | 11235 * @param metadata the annotations associated with this variable |
| 11084 * @param variableList the top-level variables being declared | 11236 * @param variableList the top-level variables being declared |
| 11085 * @param semicolon the semicolon terminating the declaration | 11237 * @param semicolon the semicolon terminating the declaration |
| 11086 */ | 11238 */ |
| 11087 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata, Variab
leDeclarationList variableList, this.semicolon) : super(comment, metadata) { | 11239 TopLevelVariableDeclaration(Comment comment, List<Annotation> metadata, Variab
leDeclarationList variableList, Token semicolon) : super(comment, metadata) { |
| 11088 this._variableList = becomeParentOf(variableList); | 11240 this._variableList = becomeParentOf(variableList); |
| 11241 this.semicolon = semicolon; |
| 11089 } | 11242 } |
| 11090 | 11243 |
| 11091 @override | 11244 @override |
| 11092 accept(AstVisitor visitor) => visitor.visitTopLevelVariableDeclaration(this); | 11245 accept(AstVisitor visitor) => visitor.visitTopLevelVariableDeclaration(this); |
| 11093 | 11246 |
| 11094 @override | 11247 @override |
| 11095 Element get element => null; | 11248 Element get element => null; |
| 11096 | 11249 |
| 11097 @override | 11250 @override |
| 11098 Token get endToken => semicolon; | 11251 Token get endToken => semicolon; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11164 | 11317 |
| 11165 /** | 11318 /** |
| 11166 * Initialize a newly created try statement. | 11319 * Initialize a newly created try statement. |
| 11167 * | 11320 * |
| 11168 * @param tryKeyword the token representing the 'try' keyword | 11321 * @param tryKeyword the token representing the 'try' keyword |
| 11169 * @param body the body of the statement | 11322 * @param body the body of the statement |
| 11170 * @param catchClauses the catch clauses contained in the try statement | 11323 * @param catchClauses the catch clauses contained in the try statement |
| 11171 * @param finallyKeyword the token representing the 'finally' keyword | 11324 * @param finallyKeyword the token representing the 'finally' keyword |
| 11172 * @param finallyBlock the finally block contained in the try statement | 11325 * @param finallyBlock the finally block contained in the try statement |
| 11173 */ | 11326 */ |
| 11174 TryStatement(this.tryKeyword, Block body, List<CatchClause> catchClauses, this
.finallyKeyword, Block finallyBlock) { | 11327 TryStatement(Token tryKeyword, Block body, List<CatchClause> catchClauses, Tok
en finallyKeyword, Block finallyBlock) { |
| 11175 this._catchClauses = new NodeList<CatchClause>(this); | 11328 this._catchClauses = new NodeList<CatchClause>(this); |
| 11329 this.tryKeyword = tryKeyword; |
| 11176 this._body = becomeParentOf(body); | 11330 this._body = becomeParentOf(body); |
| 11177 this._catchClauses.addAll(catchClauses); | 11331 this._catchClauses.addAll(catchClauses); |
| 11332 this.finallyKeyword = finallyKeyword; |
| 11178 this._finallyBlock = becomeParentOf(finallyBlock); | 11333 this._finallyBlock = becomeParentOf(finallyBlock); |
| 11179 } | 11334 } |
| 11180 | 11335 |
| 11181 @override | 11336 @override |
| 11182 accept(AstVisitor visitor) => visitor.visitTryStatement(this); | 11337 accept(AstVisitor visitor) => visitor.visitTryStatement(this); |
| 11183 | 11338 |
| 11184 @override | 11339 @override |
| 11185 Token get beginToken => tryKeyword; | 11340 Token get beginToken => tryKeyword; |
| 11186 | 11341 |
| 11187 /** | 11342 /** |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11268 Token semicolon; | 11423 Token semicolon; |
| 11269 | 11424 |
| 11270 /** | 11425 /** |
| 11271 * Initialize a newly created type alias. | 11426 * Initialize a newly created type alias. |
| 11272 * | 11427 * |
| 11273 * @param comment the documentation comment associated with this type alias | 11428 * @param comment the documentation comment associated with this type alias |
| 11274 * @param metadata the annotations associated with this type alias | 11429 * @param metadata the annotations associated with this type alias |
| 11275 * @param keyword the token representing the 'typedef' keyword | 11430 * @param keyword the token representing the 'typedef' keyword |
| 11276 * @param semicolon the semicolon terminating the declaration | 11431 * @param semicolon the semicolon terminating the declaration |
| 11277 */ | 11432 */ |
| 11278 TypeAlias(Comment comment, List<Annotation> metadata, this.keyword, this.semic
olon) : super(comment, metadata); | 11433 TypeAlias(Comment comment, List<Annotation> metadata, Token keyword, Token sem
icolon) : super(comment, metadata) { |
| 11434 this.keyword = keyword; |
| 11435 this.semicolon = semicolon; |
| 11436 } |
| 11279 | 11437 |
| 11280 @override | 11438 @override |
| 11281 Token get endToken => semicolon; | 11439 Token get endToken => semicolon; |
| 11282 | 11440 |
| 11283 @override | 11441 @override |
| 11284 Token get firstTokenAfterCommentAndMetadata => keyword; | 11442 Token get firstTokenAfterCommentAndMetadata => keyword; |
| 11285 } | 11443 } |
| 11286 | 11444 |
| 11287 /** | 11445 /** |
| 11288 * Instances of the class `TypeArgumentList` represent a list of type arguments. | 11446 * Instances of the class `TypeArgumentList` represent a list of type arguments. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 11308 */ | 11466 */ |
| 11309 Token rightBracket; | 11467 Token rightBracket; |
| 11310 | 11468 |
| 11311 /** | 11469 /** |
| 11312 * Initialize a newly created list of type arguments. | 11470 * Initialize a newly created list of type arguments. |
| 11313 * | 11471 * |
| 11314 * @param leftBracket the left bracket | 11472 * @param leftBracket the left bracket |
| 11315 * @param arguments the type arguments associated with the type | 11473 * @param arguments the type arguments associated with the type |
| 11316 * @param rightBracket the right bracket | 11474 * @param rightBracket the right bracket |
| 11317 */ | 11475 */ |
| 11318 TypeArgumentList(this.leftBracket, List<TypeName> arguments, this.rightBracket
) { | 11476 TypeArgumentList(Token leftBracket, List<TypeName> arguments, Token rightBrack
et) { |
| 11319 this._arguments = new NodeList<TypeName>(this); | 11477 this._arguments = new NodeList<TypeName>(this); |
| 11478 this.leftBracket = leftBracket; |
| 11320 this._arguments.addAll(arguments); | 11479 this._arguments.addAll(arguments); |
| 11480 this.rightBracket = rightBracket; |
| 11321 } | 11481 } |
| 11322 | 11482 |
| 11323 @override | 11483 @override |
| 11324 accept(AstVisitor visitor) => visitor.visitTypeArgumentList(this); | 11484 accept(AstVisitor visitor) => visitor.visitTypeArgumentList(this); |
| 11325 | 11485 |
| 11326 /** | 11486 /** |
| 11327 * Return the type arguments associated with the type. | 11487 * Return the type arguments associated with the type. |
| 11328 * | 11488 * |
| 11329 * @return the type arguments associated with the type | 11489 * @return the type arguments associated with the type |
| 11330 */ | 11490 */ |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11464 | 11624 |
| 11465 /** | 11625 /** |
| 11466 * Initialize a newly created type parameter. | 11626 * Initialize a newly created type parameter. |
| 11467 * | 11627 * |
| 11468 * @param comment the documentation comment associated with the type parameter | 11628 * @param comment the documentation comment associated with the type parameter |
| 11469 * @param metadata the annotations associated with the type parameter | 11629 * @param metadata the annotations associated with the type parameter |
| 11470 * @param name the name of the type parameter | 11630 * @param name the name of the type parameter |
| 11471 * @param keyword the token representing the 'extends' keyword | 11631 * @param keyword the token representing the 'extends' keyword |
| 11472 * @param bound the name of the upper bound for legal arguments | 11632 * @param bound the name of the upper bound for legal arguments |
| 11473 */ | 11633 */ |
| 11474 TypeParameter(Comment comment, List<Annotation> metadata, SimpleIdentifier nam
e, this.keyword, TypeName bound) : super(comment, metadata) { | 11634 TypeParameter(Comment comment, List<Annotation> metadata, SimpleIdentifier nam
e, Token keyword, TypeName bound) : super(comment, metadata) { |
| 11475 this._name = becomeParentOf(name); | 11635 this._name = becomeParentOf(name); |
| 11636 this.keyword = keyword; |
| 11476 this._bound = becomeParentOf(bound); | 11637 this._bound = becomeParentOf(bound); |
| 11477 } | 11638 } |
| 11478 | 11639 |
| 11479 @override | 11640 @override |
| 11480 accept(AstVisitor visitor) => visitor.visitTypeParameter(this); | 11641 accept(AstVisitor visitor) => visitor.visitTypeParameter(this); |
| 11481 | 11642 |
| 11482 /** | 11643 /** |
| 11483 * Return the name of the upper bound for legal arguments, or `null` if there
was no | 11644 * Return the name of the upper bound for legal arguments, or `null` if there
was no |
| 11484 * explicit upper bound. | 11645 * explicit upper bound. |
| 11485 * | 11646 * |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11539 * | 11700 * |
| 11540 * <pre> | 11701 * <pre> |
| 11541 * typeParameterList ::= | 11702 * typeParameterList ::= |
| 11542 * '<' [TypeParameter] (',' [TypeParameter])* '>' | 11703 * '<' [TypeParameter] (',' [TypeParameter])* '>' |
| 11543 * </pre> | 11704 * </pre> |
| 11544 */ | 11705 */ |
| 11545 class TypeParameterList extends AstNode { | 11706 class TypeParameterList extends AstNode { |
| 11546 /** | 11707 /** |
| 11547 * The left angle bracket. | 11708 * The left angle bracket. |
| 11548 */ | 11709 */ |
| 11549 final Token leftBracket; | 11710 Token leftBracket; |
| 11550 | 11711 |
| 11551 /** | 11712 /** |
| 11552 * The type parameters in the list. | 11713 * The type parameters in the list. |
| 11553 */ | 11714 */ |
| 11554 NodeList<TypeParameter> _typeParameters; | 11715 NodeList<TypeParameter> _typeParameters; |
| 11555 | 11716 |
| 11556 /** | 11717 /** |
| 11557 * The right angle bracket. | 11718 * The right angle bracket. |
| 11558 */ | 11719 */ |
| 11559 final Token rightBracket; | 11720 Token rightBracket; |
| 11560 | 11721 |
| 11561 /** | 11722 /** |
| 11562 * Initialize a newly created list of type parameters. | 11723 * Initialize a newly created list of type parameters. |
| 11563 * | 11724 * |
| 11564 * @param leftBracket the left angle bracket | 11725 * @param leftBracket the left angle bracket |
| 11565 * @param typeParameters the type parameters in the list | 11726 * @param typeParameters the type parameters in the list |
| 11566 * @param rightBracket the right angle bracket | 11727 * @param rightBracket the right angle bracket |
| 11567 */ | 11728 */ |
| 11568 TypeParameterList(this.leftBracket, List<TypeParameter> typeParameters, this.r
ightBracket) { | 11729 TypeParameterList(Token leftBracket, List<TypeParameter> typeParameters, Token
rightBracket) { |
| 11569 this._typeParameters = new NodeList<TypeParameter>(this); | 11730 this._typeParameters = new NodeList<TypeParameter>(this); |
| 11731 this.leftBracket = leftBracket; |
| 11570 this._typeParameters.addAll(typeParameters); | 11732 this._typeParameters.addAll(typeParameters); |
| 11733 this.rightBracket = rightBracket; |
| 11571 } | 11734 } |
| 11572 | 11735 |
| 11573 @override | 11736 @override |
| 11574 accept(AstVisitor visitor) => visitor.visitTypeParameterList(this); | 11737 accept(AstVisitor visitor) => visitor.visitTypeParameterList(this); |
| 11575 | 11738 |
| 11576 @override | 11739 @override |
| 11577 Token get beginToken => leftBracket; | 11740 Token get beginToken => leftBracket; |
| 11578 | 11741 |
| 11579 @override | 11742 @override |
| 11580 Token get endToken => rightBracket; | 11743 Token get endToken => rightBracket; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11614 */ | 11777 */ |
| 11615 TypeArgumentList typeArguments; | 11778 TypeArgumentList typeArguments; |
| 11616 | 11779 |
| 11617 /** | 11780 /** |
| 11618 * Initialize a newly created typed literal. | 11781 * Initialize a newly created typed literal. |
| 11619 * | 11782 * |
| 11620 * @param constKeyword the token representing the 'const' keyword | 11783 * @param constKeyword the token representing the 'const' keyword |
| 11621 * @param typeArguments the type argument associated with this literal, or `nu
ll` if no type | 11784 * @param typeArguments the type argument associated with this literal, or `nu
ll` if no type |
| 11622 * arguments were declared | 11785 * arguments were declared |
| 11623 */ | 11786 */ |
| 11624 TypedLiteral(this.constKeyword, TypeArgumentList typeArguments) { | 11787 TypedLiteral(Token constKeyword, TypeArgumentList typeArguments) { |
| 11788 this.constKeyword = constKeyword; |
| 11625 this.typeArguments = becomeParentOf(typeArguments); | 11789 this.typeArguments = becomeParentOf(typeArguments); |
| 11626 } | 11790 } |
| 11627 | 11791 |
| 11628 @override | 11792 @override |
| 11629 void visitChildren(AstVisitor visitor) { | 11793 void visitChildren(AstVisitor visitor) { |
| 11630 safelyVisitChild(typeArguments, visitor); | 11794 safelyVisitChild(typeArguments, visitor); |
| 11631 } | 11795 } |
| 11632 } | 11796 } |
| 11633 | 11797 |
| 11634 /** | 11798 /** |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11731 | 11895 |
| 11732 /** | 11896 /** |
| 11733 * Initialize a newly created variable declaration. | 11897 * Initialize a newly created variable declaration. |
| 11734 * | 11898 * |
| 11735 * @param comment the documentation comment associated with this declaration | 11899 * @param comment the documentation comment associated with this declaration |
| 11736 * @param metadata the annotations associated with this member | 11900 * @param metadata the annotations associated with this member |
| 11737 * @param name the name of the variable being declared | 11901 * @param name the name of the variable being declared |
| 11738 * @param equals the equal sign separating the variable name from the initial
value | 11902 * @param equals the equal sign separating the variable name from the initial
value |
| 11739 * @param initializer the expression used to compute the initial value for the
variable | 11903 * @param initializer the expression used to compute the initial value for the
variable |
| 11740 */ | 11904 */ |
| 11741 VariableDeclaration(Comment comment, List<Annotation> metadata, SimpleIdentifi
er name, this.equals, Expression initializer) : super(comment, metadata) { | 11905 VariableDeclaration(Comment comment, List<Annotation> metadata, SimpleIdentifi
er name, Token equals, Expression initializer) : super(comment, metadata) { |
| 11742 this._name = becomeParentOf(name); | 11906 this._name = becomeParentOf(name); |
| 11907 this.equals = equals; |
| 11743 this._initializer = becomeParentOf(initializer); | 11908 this._initializer = becomeParentOf(initializer); |
| 11744 } | 11909 } |
| 11745 | 11910 |
| 11746 @override | 11911 @override |
| 11747 accept(AstVisitor visitor) => visitor.visitVariableDeclaration(this); | 11912 accept(AstVisitor visitor) => visitor.visitVariableDeclaration(this); |
| 11748 | 11913 |
| 11749 /** | 11914 /** |
| 11750 * This overridden implementation of getDocumentationComment() looks in the gr
andparent node for | 11915 * This overridden implementation of getDocumentationComment() looks in the gr
andparent node for |
| 11751 * dartdoc comments if no documentation is specifically available on the node. | 11916 * dartdoc comments if no documentation is specifically available on the node. |
| 11752 */ | 11917 */ |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11875 | 12040 |
| 11876 /** | 12041 /** |
| 11877 * Initialize a newly created variable declaration list. | 12042 * Initialize a newly created variable declaration list. |
| 11878 * | 12043 * |
| 11879 * @param comment the documentation comment associated with this declaration l
ist | 12044 * @param comment the documentation comment associated with this declaration l
ist |
| 11880 * @param metadata the annotations associated with this declaration list | 12045 * @param metadata the annotations associated with this declaration list |
| 11881 * @param keyword the token representing the 'final', 'const' or 'var' keyword | 12046 * @param keyword the token representing the 'final', 'const' or 'var' keyword |
| 11882 * @param type the type of the variables being declared | 12047 * @param type the type of the variables being declared |
| 11883 * @param variables a list containing the individual variables being declared | 12048 * @param variables a list containing the individual variables being declared |
| 11884 */ | 12049 */ |
| 11885 VariableDeclarationList(Comment comment, List<Annotation> metadata, this.keywo
rd, TypeName type, List<VariableDeclaration> variables) : super(comment, metadat
a) { | 12050 VariableDeclarationList(Comment comment, List<Annotation> metadata, Token keyw
ord, TypeName type, List<VariableDeclaration> variables) : super(comment, metada
ta) { |
| 11886 this._variables = new NodeList<VariableDeclaration>(this); | 12051 this._variables = new NodeList<VariableDeclaration>(this); |
| 12052 this.keyword = keyword; |
| 11887 this._type = becomeParentOf(type); | 12053 this._type = becomeParentOf(type); |
| 11888 this._variables.addAll(variables); | 12054 this._variables.addAll(variables); |
| 11889 } | 12055 } |
| 11890 | 12056 |
| 11891 @override | 12057 @override |
| 11892 accept(AstVisitor visitor) => visitor.visitVariableDeclarationList(this); | 12058 accept(AstVisitor visitor) => visitor.visitVariableDeclarationList(this); |
| 11893 | 12059 |
| 11894 @override | 12060 @override |
| 11895 Token get endToken => _variables.endToken; | 12061 Token get endToken => _variables.endToken; |
| 11896 | 12062 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11969 * The semicolon terminating the statement. | 12135 * The semicolon terminating the statement. |
| 11970 */ | 12136 */ |
| 11971 Token semicolon; | 12137 Token semicolon; |
| 11972 | 12138 |
| 11973 /** | 12139 /** |
| 11974 * Initialize a newly created variable declaration statement. | 12140 * Initialize a newly created variable declaration statement. |
| 11975 * | 12141 * |
| 11976 * @param variableList the fields being declared | 12142 * @param variableList the fields being declared |
| 11977 * @param semicolon the semicolon terminating the statement | 12143 * @param semicolon the semicolon terminating the statement |
| 11978 */ | 12144 */ |
| 11979 VariableDeclarationStatement(VariableDeclarationList variableList, this.semico
lon) { | 12145 VariableDeclarationStatement(VariableDeclarationList variableList, Token semic
olon) { |
| 11980 this._variableList = becomeParentOf(variableList); | 12146 this._variableList = becomeParentOf(variableList); |
| 12147 this.semicolon = semicolon; |
| 11981 } | 12148 } |
| 11982 | 12149 |
| 11983 @override | 12150 @override |
| 11984 accept(AstVisitor visitor) => visitor.visitVariableDeclarationStatement(this); | 12151 accept(AstVisitor visitor) => visitor.visitVariableDeclarationStatement(this); |
| 11985 | 12152 |
| 11986 @override | 12153 @override |
| 11987 Token get beginToken => _variableList.beginToken; | 12154 Token get beginToken => _variableList.beginToken; |
| 11988 | 12155 |
| 11989 @override | 12156 @override |
| 11990 Token get endToken => semicolon; | 12157 Token get endToken => semicolon; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12047 | 12214 |
| 12048 /** | 12215 /** |
| 12049 * Initialize a newly created while statement. | 12216 * Initialize a newly created while statement. |
| 12050 * | 12217 * |
| 12051 * @param keyword the token representing the 'while' keyword | 12218 * @param keyword the token representing the 'while' keyword |
| 12052 * @param leftParenthesis the left parenthesis | 12219 * @param leftParenthesis the left parenthesis |
| 12053 * @param condition the expression used to determine whether to execute the bo
dy of the loop | 12220 * @param condition the expression used to determine whether to execute the bo
dy of the loop |
| 12054 * @param rightParenthesis the right parenthesis | 12221 * @param rightParenthesis the right parenthesis |
| 12055 * @param body the body of the loop | 12222 * @param body the body of the loop |
| 12056 */ | 12223 */ |
| 12057 WhileStatement(this.keyword, this.leftParenthesis, Expression condition, this.
rightParenthesis, Statement body) { | 12224 WhileStatement(Token keyword, Token leftParenthesis, Expression condition, Tok
en rightParenthesis, Statement body) { |
| 12225 this.keyword = keyword; |
| 12226 this.leftParenthesis = leftParenthesis; |
| 12058 this._condition = becomeParentOf(condition); | 12227 this._condition = becomeParentOf(condition); |
| 12228 this.rightParenthesis = rightParenthesis; |
| 12059 this._body = becomeParentOf(body); | 12229 this._body = becomeParentOf(body); |
| 12060 } | 12230 } |
| 12061 | 12231 |
| 12062 @override | 12232 @override |
| 12063 accept(AstVisitor visitor) => visitor.visitWhileStatement(this); | 12233 accept(AstVisitor visitor) => visitor.visitWhileStatement(this); |
| 12064 | 12234 |
| 12065 @override | 12235 @override |
| 12066 Token get beginToken => keyword; | 12236 Token get beginToken => keyword; |
| 12067 | 12237 |
| 12068 /** | 12238 /** |
| (...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14185 } | 14355 } |
| 14186 | 14356 |
| 14187 /** | 14357 /** |
| 14188 * Instances of the class `ToSourceVisitor` write a source representation of a v
isited AST | 14358 * Instances of the class `ToSourceVisitor` write a source representation of a v
isited AST |
| 14189 * node (and all of it's children) to a writer. | 14359 * node (and all of it's children) to a writer. |
| 14190 */ | 14360 */ |
| 14191 class ToSourceVisitor implements AstVisitor<Object> { | 14361 class ToSourceVisitor implements AstVisitor<Object> { |
| 14192 /** | 14362 /** |
| 14193 * The writer to which the source is to be written. | 14363 * The writer to which the source is to be written. |
| 14194 */ | 14364 */ |
| 14195 final PrintWriter _writer; | 14365 PrintWriter _writer; |
| 14196 | 14366 |
| 14197 /** | 14367 /** |
| 14198 * Initialize a newly created visitor to write source code representing the vi
sited nodes to the | 14368 * Initialize a newly created visitor to write source code representing the vi
sited nodes to the |
| 14199 * given writer. | 14369 * given writer. |
| 14200 * | 14370 * |
| 14201 * @param writer the writer to which the source is to be written | 14371 * @param writer the writer to which the source is to be written |
| 14202 */ | 14372 */ |
| 14203 ToSourceVisitor(this._writer); | 14373 ToSourceVisitor(PrintWriter writer) { |
| 14374 this._writer = writer; |
| 14375 } |
| 14204 | 14376 |
| 14205 @override | 14377 @override |
| 14206 Object visitAdjacentStrings(AdjacentStrings node) { | 14378 Object visitAdjacentStrings(AdjacentStrings node) { |
| 14207 _visitNodeListWithSeparator(node.strings, " "); | 14379 _visitNodeListWithSeparator(node.strings, " "); |
| 14208 return null; | 14380 return null; |
| 14209 } | 14381 } |
| 14210 | 14382 |
| 14211 @override | 14383 @override |
| 14212 Object visitAnnotation(Annotation node) { | 14384 Object visitAnnotation(Annotation node) { |
| 14213 _writer.print('@'); | 14385 _writer.print('@'); |
| (...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16695 /** | 16867 /** |
| 16696 * Instances of the class `IncrementalAstCloner` implement an object that will c
lone any AST | 16868 * Instances of the class `IncrementalAstCloner` implement an object that will c
lone any AST |
| 16697 * structure that it visits. The cloner will clone the structure, replacing the
specified ASTNode | 16869 * structure that it visits. The cloner will clone the structure, replacing the
specified ASTNode |
| 16698 * with a new ASTNode, mapping the old token stream to a new token stream, and p
reserving resolution | 16870 * with a new ASTNode, mapping the old token stream to a new token stream, and p
reserving resolution |
| 16699 * results. | 16871 * results. |
| 16700 */ | 16872 */ |
| 16701 class IncrementalAstCloner implements AstVisitor<AstNode> { | 16873 class IncrementalAstCloner implements AstVisitor<AstNode> { |
| 16702 /** | 16874 /** |
| 16703 * The node to be replaced during the cloning process. | 16875 * The node to be replaced during the cloning process. |
| 16704 */ | 16876 */ |
| 16705 final AstNode _oldNode; | 16877 AstNode _oldNode; |
| 16706 | 16878 |
| 16707 /** | 16879 /** |
| 16708 * The replacement node used during the cloning process. | 16880 * The replacement node used during the cloning process. |
| 16709 */ | 16881 */ |
| 16710 final AstNode _newNode; | 16882 AstNode _newNode; |
| 16711 | 16883 |
| 16712 /** | 16884 /** |
| 16713 * A mapping of old tokens to new tokens used during the cloning process. | 16885 * A mapping of old tokens to new tokens used during the cloning process. |
| 16714 */ | 16886 */ |
| 16715 final TokenMap _tokenMap; | 16887 TokenMap _tokenMap; |
| 16716 | 16888 |
| 16717 /** | 16889 /** |
| 16718 * Construct a new instance that will replace `oldNode` with `newNode` in the
process | 16890 * Construct a new instance that will replace `oldNode` with `newNode` in the
process |
| 16719 * of cloning an existing AST structure. | 16891 * of cloning an existing AST structure. |
| 16720 * | 16892 * |
| 16721 * @param oldNode the node to be replaced | 16893 * @param oldNode the node to be replaced |
| 16722 * @param newNode the replacement node | 16894 * @param newNode the replacement node |
| 16723 * @param tokenMap a mapping of old tokens to new tokens (not `null`) | 16895 * @param tokenMap a mapping of old tokens to new tokens (not `null`) |
| 16724 */ | 16896 */ |
| 16725 IncrementalAstCloner(this._oldNode, this._newNode, this._tokenMap); | 16897 IncrementalAstCloner(AstNode oldNode, AstNode newNode, TokenMap tokenMap) { |
| 16898 this._oldNode = oldNode; |
| 16899 this._newNode = newNode; |
| 16900 this._tokenMap = tokenMap; |
| 16901 } |
| 16726 | 16902 |
| 16727 @override | 16903 @override |
| 16728 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); | 16904 AdjacentStrings visitAdjacentStrings(AdjacentStrings node) => new AdjacentStri
ngs(_cloneNodeList(node.strings)); |
| 16729 | 16905 |
| 16730 @override | 16906 @override |
| 16731 Annotation visitAnnotation(Annotation node) { | 16907 Annotation visitAnnotation(Annotation node) { |
| 16732 Annotation copy = new Annotation(_mapToken(node.atSign), _cloneNode(node.nam
e), _mapToken(node.period), _cloneNode(node.constructorName), _cloneNode(node.ar
guments)); | 16908 Annotation copy = new Annotation(_mapToken(node.atSign), _cloneNode(node.nam
e), _mapToken(node.period), _cloneNode(node.constructorName), _cloneNode(node.ar
guments)); |
| 16733 copy.element = node.element; | 16909 copy.element = node.element; |
| 16734 return copy; | 16910 return copy; |
| 16735 } | 16911 } |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17330 * Completion test code coverage is 95%. The two basic blocks that are not execu
ted cannot be | 17506 * Completion test code coverage is 95%. The two basic blocks that are not execu
ted cannot be |
| 17331 * executed. They are included for future reference. | 17507 * executed. They are included for future reference. |
| 17332 */ | 17508 */ |
| 17333 class ScopedNameFinder extends GeneralizingAstVisitor<Object> { | 17509 class ScopedNameFinder extends GeneralizingAstVisitor<Object> { |
| 17334 Declaration _declarationNode; | 17510 Declaration _declarationNode; |
| 17335 | 17511 |
| 17336 AstNode _immediateChild; | 17512 AstNode _immediateChild; |
| 17337 | 17513 |
| 17338 Map<String, SimpleIdentifier> _locals = new Map<String, SimpleIdentifier>(); | 17514 Map<String, SimpleIdentifier> _locals = new Map<String, SimpleIdentifier>(); |
| 17339 | 17515 |
| 17340 final int _position; | 17516 int _position = 0; |
| 17341 | 17517 |
| 17342 bool _referenceIsWithinLocalFunction = false; | 17518 bool _referenceIsWithinLocalFunction = false; |
| 17343 | 17519 |
| 17344 ScopedNameFinder(this._position); | 17520 ScopedNameFinder(int position) { |
| 17521 this._position = position; |
| 17522 } |
| 17345 | 17523 |
| 17346 Declaration get declaration => _declarationNode; | 17524 Declaration get declaration => _declarationNode; |
| 17347 | 17525 |
| 17348 Map<String, SimpleIdentifier> get locals => _locals; | 17526 Map<String, SimpleIdentifier> get locals => _locals; |
| 17349 | 17527 |
| 17350 @override | 17528 @override |
| 17351 Object visitBlock(Block node) { | 17529 Object visitBlock(Block node) { |
| 17352 _checkStatements(node.statements); | 17530 _checkStatements(node.statements); |
| 17353 return super.visitBlock(node); | 17531 return super.visitBlock(node); |
| 17354 } | 17532 } |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17620 _elements[index] = node; | 17798 _elements[index] = node; |
| 17621 } | 17799 } |
| 17622 void clear() { | 17800 void clear() { |
| 17623 _elements = <E> []; | 17801 _elements = <E> []; |
| 17624 } | 17802 } |
| 17625 int get length => _elements.length; | 17803 int get length => _elements.length; |
| 17626 void set length(int value) { | 17804 void set length(int value) { |
| 17627 throw new UnsupportedError("Cannot resize NodeList."); | 17805 throw new UnsupportedError("Cannot resize NodeList."); |
| 17628 } | 17806 } |
| 17629 } | 17807 } |
| OLD | NEW |