Signed-off-by: Jim Pryor <profjim@jimpryor.net>
a = t.type;
if (a === "name") {
o = symbol_table[v];
- if (o && typeof o !== 'function') {
- a = "keyword";
- } else {
+ if (!o || typeof o === 'function') {
o = symbol_table["(name)"];
+ } else {
+ a = o.arity || "keyword";
}
} else if (a === "number") {
o = symbol_table["(literal)"];
var x = symbol(s);
x.handler = function () {
this.value = symbol_table[this.id].value;
- this.arity = "literal";
return this;
};
x.value = v;
+ x.arity = "literal";
return x;
};