Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/tree/nodes.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart |
| index f317de421ba7ba235e56aca40c6f24128de0a400..220b31388cdae4fda185645d03aee7cdbab60a22 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart |
| @@ -48,6 +48,7 @@ abstract class Visitor<R> { |
| R visitLiteralString(LiteralString node) => visitStringNode(node); |
| R visitStringJuxtaposition(StringJuxtaposition node) => visitStringNode(node); |
| R visitLoop(Loop node) => visitStatement(node); |
| + R visitMixinApplication(MixinApplication node) => visitNode(node); |
| R visitModifiers(Modifiers node) => visitNode(node); |
| R visitNamedArgument(NamedArgument node) => visitExpression(node); |
| R visitNewExpression(NewExpression node) => visitExpression(node); |
| @@ -144,7 +145,7 @@ abstract class Node extends TreeElementMixin implements Spannable { |
| ContinueStatement asContinueStatement() => null; |
| DoWhile asDoWhile() => null; |
| EmptyStatement asEmptyStatement() => null; |
| - Export AsExport() => null; |
| + Export asExport() => null; |
| Expression asExpression() => null; |
| ExpressionStatement asExpressionStatement() => null; |
| For asFor() => null; |
| @@ -153,10 +154,10 @@ abstract class Node extends TreeElementMixin implements Spannable { |
| FunctionExpression asFunctionExpression() => null; |
| Identifier asIdentifier() => null; |
| If asIf() => null; |
| - Import AsImport() => null; |
| + Import asImport() => null; |
| Label asLabel() => null; |
| LabeledStatement asLabeledStatement() => null; |
| - LibraryName AsLibraryName() => null; |
| + LibraryName asLibraryName() => null; |
| LiteralBool asLiteralBool() => null; |
| LiteralDouble asLiteralDouble() => null; |
| LiteralInt asLiteralInt() => null; |
| @@ -165,13 +166,14 @@ abstract class Node extends TreeElementMixin implements Spannable { |
| LiteralMapEntry asLiteralMapEntry() => null; |
| LiteralNull asLiteralNull() => null; |
| LiteralString asLiteralString() => null; |
| + MixinApplication asMixinApplication() => null; |
| Modifiers asModifiers() => null; |
| NamedArgument asNamedArgument() => null; |
| NodeList asNodeList() => null; |
| Operator asOperator() => null; |
| ParenthesizedExpression asParenthesizedExpression() => null; |
| - Part AsPart() => null; |
| - PartOf AsPartOf() => null; |
| + Part asPart() => null; |
| + PartOf asPartOf() => null; |
| Return asReturn() => null; |
| ScriptTag asScriptTag() => null; |
| Send asSend() => null; |
| @@ -235,6 +237,31 @@ class ClassNode extends Node { |
| Token getEndToken() => endToken; |
| } |
| +class MixinApplication extends Node { |
| + final Modifiers modifiers; |
| + final TypeAnnotation superclass; |
| + final NodeList mixins; |
| + final Token beginToken; |
|
ahe
2013/01/15 15:35:04
typedefKeyword?
kasperl
2013/01/15 15:58:18
The mixin application itself doesn't start with ty
|
| + final Token endToken; |
|
ahe
2013/01/15 15:35:04
This is not necessary.
|
| + |
| + MixinApplication(this.modifiers, this.superclass, this.mixins, |
| + this.beginToken, this.endToken); |
| + |
| + MixinApplication asMixinApplication() => this; |
| + |
| + accept(Visitor visitor) => visitor.visitMixinApplication(this); |
| + |
| + visitChildren(Visitor visitor) { |
| + if (modifiers != null) modifiers.accept(visitor); |
| + if (superclass != null) superclass.accept(visitor); |
| + if (mixins != null) mixins.accept(visitor); |
| + } |
| + |
| + Token getBeginToken() => beginToken; |
| + |
| + Token getEndToken() => endToken; |
|
ahe
2013/01/15 15:35:04
mixins.getEndToken();
kasperl
2013/01/15 15:58:18
Unfortunately, the node list produced from parseTy
ahe
2013/01/15 16:03:40
I think NodeList.getEndToken() should do what you
kasperl
2013/01/16 07:00:03
Thanks. That looks exactly right.
|
| +} |
| + |
| abstract class Expression extends Node { |
| Expression(); |