diff options
-rw-r--r-- | eval.c | 6 | ||||
-rw-r--r-- | parser.y | 4 |
2 files changed, 5 insertions, 5 deletions
@@ -2900,7 +2900,11 @@ static val expand_qquote_rec(val qquoted_form, val qq, val unq, val spl) { if (nilp(qquoted_form)) { return nil; - } if (atom(qquoted_form)) { + } else if (rangep(qquoted_form)) { + val frexp = expand_qquote(from(qquoted_form), qq, unq, spl); + val toexp = expand_qquote(to(qquoted_form), qq, unq, spl); + return rlcp(list(rcons_s, frexp, toexp, nao), qquoted_form); + } else if (atom(qquoted_form)) { return cons(quote_s, cons(qquoted_form, nil)); } else { val sym = car(qquoted_form); @@ -848,10 +848,6 @@ struct : HASH_S list { if (unquotes_occur($2, 0)) range : HASH_R list { if (length($2) != two) yyerr("range literal needs two elements"); - - if (unquotes_occur($2, 0)) - $$ = rl(cons(rcons_s, $2), num($1)); - else { val range = rcons(first($2), second($2)); $$ = rl(range, num($1)); } } ; |