aboutsummaryrefslogtreecommitdiff
path: root/lib/parse.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-09-03 12:05:10 +0300
committerMihai Bazon <mihai@bazon.net>2012-09-03 12:05:10 +0300
commitd7c1dc6c0578b55eefc3bc94556146dce6e1a8cb (patch)
treef5293d83b48fcd91e8924b4a3334f79ab4ba6163 /lib/parse.js
parentd6efa8b28dc0a937bc154bf5f2e5d5450be5c1d5 (diff)
downloadtracifyjs-d7c1dc6c0578b55eefc3bc94556146dce6e1a8cb.tar.gz
tracifyjs-d7c1dc6c0578b55eefc3bc94556146dce6e1a8cb.zip
a LabeledStatement should be in fact a StatementWithBody
This fixes output for: if (foo) { moo: if (bar) { break moo; } } else { baz(); } (the labeled statement must be outputted inside brackets)
Diffstat (limited to 'lib/parse.js')
-rw-r--r--lib/parse.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/parse.js b/lib/parse.js
index 416c363a..9c3f3fb1 100644
--- a/lib/parse.js
+++ b/lib/parse.js
@@ -892,7 +892,7 @@ function parse($TEXT, exigent_mode) {
S.labels.push(label);
var start = S.token, stat = statement();
S.labels.pop();
- return new AST_LabeledStatement({ statement: stat, label: label });
+ return new AST_LabeledStatement({ body: stat, label: label });
};
function simple_statement() {