• Glad to hear eval does it :)
    I've actually grabbed your pretokenise.js from EspruinoTools and done something similar already. First the code was not executable because "return" is defined twice, as LEX_R_BREAK and as LEX_R_RETURN. The returns from a function need to be tokenised as the latter one, but the pretokenise routine returns the first one. After obfuscating the token for LEX_R_BREAK (as "XXreturn") everything runs fine.
    The pre-tokenised code uses many of the tokens including class, new, switch/case, try/catch and some bit shift operators.

About

Avatar for Steffen @Steffen started