You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello to Cursive team!
First of all – thanks for the good work and keep it up, you're really making my life easier.
I've found a few a issues with javascript parsing though.
The following is an example, however I get five of them like the one below for different .js files.
Idea data
IntelliJ IDEA 2018.2.5 (Ultimate Edition)
Build #IU-182.4892.20, built on October 16, 2018
JRE: 1.8.0_152-release-1248-b19 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
This actually looks to be a problem in Rhino. I can't figure it out exactly though. Do you have your locale set to French, by any chance?
The issue is that Rhino is trying to print a parsing error when it encounters an anonymous function without braces around the body, like path => path.isObjectProperty(). This is because I haven't set the language level correctly on the parser. It gets the errors from a message bundle using the current locale and then calls new MessageFormat(formatString) on them. There are only two resource bundles in Rhino, one is English (and the default): missing '{' before function body, and the other is in French: il manque ''{'' avant le corps d''une fonction. The French message does indeed throw that error when calling new MessageFormat(formatString) - I guess the double quotes are invalid, but I'm very surprised that no-one has ever had a Javascript parsing error in France :-)
I've fixed the language level issue and now parse JS as ES6 - hopefully that won't give spurious errors on older JS.
Hello to Cursive team!
First of all – thanks for the good work and keep it up, you're really making my life easier.
I've found a few a issues with javascript parsing though.
The following is an example, however I get five of them like the one below for different
.js
files.Idea data
Cursive plugin
The bad file – https://gist.github.com/spacegangster/59e81791cce11cc909534273e97f656
Exception trace
Regards,
Ivan
The text was updated successfully, but these errors were encountered: