summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-04-11 06:59:33 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-04-11 06:59:33 -0700
commit046a6a3212c1b19c79deb467e6d20e1c30f9f7e3 (patch)
tree612dcf8c7e2dc2a9d1f7670356f5ae2e32d8f1b6
parent7ab40cbec9676c75073289a58525c1256617a32b (diff)
downloadtxr-046a6a3212c1b19c79deb467e6d20e1c30f9f7e3.tar.gz
txr-046a6a3212c1b19c79deb467e6d20e1c30f9f7e3.tar.bz2
txr-046a6a3212c1b19c79deb467e6d20e1c30f9f7e3.zip
Bugfix: missing usr:end and usr:single symbols.
When TXR pattern language code is canned in the context of an alternative *package* which uses the usr package, the scanner will throw false errors on @(end) and @(single). This is because these symbols don't exist in the usr package and will get interned in the current package. The scanner will then complain that they are not in the usr package. * match.c (syms_init): Intern end and single in the usr package, but don't store the return value in any variable.
-rw-r--r--match.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/match.c b/match.c
index b187e13b..6a0d6ea2 100644
--- a/match.c
+++ b/match.c
@@ -4760,6 +4760,12 @@ static void syms_init(void)
data_s = intern(lit("data"), user_package);
fuzz_s = intern(lit("fuzz"), user_package);
counter_k = intern(lit("counter"), keyword_package);
+
+ /* These symbols must exist when TXR code is parsed
+ * in the context of an alternative package, rather than usr.
+ */
+ intern(lit("end"), user_package);
+ intern(lit("single"), user_package);
}
static void dir_tables_init(void)