mirror of
https://github.com/fluencelabs/lalrpop
synced 2025-03-16 17:00:53 +00:00
fix error on parsing a single-quote char literal
This commit is contained in:
parent
0c9f9025f7
commit
1c79d90b33
@ -548,6 +548,9 @@ impl<'input> Tokenizer<'input> {
|
||||
self.lookahead.and_then( |(_, c)| {
|
||||
if c == '\\' {
|
||||
// escape after `'` => it had to be character literal token, consume
|
||||
// the backslash and escaped character, then consume until `'`
|
||||
self.bump();
|
||||
self.bump();
|
||||
self.take_until_and_consume_terminating_character(|c:char| { c == '\'' })
|
||||
} else {
|
||||
// no escape, then we require to see next `'` or we assume it was lifetime
|
||||
|
Loading…
x
Reference in New Issue
Block a user