| Index: frog/leg/tree/nodes.dart
|
| diff --git a/frog/leg/tree/nodes.dart b/frog/leg/tree/nodes.dart
|
| index c96e1fb06e3ecd41f0124bbf4a2ad0f7cac3f745..62c0fca3e28cf574e558714497e193f8094bba74 100644
|
| --- a/frog/leg/tree/nodes.dart
|
| +++ b/frog/leg/tree/nodes.dart
|
| @@ -14,6 +14,7 @@ interface Visitor<R> {
|
| R visitExpressionStatement(ExpressionStatement node);
|
| R visitFor(For node);
|
| R visitForInStatement(ForInStatement node);
|
| + R visitFunctionDeclaration(FunctionDeclaration node);
|
| R visitFunctionExpression(FunctionExpression node);
|
| R visitIdentifier(Identifier node);
|
| R visitIf(If node);
|
| @@ -106,6 +107,7 @@ class Node implements Hashable {
|
| ExpressionStatement asExpressionStatement() => null;
|
| For asFor() => null;
|
| ForInStatement asForInStatement() => null;
|
| + FunctionDeclaration asFunctionDeclaration() => null;
|
| FunctionExpression asFunctionExpression() => null;
|
| Identifier asIdentifier() => null;
|
| If asIf() => null;
|
| @@ -505,6 +507,21 @@ class For extends Loop {
|
| }
|
| }
|
|
|
| +class FunctionDeclaration extends Statement {
|
| + final FunctionExpression function;
|
| +
|
| + FunctionDeclaration(this.function);
|
| +
|
| + FunctionDeclaration asFunctionDeclaration() => this;
|
| +
|
| + accept(Visitor visitor) => visitor.visitFunctionDeclaration(this);
|
| +
|
| + visitChildren(Visitor visitor) => function.accept(visitor);
|
| +
|
| + Token getBeginToken() => function.getBeginToken();
|
| + Token getEndToken() => function.getEndToken();
|
| +}
|
| +
|
| class FunctionExpression extends Expression {
|
| final Node name;
|
|
|
|
|