[−][src]Struct rslint_parser::ParserState
State kept by the parser while parsing. It is required for things such as strict mode or async functions
Fields
include_in: bool
Whether in
should be counted in a binary expression
this is for for...in
statements to prevent ambiguity.
continue_allowed: bool
Whether the parser is in an iteration statement and continue
is allowed.
break_allowed: bool
Whether the parser is in an iteration or switch statement and
break
is allowed.
labels: HashMap<String, Range<usize>>
A list of labels for labelled statements used to report undefined label errors for break and continue, as well as duplicate labels
in_generator: bool
Whether the parser is in a generator function like function* a() {}
in_function: bool
Whether the parser is inside of a function
potential_arrow_start: bool
Whether we potentially are in a place to parse an arrow expression
in_async: bool
Whether we are in an async function
strict: Option<StrictMode>
Whether we are in strict mode code
is_module: bool
Whether the code we are parsing is a module
default_item: Option<Range<usize>>
The exported default item, used for checking duplicate defaults
expr_recovery_set: TokenSet
The recovery set primary_expr will use
Implementations
impl ParserState
[src]
pub fn module() -> Self
[src]
pub fn check_default(
&mut self,
p: &mut Parser<'_>,
marker: CompletedMarker
) -> CompletedMarker
[src]
&mut self,
p: &mut Parser<'_>,
marker: CompletedMarker
) -> CompletedMarker
Check for duplicate defaults and update state
pub fn iteration_stmt(&mut self, set: bool)
[src]
pub fn strict(&mut self, p: &mut Parser<'_>, range: Range<usize>)
[src]
Turn on strict mode and issue a warning for redundant strict mode declarations
Trait Implementations
impl Clone for ParserState
[src]
fn clone(&self) -> ParserState
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ParserState
[src]
impl Default for ParserState
[src]
impl Eq for ParserState
[src]
impl PartialEq<ParserState> for ParserState
[src]
fn eq(&self, other: &ParserState) -> bool
[src]
fn ne(&self, other: &ParserState) -> bool
[src]
impl StructuralEq for ParserState
[src]
impl StructuralPartialEq for ParserState
[src]
Auto Trait Implementations
impl RefUnwindSafe for ParserState
impl Send for ParserState
impl Sync for ParserState
impl Unpin for ParserState
impl UnwindSafe for ParserState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erasable for T
unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>
const ACK_1_1_0: bool
fn erase(this: NonNull<Self>) -> NonNull<Erased>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,