Struct rustemo_compiler::grammar::NonTerminal
source · pub struct NonTerminal {
pub idx: NonTermIndex,
pub name: String,
pub annotation: Option<String>,
pub productions: Vec<ProdIndex>,
pub reachable: Cell<bool>,
}
Fields§
§idx: NonTermIndex
§name: String
§annotation: Option<String>
§productions: Vec<ProdIndex>
§reachable: Cell<bool>
Is this non-terminal reachable from the start rule. Used to determine layout-only rules.
Implementations§
source§impl NonTerminal
impl NonTerminal
pub fn productions<'a>(&self, grammar: &'a Grammar) -> Vec<&'a Production>
Trait Implementations§
source§impl Debug for NonTerminal
impl Debug for NonTerminal
source§impl Default for NonTerminal
impl Default for NonTerminal
source§fn default() -> NonTerminal
fn default() -> NonTerminal
Returns the “default value” for a type. Read more
source§impl Hash for NonTerminal
impl Hash for NonTerminal
source§impl Ord for NonTerminal
impl Ord for NonTerminal
source§impl PartialEq for NonTerminal
impl PartialEq for NonTerminal
source§impl PartialOrd for NonTerminal
impl PartialOrd for NonTerminal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for NonTerminal
Auto Trait Implementations§
impl !RefUnwindSafe for NonTerminal
impl Send for NonTerminal
impl !Sync for NonTerminal
impl Unpin for NonTerminal
impl UnwindSafe for NonTerminal
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.