summaryrefslogtreecommitdiffstats
path: root/parser.y
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-03-13 06:41:26 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-03-13 06:41:26 -0700
commit398fcda3ac71e99fb3bdd5c3d1fa69099c50fdb4 (patch)
tree3ce17cae7b9dbea916a78d32f23cd5ef0567c4f0 /parser.y
parent2e99d6d842d4714a2b165b1ae3920013467e03f7 (diff)
downloadtxr-398fcda3ac71e99fb3bdd5c3d1fa69099c50fdb4.tar.gz
txr-398fcda3ac71e99fb3bdd5c3d1fa69099c50fdb4.tar.bz2
txr-398fcda3ac71e99fb3bdd5c3d1fa69099c50fdb4.zip
Add in-package directive.
* match.c (in_package_s): New symbol variable. (syms_init): Initialize in_package_s. * match.h (in_package_s): Declared. * parser.y (check_parse_time_action): Add case for in-package. Evaluate just with eval, as a case of the in-package macro. * txr.1: Documented.
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/parser.y b/parser.y
index 6615a3e7..9f628227 100644
--- a/parser.y
+++ b/parser.y
@@ -1676,6 +1676,10 @@ static val check_parse_time_action(val spec_rev)
eval_intrinsic(cons(progn_s, cdr(elem)), nil);
return nil;
}
+ if (sym == in_package_s) {
+ eval_intrinsic(elem, nil);
+ return nil;
+ }
}
}
return spec_rev;