Enum swc_ecma_parser::token::Token [−][src]
pub enum Token {
Show 36 variants
Word(Word),
Arrow,
Hash,
At,
Dot,
DotDotDot,
Bang,
LParen,
RParen,
LBracket,
RBracket,
LBrace,
RBrace,
Semi,
Comma,
BackQuote,
Template {
raw: JsWord,
cooked: Option<JsWord>,
has_escape: bool,
},
Colon,
ColonColon,
BinOp(BinOpToken),
AssignOp(AssignOpToken),
DollarLBrace,
QuestionMark,
PlusPlus,
MinusMinus,
Tilde,
Str {
value: JsWord,
has_escape: bool,
},
Regex(JsWord, JsWord),
Num(f64),
BigInt(BigIntValue),
JSXName {
name: JsWord,
},
JSXText {
raw: JsWord,
},
JSXTagStart,
JSXTagEnd,
Shebang(JsWord),
Error(Error),
}
Variants
Word(Word)
Identifier, “null”, “true”, “false”.
Contains null
and ``
Tuple Fields of Word
0: Word
‘=>’
‘#’
‘@’
‘.’
‘…’
‘!’
‘(’
‘)’
[
‘]’
‘{’
‘}’
‘;’
‘,’
‘`’
‘:’
‘::’
BinOp(BinOpToken)
Tuple Fields of BinOp
0: BinOpToken
AssignOp(AssignOpToken)
Tuple Fields of AssignOp
‘${’
‘?’
++
--
~
String literal. Span of this token contains quote.
Fields of Str
Regexp literal.
Num(f64)
TODO: Make Num as enum and separate decimal, binary, ..etc
Tuple Fields of Num
0: f64
BigInt(BigIntValue)
Tuple Fields of BigInt
0: BigIntValue
Fields of JSXName
name: JsWord
Fields of JSXText
raw: JsWord
Shebang(JsWord)
Tuple Fields of Shebang
0: JsWord
Error(Error)
Tuple Fields of Error
0: Error
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Token
impl UnwindSafe for Token
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