Struct CustomToken
pub struct CustomToken {
pub type_name: CompactString,
pub value: CompactString,
pub start_pos: Option<u32>,
pub end_pos: Option<u32>,
pub line: Option<u32>,
pub end_line: Option<u32>,
pub column: Option<u32>,
pub end_column: Option<u32>,
}Expand description
A token produced by a TokenSource, typed by terminal NAME — exactly the
seam Lark exposes (a custom lexer yields Token(type: str, value)); the
engine resolves the name through the parse table per token. Positions are
the caller’s verbatim (the engines never recompute them; $END borrows
them as-is).
Fields§
§type_name: CompactString§value: CompactString§start_pos: Option<u32>§end_pos: Option<u32>§line: Option<u32>§end_line: Option<u32>§column: Option<u32>§end_column: Option<u32>Implementations§
§impl CustomToken
impl CustomToken
Trait Implementations§
§impl Clone for CustomToken
impl Clone for CustomToken
§fn clone(&self) -> CustomToken
fn clone(&self) -> CustomToken
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 more§impl Debug for CustomToken
impl Debug for CustomToken
impl Eq for CustomToken
§impl PartialEq for CustomToken
impl PartialEq for CustomToken
impl StructuralPartialEq for CustomToken
Auto Trait Implementations§
impl Freeze for CustomToken
impl RefUnwindSafe for CustomToken
impl Send for CustomToken
impl Sync for CustomToken
impl Unpin for CustomToken
impl UnsafeUnpin for CustomToken
impl UnwindSafe for CustomToken
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