jcubic / koduj

P5.js playground
https://koduj.org
3 stars 1 forks source link

Add guard for infinite loops #4

Closed jcubic closed 2 years ago

jcubic commented 2 years ago

Add similar code as in gaiman to guard against infinite loops (inspired by CodePen). Try to use falafel. Or use a JavaScript parser like Esprima + escodegen.

jcubic commented 2 years ago

node-falafel was unusable because it works with strings.

Here is working transformer: https://codepen.io/jcubic/pen/gOejqEz?editors=1010