Skip to content

Commit 7db6f21

Browse files
gvozdvmozgubenfdking
authored andcommitted
chore: add ST03
1 parent 229eaf3 commit 7db6f21

File tree

5 files changed

+517
-5
lines changed

5 files changed

+517
-5
lines changed

crates/lib/src/core/parser/segments/base.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,6 @@ pub trait Segment: Any + DynEq + DynClone + DynHash + Debug + CloneSegment {
276276
no_recursive_seg_type: Option<&str>,
277277
allow_self: bool,
278278
) -> Vec<ErasedSegment> {
279-
let is_debug = seg_types == &["object_reference"];
280-
281279
let mut acc = Vec::new();
282280
let seg_types_set: AHashSet<&str> = AHashSet::from_iter(seg_types.iter().copied());
283281

crates/lib/src/dialects/ansi.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2879,6 +2879,10 @@ impl NodeTrait for SelectStatementSegment {
28792879
)
28802880
.into()
28812881
}
2882+
2883+
fn class_types() -> AHashSet<String> {
2884+
["select_statement".into()].into_iter().collect()
2885+
}
28822886
}
28832887

28842888
pub struct SelectClauseModifierSegment;
@@ -5312,6 +5316,10 @@ impl NodeTrait for WithCompoundStatementSegment {
53125316
])
53135317
.to_matchable()
53145318
}
5319+
5320+
fn class_types() -> AHashSet<String> {
5321+
["with_compound_statement".into()].into_iter().collect()
5322+
}
53155323
}
53165324

53175325
pub struct CTEDefinitionSegment;
@@ -5328,6 +5336,10 @@ impl NodeTrait for CTEDefinitionSegment {
53285336
])
53295337
.to_matchable()
53305338
}
5339+
5340+
fn class_types() -> AHashSet<String> {
5341+
["common_table_expression"].map(ToOwned::to_owned).into_iter().collect()
5342+
}
53315343
}
53325344

53335345
pub struct CTEColumnList;
@@ -5652,6 +5664,10 @@ impl NodeTrait for TableReferenceSegment {
56525664
fn match_grammar() -> Box<dyn Matchable> {
56535665
Ref::new("ObjectReferenceSegment").to_matchable()
56545666
}
5667+
5668+
fn class_types() -> AHashSet<String> {
5669+
["table_reference".into()].into_iter().collect()
5670+
}
56555671
}
56565672

56575673
pub struct SchemaReferenceSegment;

crates/lib/src/rules/structure.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
pub mod ST01;
22
pub mod ST02;
3+
pub mod ST03;

0 commit comments

Comments
 (0)