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 library engine.ast; | 5 library engine.ast; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'element.dart'; | 9 import 'element.dart'; |
10 import 'engine.dart' show AnalysisEngine; | 10 import 'engine.dart' show AnalysisEngine; |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 /** | 416 /** |
417 * Return the expressions producing the values of the arguments. Although the | 417 * Return the expressions producing the values of the arguments. Although the |
418 * language requires that positional arguments appear before named arguments, | 418 * language requires that positional arguments appear before named arguments, |
419 * this class allows them to be intermixed. | 419 * this class allows them to be intermixed. |
420 */ | 420 */ |
421 NodeList<Expression> get arguments => _arguments; | 421 NodeList<Expression> get arguments => _arguments; |
422 | 422 |
423 @override | 423 @override |
424 Token get beginToken => leftParenthesis; | 424 Token get beginToken => leftParenthesis; |
425 | 425 |
426 /** | |
427 * TODO(paulberry): Add commas. | |
428 */ | |
429 @override | 426 @override |
| 427 // TODO(paulberry): Add commas. |
430 Iterable get childEntities => new ChildEntities() | 428 Iterable get childEntities => new ChildEntities() |
431 ..add(leftParenthesis) | 429 ..add(leftParenthesis) |
432 ..addAll(_arguments) | 430 ..addAll(_arguments) |
433 ..add(rightParenthesis); | 431 ..add(rightParenthesis); |
434 | 432 |
435 /** | 433 /** |
436 * Set the parameter elements corresponding to each of the arguments in this | 434 * Set the parameter elements corresponding to each of the arguments in this |
437 * list to the given list of [parameters]. The list of parameters must be the | 435 * list to the given list of [parameters]. The list of parameters must be the |
438 * same length as the number of arguments, but can contain `null` entries if a | 436 * same length as the number of arguments, but can contain `null` entries if a |
439 * given argument does not correspond to a formal parameter. | 437 * given argument does not correspond to a formal parameter. |
(...skipping 3389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3829 @override | 3827 @override |
3830 Token get endToken => semicolon; | 3828 Token get endToken => semicolon; |
3831 | 3829 |
3832 /** | 3830 /** |
3833 * Return the token representing the 'break' keyword. | 3831 * Return the token representing the 'break' keyword. |
3834 */ | 3832 */ |
3835 @deprecated // Use "this.breakKeyword" | 3833 @deprecated // Use "this.breakKeyword" |
3836 Token get keyword => breakKeyword; | 3834 Token get keyword => breakKeyword; |
3837 | 3835 |
3838 /** | 3836 /** |
3839 * Sethe token representing the 'break' keyword to the given [token]. | 3837 * Set the token representing the 'break' keyword to the given [token]. |
3840 */ | 3838 */ |
3841 @deprecated // Use "this.breakKeyword" | 3839 @deprecated // Use "this.breakKeyword" |
3842 void set keyword(Token token) { | 3840 void set keyword(Token token) { |
3843 breakKeyword = token; | 3841 breakKeyword = token; |
3844 } | 3842 } |
3845 | 3843 |
3846 /** | 3844 /** |
3847 * Return the label associated with the statement, or `null` if there is no | 3845 * Return the label associated with the statement, or `null` if there is no |
3848 * label. | 3846 * label. |
3849 */ | 3847 */ |
(...skipping 5621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9471 /** | 9469 /** |
9472 * Initialize a newly created implements clause. | 9470 * Initialize a newly created implements clause. |
9473 */ | 9471 */ |
9474 ImplementsClause(this.implementsKeyword, List<TypeName> interfaces) { | 9472 ImplementsClause(this.implementsKeyword, List<TypeName> interfaces) { |
9475 _interfaces = new NodeList<TypeName>(this, interfaces); | 9473 _interfaces = new NodeList<TypeName>(this, interfaces); |
9476 } | 9474 } |
9477 | 9475 |
9478 @override | 9476 @override |
9479 Token get beginToken => implementsKeyword; | 9477 Token get beginToken => implementsKeyword; |
9480 | 9478 |
9481 /** | |
9482 * TODO(paulberry): add commas. | |
9483 */ | |
9484 @override | 9479 @override |
| 9480 // TODO(paulberry): add commas. |
9485 Iterable get childEntities => new ChildEntities() | 9481 Iterable get childEntities => new ChildEntities() |
9486 ..add(implementsKeyword) | 9482 ..add(implementsKeyword) |
9487 ..addAll(interfaces); | 9483 ..addAll(interfaces); |
9488 | 9484 |
9489 @override | 9485 @override |
9490 Token get endToken => _interfaces.endToken; | 9486 Token get endToken => _interfaces.endToken; |
9491 | 9487 |
9492 /** | 9488 /** |
9493 * Return the list of the interfaces that are being implemented. | 9489 * Return the list of the interfaces that are being implemented. |
9494 */ | 9490 */ |
(...skipping 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11650 LibraryIdentifier(List<SimpleIdentifier> components) { | 11646 LibraryIdentifier(List<SimpleIdentifier> components) { |
11651 _components = new NodeList<SimpleIdentifier>(this, components); | 11647 _components = new NodeList<SimpleIdentifier>(this, components); |
11652 } | 11648 } |
11653 | 11649 |
11654 @override | 11650 @override |
11655 Token get beginToken => _components.beginToken; | 11651 Token get beginToken => _components.beginToken; |
11656 | 11652 |
11657 @override | 11653 @override |
11658 Element get bestElement => staticElement; | 11654 Element get bestElement => staticElement; |
11659 | 11655 |
11660 /** | |
11661 * TODO(paulberry): add "." tokens. | |
11662 */ | |
11663 @override | 11656 @override |
| 11657 // TODO(paulberry): add "." tokens. |
11664 Iterable get childEntities => new ChildEntities()..addAll(_components); | 11658 Iterable get childEntities => new ChildEntities()..addAll(_components); |
11665 | 11659 |
11666 /** | 11660 /** |
11667 * Return the components of the identifier. | 11661 * Return the components of the identifier. |
11668 */ | 11662 */ |
11669 NodeList<SimpleIdentifier> get components => _components; | 11663 NodeList<SimpleIdentifier> get components => _components; |
11670 | 11664 |
11671 @override | 11665 @override |
11672 Token get endToken => _components.endToken; | 11666 Token get endToken => _components.endToken; |
11673 | 11667 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11743 if (constKeyword != null) { | 11737 if (constKeyword != null) { |
11744 return constKeyword; | 11738 return constKeyword; |
11745 } | 11739 } |
11746 TypeArgumentList typeArguments = this.typeArguments; | 11740 TypeArgumentList typeArguments = this.typeArguments; |
11747 if (typeArguments != null) { | 11741 if (typeArguments != null) { |
11748 return typeArguments.beginToken; | 11742 return typeArguments.beginToken; |
11749 } | 11743 } |
11750 return leftBracket; | 11744 return leftBracket; |
11751 } | 11745 } |
11752 | 11746 |
11753 /** | |
11754 * TODO(paulberry): add commas. | |
11755 */ | |
11756 @override | 11747 @override |
| 11748 // TODO(paulberry): add commas. |
11757 Iterable get childEntities => super._childEntities | 11749 Iterable get childEntities => super._childEntities |
11758 ..add(leftBracket) | 11750 ..add(leftBracket) |
11759 ..addAll(_elements) | 11751 ..addAll(_elements) |
11760 ..add(rightBracket); | 11752 ..add(rightBracket); |
11761 | 11753 |
11762 /** | 11754 /** |
11763 * Return the expressions used to compute the elements of the list. | 11755 * Return the expressions used to compute the elements of the list. |
11764 */ | 11756 */ |
11765 NodeList<Expression> get elements => _elements; | 11757 NodeList<Expression> get elements => _elements; |
11766 | 11758 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11833 if (constKeyword != null) { | 11825 if (constKeyword != null) { |
11834 return constKeyword; | 11826 return constKeyword; |
11835 } | 11827 } |
11836 TypeArgumentList typeArguments = this.typeArguments; | 11828 TypeArgumentList typeArguments = this.typeArguments; |
11837 if (typeArguments != null) { | 11829 if (typeArguments != null) { |
11838 return typeArguments.beginToken; | 11830 return typeArguments.beginToken; |
11839 } | 11831 } |
11840 return leftBracket; | 11832 return leftBracket; |
11841 } | 11833 } |
11842 | 11834 |
11843 /** | |
11844 * TODO(paulberry): add commas. | |
11845 */ | |
11846 @override | 11835 @override |
| 11836 // TODO(paulberry): add commas. |
11847 Iterable get childEntities => super._childEntities | 11837 Iterable get childEntities => super._childEntities |
11848 ..add(leftBracket) | 11838 ..add(leftBracket) |
11849 ..addAll(entries) | 11839 ..addAll(entries) |
11850 ..add(rightBracket); | 11840 ..add(rightBracket); |
11851 | 11841 |
11852 @override | 11842 @override |
11853 Token get endToken => rightBracket; | 11843 Token get endToken => rightBracket; |
11854 | 11844 |
11855 /** | 11845 /** |
11856 * Return the entries in the map. | 11846 * Return the entries in the map. |
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12604 set keyword(Token token) { | 12594 set keyword(Token token) { |
12605 nativeKeyword = token; | 12595 nativeKeyword = token; |
12606 } | 12596 } |
12607 | 12597 |
12608 /** | 12598 /** |
12609 * Return the name of the native object that implements the class. | 12599 * Return the name of the native object that implements the class. |
12610 */ | 12600 */ |
12611 StringLiteral get name => _name; | 12601 StringLiteral get name => _name; |
12612 | 12602 |
12613 /** | 12603 /** |
12614 * Sets the name of the native object that implements the class to the given | 12604 * Set the name of the native object that implements the class to the given |
12615 * [name]. | 12605 * [name]. |
12616 */ | 12606 */ |
12617 void set name(StringLiteral name) { | 12607 void set name(StringLiteral name) { |
12618 _name = _becomeParentOf(name); | 12608 _name = _becomeParentOf(name); |
12619 } | 12609 } |
12620 | 12610 |
12621 @override | 12611 @override |
12622 accept(AstVisitor visitor) => visitor.visitNativeClause(this); | 12612 accept(AstVisitor visitor) => visitor.visitNativeClause(this); |
12623 | 12613 |
12624 @override | 12614 @override |
(...skipping 3566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16191 NodeList<SimpleIdentifier> _shownNames; | 16181 NodeList<SimpleIdentifier> _shownNames; |
16192 | 16182 |
16193 /** | 16183 /** |
16194 * Initialize a newly created import show combinator. | 16184 * Initialize a newly created import show combinator. |
16195 */ | 16185 */ |
16196 ShowCombinator(Token keyword, List<SimpleIdentifier> shownNames) | 16186 ShowCombinator(Token keyword, List<SimpleIdentifier> shownNames) |
16197 : super(keyword) { | 16187 : super(keyword) { |
16198 _shownNames = new NodeList<SimpleIdentifier>(this, shownNames); | 16188 _shownNames = new NodeList<SimpleIdentifier>(this, shownNames); |
16199 } | 16189 } |
16200 | 16190 |
16201 /** | |
16202 * TODO(paulberry): add commas. | |
16203 */ | |
16204 @override | 16191 @override |
| 16192 // TODO(paulberry): add commas. |
16205 Iterable get childEntities => new ChildEntities() | 16193 Iterable get childEntities => new ChildEntities() |
16206 ..add(keyword) | 16194 ..add(keyword) |
16207 ..addAll(_shownNames); | 16195 ..addAll(_shownNames); |
16208 | 16196 |
16209 @override | 16197 @override |
16210 Token get endToken => _shownNames.endToken; | 16198 Token get endToken => _shownNames.endToken; |
16211 | 16199 |
16212 /** | 16200 /** |
16213 * Return the list of names from the library that are made visible by this | 16201 * Return the list of names from the library that are made visible by this |
16214 * combinator. | 16202 * combinator. |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16693 return _propagatedElement; | 16681 return _propagatedElement; |
16694 } | 16682 } |
16695 | 16683 |
16696 @override | 16684 @override |
16697 Iterable get childEntities => new ChildEntities()..add(token); | 16685 Iterable get childEntities => new ChildEntities()..add(token); |
16698 | 16686 |
16699 @override | 16687 @override |
16700 Token get endToken => token; | 16688 Token get endToken => token; |
16701 | 16689 |
16702 /** | 16690 /** |
16703 * Returns `true` if this identifier is the "name" part of a prefixed | 16691 * Return `true` if this identifier is the "name" part of a prefixed |
16704 * identifier or a method invocation. | 16692 * identifier or a method invocation. |
16705 */ | 16693 */ |
16706 bool get isQualified { | 16694 bool get isQualified { |
16707 AstNode parent = this.parent; | 16695 AstNode parent = this.parent; |
16708 if (parent is PrefixedIdentifier) { | 16696 if (parent is PrefixedIdentifier) { |
16709 return identical(parent.identifier, this); | 16697 return identical(parent.identifier, this); |
16710 } | 16698 } |
16711 if (parent is PropertyAccess) { | 16699 if (parent is PropertyAccess) { |
16712 return identical(parent.propertyName, this); | 16700 return identical(parent.propertyName, this); |
16713 } | 16701 } |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17778 final List<Token> components; | 17766 final List<Token> components; |
17779 | 17767 |
17780 /** | 17768 /** |
17781 * Initialize a newly created symbol literal. | 17769 * Initialize a newly created symbol literal. |
17782 */ | 17770 */ |
17783 SymbolLiteral(this.poundSign, this.components); | 17771 SymbolLiteral(this.poundSign, this.components); |
17784 | 17772 |
17785 @override | 17773 @override |
17786 Token get beginToken => poundSign; | 17774 Token get beginToken => poundSign; |
17787 | 17775 |
17788 /** | |
17789 * TODO(paulberry): add "." tokens. | |
17790 */ | |
17791 @override | 17776 @override |
| 17777 // TODO(paulberry): add "." tokens. |
17792 Iterable get childEntities => new ChildEntities() | 17778 Iterable get childEntities => new ChildEntities() |
17793 ..add(poundSign) | 17779 ..add(poundSign) |
17794 ..addAll(components); | 17780 ..addAll(components); |
17795 | 17781 |
17796 @override | 17782 @override |
17797 Token get endToken => components[components.length - 1]; | 17783 Token get endToken => components[components.length - 1]; |
17798 | 17784 |
17799 @override | 17785 @override |
17800 accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this); | 17786 accept(AstVisitor visitor) => visitor.visitSymbolLiteral(this); |
17801 | 17787 |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18352 Object visitFieldDeclaration(FieldDeclaration node) { | 18338 Object visitFieldDeclaration(FieldDeclaration node) { |
18353 _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " "); | 18339 _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " "); |
18354 _visitTokenWithSuffix(node.staticKeyword, " "); | 18340 _visitTokenWithSuffix(node.staticKeyword, " "); |
18355 _visitNode(node.fields); | 18341 _visitNode(node.fields); |
18356 _writer.print(";"); | 18342 _writer.print(";"); |
18357 return null; | 18343 return null; |
18358 } | 18344 } |
18359 | 18345 |
18360 @override | 18346 @override |
18361 Object visitFieldFormalParameter(FieldFormalParameter node) { | 18347 Object visitFieldFormalParameter(FieldFormalParameter node) { |
| 18348 _visitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' '); |
18362 _visitTokenWithSuffix(node.keyword, " "); | 18349 _visitTokenWithSuffix(node.keyword, " "); |
18363 _visitNodeWithSuffix(node.type, " "); | 18350 _visitNodeWithSuffix(node.type, " "); |
18364 _writer.print("this."); | 18351 _writer.print("this."); |
18365 _visitNode(node.identifier); | 18352 _visitNode(node.identifier); |
18366 _visitNode(node.typeParameters); | 18353 _visitNode(node.typeParameters); |
18367 _visitNode(node.parameters); | 18354 _visitNode(node.parameters); |
18368 return null; | 18355 return null; |
18369 } | 18356 } |
18370 | 18357 |
18371 @override | 18358 @override |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18477 _visitNodeWithSuffix(node.returnType, " "); | 18464 _visitNodeWithSuffix(node.returnType, " "); |
18478 _visitNode(node.name); | 18465 _visitNode(node.name); |
18479 _visitNode(node.typeParameters); | 18466 _visitNode(node.typeParameters); |
18480 _visitNode(node.parameters); | 18467 _visitNode(node.parameters); |
18481 _writer.print(";"); | 18468 _writer.print(";"); |
18482 return null; | 18469 return null; |
18483 } | 18470 } |
18484 | 18471 |
18485 @override | 18472 @override |
18486 Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { | 18473 Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) { |
| 18474 _visitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' '); |
18487 _visitNodeWithSuffix(node.returnType, " "); | 18475 _visitNodeWithSuffix(node.returnType, " "); |
18488 _visitNode(node.identifier); | 18476 _visitNode(node.identifier); |
18489 _visitNode(node.typeParameters); | 18477 _visitNode(node.typeParameters); |
18490 _visitNode(node.parameters); | 18478 _visitNode(node.parameters); |
18491 return null; | 18479 return null; |
18492 } | 18480 } |
18493 | 18481 |
18494 @override | 18482 @override |
18495 Object visitHideCombinator(HideCombinator node) { | 18483 Object visitHideCombinator(HideCombinator node) { |
18496 _writer.print("hide "); | 18484 _writer.print("hide "); |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18807 | 18795 |
18808 @override | 18796 @override |
18809 Object visitShowCombinator(ShowCombinator node) { | 18797 Object visitShowCombinator(ShowCombinator node) { |
18810 _writer.print("show "); | 18798 _writer.print("show "); |
18811 _visitNodeListWithSeparator(node.shownNames, ", "); | 18799 _visitNodeListWithSeparator(node.shownNames, ", "); |
18812 return null; | 18800 return null; |
18813 } | 18801 } |
18814 | 18802 |
18815 @override | 18803 @override |
18816 Object visitSimpleFormalParameter(SimpleFormalParameter node) { | 18804 Object visitSimpleFormalParameter(SimpleFormalParameter node) { |
| 18805 _visitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' '); |
18817 _visitTokenWithSuffix(node.keyword, " "); | 18806 _visitTokenWithSuffix(node.keyword, " "); |
18818 _visitNodeWithSuffix(node.type, " "); | 18807 _visitNodeWithSuffix(node.type, " "); |
18819 _visitNode(node.identifier); | 18808 _visitNode(node.identifier); |
18820 return null; | 18809 return null; |
18821 } | 18810 } |
18822 | 18811 |
18823 @override | 18812 @override |
18824 Object visitSimpleIdentifier(SimpleIdentifier node) { | 18813 Object visitSimpleIdentifier(SimpleIdentifier node) { |
18825 _writer.print(node.token.lexeme); | 18814 _writer.print(node.token.lexeme); |
18826 return null; | 18815 return null; |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19315 } | 19304 } |
19316 | 19305 |
19317 /** | 19306 /** |
19318 * Return the type arguments associated with the type. | 19307 * Return the type arguments associated with the type. |
19319 */ | 19308 */ |
19320 NodeList<TypeName> get arguments => _arguments; | 19309 NodeList<TypeName> get arguments => _arguments; |
19321 | 19310 |
19322 @override | 19311 @override |
19323 Token get beginToken => leftBracket; | 19312 Token get beginToken => leftBracket; |
19324 | 19313 |
19325 /** | |
19326 * TODO(paulberry): Add commas. | |
19327 */ | |
19328 @override | 19314 @override |
| 19315 // TODO(paulberry): Add commas. |
19329 Iterable get childEntities => new ChildEntities() | 19316 Iterable get childEntities => new ChildEntities() |
19330 ..add(leftBracket) | 19317 ..add(leftBracket) |
19331 ..addAll(_arguments) | 19318 ..addAll(_arguments) |
19332 ..add(rightBracket); | 19319 ..add(rightBracket); |
19333 | 19320 |
19334 @override | 19321 @override |
19335 Token get endToken => rightBracket; | 19322 Token get endToken => rightBracket; |
19336 | 19323 |
19337 @override | 19324 @override |
19338 accept(AstVisitor visitor) => visitor.visitTypeArgumentList(this); | 19325 accept(AstVisitor visitor) => visitor.visitTypeArgumentList(this); |
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20296 * the corresponding attribute. The [keyword] can be `null` if a type was | 20283 * the corresponding attribute. The [keyword] can be `null` if a type was |
20297 * specified. The [type] must be `null` if the keyword is 'var'. | 20284 * specified. The [type] must be `null` if the keyword is 'var'. |
20298 */ | 20285 */ |
20299 VariableDeclarationList(Comment comment, List<Annotation> metadata, | 20286 VariableDeclarationList(Comment comment, List<Annotation> metadata, |
20300 this.keyword, TypeName type, List<VariableDeclaration> variables) | 20287 this.keyword, TypeName type, List<VariableDeclaration> variables) |
20301 : super(comment, metadata) { | 20288 : super(comment, metadata) { |
20302 _type = _becomeParentOf(type); | 20289 _type = _becomeParentOf(type); |
20303 _variables = new NodeList<VariableDeclaration>(this, variables); | 20290 _variables = new NodeList<VariableDeclaration>(this, variables); |
20304 } | 20291 } |
20305 | 20292 |
20306 /** | |
20307 * TODO(paulberry): include commas. | |
20308 */ | |
20309 @override | 20293 @override |
| 20294 // TODO(paulberry): include commas. |
20310 Iterable get childEntities => super._childEntities | 20295 Iterable get childEntities => super._childEntities |
20311 ..add(keyword) | 20296 ..add(keyword) |
20312 ..add(_type) | 20297 ..add(_type) |
20313 ..addAll(_variables); | 20298 ..addAll(_variables); |
20314 | 20299 |
20315 @override | 20300 @override |
20316 Token get endToken => _variables.endToken; | 20301 Token get endToken => _variables.endToken; |
20317 | 20302 |
20318 @override | 20303 @override |
20319 Token get firstTokenAfterCommentAndMetadata { | 20304 Token get firstTokenAfterCommentAndMetadata { |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20552 /** | 20537 /** |
20553 * Initialize a newly created with clause. | 20538 * Initialize a newly created with clause. |
20554 */ | 20539 */ |
20555 WithClause(this.withKeyword, List<TypeName> mixinTypes) { | 20540 WithClause(this.withKeyword, List<TypeName> mixinTypes) { |
20556 _mixinTypes = new NodeList<TypeName>(this, mixinTypes); | 20541 _mixinTypes = new NodeList<TypeName>(this, mixinTypes); |
20557 } | 20542 } |
20558 | 20543 |
20559 @override | 20544 @override |
20560 Token get beginToken => withKeyword; | 20545 Token get beginToken => withKeyword; |
20561 | 20546 |
20562 /** | |
20563 * TODO(paulberry): add commas. | |
20564 */ | |
20565 @override | 20547 @override |
| 20548 // TODO(paulberry): add commas. |
20566 Iterable get childEntities => new ChildEntities() | 20549 Iterable get childEntities => new ChildEntities() |
20567 ..add(withKeyword) | 20550 ..add(withKeyword) |
20568 ..addAll(_mixinTypes); | 20551 ..addAll(_mixinTypes); |
20569 | 20552 |
20570 @override | 20553 @override |
20571 Token get endToken => _mixinTypes.endToken; | 20554 Token get endToken => _mixinTypes.endToken; |
20572 | 20555 |
20573 /** | 20556 /** |
20574 * Set the token representing the 'with' keyword to the given [token]. | 20557 * Set the token representing the 'with' keyword to the given [token]. |
20575 */ | 20558 */ |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20664 } | 20647 } |
20665 | 20648 |
20666 @override | 20649 @override |
20667 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); | 20650 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); |
20668 | 20651 |
20669 @override | 20652 @override |
20670 void visitChildren(AstVisitor visitor) { | 20653 void visitChildren(AstVisitor visitor) { |
20671 _safelyVisitChild(_expression, visitor); | 20654 _safelyVisitChild(_expression, visitor); |
20672 } | 20655 } |
20673 } | 20656 } |
OLD | NEW |