codegen and dropped the useless walker
This commit is contained in:
13
lib/parse.js
13
lib/parse.js
@@ -833,15 +833,12 @@ function parse($TEXT, exigent_mode) {
|
||||
expect(":");
|
||||
S.labels.push(label);
|
||||
var start = S.token, stat = statement();
|
||||
if (exigent_mode && !(stat instanceof AST_LabeledStatement))
|
||||
unexpected(start);
|
||||
S.labels.pop();
|
||||
stat.label = label;
|
||||
return stat;
|
||||
return new AST_LabeledStatement({ statement: stat });
|
||||
};
|
||||
|
||||
function simple_statement() {
|
||||
return new AST_Statement({ body: prog1(expression, semicolon) });
|
||||
return new AST_SimpleStatement({ body: prog1(expression, semicolon) });
|
||||
};
|
||||
|
||||
function break_cont(type) {
|
||||
@@ -1024,7 +1021,11 @@ function parse($TEXT, exigent_mode) {
|
||||
next();
|
||||
bfinally = new AST_Finally({
|
||||
start : start,
|
||||
body : block_(),
|
||||
body : new AST_Bracketed({
|
||||
start : S.token,
|
||||
body : block_(),
|
||||
end : prev()
|
||||
}),
|
||||
end : prev()
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user