Makes me think that likely minification is still turned on.
The issues with Esprima are something I'm aware of and we're probably going to move to something else completely. However for now, just turn it off (it's the default anyway). Code is executed from flash in Bangle.js and there's also pretokenisation (which basically does the same thing) so it's really unlikely to be needed.
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.
I just tried with your code:
And it works fine with minification off on Bangle.js and the emulator.
The fact that the code in this function:
Gets all the newlines removed:
Makes me think that likely minification is still turned on.
The issues with Esprima are something I'm aware of and we're probably going to move to something else completely. However for now, just turn it off (it's the default anyway). Code is executed from flash in Bangle.js and there's also pretokenisation (which basically does the same thing) so it's really unlikely to be needed.