pub struct TerminalDef {
pub name: String,
pub has_type: bool,
pub kind: TerminalKind,
pub pattern: Option<String>,
}Expand description
A terminal definition in the grammar.
Fields§
§name: StringTerminal name (e.g., “NUM”, “PLUS”).
has_type: boolWhether this terminal carries a typed payload.
kind: TerminalKindHow shift/reduce conflicts on this terminal are resolved.
pattern: Option<String>Optional regex pattern for automatic lexer generation.
Trait Implementations§
Source§impl Clone for TerminalDef
impl Clone for TerminalDef
Source§fn clone(&self) -> TerminalDef
fn clone(&self) -> TerminalDef
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 moreSource§impl Debug for TerminalDef
impl Debug for TerminalDef
Source§impl PartialEq for TerminalDef
impl PartialEq for TerminalDef
impl Eq for TerminalDef
impl StructuralPartialEq for TerminalDef
Auto Trait Implementations§
impl Freeze for TerminalDef
impl RefUnwindSafe for TerminalDef
impl Send for TerminalDef
impl Sync for TerminalDef
impl Unpin for TerminalDef
impl UnsafeUnpin for TerminalDef
impl UnwindSafe for TerminalDef
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