summaryrefslogtreecommitdiffstats
path: root/match.c
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 /match.c
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 'match.c')
-rw-r--r--match.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/match.c b/match.c
index 60b5a6df..6fda6f19 100644
--- a/match.c
+++ b/match.c
@@ -60,7 +60,7 @@ val mingap_k, maxgap_k, gap_k, mintimes_k, maxtimes_k, times_k;
val lines_k, chars_k;
val text_s, choose_s, gather_s, do_s, mdo_s, mod_s, modlast_s;
val line_s, data_s, fuzz_s, load_s;
-val include_s, close_s, require_s;
+val include_s, close_s, require_s, in_package_s;
val longest_k, shortest_k, greedy_k;
val vars_k, resolve_k;
val append_k, into_k, var_k, list_k, tlist_k, string_k, env_k, counter_k;
@@ -4689,6 +4689,7 @@ static void syms_init(void)
include_s = intern(lit("include"), user_package);
close_s = intern(lit("close"), user_package);
require_s = intern(lit("require"), user_package);
+ in_package_s = intern(lit("in-package"), user_package);
longest_k = intern(lit("longest"), keyword_package);
shortest_k = intern(lit("shortest"), keyword_package);
greedy_k = intern(lit("greedy"), keyword_package);