mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
Immutable parser (Tokenize borrow strings cont) (#2098)
Some checks failed
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
Rust / test (stable) (push) Has been cancelled
Some checks failed
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
Rust / test (stable) (push) Has been cancelled
Co-authored-by: Eyal Leshem <eyal@satoricyber.com>
This commit is contained in:
parent
b098976cab
commit
c6933bb8ec
13 changed files with 658 additions and 716 deletions
|
|
@ -39,7 +39,7 @@ fn custom_prefix_parser() -> Result<(), ParserError> {
|
|||
is_identifier_part(ch)
|
||||
}
|
||||
|
||||
fn parse_prefix(&self, parser: &mut Parser) -> Option<Result<Expr, ParserError>> {
|
||||
fn parse_prefix(&self, parser: &Parser) -> Option<Result<Expr, ParserError>> {
|
||||
if parser.consume_token(&Token::Number("1".to_string(), false)) {
|
||||
Some(Ok(Expr::Value(Value::Null.with_empty_span())))
|
||||
} else {
|
||||
|
|
@ -72,7 +72,7 @@ fn custom_infix_parser() -> Result<(), ParserError> {
|
|||
|
||||
fn parse_infix(
|
||||
&self,
|
||||
parser: &mut Parser,
|
||||
parser: &Parser,
|
||||
expr: &Expr,
|
||||
_precedence: u8,
|
||||
) -> Option<Result<Expr, ParserError>> {
|
||||
|
|
@ -110,7 +110,7 @@ fn custom_statement_parser() -> Result<(), ParserError> {
|
|||
is_identifier_part(ch)
|
||||
}
|
||||
|
||||
fn parse_statement(&self, parser: &mut Parser) -> Option<Result<Statement, ParserError>> {
|
||||
fn parse_statement(&self, parser: &Parser) -> Option<Result<Statement, ParserError>> {
|
||||
if parser.parse_keyword(Keyword::SELECT) {
|
||||
for _ in 0..3 {
|
||||
let _ = parser.next_token();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue