google-code-export / esprima

Automatically exported from code.google.com/p/esprima
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Semicolon token after object-literal properties considered valid syntax in esvalidate web demo #603

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open syntax validator at http://esprima.org/demo/validate.html
2. enter the following invalid javascript:
obj = {
    a: "A";
};

What is the expected output? Red flag identifying semicolon after "A" as 
unexpected

What do you see instead? Green 'OK' message reporting "Code is syntatically 
valid."

What version of the product are you using? On what operating system? Which
browser?
- Whatever version the website is using
- Windows 7 Professional
- Google Chrome

Please provide any additional information below.
- Included a screenshot of the webpage reproducing the issue

Original issue reported on code.google.com by lydia...@gmail.com on 9 Oct 2014 at 3:42

Attachments:

GoogleCodeExporter commented 9 years ago
This is a defect in implementing issue 549 (see commit 
https://github.com/ariya/esprima/commit/e0e96a4d6c).

Original comment by ariya.hi...@gmail.com on 18 Jan 2015 at 8:17

GoogleCodeExporter commented 9 years ago
Issue 583 has been merged into this issue.

Original comment by ariya.hi...@gmail.com on 18 Jan 2015 at 8:23

GoogleCodeExporter commented 9 years ago
Workaround: tolerate semicolon on object initialiser and similar situations.
https://github.com/ariya/esprima/commit/0bc70724f1

Original comment by ariya.hi...@gmail.com on 19 Jan 2015 at 4:29