diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/xixanta/src/parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/xixanta/src/parser.rs b/lib/xixanta/src/parser.rs index 9c67587..19b4530 100644 --- a/lib/xixanta/src/parser.rs +++ b/lib/xixanta/src/parser.rs @@ -789,14 +789,14 @@ impl Parser { let del = chars.next().unwrap(); let ch = chars.next().unwrap(); - if del != '\'' || chars.next().unwrap() != '\'' { - return Err(self.parser_error("bad character literal")); - } if !ch.is_ascii_alphanumeric() { return Err(self.parser_error( "only alphanumeric ASCII characters are allowed on character literals", )); } + if del != '\'' || chars.next().unwrap() != '\'' { + return Err(self.parser_error("bad character literal")); + } Ok(PNode { node_type: NodeType::Literal, |
