pub struct Capturing<I> { /* private fields */ }Available on crate feature
unstable only.Implementations§
Trait Implementations§
Source§impl<I: Tokens> Tokens for Capturing<I>
impl<I: Tokens> Tokens for Capturing<I>
type Checkpoint = CapturingCheckpoint<I>
fn checkpoint_save(&self) -> Self::Checkpoint
fn checkpoint_load(&mut self, checkpoint: Self::Checkpoint)
fn read_string(&self, span: Span) -> &str
fn set_ctx(&mut self, ctx: Context)
fn ctx(&self) -> Context
fn ctx_mut(&mut self) -> &mut Context
fn syntax(&self) -> SyntaxFlags
fn target(&self) -> EsVersion
fn set_expr_allowed(&mut self, allow: bool)
fn set_next_regexp(&mut self, start: Option<BytePos>)
Source§fn add_module_mode_error(&mut self, error: Error)
fn add_module_mode_error(&mut self, error: Error)
Add an error which is valid syntax in script mode. Read more
fn end_pos(&self) -> BytePos
fn take_errors(&mut self) -> Vec<Error>
Source§fn take_script_module_errors(&mut self) -> Vec<Error>
fn take_script_module_errors(&mut self) -> Vec<Error>
If the program was parsed as a script, this contains the module
errors should the program be identified as a module in the future.
fn update_token_flags(&mut self, f: impl FnOnce(&mut TokenFlags))
fn token_flags(&self) -> TokenFlags
fn clone_token_value(&self) -> Option<TokenValue>
fn take_token_value(&mut self) -> Option<TokenValue>
fn get_token_value(&self) -> Option<&TokenValue>
Source§fn first_token(&mut self) -> TokenAndSpan
fn first_token(&mut self) -> TokenAndSpan
Returns the first token in the file. Read more
Source§fn next_token(&mut self) -> TokenAndSpan
fn next_token(&mut self) -> TokenAndSpan
Returns the next token from the input stream. Read more
fn set_token_value(&mut self, token_value: Option<TokenValue>)
fn scan_jsx_token(&mut self) -> TokenAndSpan
fn scan_jsx_open_el_terminal_token(&mut self) -> TokenAndSpan
fn rescan_jsx_open_el_terminal_token(&mut self, reset: BytePos) -> TokenAndSpan
fn rescan_jsx_token(&mut self, reset: BytePos) -> TokenAndSpan
fn scan_jsx_identifier(&mut self, start: BytePos) -> TokenAndSpan
fn scan_jsx_attribute_value(&mut self) -> TokenAndSpan
fn rescan_template_token( &mut self, start: BytePos, start_with_back_tick: bool, ) -> TokenAndSpan
fn start_pos(&self) -> BytePos
Auto Trait Implementations§
impl<I> Freeze for Capturing<I>where
I: Freeze,
impl<I> RefUnwindSafe for Capturing<I>where
I: RefUnwindSafe,
impl<I> Send for Capturing<I>where
I: Send,
impl<I> Sync for Capturing<I>where
I: Sync,
impl<I> Unpin for Capturing<I>where
I: Unpin,
impl<I> UnsafeUnpin for Capturing<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for Capturing<I>where
I: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more