Skip to content

Conversation

@mbks
Copy link
Contributor

@mbks mbks commented Aug 9, 2022

The current library for waypoints includes nested backticks for format string evaluation. However, when attempting to import this library (e.g. with require("waypoints").load() such as in the Way Pointer app) I get the error

Uncaught SyntaxError: Got EOF expected ':' at line 1 col 5 num? ^ at line 1 col 5 num? ^ in function "load" called from line 44 col 38 in waypointer.app.js var waypoints=require("waypoints").load();.

This is fixed by removing the inner backticks and replacing them with string concatenation, which still appears to evaluate the format string correctly.

@gfwilliams
Copy link
Member

Thanks - that's very strange though since I'm pretty sure we've done similar things all over the place.

I'll merge this but will also see if I can figure out what's wrong with the interpreter itself that causes this error

@gfwilliams gfwilliams merged commit d4c8369 into espruino:master Aug 10, 2022
@gfwilliams
Copy link
Member

Ok, just found an issue inside Espruino so this should be fixed in firmwares 2v15 and later.

Thanks for the PR and letting me know about the issue!

@mbks
Copy link
Contributor Author

mbks commented Aug 10, 2022

Cool, thanks for fixing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants