mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix blunder in reworking of how SpiderMonkey detects a label statement (reported by Steve Yegge).
This commit is contained in:
parent
df0899706b
commit
fdc7388265
@ -547,18 +547,23 @@ function Statement(t, x) {
|
||||
return n;
|
||||
|
||||
default:
|
||||
if (tt == IDENTIFIER && t.peek() == COLON) {
|
||||
label = t.token.value;
|
||||
ss = x.stmtStack;
|
||||
for (i = ss.length-1; i >= 0; --i) {
|
||||
if (ss[i].label == label)
|
||||
throw t.newSyntaxError("Duplicate label");
|
||||
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) {
|
||||
if (ss[i].label == label)
|
||||
throw t.newSyntaxError("Duplicate label");
|
||||
}
|
||||
t.get();
|
||||
n = new Node(t, LABEL);
|
||||
n.label = label;
|
||||
n.statement = nest(t, x, n, Statement);
|
||||
return n;
|
||||
}
|
||||
t.get();
|
||||
n = new Node(t, LABEL);
|
||||
n.label = label;
|
||||
n.statement = nest(t, x, n, Statement);
|
||||
return n;
|
||||
}
|
||||
|
||||
n = new Node(t, SEMICOLON);
|
||||
|
Loading…
Reference in New Issue
Block a user