Mercurial > repos > tabletprog
diff compiler.js @ 265:d6a4c9e7716e
Remove remapping of most operators
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 14 Jul 2014 19:03:46 -0700 |
parents | 2557ce4e671f |
children | 0dc7322590da |
line wrap: on
line diff
--- a/compiler.js Mon Jul 14 09:33:41 2014 -0700 +++ b/compiler.js Mon Jul 14 19:03:46 2014 -0700 @@ -383,16 +383,16 @@ } else if (this.name == 'llProperty:withType:') { if (this.args[0] instanceof symbol) { if ((this.args[1] instanceof symbol) || (this.args[1] instanceof funcall)) { - symbols.defineLLProperty(this.args[0].name); + symbols.defineLLProperty(this.args[0] instanceof symbol ? this.args[0].name : this.args[0].val); return; } else { throw new Error("Second argument to llProperty:withType: must be a symbol or funcall"); } } else { - throw new Error("First argument to llProperty:withType: must be a symbol"); + throw new Error("First argument to llProperty:withType: must be a symbol or string"); } } else if (this.name == 'llMessage:withVars:andCode:') { - if (this.args[0] instanceof symbol) { + if (this.args[0] instanceof symbol || this.args[0] instanceof strlit) { if (this.args[1] instanceof lambda) { if (this.args[2] instanceof lambda) { symbols.defineMsg(this.args[0].name, this.args[2]);