Struct swc_ecma_ast::Number
source · [−]Expand description
A numeric literal.
Creation
If you are creating a numeric literal with a dummy span, please use
literal.into()
, instead of creating this struct directly.
All of Box<Expr>
, Expr
, Lit
, Number
implements From<64>
and
From<usize>
.
Fields
span: Span
value: f64
Note: This should not be NaN
. Use crate::Ident to represent NaN.
If you store NaN
in this field, a hash map will behave strangely.
raw: Option<Atom>
Use None
value only for transformations to avoid recalculate
characters in number literal
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Number
impl<'de> Deserialize<'de> for Number
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl EqIgnoreSpan for Number
impl EqIgnoreSpan for Number
fn eq_ignore_span(&self, other: &Self) -> bool
impl Eq for Number
impl StructuralPartialEq for Number
Auto Trait Implementations
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more