Yes, the lack of hoisting is a bit tricky. It's something I could conceivably add I guess, but it's all extra memory used to store the list of hoisted variables.
@Robin your issues aren't related at all. I've tried to explain in response to your most recent post
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.
Thanks! I'm not sure if you'd spotted, but this is pretty much exactly the fix I'd put in: https://github.com/espruino/Espruino/commit/3814bedff6a4b4457940f1cd41ffbe445c7e8425#diff-1b2a6245c921816c1acf6e4a95da404e0eebd9a784b660de19fde5e44f0bc36d
Yes, the lack of hoisting is a bit tricky. It's something I could conceivably add I guess, but it's all extra memory used to store the list of hoisted variables.
@Robin your issues aren't related at all. I've tried to explain in response to your most recent post