From a9a7efc1790c6ebe663107fbf10c8b72cd76b91b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 22 Aug 2017 06:10:11 -0700 Subject: parser: bugfix: empty buf literal problem. * parser.y (buflit): Fix neglect to call end_of_buflit in the empty buffer literal case, which precipitates syntax errors when an empty buffer literal #b'' is embedded in other syntax. --- parser.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parser.y b/parser.y index 95c8969b..265e4e30 100644 --- a/parser.y +++ b/parser.y @@ -1220,7 +1220,8 @@ wordsqlit : '`' { $$ = nil; } $$ = rlcp(cons(qword, $3), $1); } ; -buflit : HASH_B_QUOTE '\'' { $$ = make_buf(zero, nil, nil); } +buflit : HASH_B_QUOTE '\'' { $$ = make_buf(zero, nil, nil); + end_of_buflit(scnr); } | HASH_B_QUOTE buflit_items '\'' { val len = length($2); val bytes = nreverse($2); val buf = make_buf(len, nil, nil); -- cgit v1.2.3