summaryrefslogtreecommitdiffstats
path: root/parser.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-02-05 14:25:59 -0800
committerKaz Kylheku <kaz@kylheku.com>2022-02-05 14:25:59 -0800
commit03be4ba79f2fa68d966c81be4f32b36f9fe09813 (patch)
tree1532b50183d934167344604358b7583448f2043b /parser.c
parent1be4447a30aa5787b99ce2dec5c6977322aefebe (diff)
downloadtxr-03be4ba79f2fa68d966c81be4f32b36f9fe09813.tar.gz
txr-03be4ba79f2fa68d966c81be4f32b36f9fe09813.tar.bz2
txr-03be4ba79f2fa68d966c81be4f32b36f9fe09813.zip
Use null_string throughout code base.
* eval.c (load): Use null_string instead of lit(""). * lib.c (obj_init): Likewise. * match.c (LOG_MATCH, LOG_MISMATCH, do_txeval): Likewise. * parser.c (regex_parse, lisp_parse_impl, find_matching_syms): Likewise. * stream.c (do_parse_mode): Likewise. * txr.c (sysroot_init): Likewise. (txr_main): Replace string(L"") with null_string.
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/parser.c b/parser.c
index 645b933f..4609546b 100644
--- a/parser.c
+++ b/parser.c
@@ -620,7 +620,8 @@ val regex_parse(val string, val error_stream)
{
int gc = gc_state(0);
- parse(&parser, if3(std_error != std_null, lit("regex"), lit("")), prime_regex);
+ parse(&parser, if3(std_error != std_null, lit("regex"), null_string),
+ prime_regex);
gc_state(gc);
}
@@ -668,7 +669,7 @@ static val lisp_parse_impl(val self, enum prime_parser prime,
for (;;) {
int gc = gc_state(0);
- parse(pi, if3(std_error != std_null, name, lit("")), prime);
+ parse(pi, if3(std_error != std_null, name, null_string), prime);
mut(parser);
gc_state(gc);
@@ -962,7 +963,7 @@ static void find_matching_syms(lino_completions_t *cpl,
val qualify = tnil(force_qualify || !is_cur);
val pkg_name = if2(qualify,
if3(package == keyword_package && !force_qualify,
- lit(""),
+ null_string,
package_name(package)));
val syms = ((kind == 'S' || kind == 'M')
? hash_keys((get_slot_syms(package, is_cur, tnil(kind == 'M'))))