mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-14 15:59:03 +00:00
Add APIs to reuse token buffers in Tokenizer
(#1094)
This commit is contained in:
parent
b0b62887a2
commit
d72f0a966b
3 changed files with 32 additions and 4 deletions
|
@ -8711,6 +8711,11 @@ impl<'a> Parser<'a> {
|
|||
self.expect_token(&Token::RParen)?;
|
||||
Ok(partitions)
|
||||
}
|
||||
|
||||
/// Consume the parser and return its underlying token buffer
|
||||
pub fn into_tokens(self) -> Vec<TokenWithLocation> {
|
||||
self.tokens
|
||||
}
|
||||
}
|
||||
|
||||
impl Word {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue