Mercurial > repos > tabletprog
changeset 254:0ee70ac20a02
Support assigment of literals while preparing the environment for a macro
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 31 May 2014 21:30:18 -0700 |
parents | 697c2c562af2 |
children | 08081b0a9382 |
files | interp.js |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/interp.js Sat May 31 21:27:03 2014 -0700 +++ b/interp.js Sat May 31 21:30:18 2014 -0700 @@ -740,7 +740,7 @@ } else { env.syms[expr.symbol.cleanName()] = {}; this.expressions[i] = expr.macroexpand(env); - if (this.expressions[i].expression instanceof lambda) { + if (this.expressions[i].expression instanceof lambda || 'val' in this.expressions[i].expression) { env.syms[expr.symbol.cleanName()] = this.expressions[i].expression.eval(env); } else { env.syms[expr.symbol.cleanName()] = null;