pub struct GrammarPoint {
pub name: Rc<String>,
pub name_id: u32,
pub forms: Vec<Alternation>,
/* private fields */
}Expand description
A grammar rule.
More specifically, every production/alternation associated with a given name, in order. Alternations are stored and tested in the same order as written in the grammar.
Fields§
§name: Rc<String>Name of the grammar point (LHS).
name_id: u32ID of the grammar point (index in Grammar::points).
forms: Vec<Alternation>List of productions/alternations under this grammar point’s LHS
Trait Implementations§
Source§impl Clone for GrammarPoint
impl Clone for GrammarPoint
Source§fn clone(&self) -> GrammarPoint
fn clone(&self) -> GrammarPoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GrammarPoint
impl !RefUnwindSafe for GrammarPoint
impl !Send for GrammarPoint
impl !Sync for GrammarPoint
impl Unpin for GrammarPoint
impl !UnwindSafe for GrammarPoint
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