mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 12:04:21 +01:00
Closes https://github.com/tursodatabase/limbo/issues/730. Fixed `blog_literal` function to make it return `TK_ILLEGAL` token which in turn now causes parser to stop and return `UnrecognizedTokenError`. Added `TK_ILLEGAL` to `TokenType` Enum. Behavior now: ```sql SELECT X'1'; -- Odd number of hex digits -> TK_ILLEGAL -> unrecognized token error × unrecognized token at (1, 12) ╭──── 1 │ SELECT X'1'; · ▲ · ╰── here ╰──── SELECT X'AB'; -- Valid blob -> TK_BLOB -> parses successfully � SELECT X'G1'; -- Invalid hex digit -> TK_ILLEGAL -> unrecognized token error × unrecognized token at (1, 13) ╭──── 1 │ SELECT X'G1'; · ▲ · ╰── here ╰──── ``` Reviewed-by: Jussi Saurio (@jussisaurio) Closes #736