summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parser.y26
1 files changed, 22 insertions, 4 deletions
diff --git a/parser.y b/parser.y
index 52646afe..d5fd57f5 100644
--- a/parser.y
+++ b/parser.y
@@ -1617,12 +1617,30 @@ val expand_meta(val form, val menv)
}
}
+static val rlviable(val form)
+{
+ switch (type(form)) {
+ case NIL:
+ case LIT:
+ case CHR:
+ case NUM:
+ case SYM:
+ case BGNUM:
+ case FLNUM:
+ return nil;
+ default:
+ return t;
+ }
+}
+
val rlset(val form, val info)
{
- val cell = gethash_c(form_to_ln_hash, form, nulloc);
- loc place = cdr_l(cell);
- if (nilp(deref(place)))
- set(place, info);
+ if (rlviable(form)) {
+ val cell = gethash_c(form_to_ln_hash, form, nulloc);
+ loc place = cdr_l(cell);
+ if (nilp(deref(place)))
+ set(place, info);
+ }
return form;
}