mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-19 05:30:19 +00:00
Add logical xor (#357)
This commit is contained in:
parent
a8901becc3
commit
014b82f03d
5 changed files with 83 additions and 0 deletions
|
@ -898,6 +898,7 @@ impl<'a> Parser<'a> {
|
|||
None
|
||||
}
|
||||
}
|
||||
Keyword::XOR => Some(BinaryOperator::Xor),
|
||||
_ => None,
|
||||
},
|
||||
_ => None,
|
||||
|
@ -1018,6 +1019,7 @@ impl<'a> Parser<'a> {
|
|||
match token {
|
||||
Token::Word(w) if w.keyword == Keyword::OR => Ok(5),
|
||||
Token::Word(w) if w.keyword == Keyword::AND => Ok(10),
|
||||
Token::Word(w) if w.keyword == Keyword::XOR => Ok(24),
|
||||
Token::Word(w) if w.keyword == Keyword::NOT => match self.peek_nth_token(1) {
|
||||
// The precedence of NOT varies depending on keyword that
|
||||
// follows it. If it is followed by IN, BETWEEN, or LIKE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue