Skip to content

Commit 1781f90

Browse files
committed
sexpr: properly convert from str to sym
The rewrite of struct str introduced a regression where all symbols got parsed as strings. Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
1 parent 73cfbb2 commit 1781f90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sexpr.y

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void sexpr_error2(const char *e, const char *yytext)
6666
document : tok { data->output = $1; }
6767
;
6868

69-
tok : SYMBOL { $$ = str_cast_to_val($1); }
69+
tok : SYMBOL { $$ = VAL_DUP_SYM(str_cstr($1)); str_putref($1); }
7070
| STRING { $$ = str_cast_to_val($1); }
7171
| NUMBER { $$ = VAL_ALLOC_INT($1); }
7272
| BOOL { $$ = VAL_ALLOC_BOOL($1); }

0 commit comments

Comments
 (0)