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 Value
pub fn type_name(&self) -> String
[src]
pub fn type_name(&self) -> String
Returns 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) -> String
Returns a stringified version of the Value.
pub fn pos(&self) -> &Position
[src]
pub fn pos(&self) -> &Position
Returns the position for a Value.
pub fn type_equal(&self, target: &Self) -> bool
[src]
pub fn type_equal(&self, target: &Self) -> bool
Returns true if called on a Value that is the same type as itself.
Trait Implementations
impl Debug for Value
[src]
impl Debug for Value
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Value
[src]
impl PartialEq for Value
fn eq(&self, other: &Value) -> bool
[src]
fn eq(&self, other: &Value) -> bool
This 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) -> bool
This method tests for !=
.
impl Clone for Value
[src]
impl Clone for Value