Closed Bug 710506 Opened 14 years ago Closed 14 years ago

Parsing let bug

Categories

(Other Applications Graveyard :: Narcissus, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dimvar, Unassigned)

Details

Attachments

(1 file)

Narcissus throws a syntax error "missing ; before statement" when trying to parse the following snippet: let(x=1){}y=5; It wants a semicolon after the right curly. But it can parse this: if(x=1){}y=5; In jsparse, function MagicalSemicolon, line 875 is where the first snippet fails but the second is fine.
Attached patch Fix v1Splinter Review
In the case of |if|, we return from Statement early if the |if| block was successfully parsed, thus never calling |MagicalSemicolon|. The |let| block case was breaking out of the giant switch and then calling |MagicalSemicolon|. This patch should fix that.
Thanks Shu. Go ahead and push that to the master branch on Github. Also, the github repo should allow issues to be filed, and then people can submit bug reports there directly.
I don't have permanent internet until at least Saturday, and these cafes I'm mooching internet off of tend to block everything except HTTP. Could you just push it for me? (or wait until Saturday)
I'm not an admin so I can't. Maybe Dave can do it, o/w Sat is fine.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: