AST cleanup (dropped AST_StatementBase)

This commit is contained in:
Mihai Bazon
2012-10-03 15:41:11 +03:00
parent 9221ad62db
commit 3412498795
3 changed files with 25 additions and 23 deletions

View File

@@ -46,7 +46,7 @@ function test_directory(dir) {
function as_toplevel(input) {
if (input instanceof U.AST_BlockStatement) input = input.body;
else if (input instanceof U.AST_StatementBase) input = [ input ];
else if (input instanceof U.AST_Statement) input = [ input ];
else throw new Error("Unsupported input syntax");
var toplevel = new U.AST_Toplevel({ body: input });
toplevel.figure_out_scope();