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
BraceStmt
BraceExpr
TplQuasi
ParenStmt
Fields
is_for_loop: bool
Is this for
loop?
ParenExpr
Tpl
Fields
start: BytePos
Start of a template literal.
FnExpr
JSXOpeningTag
JSXClosingTag
JSXExpr
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
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more