ref: 42be27517c8057733afe2d31b8bf7b98ee6f6578
parent: 24cdc7adf5611d536403ae625414bb10f3bc4f93
author: Peter Mikkelsen <peter@pmikkelsen.com>
date: Tue Jul 20 18:07:51 EDT 2021
Support '' in tokens
--- a/parser.c
+++ b/parser.c
@@ -448,9 +448,16 @@
if(peek == L'\''){
peek = Bgetrune(parsein);
while(peek != L'\''){
+QuotedAtomLoop:
buf[i++] = peek;
peek = Bgetrune(parsein);
}
+ peek = Bgetrune(parsein);
+ if(peek == L'\'')
+ goto QuotedAtomLoop;
+ else
+ Bungetrune(parsein);
+
buf[i] = '\0';
lookahead.tag = AtomTok;
lookahead.text = runestrdup(buf);