| 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 /** | 5 /** |
| 6 * Defines the AST model. The AST (Abstract Syntax Tree) model describes the | 6 * Defines the AST model. The AST (Abstract Syntax Tree) model describes the |
| 7 * syntactic (as opposed to semantic) structure of Dart code. The semantic | 7 * syntactic (as opposed to semantic) structure of Dart code. The semantic |
| 8 * structure of the code is modeled by the | 8 * structure of the code is modeled by the |
| 9 * [element model](../element/element.dart). | 9 * [element model](../element/element.dart). |
| 10 * | 10 * |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 /** | 247 /** |
| 248 * Set the right parenthesis to the given [token]. | 248 * Set the right parenthesis to the given [token]. |
| 249 */ | 249 */ |
| 250 void set rightParenthesis(Token token); | 250 void set rightParenthesis(Token token); |
| 251 } | 251 } |
| 252 | 252 |
| 253 /** | 253 /** |
| 254 * An as expression. | 254 * An as expression. |
| 255 * | 255 * |
| 256 * asExpression ::= | 256 * asExpression ::= |
| 257 * [Expression] 'as' [TypeAnnotation] | 257 * [Expression] 'as' [TypeName] |
| 258 * | 258 * |
| 259 * Clients may not extend, implement or mix-in this class. | 259 * Clients may not extend, implement or mix-in this class. |
| 260 */ | 260 */ |
| 261 abstract class AsExpression extends Expression { | 261 abstract class AsExpression extends Expression { |
| 262 /** | 262 /** |
| 263 * Return the 'as' operator. | 263 * Return the 'as' operator. |
| 264 */ | 264 */ |
| 265 Token get asOperator; | 265 Token get asOperator; |
| 266 | 266 |
| 267 /** | 267 /** |
| 268 * Set the 'as' operator to the given [token]. | 268 * Set the 'as' operator to the given [token]. |
| 269 */ | 269 */ |
| 270 void set asOperator(Token token); | 270 void set asOperator(Token token); |
| 271 | 271 |
| 272 /** | 272 /** |
| 273 * Return the expression used to compute the value being cast. | 273 * Return the expression used to compute the value being cast. |
| 274 */ | 274 */ |
| 275 Expression get expression; | 275 Expression get expression; |
| 276 | 276 |
| 277 /** | 277 /** |
| 278 * Set the expression used to compute the value being cast to the given | 278 * Set the expression used to compute the value being cast to the given |
| 279 * [expression]. | 279 * [expression]. |
| 280 */ | 280 */ |
| 281 void set expression(Expression expression); | 281 void set expression(Expression expression); |
| 282 | 282 |
| 283 /** | 283 /** |
| 284 * Return the type being cast to. | 284 * Return the name of the type being cast to. |
| 285 */ | 285 */ |
| 286 TypeAnnotation get type; | 286 TypeName get type; |
| 287 | 287 |
| 288 /** | 288 /** |
| 289 * Set the type being cast to to the given [type]. | 289 * Set the name of the type being cast to to the given [name]. |
| 290 */ | 290 */ |
| 291 void set type(TypeAnnotation type); | 291 void set type(TypeName name); |
| 292 } | 292 } |
| 293 | 293 |
| 294 /** | 294 /** |
| 295 * An assert in the initializer list of a constructor. | 295 * An assert in the initializer list of a constructor. |
| 296 * | 296 * |
| 297 * assertInitializer ::= | 297 * assertInitializer ::= |
| 298 * 'assert' '(' [Expression] (',' [Expression])? ')' | 298 * 'assert' '(' [Expression] (',' [Expression])? ')' |
| 299 * | 299 * |
| 300 * Clients may not extend, implement or mix-in this class. | 300 * Clients may not extend, implement or mix-in this class. |
| 301 */ | 301 */ |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 R visitFunctionDeclarationStatement(FunctionDeclarationStatement node); | 659 R visitFunctionDeclarationStatement(FunctionDeclarationStatement node); |
| 660 | 660 |
| 661 R visitFunctionExpression(FunctionExpression node); | 661 R visitFunctionExpression(FunctionExpression node); |
| 662 | 662 |
| 663 R visitFunctionExpressionInvocation(FunctionExpressionInvocation node); | 663 R visitFunctionExpressionInvocation(FunctionExpressionInvocation node); |
| 664 | 664 |
| 665 R visitFunctionTypeAlias(FunctionTypeAlias functionTypeAlias); | 665 R visitFunctionTypeAlias(FunctionTypeAlias functionTypeAlias); |
| 666 | 666 |
| 667 R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node); | 667 R visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node); |
| 668 | 668 |
| 669 R visitGenericFunctionType(GenericFunctionType node); | |
| 670 | |
| 671 R visitGenericTypeAlias(GenericTypeAlias node); | |
| 672 | |
| 673 R visitHideCombinator(HideCombinator node); | 669 R visitHideCombinator(HideCombinator node); |
| 674 | 670 |
| 675 R visitIfStatement(IfStatement node); | 671 R visitIfStatement(IfStatement node); |
| 676 | 672 |
| 677 R visitImplementsClause(ImplementsClause node); | 673 R visitImplementsClause(ImplementsClause node); |
| 678 | 674 |
| 679 R visitImportDirective(ImportDirective node); | 675 R visitImportDirective(ImportDirective node); |
| 680 | 676 |
| 681 R visitIndexExpression(IndexExpression node); | 677 R visitIndexExpression(IndexExpression node); |
| 682 | 678 |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 /** | 1097 /** |
| 1102 * Set the parameter whose value will be the exception that was thrown to the | 1098 * Set the parameter whose value will be the exception that was thrown to the |
| 1103 * given [parameter]. | 1099 * given [parameter]. |
| 1104 */ | 1100 */ |
| 1105 void set exceptionParameter(SimpleIdentifier parameter); | 1101 void set exceptionParameter(SimpleIdentifier parameter); |
| 1106 | 1102 |
| 1107 /** | 1103 /** |
| 1108 * Return the type of exceptions caught by this catch clause, or `null` if | 1104 * Return the type of exceptions caught by this catch clause, or `null` if |
| 1109 * this catch clause catches every type of exception. | 1105 * this catch clause catches every type of exception. |
| 1110 */ | 1106 */ |
| 1111 TypeAnnotation get exceptionType; | 1107 TypeName get exceptionType; |
| 1112 | 1108 |
| 1113 /** | 1109 /** |
| 1114 * Set the type of exceptions caught by this catch clause to the given | 1110 * Set the type of exceptions caught by this catch clause to the given |
| 1115 * [exceptionType]. | 1111 * [exceptionType]. |
| 1116 */ | 1112 */ |
| 1117 void set exceptionType(TypeAnnotation exceptionType); | 1113 void set exceptionType(TypeName exceptionType); |
| 1118 | 1114 |
| 1119 /** | 1115 /** |
| 1120 * Return the left parenthesis, or `null` if there is no 'catch' keyword. | 1116 * Return the left parenthesis, or `null` if there is no 'catch' keyword. |
| 1121 */ | 1117 */ |
| 1122 Token get leftParenthesis; | 1118 Token get leftParenthesis; |
| 1123 | 1119 |
| 1124 /** | 1120 /** |
| 1125 * Set the left parenthesis to the given [token]. | 1121 * Set the left parenthesis to the given [token]. |
| 1126 */ | 1122 */ |
| 1127 void set leftParenthesis(Token token); | 1123 void set leftParenthesis(Token token); |
| (...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2191 /** | 2187 /** |
| 2192 * Set the token representing either the 'final', 'const' or 'var' keyword to | 2188 * Set the token representing either the 'final', 'const' or 'var' keyword to |
| 2193 * the given [token]. | 2189 * the given [token]. |
| 2194 */ | 2190 */ |
| 2195 void set keyword(Token token); | 2191 void set keyword(Token token); |
| 2196 | 2192 |
| 2197 /** | 2193 /** |
| 2198 * Return the name of the declared type of the parameter, or `null` if the | 2194 * Return the name of the declared type of the parameter, or `null` if the |
| 2199 * parameter does not have a declared type. | 2195 * parameter does not have a declared type. |
| 2200 */ | 2196 */ |
| 2201 TypeAnnotation get type; | 2197 TypeName get type; |
| 2202 | 2198 |
| 2203 /** | 2199 /** |
| 2204 * Set the declared type of the parameter to the given [type]. | 2200 * Set the name of the declared type of the parameter to the given [typeName]. |
| 2205 */ | 2201 */ |
| 2206 void set type(TypeAnnotation type); | 2202 void set type(TypeName typeName); |
| 2207 } | 2203 } |
| 2208 | 2204 |
| 2209 /** | 2205 /** |
| 2210 * A formal parameter with a default value. There are two kinds of parameters | 2206 * A formal parameter with a default value. There are two kinds of parameters |
| 2211 * that are both represented by this class: named formal parameters and | 2207 * that are both represented by this class: named formal parameters and |
| 2212 * positional formal parameters. | 2208 * positional formal parameters. |
| 2213 * | 2209 * |
| 2214 * defaultFormalParameter ::= | 2210 * defaultFormalParameter ::= |
| 2215 * [NormalFormalParameter] ('=' [Expression])? | 2211 * [NormalFormalParameter] ('=' [Expression])? |
| 2216 * | 2212 * |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2793 /** | 2789 /** |
| 2794 * Set the token representing the 'static' keyword to the given [token]. | 2790 * Set the token representing the 'static' keyword to the given [token]. |
| 2795 */ | 2791 */ |
| 2796 void set staticKeyword(Token token); | 2792 void set staticKeyword(Token token); |
| 2797 } | 2793 } |
| 2798 | 2794 |
| 2799 /** | 2795 /** |
| 2800 * A field formal parameter. | 2796 * A field formal parameter. |
| 2801 * | 2797 * |
| 2802 * fieldFormalParameter ::= | 2798 * fieldFormalParameter ::= |
| 2803 * ('final' [TypeAnnotation] | 'const' [TypeAnnotation] | 'var' | [TypeAn
notation])? | 2799 * ('final' [TypeName] | 'const' [TypeName] | 'var' | [TypeName])? |
| 2804 * 'this' '.' [SimpleIdentifier] ([TypeParameterList]? [FormalParameterLi
st])? | 2800 * 'this' '.' [SimpleIdentifier] ([TypeParameterList]? [FormalParameterLi
st])? |
| 2805 * | 2801 * |
| 2806 * Clients may not extend, implement or mix-in this class. | 2802 * Clients may not extend, implement or mix-in this class. |
| 2807 */ | 2803 */ |
| 2808 abstract class FieldFormalParameter extends NormalFormalParameter { | 2804 abstract class FieldFormalParameter extends NormalFormalParameter { |
| 2809 /** | 2805 /** |
| 2810 * Return the token representing either the 'final', 'const' or 'var' keyword, | 2806 * Return the token representing either the 'final', 'const' or 'var' keyword, |
| 2811 * or `null` if no keyword was used. | 2807 * or `null` if no keyword was used. |
| 2812 */ | 2808 */ |
| 2813 Token get keyword; | 2809 Token get keyword; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 2844 * Return the token representing the 'this' keyword. | 2840 * Return the token representing the 'this' keyword. |
| 2845 */ | 2841 */ |
| 2846 Token get thisKeyword; | 2842 Token get thisKeyword; |
| 2847 | 2843 |
| 2848 /** | 2844 /** |
| 2849 * Set the token representing the 'this' keyword to the given [token]. | 2845 * Set the token representing the 'this' keyword to the given [token]. |
| 2850 */ | 2846 */ |
| 2851 void set thisKeyword(Token token); | 2847 void set thisKeyword(Token token); |
| 2852 | 2848 |
| 2853 /** | 2849 /** |
| 2854 * Return the declared type of the parameter, or `null` if the parameter does | 2850 * Return the name of the declared type of the parameter, or `null` if the |
| 2855 * not have a declared type. Note that if this is a function-typed field | 2851 * parameter does not have a declared type. Note that if this is a |
| 2856 * formal parameter this is the return type of the function. | 2852 * function-typed field formal parameter this is the return type of the |
| 2853 * function. |
| 2857 */ | 2854 */ |
| 2858 TypeAnnotation get type; | 2855 TypeName get type; |
| 2859 | 2856 |
| 2860 /** | 2857 /** |
| 2861 * Set the declared type of the parameter to the given [type]. | 2858 * Set the name of the declared type of the parameter to the given [typeName]. |
| 2862 */ | 2859 */ |
| 2863 void set type(TypeAnnotation type); | 2860 void set type(TypeName typeName); |
| 2864 | 2861 |
| 2865 /** | 2862 /** |
| 2866 * Return the type parameters associated with this method, or `null` if this | 2863 * Return the type parameters associated with this method, or `null` if this |
| 2867 * method is not a generic method. | 2864 * method is not a generic method. |
| 2868 */ | 2865 */ |
| 2869 TypeParameterList get typeParameters; | 2866 TypeParameterList get typeParameters; |
| 2870 | 2867 |
| 2871 /** | 2868 /** |
| 2872 * Set the type parameters associated with this method to the given | 2869 * Set the type parameters associated with this method to the given |
| 2873 * [typeParameters]. | 2870 * [typeParameters]. |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3351 | 3348 |
| 3352 /** | 3349 /** |
| 3353 * Set the token representing the 'get' or 'set' keyword to the given [token]. | 3350 * Set the token representing the 'get' or 'set' keyword to the given [token]. |
| 3354 */ | 3351 */ |
| 3355 void set propertyKeyword(Token token); | 3352 void set propertyKeyword(Token token); |
| 3356 | 3353 |
| 3357 /** | 3354 /** |
| 3358 * Return the return type of the function, or `null` if no return type was | 3355 * Return the return type of the function, or `null` if no return type was |
| 3359 * declared. | 3356 * declared. |
| 3360 */ | 3357 */ |
| 3361 TypeAnnotation get returnType; | 3358 TypeName get returnType; |
| 3362 | 3359 |
| 3363 /** | 3360 /** |
| 3364 * Set the return type of the function to the given [type]. | 3361 * Set the return type of the function to the given [returnType]. |
| 3365 */ | 3362 */ |
| 3366 void set returnType(TypeAnnotation type); | 3363 void set returnType(TypeName returnType); |
| 3367 } | 3364 } |
| 3368 | 3365 |
| 3369 /** | 3366 /** |
| 3370 * A [FunctionDeclaration] used as a statement. | 3367 * A [FunctionDeclaration] used as a statement. |
| 3371 * | 3368 * |
| 3372 * Clients may not extend, implement or mix-in this class. | 3369 * Clients may not extend, implement or mix-in this class. |
| 3373 */ | 3370 */ |
| 3374 abstract class FunctionDeclarationStatement extends Statement { | 3371 abstract class FunctionDeclarationStatement extends Statement { |
| 3375 /** | 3372 /** |
| 3376 * Return the function declaration being wrapped. | 3373 * Return the function declaration being wrapped. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3509 void set typeArguments(TypeArgumentList typeArguments); | 3506 void set typeArguments(TypeArgumentList typeArguments); |
| 3510 } | 3507 } |
| 3511 | 3508 |
| 3512 /** | 3509 /** |
| 3513 * A function type alias. | 3510 * A function type alias. |
| 3514 * | 3511 * |
| 3515 * functionTypeAlias ::= | 3512 * functionTypeAlias ::= |
| 3516 * functionPrefix [TypeParameterList]? [FormalParameterList] ';' | 3513 * functionPrefix [TypeParameterList]? [FormalParameterList] ';' |
| 3517 * | 3514 * |
| 3518 * functionPrefix ::= | 3515 * functionPrefix ::= |
| 3519 * [TypeAnnotation]? [SimpleIdentifier] | 3516 * [TypeName]? [SimpleIdentifier] |
| 3520 * | 3517 * |
| 3521 * Clients may not extend, implement or mix-in this class. | 3518 * Clients may not extend, implement or mix-in this class. |
| 3522 */ | 3519 */ |
| 3523 abstract class FunctionTypeAlias extends TypeAlias { | 3520 abstract class FunctionTypeAlias extends TypeAlias { |
| 3524 /** | 3521 /** |
| 3525 * Return the parameters associated with the function type. | 3522 * Return the parameters associated with the function type. |
| 3526 */ | 3523 */ |
| 3527 FormalParameterList get parameters; | 3524 FormalParameterList get parameters; |
| 3528 | 3525 |
| 3529 /** | 3526 /** |
| 3530 * Set the parameters associated with the function type to the given list of | 3527 * Set the parameters associated with the function type to the given list of |
| 3531 * [parameters]. | 3528 * [parameters]. |
| 3532 */ | 3529 */ |
| 3533 void set parameters(FormalParameterList parameters); | 3530 void set parameters(FormalParameterList parameters); |
| 3534 | 3531 |
| 3535 /** | 3532 /** |
| 3536 * Return the return type of the function type being defined, or `null` if no | 3533 * Return the name of the return type of the function type being defined, or |
| 3537 * return type was given. | 3534 * `null` if no return type was given. |
| 3538 */ | 3535 */ |
| 3539 TypeAnnotation get returnType; | 3536 TypeName get returnType; |
| 3540 | 3537 |
| 3541 /** | 3538 /** |
| 3542 * Set the return type of the function type being defined to the given [type]. | 3539 * Set the name of the return type of the function type being defined to the |
| 3540 * given [typeName]. |
| 3543 */ | 3541 */ |
| 3544 void set returnType(TypeAnnotation type); | 3542 void set returnType(TypeName typeName); |
| 3545 | 3543 |
| 3546 /** | 3544 /** |
| 3547 * Return the type parameters for the function type, or `null` if the function | 3545 * Return the type parameters for the function type, or `null` if the function |
| 3548 * type does not have any type parameters. | 3546 * type does not have any type parameters. |
| 3549 */ | 3547 */ |
| 3550 TypeParameterList get typeParameters; | 3548 TypeParameterList get typeParameters; |
| 3551 | 3549 |
| 3552 /** | 3550 /** |
| 3553 * Set the type parameters for the function type to the given list of | 3551 * Set the type parameters for the function type to the given list of |
| 3554 * [typeParameters]. | 3552 * [typeParameters]. |
| 3555 */ | 3553 */ |
| 3556 void set typeParameters(TypeParameterList typeParameters); | 3554 void set typeParameters(TypeParameterList typeParameters); |
| 3557 } | 3555 } |
| 3558 | 3556 |
| 3559 /** | 3557 /** |
| 3560 * A function-typed formal parameter. | 3558 * A function-typed formal parameter. |
| 3561 * | 3559 * |
| 3562 * functionSignature ::= | 3560 * functionSignature ::= |
| 3563 * [TypeAnnotation]? [SimpleIdentifier] [TypeParameterList]? [FormalParam
eterList] | 3561 * [TypeName]? [SimpleIdentifier] [TypeParameterList]? [FormalParameterLi
st] |
| 3564 * | 3562 * |
| 3565 * Clients may not extend, implement or mix-in this class. | 3563 * Clients may not extend, implement or mix-in this class. |
| 3566 */ | 3564 */ |
| 3567 abstract class FunctionTypedFormalParameter extends NormalFormalParameter { | 3565 abstract class FunctionTypedFormalParameter extends NormalFormalParameter { |
| 3568 /** | 3566 /** |
| 3569 * Return the parameters of the function-typed parameter. | 3567 * Return the parameters of the function-typed parameter. |
| 3570 */ | 3568 */ |
| 3571 FormalParameterList get parameters; | 3569 FormalParameterList get parameters; |
| 3572 | 3570 |
| 3573 /** | 3571 /** |
| (...skipping 11 matching lines...) Expand all Loading... |
| 3585 /** | 3583 /** |
| 3586 * Return the question mark marking this as a nullable type to the given | 3584 * Return the question mark marking this as a nullable type to the given |
| 3587 * [question]. | 3585 * [question]. |
| 3588 */ | 3586 */ |
| 3589 void set question(Token question); | 3587 void set question(Token question); |
| 3590 | 3588 |
| 3591 /** | 3589 /** |
| 3592 * Return the return type of the function, or `null` if the function does not | 3590 * Return the return type of the function, or `null` if the function does not |
| 3593 * have a return type. | 3591 * have a return type. |
| 3594 */ | 3592 */ |
| 3595 TypeAnnotation get returnType; | 3593 TypeName get returnType; |
| 3596 | 3594 |
| 3597 /** | 3595 /** |
| 3598 * Set the return type of the function to the given [type]. | 3596 * Set the return type of the function to the given [type]. |
| 3599 */ | 3597 */ |
| 3600 void set returnType(TypeAnnotation type); | 3598 void set returnType(TypeName type); |
| 3601 | 3599 |
| 3602 /** | 3600 /** |
| 3603 * Return the type parameters associated with this function, or `null` if | 3601 * Return the type parameters associated with this function, or `null` if |
| 3604 * this function is not a generic function. | 3602 * this function is not a generic function. |
| 3605 */ | 3603 */ |
| 3606 TypeParameterList get typeParameters; | 3604 TypeParameterList get typeParameters; |
| 3607 | 3605 |
| 3608 /** | 3606 /** |
| 3609 * Set the type parameters associated with this method to the given | 3607 * Set the type parameters associated with this method to the given |
| 3610 * [typeParameters]. | 3608 * [typeParameters]. |
| 3611 */ | 3609 */ |
| 3612 void set typeParameters(TypeParameterList typeParameters); | 3610 void set typeParameters(TypeParameterList typeParameters); |
| 3613 } | 3611 } |
| 3614 | 3612 |
| 3615 /** | 3613 /** |
| 3616 * An anonymous function type. | |
| 3617 * | |
| 3618 * functionType ::= | |
| 3619 * [TypeAnnotation]? 'Function' [TypeParameterList]? [FormalParameterList
] | |
| 3620 * | |
| 3621 * where the FormalParameterList is being used to represent the following | |
| 3622 * grammar, despite the fact that FormalParameterList can represent a much | |
| 3623 * larger grammar than the one below. This is done in order to simplify the | |
| 3624 * implementation. | |
| 3625 * | |
| 3626 * parameterTypeList ::= | |
| 3627 * () | | |
| 3628 * ( normalParameterTypes ,? ) | | |
| 3629 * ( normalParameterTypes , optionalParameterTypes ) | | |
| 3630 * ( optionalParameterTypes ) | |
| 3631 * namedParameterTypes ::= | |
| 3632 * { namedParameterType (, namedParameterType)* ,? } | |
| 3633 * namedParameterType ::= | |
| 3634 * [TypeAnnotation]? [SimpleIdentifier] | |
| 3635 * normalParameterTypes ::= | |
| 3636 * normalParameterType (, normalParameterType)* | |
| 3637 * normalParameterType ::= | |
| 3638 * [TypeAnnotation] [SimpleIdentifier]? | |
| 3639 * optionalParameterTypes ::= | |
| 3640 * optionalPositionalParameterTypes | namedParameterTypes | |
| 3641 * optionalPositionalParameterTypes ::= | |
| 3642 * [ normalParameterTypes ,? ] | |
| 3643 * | |
| 3644 * Clients may not extend, implement or mix-in this class. | |
| 3645 */ | |
| 3646 abstract class GenericFunctionType extends TypeAnnotation { | |
| 3647 /** | |
| 3648 * Return the keyword 'Function'. | |
| 3649 */ | |
| 3650 Token get functionKeyword; | |
| 3651 | |
| 3652 /** | |
| 3653 * Set the keyword 'Function' to the given [token]. | |
| 3654 */ | |
| 3655 void set functionKeyword(Token token); | |
| 3656 | |
| 3657 /** | |
| 3658 * Return the parameters associated with the function type. | |
| 3659 */ | |
| 3660 FormalParameterList get parameters; | |
| 3661 | |
| 3662 /** | |
| 3663 * Set the parameters associated with the function type to the given list of | |
| 3664 * [parameters]. | |
| 3665 */ | |
| 3666 void set parameters(FormalParameterList parameters); | |
| 3667 | |
| 3668 /** | |
| 3669 * Return the return type of the function type being defined, or `null` if | |
| 3670 * no return type was given. | |
| 3671 */ | |
| 3672 TypeAnnotation get returnType; | |
| 3673 | |
| 3674 /** | |
| 3675 * Set the return type of the function type being defined to the given[type]. | |
| 3676 */ | |
| 3677 void set returnType(TypeAnnotation type); | |
| 3678 | |
| 3679 /** | |
| 3680 * Return the type parameters for the function type, or `null` if the function | |
| 3681 * type does not have any type parameters. | |
| 3682 */ | |
| 3683 TypeParameterList get typeParameters; | |
| 3684 | |
| 3685 /** | |
| 3686 * Set the type parameters for the function type to the given list of | |
| 3687 * [typeParameters]. | |
| 3688 */ | |
| 3689 void set typeParameters(TypeParameterList typeParameters); | |
| 3690 } | |
| 3691 | |
| 3692 /** | |
| 3693 * A generic type alias. | |
| 3694 * | |
| 3695 * functionTypeAlias ::= | |
| 3696 * metadata 'typedef' [SimpleIdentifier] [TypeParameterList]? = [Function
Type] ';' | |
| 3697 * | |
| 3698 * Clients may not extend, implement or mix-in this class. | |
| 3699 */ | |
| 3700 abstract class GenericTypeAlias extends TypeAlias { | |
| 3701 /** | |
| 3702 * Return the equal sign separating the name being defined from the function | |
| 3703 * type. | |
| 3704 */ | |
| 3705 Token get equals; | |
| 3706 | |
| 3707 /** | |
| 3708 * Set the equal sign separating the name being defined from the function ty
pe | |
| 3709 * to the given [token]. | |
| 3710 */ | |
| 3711 void set equals(Token token); | |
| 3712 | |
| 3713 /** | |
| 3714 * Return the type of function being defined by the alias. | |
| 3715 */ | |
| 3716 GenericFunctionType get functionType; | |
| 3717 | |
| 3718 /** | |
| 3719 * Set the type of function being defined by the alias to the given | |
| 3720 * [functionType]. | |
| 3721 */ | |
| 3722 void set functionType(GenericFunctionType functionType); | |
| 3723 | |
| 3724 /** | |
| 3725 * Return the type parameters for the function type, or `null` if the functi
on | |
| 3726 * type does not have any type parameters. | |
| 3727 */ | |
| 3728 TypeParameterList get typeParameters; | |
| 3729 | |
| 3730 /** | |
| 3731 * Set the type parameters for the function type to the given list of | |
| 3732 * [typeParameters]. | |
| 3733 */ | |
| 3734 void set typeParameters(TypeParameterList typeParameters); | |
| 3735 } | |
| 3736 | |
| 3737 /** | |
| 3738 * A combinator that restricts the names being imported to those that are not in | 3614 * A combinator that restricts the names being imported to those that are not in |
| 3739 * a given list. | 3615 * a given list. |
| 3740 * | 3616 * |
| 3741 * hideCombinator ::= | 3617 * hideCombinator ::= |
| 3742 * 'hide' [SimpleIdentifier] (',' [SimpleIdentifier])* | 3618 * 'hide' [SimpleIdentifier] (',' [SimpleIdentifier])* |
| 3743 * | 3619 * |
| 3744 * Clients may not extend, implement or mix-in this class. | 3620 * Clients may not extend, implement or mix-in this class. |
| 3745 */ | 3621 */ |
| 3746 abstract class HideCombinator extends Combinator { | 3622 abstract class HideCombinator extends Combinator { |
| 3747 /** | 3623 /** |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4427 * Return the type arguments to be applied to the method being invoked, or | 4303 * Return the type arguments to be applied to the method being invoked, or |
| 4428 * `null` if no type arguments were provided. | 4304 * `null` if no type arguments were provided. |
| 4429 */ | 4305 */ |
| 4430 TypeArgumentList get typeArguments; | 4306 TypeArgumentList get typeArguments; |
| 4431 } | 4307 } |
| 4432 | 4308 |
| 4433 /** | 4309 /** |
| 4434 * An is expression. | 4310 * An is expression. |
| 4435 * | 4311 * |
| 4436 * isExpression ::= | 4312 * isExpression ::= |
| 4437 * [Expression] 'is' '!'? [TypeAnnotation] | 4313 * [Expression] 'is' '!'? [TypeName] |
| 4438 * | 4314 * |
| 4439 * Clients may not extend, implement or mix-in this class. | 4315 * Clients may not extend, implement or mix-in this class. |
| 4440 */ | 4316 */ |
| 4441 abstract class IsExpression extends Expression { | 4317 abstract class IsExpression extends Expression { |
| 4442 /** | 4318 /** |
| 4443 * Return the expression used to compute the value whose type is being tested. | 4319 * Return the expression used to compute the value whose type is being tested. |
| 4444 */ | 4320 */ |
| 4445 Expression get expression; | 4321 Expression get expression; |
| 4446 | 4322 |
| 4447 /** | 4323 /** |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4464 * Return the not operator, or `null` if the sense of the test is not negated. | 4340 * Return the not operator, or `null` if the sense of the test is not negated. |
| 4465 */ | 4341 */ |
| 4466 Token get notOperator; | 4342 Token get notOperator; |
| 4467 | 4343 |
| 4468 /** | 4344 /** |
| 4469 * Set the not operator to the given [token]. | 4345 * Set the not operator to the given [token]. |
| 4470 */ | 4346 */ |
| 4471 void set notOperator(Token token); | 4347 void set notOperator(Token token); |
| 4472 | 4348 |
| 4473 /** | 4349 /** |
| 4474 * Return the type being tested for. | 4350 * Return the name of the type being tested for. |
| 4475 */ | 4351 */ |
| 4476 TypeAnnotation get type; | 4352 TypeName get type; |
| 4477 | 4353 |
| 4478 /** | 4354 /** |
| 4479 * Set the type being tested for to the given [type]. | 4355 * Set the name of the type being tested for to the given [name]. |
| 4480 */ | 4356 */ |
| 4481 void set type(TypeAnnotation type); | 4357 void set type(TypeName name); |
| 4482 } | 4358 } |
| 4483 | 4359 |
| 4484 /** | 4360 /** |
| 4485 * A label on either a [LabeledStatement] or a [NamedExpression]. | 4361 * A label on either a [LabeledStatement] or a [NamedExpression]. |
| 4486 * | 4362 * |
| 4487 * label ::= | 4363 * label ::= |
| 4488 * [SimpleIdentifier] ':' | 4364 * [SimpleIdentifier] ':' |
| 4489 * | 4365 * |
| 4490 * Clients may not extend, implement or mix-in this class. | 4366 * Clients may not extend, implement or mix-in this class. |
| 4491 */ | 4367 */ |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4590 /** | 4466 /** |
| 4591 * Return the components of the identifier. | 4467 * Return the components of the identifier. |
| 4592 */ | 4468 */ |
| 4593 NodeList<SimpleIdentifier> get components; | 4469 NodeList<SimpleIdentifier> get components; |
| 4594 } | 4470 } |
| 4595 | 4471 |
| 4596 /** | 4472 /** |
| 4597 * A list literal. | 4473 * A list literal. |
| 4598 * | 4474 * |
| 4599 * listLiteral ::= | 4475 * listLiteral ::= |
| 4600 * 'const'? ('<' [TypeAnnotation] '>')? '[' ([Expression] ','?)? ']' | 4476 * 'const'? ('<' [TypeName] '>')? '[' ([Expression] ','?)? ']' |
| 4601 * | 4477 * |
| 4602 * Clients may not extend, implement or mix-in this class. | 4478 * Clients may not extend, implement or mix-in this class. |
| 4603 */ | 4479 */ |
| 4604 abstract class ListLiteral extends TypedLiteral { | 4480 abstract class ListLiteral extends TypedLiteral { |
| 4605 /** | 4481 /** |
| 4606 * Return the expressions used to compute the elements of the list. | 4482 * Return the expressions used to compute the elements of the list. |
| 4607 */ | 4483 */ |
| 4608 NodeList<Expression> get elements; | 4484 NodeList<Expression> get elements; |
| 4609 | 4485 |
| 4610 /** | 4486 /** |
| (...skipping 30 matching lines...) Expand all Loading... |
| 4641 * | [StringLiteral] | 4517 * | [StringLiteral] |
| 4642 * | 4518 * |
| 4643 * Clients may not extend, implement or mix-in this class. | 4519 * Clients may not extend, implement or mix-in this class. |
| 4644 */ | 4520 */ |
| 4645 abstract class Literal extends Expression {} | 4521 abstract class Literal extends Expression {} |
| 4646 | 4522 |
| 4647 /** | 4523 /** |
| 4648 * A literal map. | 4524 * A literal map. |
| 4649 * | 4525 * |
| 4650 * mapLiteral ::= | 4526 * mapLiteral ::= |
| 4651 * 'const'? ('<' [TypeAnnotation] (',' [TypeAnnotation])* '>')? | 4527 * 'const'? ('<' [TypeName] (',' [TypeName])* '>')? |
| 4652 * '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}' | 4528 * '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}' |
| 4653 * | 4529 * |
| 4654 * Clients may not extend, implement or mix-in this class. | 4530 * Clients may not extend, implement or mix-in this class. |
| 4655 */ | 4531 */ |
| 4656 abstract class MapLiteral extends TypedLiteral { | 4532 abstract class MapLiteral extends TypedLiteral { |
| 4657 /** | 4533 /** |
| 4658 * Return the entries in the map. | 4534 * Return the entries in the map. |
| 4659 */ | 4535 */ |
| 4660 NodeList<MapLiteralEntry> get entries; | 4536 NodeList<MapLiteralEntry> get entries; |
| 4661 | 4537 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4843 | 4719 |
| 4844 /** | 4720 /** |
| 4845 * Set the token representing the 'get' or 'set' keyword to the given [token]. | 4721 * Set the token representing the 'get' or 'set' keyword to the given [token]. |
| 4846 */ | 4722 */ |
| 4847 void set propertyKeyword(Token token); | 4723 void set propertyKeyword(Token token); |
| 4848 | 4724 |
| 4849 /** | 4725 /** |
| 4850 * Return the return type of the method, or `null` if no return type was | 4726 * Return the return type of the method, or `null` if no return type was |
| 4851 * declared. | 4727 * declared. |
| 4852 */ | 4728 */ |
| 4853 TypeAnnotation get returnType; | 4729 TypeName get returnType; |
| 4854 | 4730 |
| 4855 /** | 4731 /** |
| 4856 * Set the return type of the method to the given [type]. | 4732 * Set the return type of the method to the given [typeName]. |
| 4857 */ | 4733 */ |
| 4858 void set returnType(TypeAnnotation type); | 4734 void set returnType(TypeName typeName); |
| 4859 | 4735 |
| 4860 /** | 4736 /** |
| 4861 * Return the type parameters associated with this method, or `null` if this | 4737 * Return the type parameters associated with this method, or `null` if this |
| 4862 * method is not a generic method. | 4738 * method is not a generic method. |
| 4863 */ | 4739 */ |
| 4864 TypeParameterList get typeParameters; | 4740 TypeParameterList get typeParameters; |
| 4865 | 4741 |
| 4866 /** | 4742 /** |
| 4867 * Set the type parameters associated with this method to the given | 4743 * Set the type parameters associated with this method to the given |
| 4868 * [typeParameters]. | 4744 * [typeParameters]. |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5760 * Return the list of names from the library that are made visible by this | 5636 * Return the list of names from the library that are made visible by this |
| 5761 * combinator. | 5637 * combinator. |
| 5762 */ | 5638 */ |
| 5763 NodeList<SimpleIdentifier> get shownNames; | 5639 NodeList<SimpleIdentifier> get shownNames; |
| 5764 } | 5640 } |
| 5765 | 5641 |
| 5766 /** | 5642 /** |
| 5767 * A simple formal parameter. | 5643 * A simple formal parameter. |
| 5768 * | 5644 * |
| 5769 * simpleFormalParameter ::= | 5645 * simpleFormalParameter ::= |
| 5770 * ('final' [TypeAnnotation] | 'var' | [TypeAnnotation])? [SimpleIdentifi
er] | 5646 * ('final' [TypeName] | 'var' | [TypeName])? [SimpleIdentifier] |
| 5771 * | 5647 * |
| 5772 * Clients may not extend, implement or mix-in this class. | 5648 * Clients may not extend, implement or mix-in this class. |
| 5773 */ | 5649 */ |
| 5774 abstract class SimpleFormalParameter extends NormalFormalParameter { | 5650 abstract class SimpleFormalParameter extends NormalFormalParameter { |
| 5775 /** | 5651 /** |
| 5776 * Return the token representing either the 'final', 'const' or 'var' keyword, | 5652 * Return the token representing either the 'final', 'const' or 'var' keyword, |
| 5777 * or `null` if no keyword was used. | 5653 * or `null` if no keyword was used. |
| 5778 */ | 5654 */ |
| 5779 Token get keyword; | 5655 Token get keyword; |
| 5780 | 5656 |
| 5781 /** | 5657 /** |
| 5782 * Set the token representing either the 'final', 'const' or 'var' keyword to | 5658 * Set the token representing either the 'final', 'const' or 'var' keyword to |
| 5783 * the given [token]. | 5659 * the given [token]. |
| 5784 */ | 5660 */ |
| 5785 void set keyword(Token token); | 5661 void set keyword(Token token); |
| 5786 | 5662 |
| 5787 /** | 5663 /** |
| 5788 * Return the declared type of the parameter, or `null` if the parameter does | 5664 * Return the name of the declared type of the parameter, or `null` if the |
| 5789 * not have a declared type. | 5665 * parameter does not have a declared type. |
| 5790 */ | 5666 */ |
| 5791 TypeAnnotation get type; | 5667 TypeName get type; |
| 5792 | 5668 |
| 5793 /** | 5669 /** |
| 5794 * Set the declared type of the parameter to the given [type]. | 5670 * Set the name of the declared type of the parameter to the given [typeName]. |
| 5795 */ | 5671 */ |
| 5796 void set type(TypeAnnotation type); | 5672 void set type(TypeName typeName); |
| 5797 } | 5673 } |
| 5798 | 5674 |
| 5799 /** | 5675 /** |
| 5800 * A simple identifier. | 5676 * A simple identifier. |
| 5801 * | 5677 * |
| 5802 * simpleIdentifier ::= | 5678 * simpleIdentifier ::= |
| 5803 * initialCharacter internalCharacter* | 5679 * initialCharacter internalCharacter* |
| 5804 * | 5680 * |
| 5805 * initialCharacter ::= '_' | '$' | letter | 5681 * initialCharacter ::= '_' | '$' | letter |
| 5806 * | 5682 * |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6453 */ | 6329 */ |
| 6454 Token get typedefKeyword; | 6330 Token get typedefKeyword; |
| 6455 | 6331 |
| 6456 /** | 6332 /** |
| 6457 * Set the token representing the 'typedef' keyword to the given [token]. | 6333 * Set the token representing the 'typedef' keyword to the given [token]. |
| 6458 */ | 6334 */ |
| 6459 void set typedefKeyword(Token token); | 6335 void set typedefKeyword(Token token); |
| 6460 } | 6336 } |
| 6461 | 6337 |
| 6462 /** | 6338 /** |
| 6463 * A type annotation. | |
| 6464 * | |
| 6465 * type ::= | |
| 6466 * [NamedType] | |
| 6467 * | [GenericFunctionType] | |
| 6468 * | |
| 6469 * Clients may not extend, implement or mix-in this class. | |
| 6470 */ | |
| 6471 abstract class TypeAnnotation extends AstNode { | |
| 6472 /** | |
| 6473 * Return the type being named, or `null` if the AST structure has not been | |
| 6474 * resolved. | |
| 6475 */ | |
| 6476 DartType get type; | |
| 6477 } | |
| 6478 | |
| 6479 /** | |
| 6480 * A list of type arguments. | 6339 * A list of type arguments. |
| 6481 * | 6340 * |
| 6482 * typeArguments ::= | 6341 * typeArguments ::= |
| 6483 * '<' typeName (',' typeName)* '>' | 6342 * '<' typeName (',' typeName)* '>' |
| 6484 * | 6343 * |
| 6485 * Clients may not extend, implement or mix-in this class. | 6344 * Clients may not extend, implement or mix-in this class. |
| 6486 */ | 6345 */ |
| 6487 abstract class TypeArgumentList extends AstNode { | 6346 abstract class TypeArgumentList extends AstNode { |
| 6488 /** | 6347 /** |
| 6489 * Return the type arguments associated with the type. | 6348 * Return the type arguments associated with the type. |
| 6490 */ | 6349 */ |
| 6491 NodeList<TypeAnnotation> get arguments; | 6350 NodeList<TypeName> get arguments; |
| 6492 | 6351 |
| 6493 /** | 6352 /** |
| 6494 * Return the left bracket. | 6353 * Return the left bracket. |
| 6495 */ | 6354 */ |
| 6496 Token get leftBracket; | 6355 Token get leftBracket; |
| 6497 | 6356 |
| 6498 /** | 6357 /** |
| 6499 * Set the left bracket to the given [token]. | 6358 * Set the left bracket to the given [token]. |
| 6500 */ | 6359 */ |
| 6501 void set leftBracket(Token token); | 6360 void set leftBracket(Token token); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6546 } | 6405 } |
| 6547 | 6406 |
| 6548 /** | 6407 /** |
| 6549 * The name of a type, which can optionally include type arguments. | 6408 * The name of a type, which can optionally include type arguments. |
| 6550 * | 6409 * |
| 6551 * typeName ::= | 6410 * typeName ::= |
| 6552 * [Identifier] typeArguments? | 6411 * [Identifier] typeArguments? |
| 6553 * | 6412 * |
| 6554 * Clients may not extend, implement or mix-in this class. | 6413 * Clients may not extend, implement or mix-in this class. |
| 6555 */ | 6414 */ |
| 6556 abstract class TypeName extends TypeAnnotation { | 6415 abstract class TypeName extends AstNode { |
| 6557 /** | 6416 /** |
| 6558 * Return `true` if this type is a deferred type. | 6417 * Return `true` if this type is a deferred type. |
| 6559 * | 6418 * |
| 6560 * 15.1 Static Types: A type <i>T</i> is deferred iff it is of the form | 6419 * 15.1 Static Types: A type <i>T</i> is deferred iff it is of the form |
| 6561 * </i>p.T</i> where <i>p</i> is a deferred prefix. | 6420 * </i>p.T</i> where <i>p</i> is a deferred prefix. |
| 6562 */ | 6421 */ |
| 6563 bool get isDeferred; | 6422 bool get isDeferred; |
| 6564 | 6423 |
| 6565 /** | 6424 /** |
| 6566 * Return the name of the type. | 6425 * Return the name of the type. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 6578 */ | 6437 */ |
| 6579 Token get question; | 6438 Token get question; |
| 6580 | 6439 |
| 6581 /** | 6440 /** |
| 6582 * Return the question mark marking this as a nullable type to the given | 6441 * Return the question mark marking this as a nullable type to the given |
| 6583 * [question]. | 6442 * [question]. |
| 6584 */ | 6443 */ |
| 6585 void set question(Token question); | 6444 void set question(Token question); |
| 6586 | 6445 |
| 6587 /** | 6446 /** |
| 6447 * Return the type being named, or `null` if the AST structure has not been |
| 6448 * resolved. |
| 6449 */ |
| 6450 DartType get type; |
| 6451 |
| 6452 /** |
| 6588 * Set the type being named to the given [type]. | 6453 * Set the type being named to the given [type]. |
| 6589 */ | 6454 */ |
| 6590 void set type(DartType type); | 6455 void set type(DartType type); |
| 6591 | 6456 |
| 6592 /** | 6457 /** |
| 6593 * Return the type arguments associated with the type, or `null` if there are | 6458 * Return the type arguments associated with the type, or `null` if there are |
| 6594 * no type arguments. | 6459 * no type arguments. |
| 6595 */ | 6460 */ |
| 6596 TypeArgumentList get typeArguments; | 6461 TypeArgumentList get typeArguments; |
| 6597 | 6462 |
| 6598 /** | 6463 /** |
| 6599 * Set the type arguments associated with the type to the given | 6464 * Set the type arguments associated with the type to the given |
| 6600 * [typeArguments]. | 6465 * [typeArguments]. |
| 6601 */ | 6466 */ |
| 6602 void set typeArguments(TypeArgumentList typeArguments); | 6467 void set typeArguments(TypeArgumentList typeArguments); |
| 6603 } | 6468 } |
| 6604 | 6469 |
| 6605 /** | 6470 /** |
| 6606 * A type parameter. | 6471 * A type parameter. |
| 6607 * | 6472 * |
| 6608 * typeParameter ::= | 6473 * typeParameter ::= |
| 6609 * [SimpleIdentifier] ('extends' [TypeAnnotation])? | 6474 * [SimpleIdentifier] ('extends' [TypeName])? |
| 6610 * | 6475 * |
| 6611 * Clients may not extend, implement or mix-in this class. | 6476 * Clients may not extend, implement or mix-in this class. |
| 6612 */ | 6477 */ |
| 6613 abstract class TypeParameter extends Declaration { | 6478 abstract class TypeParameter extends Declaration { |
| 6614 /** | 6479 /** |
| 6615 * Return the upper bound for legal arguments, or `null` if there is no | 6480 * Return the name of the upper bound for legal arguments, or `null` if there |
| 6616 * explicit upper bound. | 6481 * is no explicit upper bound. |
| 6617 */ | 6482 */ |
| 6618 TypeAnnotation get bound; | 6483 TypeName get bound; |
| 6619 | 6484 |
| 6620 /** | 6485 /** |
| 6621 * Set the upper bound for legal arguments to the given [type]. | 6486 * Set the name of the upper bound for legal arguments to the given |
| 6487 * [typeName]. |
| 6622 */ | 6488 */ |
| 6623 void set bound(TypeAnnotation type); | 6489 void set bound(TypeName typeName); |
| 6624 | 6490 |
| 6625 /** | 6491 /** |
| 6626 * Return the token representing the 'extends' keyword, or `null` if there is | 6492 * Return the token representing the 'extends' keyword, or `null` if there is |
| 6627 * no explicit upper bound. | 6493 * no explicit upper bound. |
| 6628 */ | 6494 */ |
| 6629 Token get extendsKeyword; | 6495 Token get extendsKeyword; |
| 6630 | 6496 |
| 6631 /** | 6497 /** |
| 6632 * Set the token representing the 'extends' keyword to the given [token]. | 6498 * Set the token representing the 'extends' keyword to the given [token]. |
| 6633 */ | 6499 */ |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6796 void set name(SimpleIdentifier identifier); | 6662 void set name(SimpleIdentifier identifier); |
| 6797 } | 6663 } |
| 6798 | 6664 |
| 6799 /** | 6665 /** |
| 6800 * The declaration of one or more variables of the same type. | 6666 * The declaration of one or more variables of the same type. |
| 6801 * | 6667 * |
| 6802 * variableDeclarationList ::= | 6668 * variableDeclarationList ::= |
| 6803 * finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])* | 6669 * finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])* |
| 6804 * | 6670 * |
| 6805 * finalConstVarOrType ::= | 6671 * finalConstVarOrType ::= |
| 6806 * | 'final' [TypeAnnotation]? | 6672 * | 'final' [TypeName]? |
| 6807 * | 'const' [TypeAnnotation]? | 6673 * | 'const' [TypeName]? |
| 6808 * | 'var' | 6674 * | 'var' |
| 6809 * | [TypeAnnotation] | 6675 * | [TypeName] |
| 6810 * | 6676 * |
| 6811 * Clients may not extend, implement or mix-in this class. | 6677 * Clients may not extend, implement or mix-in this class. |
| 6812 */ | 6678 */ |
| 6813 abstract class VariableDeclarationList extends AnnotatedNode { | 6679 abstract class VariableDeclarationList extends AnnotatedNode { |
| 6814 /** | 6680 /** |
| 6815 * Return `true` if the variables in this list were declared with the 'const' | 6681 * Return `true` if the variables in this list were declared with the 'const' |
| 6816 * modifier. | 6682 * modifier. |
| 6817 */ | 6683 */ |
| 6818 bool get isConst; | 6684 bool get isConst; |
| 6819 | 6685 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 6834 /** | 6700 /** |
| 6835 * Set the token representing the 'final', 'const' or 'var' keyword to the | 6701 * Set the token representing the 'final', 'const' or 'var' keyword to the |
| 6836 * given [token]. | 6702 * given [token]. |
| 6837 */ | 6703 */ |
| 6838 void set keyword(Token token); | 6704 void set keyword(Token token); |
| 6839 | 6705 |
| 6840 /** | 6706 /** |
| 6841 * Return the type of the variables being declared, or `null` if no type was | 6707 * Return the type of the variables being declared, or `null` if no type was |
| 6842 * provided. | 6708 * provided. |
| 6843 */ | 6709 */ |
| 6844 TypeAnnotation get type; | 6710 TypeName get type; |
| 6845 | 6711 |
| 6846 /** | 6712 /** |
| 6847 * Set the type of the variables being declared to the given [type]. | 6713 * Set the type of the variables being declared to the given [typeName]. |
| 6848 */ | 6714 */ |
| 6849 void set type(TypeAnnotation type); | 6715 void set type(TypeName typeName); |
| 6850 | 6716 |
| 6851 /** | 6717 /** |
| 6852 * Return a list containing the individual variables being declared. | 6718 * Return a list containing the individual variables being declared. |
| 6853 */ | 6719 */ |
| 6854 NodeList<VariableDeclaration> get variables; | 6720 NodeList<VariableDeclaration> get variables; |
| 6855 } | 6721 } |
| 6856 | 6722 |
| 6857 /** | 6723 /** |
| 6858 * A list of variables that are being declared in a context where a statement is | 6724 * A list of variables that are being declared in a context where a statement is |
| 6859 * required. | 6725 * required. |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7014 /** | 6880 /** |
| 7015 * Return the 'yield' keyword. | 6881 * Return the 'yield' keyword. |
| 7016 */ | 6882 */ |
| 7017 Token get yieldKeyword; | 6883 Token get yieldKeyword; |
| 7018 | 6884 |
| 7019 /** | 6885 /** |
| 7020 * Return the 'yield' keyword to the given [token]. | 6886 * Return the 'yield' keyword to the given [token]. |
| 7021 */ | 6887 */ |
| 7022 void set yieldKeyword(Token token); | 6888 void set yieldKeyword(Token token); |
| 7023 } | 6889 } |
| OLD | NEW |