Uncaught SyntaxError: Got ?[198] expected ID #1571
Replies: 2 comments
-
Posted at 2021-09-14 by @gfwilliams Thanks! In Espruino, 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 espruino/Espruino#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. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-09-16 by @gfwilliams Turns out the pretokeniser issue is unrelated, so this issue is very specifically just if you decide to call a function |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-09-06 by Robin
Mon 2021.09.06
During development, attempted to create shortened two letter function names that maintained alignment.
Significantly shortened statement:
Throws error:
There is no immediate rush to resolve this for me as I've created a temporary workaround. More curious as to what is causing this.
of
is not a reserved word:However, I did find a reference used within a for loop:
I'm making the assumption that 'of' might be parsed as part of the statement syntax in this case, but really doesn't answer why a function may not have the same name as it isn't a reserved keyword.
Beta Was this translation helpful? Give feedback.
All reactions