Fix Expression to stop on : only if hookLevel is not elevated.

This commit is contained in:
brendan%mozilla.org 2004-02-11 08:30:20 +00:00
parent f3068c76bf
commit 70d3411bc0

View File

@ -714,7 +714,8 @@ function Expression(t, x, stop) {
loop:
while ((tt = t.get()) != END) {
if (tt == stop &&
x.bracketLevel == bl && x.curlyLevel == cl && x.parenLevel == pl) {
x.bracketLevel == bl && x.curlyLevel == cl && x.parenLevel == pl &&
x.hookLevel == hl) {
// Stop only if tt matches the optional stop parameter, and that
// token is not quoted by some kind of bracket.
break;