Enum ezno_parser::NumberStructure
source · pub enum NumberStructure {
Infinity,
NegativeInfinity,
NaN,
Hex(NumberSign, u64),
Bin(NumberSign, u64),
Octal(NumberSign, u64),
Number(f64),
}
Expand description
TODO BigInt TODO a mix between runtime numbers and source syntax based number https://tc39.es/ecma262/multipage/ecmascript-language-lexical-grammar.html#sec-literals-numeric-literals
Variants§
Infinity
NegativeInfinity
NaN
Hex(NumberSign, u64)
Bin(NumberSign, u64)
Octal(NumberSign, u64)
Number(f64)
TODO could do as something other than f64
Implementations§
source§impl NumberStructure
impl NumberStructure
pub fn negate(&self) -> Self
pub fn as_js_string(self) -> String
Trait Implementations§
source§impl Clone for NumberStructure
impl Clone for NumberStructure
source§fn clone(&self) -> NumberStructure
fn clone(&self) -> NumberStructure
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NumberStructure
impl Debug for NumberStructure
source§impl Display for NumberStructure
impl Display for NumberStructure
source§impl From<NumberStructure> for f64
impl From<NumberStructure> for f64
source§fn from(this: NumberStructure) -> f64
fn from(this: NumberStructure) -> f64
Converts to this type from the input type.
source§impl From<f64> for NumberStructure
impl From<f64> for NumberStructure
source§impl FromStr for NumberStructure
impl FromStr for NumberStructure
source§impl Hash for NumberStructure
impl Hash for NumberStructure
source§impl PartialEq<NumberStructure> for NumberStructure
impl PartialEq<NumberStructure> for NumberStructure
source§impl SelfRustTokenize for NumberStructure
impl SelfRustTokenize for NumberStructure
fn append_to_token_stream(&self, token_stream: &mut TokenStream)
source§fn to_tokens(&self) -> TokenStream
fn to_tokens(&self) -> TokenStream
Returns the tokens used to construct self
source§impl Visitable for NumberStructure
impl Visitable for NumberStructure
fn visit<TData>( &self, _visitors: &mut (impl VisitorReceiver<TData> + ?Sized), _data: &mut TData, _settings: &VisitSettings, _chain: &mut Annex<'_, Chain> )
fn visit_mut<TData>( &mut self, _visitors: &mut (impl VisitorMutReceiver<TData> + ?Sized), _data: &mut TData, _settings: &VisitSettings, _chain: &mut Annex<'_, Chain> )
impl Copy for NumberStructure
impl Eq for NumberStructure
Auto Trait Implementations§
impl RefUnwindSafe for NumberStructure
impl Send for NumberStructure
impl Sync for NumberStructure
impl Unpin for NumberStructure
impl UnwindSafe for NumberStructure
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