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