Enum ChoiceAction
#[non_exhaustive]pub enum ChoiceAction {
Shift(usize),
Reduce(usize),
}Expand description
A merged choices() entry — Lark returns the raw states[position] map
whose keys include NON-TERMINAL goto names: hyperlark re-merges the split
token_actions/goto_actions rows to reproduce it.
Provisional: part of the interactive recovery surface, so
#[non_exhaustive] leaves room for a future goto/shift split without a
breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Shift(usize)
Shift to (terminal key) or goto (rule-name key) this state.
Reduce(usize)
Reduce by this rule index (terminal keys only).
Trait Implementations§
§impl Clone for ChoiceAction
impl Clone for ChoiceAction
§fn clone(&self) -> ChoiceAction
fn clone(&self) -> ChoiceAction
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 moreimpl Copy for ChoiceAction
§impl Debug for ChoiceAction
impl Debug for ChoiceAction
impl Eq for ChoiceAction
§impl PartialEq for ChoiceAction
impl PartialEq for ChoiceAction
impl StructuralPartialEq for ChoiceAction
Auto Trait Implementations§
impl Freeze for ChoiceAction
impl RefUnwindSafe for ChoiceAction
impl Send for ChoiceAction
impl Sync for ChoiceAction
impl Unpin for ChoiceAction
impl UnsafeUnpin for ChoiceAction
impl UnwindSafe for ChoiceAction
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