-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Cannot parse file (trailing comma) #989
Comments
Well, it seems there is indeed a syntax error. Why do you have trailing comma |
The file comes from here If I was to guess, this looks like the output of a JS formatter like prettier. Trailing commas for multi-line function parameters are useful so you don't have to modify the previous line when adding a new parameter, and it's correct syntax in ES2017. I don't really know what's the policy of js_of_ocaml here |
I didn't realise it was because of the trailing comma though, I created a PR for reason-harfbuzz to remove the trailing comma |
The JavaScript parser inside js_of_ocaml didn't keep up with recent version of ecmascript. One could update the parser. PR welcome. |
Describe the bug
I'm getting an error when compiling a projet :
this file contains
I'm thinking this might already have been fixed by #980 , so I tried to pin the latest commit (203dc9c), but I get a new error. I cannot even build
js_of_ocaml-compiler
anymore, and the dependency build fails withVersions
ocaml: 4.08.1
js_of_ocaml: 3.5.2
The text was updated successfully, but these errors were encountered: