author | Alan Dipert
<alan@dipert.org> 2019-12-29 13:15:55 UTC |
committer | Alan Dipert
<alan@dipert.org> 2019-12-29 13:15:55 UTC |
parent | d7cf8fd66172e9f1ddf251ea276e6ab19fb1ca70 |
jacl.js | +2 | -2 |
notes.txt | +3 | -3 |
diff --git a/jacl.js b/jacl.js index 17189bc..bbe9771 100644 --- a/jacl.js +++ b/jacl.js @@ -772,7 +772,7 @@ const SPECIAL_FORMS = [ '%LET', '%NEW', '%PROG', - '%SET', + '%SET-VAR', '%TAGBODY', '%GO' ]; @@ -1176,7 +1176,7 @@ const analyzeSpecials = new Map([ }); return merge(node, analyzeBlock(env, node, body)); }], - [JACLPKG.intern('%SET'), (env, parent, form) => { + [JACLPKG.intern('%SET-VAR'), (env, parent, form) => { const [, target, val] = form; if (!(target instanceof LispSymbol)) throw new Error(`Can't assign to non-symbol`); diff --git a/notes.txt b/notes.txt index c33e7c8..805f32a 100644 --- a/notes.txt +++ b/notes.txt @@ -50,8 +50,8 @@ window (%tagbody t0 (%if (!eql n 0) (%go done) nil) - (%set prod (!* prod n)) - (%set n (!- n 1)) + (%set-var prod (!* prod n)) + (%set-var n (!- n 1)) (%go t0) done) prod)) @@ -61,7 +61,7 @@ window t0 (%if (> x 10) (%go t1) nil) (!log x) - (%set x (+ x 1)) + (%set-var x (+ x 1)) (%go t0) t1 (!log "done"))