Files
turso/vendored/sqlite3-parser/src
Jussi Saurio a26fc1619a Merge 'Fix select X'1'; causes limbo to go in infinite loop' from Krishna Vishal
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
2025-01-21 11:32:10 +02:00
..
2024-11-16 20:08:59 +02:00