Thanks! In Espruino, of is a reserved word because of for (var i of foo) so I'm surprised it's actually not in the JS spec.
I'd been having issues with the Layout.js file when pretokenised, so it's actually possible you're having the same issue. I just filed a bug for this so I can track it https://github.com/espruino/Espruino/issues/2047
This particular one should be an easy fix (changing the pretokeniser to ignore 'of') but there are definitely other cases like this where it could be a problem.
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! In Espruino,
of
is a reserved word because offor (var i of foo)
so I'm surprised it's actually not in the JS spec.I'd been having issues with the Layout.js file when pretokenised, so it's actually possible you're having the same issue. I just filed a bug for this so I can track it https://github.com/espruino/Espruino/issues/2047
This particular one should be an easy fix (changing the pretokeniser to ignore 'of') but there are definitely other cases like this where it could be a problem.