Trait State

Source
pub trait State: Clone {
    type TokenKind: Debug + Copy + TokenKind + Into<Self::TokenType>;
    type TokenType: Debug + Copy + TokenType;

Show 16 methods // Required methods fn is_expr_allowed(&self) -> bool; fn set_is_expr_allowed(&mut self, is_expr_allowed: bool); fn set_next_regexp(&mut self, start: Option<BytePos>); fn had_line_break(&self) -> bool; fn mark_had_line_break(&mut self); fn had_line_break_before_last(&self) -> bool; fn token_contexts(&self) -> &TokenContexts; fn mut_token_contexts(&mut self) -> &mut TokenContexts; fn set_token_type(&mut self, token_type: Self::TokenType); fn token_type(&self) -> Option<Self::TokenType>; fn syntax(&self) -> SyntaxFlags; fn prev_hi(&self) -> BytePos; fn start(&self) -> BytePos; // Provided methods fn can_have_trailing_line_comment(&self) -> bool { ... } fn can_have_trailing_comment(&self) -> bool { ... } fn last_was_tpl_element(&self) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

fn is_expr_allowed(&self) -> bool

Source

fn set_is_expr_allowed(&mut self, is_expr_allowed: bool)

Source

fn set_next_regexp(&mut self, start: Option<BytePos>)

Source

fn had_line_break(&self) -> bool

Source

fn mark_had_line_break(&mut self)

Source

fn had_line_break_before_last(&self) -> bool

Source

fn token_contexts(&self) -> &TokenContexts

Source

fn mut_token_contexts(&mut self) -> &mut TokenContexts

Source

fn set_token_type(&mut self, token_type: Self::TokenType)

Source

fn token_type(&self) -> Option<Self::TokenType>

Source

fn syntax(&self) -> SyntaxFlags

Source

fn prev_hi(&self) -> BytePos

Source

fn start(&self) -> BytePos

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§