pub struct NoSemanticHooks;Expand description
Default hook object used by parsers that do not need user-supplied semantics.
Trait Implementations§
Source§impl Clone for NoSemanticHooks
impl Clone for NoSemanticHooks
Source§fn clone(&self) -> NoSemanticHooks
fn clone(&self) -> NoSemanticHooks
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 NoSemanticHooks
Source§impl Debug for NoSemanticHooks
impl Debug for NoSemanticHooks
Source§impl Default for NoSemanticHooks
impl Default for NoSemanticHooks
Source§fn default() -> NoSemanticHooks
fn default() -> NoSemanticHooks
Returns the “default value” for a type. Read more
Source§impl SemanticHooks for NoSemanticHooks
impl SemanticHooks for NoSemanticHooks
Source§fn observes_parser_predicates(&self) -> bool
fn observes_parser_predicates(&self) -> bool
Whether this hook object may observe parser predicate transitions. Read more
fn sempred<S>(
&mut self,
ctx: &mut ParserSemCtx<'_, S>,
rule_index: usize,
pred_index: usize,
) -> Option<bool>where
S: TokenSource,
fn action<S>(
&mut self,
ctx: &mut ParserSemCtx<'_, S>,
action: ParserAction,
) -> boolwhere
S: TokenSource,
fn lexer_sempred<I, F>(
&mut self,
ctx: &mut LexerSemCtx<'_, I, F>,
rule_index: usize,
pred_index: usize,
) -> Option<bool>where
I: CharStream,
F: TokenFactory,
Source§fn lexer_action<I, F>(
&mut self,
ctx: &mut LexerSemCtx<'_, I, F>,
action: LexerCustomAction,
) -> boolwhere
I: CharStream,
F: TokenFactory,
fn lexer_action<I, F>(
&mut self,
ctx: &mut LexerSemCtx<'_, I, F>,
action: LexerCustomAction,
) -> boolwhere
I: CharStream,
F: TokenFactory,
Runs a lexer custom action on the committed lexing path. Returns whether
the hook handled the action. Read more
Source§fn lexer_token_emitted(&mut self, token: &CommonToken)
fn lexer_token_emitted(&mut self, token: &CommonToken)
Observes a token after committed lexer actions and portable commands
have run and the token has been emitted, immediately before it is
returned to the token stream. Read more
Auto Trait Implementations§
impl Freeze for NoSemanticHooks
impl RefUnwindSafe for NoSemanticHooks
impl Send for NoSemanticHooks
impl Sync for NoSemanticHooks
impl Unpin for NoSemanticHooks
impl UnsafeUnpin for NoSemanticHooks
impl UnwindSafe for NoSemanticHooks
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