Enum dprint_swc_ecma_ast_view::Token [−]
Variants
Identifier, “null”, “true”, “false”.
Contains null
and ``
‘=>’
‘#’
‘@’
‘.’
‘…’
‘!’
‘(’
‘)’
[
‘]’
‘{’
‘}’
‘;’
‘,’
‘`’
Fields of Template
‘:’
‘::’
AssignOp(AssignOp)
‘${’
‘?’
++
--
~
String literal. Span of this token contains quote.
Fields of Str
value: Atom<JsWordStaticSet>
has_escape: bool
This field exists because ‘use\x20strict’ is not an use strict directive.
Regex(Atom<JsWordStaticSet>, Atom<JsWordStaticSet>)
Regexp literal.
Num(f64)
TODO: Make Num as enum and separate decimal, binary, ..etc
BigInt(BigInt)
Fields of JSXName
name: Atom<JsWordStaticSet>
Fields of JSXText
raw: Atom<JsWordStaticSet>
Shebang(Atom<JsWordStaticSet>)
Implementations
impl Token
pub fn starts_expr(&self) -> bool
pub fn before_expr(&self) -> bool
Trait Implementations
impl Clone for Token
pub fn clone(&self) -> Token
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Token
pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
This method is called only in the case of parsing failure.
impl PartialEq<Token> for Token
impl StructuralPartialEq for Token
Auto Trait Implementations
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Node for T where
T: Any + ?Sized,
T: Any + ?Sized,
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,