google-code-export / esprima

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

Esprima fails to parse a FunctionExpression without a body #593

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
function b (a) console.log(a)

What is the expected output?
A FunctionExpression

What do you see instead?
Error: Unexpected identifier

What version of the product are you using? On what operating system? Which
browser?
http://esprima.org/demo/parse.html on both the newest version of FireFox and 
Chrome on Ubuntu 14.04 LTS

Please provide any additional information below.

Original issue reported on code.google.com by tijnt...@gmail.com on 20 Sep 2014 at 10:09

GoogleCodeExporter commented 9 years ago
I meant Esprima fails to parse a FunctionExpression without a BlockStatement

Original comment by tijnt...@gmail.com on 20 Sep 2014 at 10:11

GoogleCodeExporter commented 9 years ago
Can you elaborate? The example that you are given is supposed to have a syntax 
error and that's what Esprima reported.

Original comment by ariya.hi...@gmail.com on 29 Jan 2015 at 7:42

GoogleCodeExporter commented 9 years ago
No more response from OP and it seems to work as expected.

Original comment by ariya.hi...@gmail.com on 8 Feb 2015 at 6:13