diff options
| author | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-12 20:35:12 +0100 |
|---|---|---|
| committer | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-12 20:35:12 +0100 |
| commit | a56af29e6808ae4194f4a7fc5f7c906b146bb88e (patch) | |
| tree | b643a5defd1c26c9278eb0387967447cb95da24d /src/luax/lexer.rs | |
| parent | 4a11fd2bd6329af21f8a3c60d70afc973f6518a4 (diff) | |
minor fixes to unknown handling
Diffstat (limited to 'src/luax/lexer.rs')
| -rw-r--r-- | src/luax/lexer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luax/lexer.rs b/src/luax/lexer.rs index bae4003..c075b3a 100644 --- a/src/luax/lexer.rs +++ b/src/luax/lexer.rs @@ -102,7 +102,7 @@ impl<'s> Lexer<'s> { TokenizeResult::Some(token) => Ok(Some(token)), TokenizeResult::Error(error) => Err(error.into()), TokenizeResult::None => match self.current { - Some(c) => Err(LuaXError::UnexpectedCharacter(c).into()), + Some(c) => Ok(Some(Token::Unknown(c))), None => { if self.emitted_eof { Ok(None) |
