Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
benfdking committed Dec 19, 2024
1 parent b54fc1a commit cab7246
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
3 changes: 1 addition & 2 deletions crates/lib-core/src/dialects/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::hash_map::Entry;
use std::fmt::Debug;

use ahash::{AHashMap, AHashSet};

use itertools::Itertools;
use crate::dialects::init::DialectKind;
use crate::dialects::syntax::SyntaxKind;
use crate::helpers::{capitalize, ToMatchable};
Expand Down Expand Up @@ -69,7 +69,6 @@ impl Dialect {
.unwrap_or_else(|| panic!("Failed to get mutable reference for {name}"))
{
DialectElementType::Matchable(matchable) => {
println!("Replacing grammar {:?} with new grammar.", matchable);
matchable.as_node_matcher().unwrap().match_grammar = match_grammar;
}
DialectElementType::SegmentGenerator(_) => {
Expand Down
18 changes: 10 additions & 8 deletions crates/lib-dialects/src/databricks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,16 @@ pub fn dialect() -> Dialect {
.into(),
);

// TODO Missing Show Object Grammar
databricks.replace_grammar(
"NotNullGrammar".into(),
Sequence::new(vec_of_erased![Ref::keyword("NOT"), Ref::keyword("NULL")])
.to_matchable()
.into(),
// TODO Function NameIdentifierSegment
);
// // TODO Missing Show Object Grammar
// databricks.replace_grammar(
// "NotNullGrammar".into(),
// Sequence::new(vec_of_erased![Ref::keyword("NOT"), Ref::keyword("NULL")])
// .to_matchable()
// .into(),
// // TODO Function NameIdentifierSegment
// );

databricks.expand();

return databricks;
}

0 comments on commit cab7246

Please sign in to comment.