Enum swc_ecma_parser::lexer::TokenContext [−][src]
pub enum TokenContext { BraceStmt, BraceExpr, TplQuasi, ParenStmt { is_for_loop: bool, }, ParenExpr, Tpl { start: BytePos, }, FnExpr, JSXOpeningTag, JSXClosingTag, JSXExpr, }
Expand description
The algorithm used to determine whether a regexp can appear at a given point in the program is loosely based on sweet.js’ approach. See https://github.com/mozilla/sweet.js/wiki/design
Variants
Fields of ParenStmt
is_for_loop: bool
Is this for
loop?
Fields of Tpl
start: BytePos
Start of a template literal.
Implementations
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for TokenContext
impl Send for TokenContext
impl Sync for TokenContext
impl Unpin for TokenContext
impl UnwindSafe for TokenContext
Blanket Implementations
Mutably borrows from an owned value. Read more