pub struct LanguageRules {Show 16 fields
pub name: &'static str,
pub lang: SupportLang,
pub extensions: &'static [&'static str],
pub scope_separator: &'static str,
pub symbol_rules: Vec<SymbolRule>,
pub symbol_scope_containers: Vec<ScopeContainerRule>,
pub symbol_unwrap_nodes: Vec<String>,
pub reference_rules: Vec<ReferenceRule>,
pub reference_scope_containers: Vec<ScopeContainerRule>,
pub reference_unwrap_nodes: Vec<String>,
pub symbol_index: HashMap<String, Vec<usize>>,
pub reference_index: HashMap<String, Vec<usize>>,
pub symbol_scope_index: HashMap<String, usize>,
pub reference_scope_index: HashMap<String, usize>,
pub symbol_unwrap_set: HashSet<String>,
pub reference_unwrap_set: HashSet<String>,
}Expand description
Compiled rules for a single language, ready for the engine.
Fields§
§name: &'static str§lang: SupportLang§extensions: &'static [&'static str]§scope_separator: &'static str§symbol_rules: Vec<SymbolRule>§symbol_scope_containers: Vec<ScopeContainerRule>§symbol_unwrap_nodes: Vec<String>§reference_rules: Vec<ReferenceRule>§reference_scope_containers: Vec<ScopeContainerRule>§reference_unwrap_nodes: Vec<String>§symbol_index: HashMap<String, Vec<usize>>Index: node_kind → list of symbol rules
reference_index: HashMap<String, Vec<usize>>Index: node_kind → list of reference rules
symbol_scope_index: HashMap<String, usize>Index: node_kind → scope container index (symbols)
reference_scope_index: HashMap<String, usize>Index: node_kind → scope container index (references)
symbol_unwrap_set: HashSet<String>Set of node kinds to unwrap (symbols)
reference_unwrap_set: HashSet<String>Set of node kinds to unwrap (references)
Auto Trait Implementations§
impl Freeze for LanguageRules
impl RefUnwindSafe for LanguageRules
impl Send for LanguageRules
impl Sync for LanguageRules
impl Unpin for LanguageRules
impl UnsafeUnpin for LanguageRules
impl UnwindSafe for LanguageRules
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