#[non_exhaustive]pub struct EnterRuleEvent<'a> {
pub rule_index: usize,
pub current: Option<TokenView<'a>>,
}Expand description
A rule-entry event delivered to ParseListener::enter_every_rule.
Non-exhaustive so future fields (alt number, invoking state, a context handle) extend the event without breaking implementors.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rule_index: usizeIndex of the rule being entered (compare against the generated
RULE_* constants).
current: Option<TokenView<'a>>The lookahead token the rule starts at — its line/column/offsets
anchor listener diagnostics — or None at end of input.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Send for EnterRuleEvent<'a>
impl<'a> !Sync for EnterRuleEvent<'a>
impl<'a> Freeze for EnterRuleEvent<'a>
impl<'a> RefUnwindSafe for EnterRuleEvent<'a>
impl<'a> Unpin for EnterRuleEvent<'a>
impl<'a> UnsafeUnpin for EnterRuleEvent<'a>
impl<'a> UnwindSafe for EnterRuleEvent<'a>
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