Closed Bug 14043 Opened 25 years ago Closed 25 years ago

for loop parsing error

Categories

(Core :: JavaScript Engine, defect, P3)

All
Mac System 8.6
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: waldemar, Assigned: rogerl)

Details

The following is legal JavaScript and should not generate a syntax error:

js> for (var x=1,y=2; x<10; x++, y--) {print("x="+x+", y="+y)}
4: missing ; after for-loop initializer:
4: for (var x=1,y=2; x<10; x++, y--) {print("x="+x+", y="+y)}
4: ............^

This error breaks the JS test shell.

    Waldemar
Assignee: mccabe → rogerl
Roger, can you look at this?
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I just backed out my change in jsparse.c - I was attempting to disable multiple
var declarations in 'for..in' statemetns but smacked all 'for' statments by
mistake. Back to the drawing board...
You need to log in before you can comment on or make changes to this bug.