Great - thanks! Wow, I hadn't even considered the regex. I'll get something in for that.
I can come up with 1 / /(\d+)/.exec("foo123bar")[1] as valid JS that would have failed :)
But yes, '++'/etc are pretokenised. Basically, anything that's more than 1 character but doesn't have a value (eg not string/id/number/etc) is turned into a token.
Do you have an example of the error message? Errors should reconstruct everything from the tokens
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Great - thanks! Wow, I hadn't even considered the regex. I'll get something in for that.
I can come up with
1 / /(\d+)/.exec("foo123bar")[1]
as valid JS that would have failed :)But yes, '++'/etc are pretokenised. Basically, anything that's more than 1 character but doesn't have a value (eg not string/id/number/etc) is turned into a token.
Do you have an example of the error message? Errors should reconstruct everything from the tokens