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