mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 11:17:23 +00:00
Roughing out pratt parser logic
This commit is contained in:
parent
e6e9c8d2cc
commit
72cff632c1
5 changed files with 91 additions and 46 deletions
|
@ -50,6 +50,9 @@ pub enum SQLToken<T: Debug + PartialEq> {
|
|||
pub trait SQLTokenizer<TokenType>
|
||||
where TokenType: Debug + PartialEq {
|
||||
|
||||
/// get the precendence of a token
|
||||
fn precedence(&self, token: &SQLToken<TokenType>) -> usize;
|
||||
|
||||
/// return a reference to the next token but do not advance the index
|
||||
fn peek_token(&self, chars: &mut Peekable<Chars>) -> Result<Option<SQLToken<TokenType>>, TokenizerError<TokenType>>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue