diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-14 07:20:03 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-14 07:20:03 -0700 |
commit | 9952353de4a6bdfd27727a00d53ae8958038c72d (patch) | |
tree | d708f3e4a056b9a0cdf88235bcf0b3919914f17b /parser.y | |
parent | f2e197dcd31d737bf23816107343f67e2bf6dd8e (diff) | |
download | txr-9952353de4a6bdfd27727a00d53ae8958038c72d.tar.gz txr-9952353de4a6bdfd27727a00d53ae8958038c72d.tar.bz2 txr-9952353de4a6bdfd27727a00d53ae8958038c72d.zip |
Word splices not quite on board with consing dot handling.
* parser.y (r_exprs): The WSPLICE and QWSPLICE syntax at the
front of a list must now initialize the terminating atom to unique_s,
not to nil. Without this we get mysterious "misplaced consing dot"
errors (even though no consing dot occurs).
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -763,7 +763,7 @@ r_exprs : n_expr { val exprs = cons($1, nil); misplaced_consing_dot_check(scnr, term_atom_cons); rplaca(term_atom_cons, $3); $$ = $1; } - | WSPLICE wordslit { $$ = cons(nil, nreverse(rl($2, num($1)))); + | WSPLICE wordslit { $$ = cons(unique_s, nreverse(rl($2, num($1)))); rlcp($$, cdr($$)); } | r_exprs WSPLICE wordslit { val term_atom_cons = $1; @@ -773,7 +773,7 @@ r_exprs : n_expr { val exprs = cons($1, nil); nappend2(rl(nreverse($3), num($2)), exprs)); $$ = term_atom_cons; } - | QWSPLICE wordsqlit { $$ = cons(nil, rl($2, num($1))); + | QWSPLICE wordsqlit { $$ = cons(unique_s, rl($2, num($1))); rlcp($$, cdr($$)); } | r_exprs QWSPLICE wordsqlit { val term_atom_cons = $1; |