File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -95,4 +95,9 @@ impl Dialect for MsSqlDialect {
95
95
fn supports_timestamp_versioning ( & self ) -> bool {
96
96
true
97
97
}
98
+
99
+ /// See <https://learn.microsoft.com/en-us/sql/t-sql/language-elements/slash-star-comment-transact-sql?view=sql-server-ver16>
100
+ fn supports_nested_comments ( & self ) -> bool {
101
+ true
102
+ }
98
103
}
Original file line number Diff line number Diff line change @@ -1620,6 +1620,22 @@ fn parse_create_table_with_valid_options() {
1620
1620
}
1621
1621
}
1622
1622
1623
+ #[ test]
1624
+ fn parse_nested_slash_star_comment ( ) {
1625
+ let sql = r#"
1626
+ select
1627
+ /*
1628
+ comment level 1
1629
+ /*
1630
+ comment level 2
1631
+ */
1632
+ */
1633
+ 1;
1634
+ "# ;
1635
+ let canonical = "SELECT 1" ;
1636
+ ms ( ) . one_statement_parses_to ( sql, canonical) ;
1637
+ }
1638
+
1623
1639
#[ test]
1624
1640
fn parse_create_table_with_invalid_options ( ) {
1625
1641
let invalid_cases = vec ! [
You can’t perform that action at this time.
0 commit comments