pub enum LexCheckResult {
Continue,
Skip,
Token(Box<LexCheckToken>),
NativeToken(Box<Token>),
}Expand description
Effect returned by a matcher-family preflight hook.
Variants§
Continue
Run the matcher’s normal implementation.
Skip
Skip this matcher and try the next matcher family.
Token(Box<LexCheckToken>)
Emit an owned token while consuming its non-empty source prefix.
NativeToken(Box<Token>)
Return a token built by a live lexer callback. The callback owns all
cursor movement, matching the canonical LexCheck(lex) contract.
Implementations§
Source§impl LexCheckResult
impl LexCheckResult
pub fn token(token: LexCheckToken) -> Self
pub fn native_token(token: Token) -> Self
Trait Implementations§
Source§impl Clone for LexCheckResult
impl Clone for LexCheckResult
Source§impl Debug for LexCheckResult
impl Debug for LexCheckResult
Source§impl PartialEq for LexCheckResult
impl PartialEq for LexCheckResult
impl StructuralPartialEq for LexCheckResult
Auto Trait Implementations§
impl !RefUnwindSafe for LexCheckResult
impl !UnwindSafe for LexCheckResult
impl Freeze for LexCheckResult
impl Send for LexCheckResult
impl Sync for LexCheckResult
impl Unpin for LexCheckResult
impl UnsafeUnpin for LexCheckResult
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