Fix blunder in reworking of how SpiderMonkey detects a label statement (reported by Steve Yegge).

This commit is contained in:
brendan@mozilla.org 2007-05-05 21:34:24 -07:00
parent 619436ff32
commit eca0bc73e1

View File

@ -547,7 +547,11 @@ function Statement(t, x) {
return n;
default:
if (tt == IDENTIFIER && t.peek() == COLON) {
if (tt == IDENTIFIER) {
t.scanOperand = false;
tt = t.peek();
t.scanOperand = true;
if (tt == COLON) {
label = t.token.value;
ss = x.stmtStack;
for (i = ss.length-1; i >= 0; --i) {
@ -560,6 +564,7 @@ function Statement(t, x) {
n.statement = nest(t, x, n, Statement);
return n;
}
}
n = new Node(t, SEMICOLON);
t.unget();