From f12e29102e8be57c4345614fe491685e99c683e8 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 26 Nov 2015 06:15:08 -0800 Subject: WIP: fix erroneous use of rlcp that should be rl. * parser.y (hash, struct, range): Fix rlcp being wrongly used to copy nonexistent line number info from an integer. --- parser.y | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/parser.y b/parser.y index 00bf0adf..1420c698 100644 --- a/parser.y +++ b/parser.y @@ -734,33 +734,32 @@ vector : '#' list { if (unquotes_occur($2, 0)) ; hash : HASH_H list { if (unquotes_occur($2, 0)) - $$ = rlcp(cons(hash_lit_s, $2), - num($1)); + $$ = rl(cons(hash_lit_s, $2), num($1)); else - $$ = rlcp(hash_construct(first($2), + $$ = rl(hash_construct(first($2), rest($2)), - num($1)); } + num($1)); } ; struct : HASH_S list { if (unquotes_occur($2, 0)) - $$ = rlcp(cons(struct_lit_s, $2), + $$ = rl(cons(struct_lit_s, $2), num($1)); else { args_decl(args, 0); val strct = make_struct(first($2), rest($2), args); - $$ = rlcp(strct, num($1)); } } + $$ = rl(strct, num($1)); } } ; range : HASH_R list { if (length($2) != two) yyerr("range literal needs two elements"); if (unquotes_occur($2, 0)) - $$ = rlcp(cons(rcons_s, $2), num($1)); + $$ = rl(cons(rcons_s, $2), num($1)); else { val range = rcons(first($2), second($2)); - $$ = rlcp(range, num($1)); } } + $$ = rl(range, num($1)); } } ; list : '(' n_exprs ')' { $$ = rl($2, num($1)); } -- cgit v1.2.3