Support Parsing of hexadecimal literals that start with 0x (#324)

* Add support for 0x prefixed bin literal

* Add tests

* Fix formatting for test
This commit is contained in:
TheSchemm 2021-08-25 11:57:32 -05:00 committed by GitHub
parent a95c81fb13
commit 70ffa4166c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -113,6 +113,11 @@ fn parse_mssql_top() {
let _ = ms_and_generic().one_statement_parses_to(sql, "SELECT TOP (5) bar, baz FROM foo");
}
#[test]
fn parse_mssql_bin_literal() {
let _ = ms_and_generic().one_statement_parses_to("SELECT 0xdeadBEEF", "SELECT X'deadBEEF'");
}
fn ms() -> TestedDialects {
TestedDialects {
dialects: vec![Box::new(MsSqlDialect {})],