mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-11 15:24:05 +09:00
STOP detection injection for do-loop
This commit is contained in:
@@ -162,7 +162,8 @@ let injectIntChk = (s, n) => {
|
||||
// primitive way of injecting a code; will replace a JS string that matches the regex...
|
||||
let k = s
|
||||
.replace(/while *\([^\n]+\) *{/, "$& "+n+"();")
|
||||
.replace(/for *\([^\n]+\) *{/, "$& "+n+"();");
|
||||
.replace(/for *\([^\n]+\) *{/, "$& "+n+"();")
|
||||
.replace(/do *{/, "$& "+n+"();");
|
||||
//serial.println(k);
|
||||
return k;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user