pub struct ParsedGrammar {
pub rules: Vec<GrammarRule>,
pub symbol_ids: BTreeMap<String, u32>,
}Expand description
A parsed grammar: the rule table plus the symbol names that produced it.
Fields§
§rules: Vec<GrammarRule>rules[id] is the definition of symbol id, terminated by
GreType::End.
symbol_ids: BTreeMap<String, u32>Symbol name to rule id. Ordered, mirroring upstream’s std::map,
so error messages and diagnostics are reproducible.
Implementations§
Trait Implementations§
Source§impl Clone for ParsedGrammar
impl Clone for ParsedGrammar
Source§fn clone(&self) -> ParsedGrammar
fn clone(&self) -> ParsedGrammar
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParsedGrammar
impl Debug for ParsedGrammar
Source§impl Default for ParsedGrammar
impl Default for ParsedGrammar
Source§fn default() -> ParsedGrammar
fn default() -> ParsedGrammar
Returns the “default value” for a type. Read more
impl Eq for ParsedGrammar
Source§impl PartialEq for ParsedGrammar
impl PartialEq for ParsedGrammar
impl StructuralPartialEq for ParsedGrammar
Auto Trait Implementations§
impl Freeze for ParsedGrammar
impl RefUnwindSafe for ParsedGrammar
impl Send for ParsedGrammar
impl Sync for ParsedGrammar
impl Unpin for ParsedGrammar
impl UnsafeUnpin for ParsedGrammar
impl UnwindSafe for ParsedGrammar
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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