[−][src]Enum ucglib::build::ir::Val
The Intermediate representation of a compiled UCG AST.
Variants
Empty
Boolean(bool)
Int(i64)
Float(f64)
Str(String)
List(Vec<Rc<Val>>)
Tuple(Vec<(PositionedItem<String>, Rc<Val>)>)
Env(Vec<(String, String)>)
Macro(MacroDef)
Module(ModuleDef)
Methods
impl Val
[src]
impl Val
pub fn type_name(&self) -> String | [src] |
Returns the Type of a Val as a string.
pub fn type_equal(&self, target: &Self) -> bool | [src] |
Returns true if called with a Val of the same type as itself.
pub fn equal(&self, target: &Self, pos: Position) -> Result<bool, BuildError> | [src] |
pub fn get_fields(&self) -> Option<&Vec<(PositionedItem<String>, Rc<Val>)>> | [src] |
Returns the fields if this Val is a tuple. None otherwise.
pub fn is_int(&self) -> bool | [src] |
pub fn is_empty(&self) -> bool | [src] |
pub fn is_float(&self) -> bool | [src] |
pub fn is_string(&self) -> bool | [src] |
pub fn is_tuple(&self) -> bool | [src] |
pub fn is_env(&self) -> bool | [src] |
pub fn is_list(&self) -> bool | [src] |
pub fn is_bool(&self) -> bool | [src] |
pub fn is_macro(&self) -> bool | [src] |
pub fn is_str(&self) -> bool | [src] |
pub fn is_module(&self) -> bool | [src] |
Trait Implementations
impl From<Val> for String
[src]
impl From<Val> for String
impl From<String> for Val
[src]
impl From<String> for Val
impl PartialEq<Val> for Val
[src]
impl PartialEq<Val> for Val
impl Clone for Val
[src]
impl Clone for Val
fn clone(&self) -> Val | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl Debug for Val
[src]
impl Debug for Val
impl Display for Val
[src]
impl Display for Val
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |