Enum js::syntax::ast::constant::Const[src]

pub enum Const {
    CString(String),
    CRegExp(String, bool, bool),
    CNum(f64),
    CInt(i32),
    CBool(bool),
    CNull,
    CUndefined,
}

A Javascript constant

Variants

CString

A UTF-8 string, such as "Hello, world"

CRegExp

A regular expression, such as /where('s| is) [wW]ally/

CNum

A 64-bit floating-point number, such as 3.1415

CInt

A 32-bit integer, such as 42

CBool

A boolean, which is either true or false and is used to check if criteria are met

CNull

The null value, which represents a non-existant value

CUndefined

The undefined value, which represents a field or index that doesn't exist

Trait Implementations

impl Show for Const

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl PartialEq for Const

fn eq(&self, __arg_0: &Const) -> bool

fn ne(&self, __arg_0: &Const) -> bool

impl Clone for Const

fn clone(&self) -> Const

fn clone_from(&mut self, source: &Self)