mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-21 14:40:18 +00:00
feat: add arg placeholder (#420)
Co-authored-by: gamife <gamife9886@gmail.com>
This commit is contained in:
parent
1da49c15c7
commit
899f91b1f6
4 changed files with 60 additions and 1 deletions
|
@ -505,6 +505,10 @@ impl<'a> Parser<'a> {
|
|||
self.expect_token(&Token::RParen)?;
|
||||
Ok(expr)
|
||||
}
|
||||
Token::Placeholder(_) => {
|
||||
self.prev_token();
|
||||
Ok(Expr::Value(self.parse_value()?))
|
||||
}
|
||||
unexpected => self.expected("an expression:", unexpected),
|
||||
}?;
|
||||
|
||||
|
@ -2261,6 +2265,7 @@ impl<'a> Parser<'a> {
|
|||
Token::SingleQuotedString(ref s) => Ok(Value::SingleQuotedString(s.to_string())),
|
||||
Token::NationalStringLiteral(ref s) => Ok(Value::NationalStringLiteral(s.to_string())),
|
||||
Token::HexStringLiteral(ref s) => Ok(Value::HexStringLiteral(s.to_string())),
|
||||
Token::Placeholder(ref s) => Ok(Value::Placeholder(s.to_string())),
|
||||
unexpected => self.expected("a value", unexpected),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue