| 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 0db90fda76307a1be08efbf1711a46a9797ef59c..11a0e0b167203423dd8cf6b0e8139f4ae15cb30e 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
|
| @@ -21,6 +21,7 @@ abstract class Visitor<R> {
|
| R visitContinueStatement(ContinueStatement node) => visitGotoStatement(node);
|
| R visitDoWhile(DoWhile node) => visitLoop(node);
|
| R visitEmptyStatement(EmptyStatement node) => visitStatement(node);
|
| + R visitEnum(Enum node) => visitNode(node);
|
| R visitExport(Export node) => visitLibraryDependency(node);
|
| R visitExpression(Expression node) => visitNode(node);
|
| R visitExpressionStatement(ExpressionStatement node) => visitStatement(node);
|
| @@ -150,6 +151,7 @@ abstract class Node extends TreeElementMixin implements Spannable {
|
| ContinueStatement asContinueStatement() => null;
|
| DoWhile asDoWhile() => null;
|
| EmptyStatement asEmptyStatement() => null;
|
| + Enum asEnum() => null;
|
| ErrorExpression asErrorExpression() => null;
|
| Export asExport() => null;
|
| Expression asExpression() => null;
|
| @@ -1829,6 +1831,33 @@ class Import extends LibraryDependency {
|
| }
|
|
|
| /**
|
| + * An `enum` declaration.
|
| + *
|
| + * An `enum` defines a number of named constants inside a non-extensible class
|
| + */
|
| +class Enum extends Node {
|
| + /** The name of the enum class. */
|
| + final Identifier name;
|
| + /** The names of the enum constants. */
|
| + final NodeList names;
|
| + final Token enumToken;
|
| +
|
| + Enum(this.enumToken, this.name, this.names);
|
| +
|
| + Enum asEnum() => this;
|
| +
|
| + accept(Visitor visitor) => visitor.visitEnum(this);
|
| +
|
| + visitChildren(Visitor visitor) {
|
| + name.accept(visitor);
|
| + if (names != null) names.accept(visitor);
|
| + }
|
| +
|
| + Token getBeginToken() => enumToken;
|
| + Token getEndToken() => names.getEndToken();
|
| +}
|
| +
|
| +/**
|
| * An [:export:] library tag.
|
| *
|
| * An export tag is dependency on another library where the exported identifiers
|
|
|