eyalleshem opened a new pull request, #2098:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2098

   refactor: Make Parser methods immutable using interior mutability
   
   Changed all parsing methods to take `&self` instead of `&mut self`. 
   Mutable parser state (token index and parser state) now uses `Cell` 
   for interior mutability.
   
   This refactoring is preparation for the borrowed tokenizer work. When 
   holding borrowed tokens from the parser (with lifetime tied to `&self`), 
   we cannot call methods requiring `&mut self` due to Rust's borrowing 
   rules. Using interior mutability resolves this conflict by allowing 
   state mutations through shared references. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to