-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow use of let and const in p5js-mode #20
Comments
I think the simple syntax checker that it uses just isn't up to date with |
Hello everyone. I'm facing exactly the same problem. I've created a simple sketch to draw some characters randonmly in the screen and it wors fine, but when i save the sketch, the same error appears. For me is not a solution to use var instead of let, because I get the same error. the only wird thing is the appearence of a new js file wich looks like a temp file, in my case: p5js-temp-cartografia_del_fracaso7261114787448830096.js. I've deleted it, but nothing changes and later, it reappears. I want to share my sketch with you to analize the error and get a fix. code:
index.html
assests/text.txt is simply a text file |
Fixed for the next release (1.1 of the Mode). |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
As I was investigating using p5js-mode, I noticed that I could not use
let
orconst
without obtaining an error after saving the code. For example, this works fine:But if the
var
is replaced bylet
, like this:then an error of
SyntaxError: Expected ; but found someColor
is thrown.This seems to be the same problem that occurred in #18. As I stated there, I poked around the source of p5js-mode, and I'm wondering if the issue lies in the public HtmlTokenMarker(boolean js) function in the HTMLTokenMarker.java file. I can see
var
in there, but the more recentlet
andconst
ES6 style variable declarations are not. Perhaps it is as simple as adding those?The text was updated successfully, but these errors were encountered: