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
commitaf8729499466e0edd22d42648a714bb584856cf7 (patch)
tree612dcf8c7e2dc2a9d1f7670356f5ae2e32d8f1b6
parent478ae133483a91b35028eca9666689669fe55015 (diff)
downloadtxr-af8729499466e0edd22d42648a714bb584856cf7.tar.gz
txr-af8729499466e0edd22d42648a714bb584856cf7.tar.bz2
txr-af8729499466e0edd22d42648a714bb584856cf7.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)