Open xem opened 7 years ago
Right, the current code is only looking for function patterns, not strings.
Getting it to work with your third example should not be too hard
a=0;setInterval("a++",33);
For the last one, I give up until I get a good ES6 string parser :)
Point made, if you want to use that feature from RegPack, don't golf the core loop into something cryptic, especially using tagged templates.
BTW your string setInterval`a++${33}b=1`
is equivalent to setInterval(["a++","b=1"],33)
Indeed, we wrote an article about it :) It's useful for saving bytes, but not at all in the context of RegPacked code. Anyway, no rush here, I don't need RegPack to understand setInterval with strings to deliver my demos :D Thanks !
(Edited)
Ex: The setInterval feature works with:
or
but not with:
or with the very strange but still valid
Thanks!