aboutsummaryrefslogtreecommitdiff
path: root/lib/parse.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/parse.js')
-rw-r--r--lib/parse.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/parse.js b/lib/parse.js
index 2cd160fa..fdf44ce3 100644
--- a/lib/parse.js
+++ b/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()
});
}