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
impl Eq for NonTerminal
Auto Trait Implementations§
impl !Freeze for NonTerminal
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
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.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.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