I passed a JavaScript file I have been working on into dukpy's evaljs and got an error. I found the offending line and did some testing and discovered that it doesn't like the let keyword. Some examples of what I used are:
let a;
let b = 5;
let c='hello world';
Each line above (which is valid JavaScript) results in this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\HPOWNE~1\DOCUME~1\CHRIST~1\projects\TDP\thea\KIVY_V~1\lib\site-packages\dukpy\evaljs.py", line 57, in evaljs
res = _dukpy.eval_string(self, jscode, jsvars)
_dukpy.JSRuntimeError: SyntaxError: unterminated statement (line 1)
src\pyduktape.c:1
duk_js_compiler.c:6594
It would seem as if the let keyword is not supported. Is there a reason for that or has it simply not been added yet?
I passed a JavaScript file I have been working on into dukpy's
evaljs
and got an error. I found the offending line and did some testing and discovered that it doesn't like thelet
keyword. Some examples of what I used are:Each line above (which is valid JavaScript) results in this error:
It would seem as if the
let
keyword is not supported. Is there a reason for that or has it simply not been added yet?