comparison interp.js @ 219:b70be565d54c

Fix check of return value from env.find in symbol.quote so that falsey found values do not cause trouble.
author Michael Pavone <pavone@retrodev.com>
date Mon, 23 Dec 2013 14:22:20 -0800
parents adad61ea2f3a
children 218b11ec8fa2
comparison
equal deleted inserted replaced
218:b799192e404b 219:b70be565d54c
302 return res; 302 return res;
303 }; 303 };
304 304
305 symbol.prototype.quote = function(env) { 305 symbol.prototype.quote = function(env) {
306 var val = env.find(this.name); 306 var val = env.find(this.name);
307 if (val) { 307 if (val !== null) {
308 var newnode = makeASTNode(val); 308 var newnode = makeASTNode(val);
309 return newnode; 309 return newnode;
310 } else { 310 } else {
311 this.dirty = true; 311 this.dirty = true;
312 return this; 312 return this;