pub struct ParserState {
pub allow_loop_control: bool,
}Expand description
State that can be used to determine if certain parse trees are valid (e.g. if a checking if a
break expression is inside a loop).
The state cannot be mutated directly; it can only be changed when parsing using the Parser::try_parse_with_state method.
Fields§
§allow_loop_control: boolWhether loop control expressions are allowed in the current context. This is used to
determine if a break or continue expression is valid.
Trait Implementations§
Source§impl Clone for ParserState
impl Clone for ParserState
Source§fn clone(&self) -> ParserState
fn clone(&self) -> ParserState
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParserState
impl Debug for ParserState
Source§impl Default for ParserState
impl Default for ParserState
Source§fn default() -> ParserState
fn default() -> ParserState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParserState
impl RefUnwindSafe for ParserState
impl Send for ParserState
impl Sync for ParserState
impl Unpin for ParserState
impl UnwindSafe for ParserState
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