STOP detection injection for do-loop

This commit is contained in:
minjaesong
2021-04-23 22:37:57 +09:00
parent dbfda580a7
commit c4cccb63c3
2 changed files with 4 additions and 3 deletions

View File

@@ -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;
}