databend_common_ast/parser/
mod.rs1macro_rules! try_dispatch {
16 ($input:expr_2021, $return_if_ok:literal, $($pat:pat => $body:expr_2021),+ $(,)?) => {{
17 if let Some(token_0) = $input.tokens.first() {
18 use TokenKind::*;
19
20 if let Some(result) = match token_0.kind {
21 $($pat => Some($body),)+
22 _ => None,
23 } {
24 if !$return_if_ok || result.is_ok() {
25 return result;
26 }
27 }
28 }
29 }};
30}
31
32mod comment;
33mod common;
34mod copy;
35mod data_mask;
36pub mod dynamic_table;
37mod error;
38mod error_suggestion;
39pub mod expr;
40mod input;
41#[allow(clippy::module_inception)]
42mod parser;
43pub mod query;
44pub mod script;
45mod sequence;
46mod stage;
47pub mod statement;
48pub mod stream;
49pub mod token;
50
51pub use common::IResult;
52pub use common::match_text;
53pub use common::match_token;
54pub use error::Backtrace;
55pub use error::Error;
56pub use error::ErrorKind;
57pub use error::display_parser_error;
58pub use error_suggestion::suggest_correction;
59pub use input::Dialect;
60pub use input::Input;
61pub use input::ParseMode;
62pub use parser::*;
63pub use token::all_reserved_keywords;