SQLite: Parse & and | at the same precedence
diff --git a/src/dialect/sqlite.rs b/src/dialect/sqlite.rs
index f63e4cb..70833d8 100644
--- a/src/dialect/sqlite.rs
+++ b/src/dialect/sqlite.rs
@@ -20,9 +20,10 @@
 
 use crate::ast::BinaryOperator;
 use crate::ast::{Expr, Statement};
-use crate::dialect::Dialect;
+use crate::dialect::{Dialect, Precedence};
 use crate::keywords::Keyword;
 use crate::parser::{Parser, ParserError};
+use crate::tokenizer::Token;
 
 /// A [`Dialect`] for [SQLite](https://www.sqlite.org)
 ///
@@ -97,6 +98,15 @@
         None
     }
 
+    /// `&` and `|` share one left-associative precedence level.
+    /// See <https://www.sqlite.org/lang_expr.html#operators_and_parse_affecting_attributes>
+    fn get_next_precedence(&self, parser: &Parser) -> Option<Result<u8, ParserError>> {
+        match parser.peek_token_ref().token {
+            Token::Ampersand | Token::Pipe => Some(Ok(self.prec_value(Precedence::Ampersand))),
+            _ => None,
+        }
+    }
+
     fn supports_in_empty_list(&self) -> bool {
         true
     }
diff --git a/tests/sqlparser_sqlite.rs b/tests/sqlparser_sqlite.rs
index 2e60c75..46222e8 100644
--- a/tests/sqlparser_sqlite.rs
+++ b/tests/sqlparser_sqlite.rs
@@ -1171,3 +1171,63 @@
         .parse_sql_statements("SELECT a$ FROM t")
         .unwrap_err();
 }
+
+#[test]
+fn parse_bitwise_and_or_share_precedence() {
+    fn num(n: &str) -> Expr {
+        Expr::value(number(n))
+    }
+    fn bin(left: Expr, op: BinaryOperator, right: Expr) -> Expr {
+        Expr::BinaryOp {
+            left: Box::new(left),
+            op,
+            right: Box::new(right),
+        }
+    }
+    use BinaryOperator::{BitwiseAnd, BitwiseOr, Eq, Multiply, Plus};
+
+    for (sql, expected) in [
+        (
+            "6 | 1 & 3",
+            bin(bin(num("6"), BitwiseOr, num("1")), BitwiseAnd, num("3")),
+        ),
+        (
+            "6 & 3 | 8",
+            bin(bin(num("6"), BitwiseAnd, num("3")), BitwiseOr, num("8")),
+        ),
+        (
+            "1 & 2 & 3",
+            bin(bin(num("1"), BitwiseAnd, num("2")), BitwiseAnd, num("3")),
+        ),
+        (
+            "1 | 2 | 3",
+            bin(bin(num("1"), BitwiseOr, num("2")), BitwiseOr, num("3")),
+        ),
+        (
+            "1 | 2 + 3 & 4 * 5",
+            bin(
+                bin(num("1"), BitwiseOr, bin(num("2"), Plus, num("3"))),
+                BitwiseAnd,
+                bin(num("4"), Multiply, num("5")),
+            ),
+        ),
+        (
+            "6 | (1 & 3)",
+            bin(
+                num("6"),
+                BitwiseOr,
+                Expr::Nested(Box::new(bin(num("1"), BitwiseAnd, num("3")))),
+            ),
+        ),
+        (
+            "1 | 2 = 3 & 4",
+            bin(
+                bin(num("1"), BitwiseOr, num("2")),
+                Eq,
+                bin(num("3"), BitwiseAnd, num("4")),
+            ),
+        ),
+    ] {
+        assert_eq!(sqlite().verified_expr(sql), expected, "{sql}");
+    }
+}