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

pub enum Const {
    String(Box<str>),
    Num(f64),
    Int(i32),
    BigInt(BigInt),
    Bool(bool),
    Null,
    Undefined,
}

Literals represent values in JavaScript.

These are fixed values not variables that you literally provide in your script.

More information:

Variants

String(Box<str>)

A string literal is zero or more characters enclosed in double (") or single (') quotation marks.

A string must be delimited by quotation marks of the same type (that is, either both single quotation marks, or both double quotation marks). You can call any of the String object's methods on a string literal value. JavaScript automatically converts the string literal to a temporary String object, calls the method, then discards the temporary String object.

More information:

Num(f64)

A floating-point number literal.

The exponent part is an "e" or "E" followed by an integer, which can be signed (preceded by "+" or "-"). A floating-point literal must have at least one digit, and either a decimal point or "e" (or "E").

More information:

Int(i32)

Integer types can be expressed in decimal (base 10), hexadecimal (base 16), octal (base 8) and binary (base 2).

More information:

BigInt(BigInt)

BigInt provides a way to represent whole numbers larger than the largest number JavaScript can reliably represent with the Number primitive.

More information:

Bool(bool)

The Boolean type has two literal values: true and false.

The Boolean object is a wrapper around the primitive Boolean data type.

More information:

Null

In JavaScript, null is marked as one of the primitive values, cause it's behaviour is seemingly primitive.

In computer science, a null value represents a reference that points, generally intentionally, to a nonexistent or invalid object or address. The meaning of a null reference varies among language implementations.

More information:

Undefined

The undefined is a primitive value automatically assigned to variables that have just been declared, or to formal arguments for which there are no actual arguments.

More information:

Trait Implementations

impl Clone for Const[src]

impl Debug for Const[src]

impl Display for Const[src]

impl Drop for Const[src]

impl Finalize for Const[src]

impl From<&'_ String> for Const[src]

impl From<&'_ str> for Const[src]

impl From<BigInt> for Const[src]

impl From<Box<str, Global>> for Const[src]

impl From<Const> for Node[src]

impl From<String> for Const[src]

impl From<bool> for Const[src]

impl From<f64> for Const[src]

impl From<i32> for Const[src]

impl PartialEq<Const> for Const[src]

impl StructuralPartialEq for Const[src]

impl Trace for Const[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> NativeObject for T where
    T: Any + Debug + Trace
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,