Enum swc_css_ast::Token
source · pub enum Token {
Show 24 variants
Ident {
value: Atom,
raw: Atom,
},
Function {
value: Atom,
raw: Atom,
},
AtKeyword {
value: Atom,
raw: Atom,
},
Hash {
is_id: bool,
value: Atom,
raw: Atom,
},
String {
value: Atom,
raw: Atom,
},
BadString {
raw: Atom,
},
Url {
value: Atom,
raw: Box<UrlKeyValue>,
},
BadUrl {
raw: Atom,
},
Delim {
value: char,
},
Number {
value: f64,
raw: Atom,
type_flag: NumberType,
},
Percentage {
value: f64,
raw: Atom,
},
Dimension(Box<DimensionToken>),
WhiteSpace {
value: Atom,
},
CDO,
CDC,
Colon,
Semi,
Comma,
LBracket,
RBracket,
LParen,
RParen,
LBrace,
RBrace,
}
Variants§
Ident
Function
AtKeyword
@
Hash
#
String
BadString
Url
url(value)
BadUrl
Delim
Number
Percentage
Dimension(Box<DimensionToken>)
WhiteSpace
One or more whitespace.
CDO
<!--
CDC
-->
Colon
`:``
Semi
;
Comma
,
LBracket
[
RBracket
]
LParen
(
RParen
)
LBrace
{
RBrace
}
Trait Implementations§
source§impl EqIgnoreSpan for Token
impl EqIgnoreSpan for Token
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl PartialEq for Token
impl PartialEq for Token
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more