diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-08-22 06:10:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-08-22 06:10:11 -0700 |
commit | a9a7efc1790c6ebe663107fbf10c8b72cd76b91b (patch) | |
tree | ec9b5bbe81513adeef3328623266dacadc14d5c5 | |
parent | 5edadcdff0d80ceb5639dc31bbe7c2b43a1d2782 (diff) | |
download | txr-a9a7efc1790c6ebe663107fbf10c8b72cd76b91b.tar.gz txr-a9a7efc1790c6ebe663107fbf10c8b72cd76b91b.tar.bz2 txr-a9a7efc1790c6ebe663107fbf10c8b72cd76b91b.zip |
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.
-rw-r--r-- | parser.y | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |