We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
dialect_of
1 parent 51cbd5a commit ce2686aCopy full SHA for ce2686a
src/dialect/mod.rs
@@ -60,6 +60,13 @@ use alloc::boxed::Box;
60
61
/// Convenience check if a [`Parser`] uses a certain dialect.
62
///
63
+/// Note: when possible please the new style, adding a method to the [`Dialect`]
64
+/// trait rather than using this macro.
65
+///
66
+/// The benefits of adding a method on `Dialect` over this macro are:
67
+/// 1. user defined [`Dialect`]s can customize the parsing behavior
68
+/// 2. The differences between dialects can be clearly documented in the trait
69
70
/// `dialect_of!(parser Is SQLiteDialect | GenericDialect)` evaluates
71
/// to `true` if `parser.dialect` is one of the [`Dialect`]s specified.
72
macro_rules! dialect_of {
0 commit comments