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 <alekratz@gmail.com>
This commit is contained in:
2020-05-19 15:42:34 -04:00
parent fb3f217d7d
commit 3ce7384f15

View File

@@ -59,7 +59,7 @@ impl<'t> Lexer<'t> {
|(?P<hex_num>0[xX][0-9a-fA-F]+) |(?P<hex_num>0[xX][0-9a-fA-F]+)
|(?P<dec_num>[0-9]+) |(?P<dec_num>[0-9]+)
|(?P<dq_str>"([^\\"]|\\[ntr0"'])*") |(?P<dq_str>"([^\\"]|\\[ntr0"'])*")
|(?P<sq_str>'([^\\"]|\\[ntr0"'])*') |(?P<sq_str>'([^\\']|\\[ntr0"'])*')
|(?P<arrow>->) |(?P<arrow>->)
|(?P<eqeq>==) |(?P<eqeq>==)