From 3ce7384f151d4ca593bd9821de69938e286f6ad0 Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Tue, 19 May 2020 15:42:34 -0400 Subject: [PATCH] Fix bug when lexing single-quoted strings Single-quoted strings were accidentally expecting a double quote for termination, instead of a single quote. Signed-off-by: Alek Ratzloff --- src/syn/lexer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syn/lexer.rs b/src/syn/lexer.rs index 8706e97..6cd95ce 100644 --- a/src/syn/lexer.rs +++ b/src/syn/lexer.rs @@ -59,7 +59,7 @@ impl<'t> Lexer<'t> { |(?P0[xX][0-9a-fA-F]+) |(?P[0-9]+) |(?P"([^\\"]|\\[ntr0"'])*") - |(?P'([^\\"]|\\[ntr0"'])*') + |(?P'([^\\']|\\[ntr0"'])*') |(?P->) |(?P==)