pub struct Dialect { /* private fields */ }
Implementations§
source§impl Dialect
impl Dialect
pub fn new(root_segment_name: &'static str) -> Self
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 lexer_matchers(&self) -> &[Box<dyn Matcher>]
pub fn insert_lexer_matchers( &mut self, lexer_patch: Vec<Box<dyn Matcher>>, before: &str )
pub fn patch_lexer_matchers(&mut self, lexer_patch: Vec<Box<dyn Matcher>>)
pub fn set_lexer_matchers(&mut self, lexer_matchers: Vec<Box<dyn 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: &str) -> &mut AHashSet<BracketPair>
pub fn update_bracket_sets(&mut self, label: &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§
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> 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> 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