diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-08-15 18:39:30 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-08-15 18:39:30 -0400 |
| commit | 0763ae6c60ed4a88055db78e84dd28f6ebdd0707 (patch) | |
| tree | 0c4e42231b6c7d0f4bed067becc23dfa30e74203 /docs | |
| parent | 15679e479511b0fa6eed8909a4cd5bc5e039b41d (diff) | |
Always wrap bocks in do/while, in case there's destructuring
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/bqn.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/bqn.js b/docs/bqn.js index 3a642a72..161e9da2 100644 --- a/docs/bqn.js +++ b/docs/bqn.js @@ -130,6 +130,7 @@ let run = (B,O,F,S,L,T,src,env) => { // Bytecode, Objects, Blocks, Bodies, Locat if (useenv) c = "const e=env;"+c; else if (imm) c = "const e=[...e2];e.vid=vid;e.p=oe;"+c; else c = "const fn=(x, w)=>{const e=[...e2];e.vid=vid;e.p=oe;e[0]=fn;e[1]=x;e[2]=w;"+c+"};"+repdf[type]+"return fn;"; + c="do {"+c+"} while (0);\n"; def = useenv ? "env" : ("new Array("+vid.length+").fill(null)"); } else { if (imm || ind.length!==2) throw "Internal error: malformed block info"; |
