pub struct Dialect { /* private fields */ }
Implementations§
source§impl Dialect
impl Dialect
pub fn new(root_segment_name: &'static str) -> Self
pub fn name(&self) -> DialectKind
pub fn add( &mut self, iter: impl IntoIterator<Item = (Cow<'static, str>, DialectElementType)> + Clone, )
pub fn grammar(&self, name: &str) -> Arc<dyn Matchable>
pub fn replace_grammar( &mut self, name: &'static str, match_grammar: Arc<dyn Matchable>, )
pub fn lexer_matchers(&self) -> &[Matcher]
pub fn insert_lexer_matchers(&mut self, lexer_patch: Vec<Matcher>, before: &str)
pub fn patch_lexer_matchers(&mut self, lexer_patch: Vec<Matcher>)
pub fn set_lexer_matchers(&mut self, lexer_matchers: Vec<Matcher>)
pub fn sets(&self, label: &str) -> AHashSet<&'static str>
pub fn sets_mut(&mut self, label: &'static str) -> &mut AHashSet<&'static str>
pub fn update_keywords_set_from_multiline_string( &mut self, set_label: &'static str, values: &'static str, )
pub fn bracket_sets(&self, label: &str) -> AHashSet<BracketPair>
pub fn bracket_sets_mut( &mut self, label: &'static str, ) -> &mut AHashSet<BracketPair>
pub fn update_bracket_sets( &mut self, label: &'static str, pairs: Vec<BracketPair>, )
pub fn ref(&self, name: &str) -> Arc<dyn Matchable>
pub fn expand(&mut self)
pub fn root_segment_name(&self) -> &'static str
pub fn get_root_segment(&self) -> Arc<dyn Matchable>
Trait Implementations§
source§impl From<DialectKind> for Dialect
impl From<DialectKind> for Dialect
source§fn from(val: DialectKind) -> Self
fn from(val: DialectKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Dialect
impl !RefUnwindSafe for Dialect
impl Send for Dialect
impl Sync for Dialect
impl Unpin for Dialect
impl !UnwindSafe for Dialect
Blanket Implementations§
source§impl<T> AsAnyMut for Twhere
T: Any,
impl<T> AsAnyMut for Twhere
T: Any,
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more