sqruff_lib_core::parser::matchableTrait MatchableTrait
Source pub trait MatchableTrait {
// Required method
fn elements(&self) -> &[Matchable];
// Provided methods
fn get_type(&self) -> SyntaxKind { ... }
fn match_grammar(&self) -> Option<Matchable> { ... }
fn is_optional(&self) -> bool { ... }
fn simple(
&self,
parse_context: &ParseContext<'_>,
crumbs: Option<Vec<&str>>,
) -> Option<(AHashSet<String>, SyntaxSet)> { ... }
fn match_segments(
&self,
_segments: &[ErasedSegment],
_idx: u32,
_parse_context: &mut ParseContext<'_>,
) -> Result<MatchResult, SQLParseError> { ... }
fn cache_key(&self) -> MatchableCacheKey { ... }
fn copy(
&self,
_insert: Option<Vec<Matchable>>,
_at: Option<usize>,
_before: Option<Matchable>,
_remove: Option<Vec<Matchable>>,
_terminators: Vec<Matchable>,
_replace_terminators: bool,
) -> Matchable { ... }
}