mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
This change introduces a lifetime parameter 'a to BorrowedToken enum
to prepare for zero-copy tokenization support. This is a foundational
step toward reducing memory allocations during SQL parsing.
Changes:
- Added lifetime parameter to BorrowedToken<'a> enum
- Added _Phantom(Cow<'a, str>) variant to carry the lifetime
- Implemented Visit and VisitMut traits for Cow<'a, str> to support
the visitor pattern with the new lifetime parameter
- Fixed lifetime issues in visitor tests by using tokenized_owned()
instead of tokenize() where owned tokens are required
- Type alias Token = BorrowedToken<'static> maintains backward
compatibility
|
||
|---|---|---|
| .. | ||
| ast | ||
| dialect | ||
| parser | ||
| display_utils.rs | ||
| keywords.rs | ||
| lib.rs | ||
| test_utils.rs | ||
| tokenizer.rs | ||