Enum ucglib::ast::Value [−][src]
pub enum Value {
Empty(Position),
Boolean(Positioned<bool>),
Int(Positioned<i64>),
Float(Positioned<f64>),
Str(Positioned<String>),
Symbol(Positioned<String>),
Tuple(Positioned<FieldList>),
List(ListDef),
Selector(SelectorDef),
}Represents a Value in the UCG parsed AST.
Variants
Empty(Position)Boolean(Positioned<bool>)Int(Positioned<i64>)Float(Positioned<f64>)Str(Positioned<String>)Symbol(Positioned<String>)Tuple(Positioned<FieldList>)List(ListDef)Selector(SelectorDef)
Methods
impl Value[src]
impl Valuepub fn type_name(&self) -> String[src]
pub fn type_name(&self) -> StringReturns the type name of the Value it is called on as a string.
pub fn to_string(&self) -> String[src]
pub fn to_string(&self) -> StringReturns a stringified version of the Value.
pub fn pos(&self) -> &Position[src]
pub fn pos(&self) -> &PositionReturns the position for a Value.
pub fn type_equal(&self, target: &Self) -> bool[src]
pub fn type_equal(&self, target: &Self) -> boolReturns true if called on a Value that is the same type as itself.
Trait Implementations
impl Debug for Value[src]
impl Debug for Valuefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Value[src]
impl PartialEq for Valuefn eq(&self, other: &Value) -> bool[src]
fn eq(&self, other: &Value) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Value) -> bool[src]
fn ne(&self, other: &Value) -> boolThis method tests for !=.
impl Clone for Value[src]
impl Clone for Value