Enum scilla_parser::ast::nodes::NodeValueLiteral
source · pub enum NodeValueLiteral {
LiteralInt(WithMetaData<NodeTypeNameIdentifier>, WithMetaData<String>),
LiteralHex(WithMetaData<String>),
LiteralString(WithMetaData<String>),
LiteralEmptyMap(WithMetaData<NodeTypeMapKey>, WithMetaData<NodeTypeMapValue>),
}Expand description
NodeValueLiteral represents a value literal node in the AST It can either be a LiteralInt, LiteralHex, LiteralString or LiteralEmptyMap
Variants§
LiteralInt(WithMetaData<NodeTypeNameIdentifier>, WithMetaData<String>)
Represents a literal integer
Example: let x = 10;
LiteralHex(WithMetaData<String>)
Represents a literal hexadecimal
Example: let x = 0x123;
LiteralString(WithMetaData<String>)
Represents a literal string
Example: let x = "string";
LiteralEmptyMap(WithMetaData<NodeTypeMapKey>, WithMetaData<NodeTypeMapValue>)
Represents a literal empty map
Example: let x: Map (KeyType, ValueType) = Emp;
Trait Implementations§
source§impl AstVisitor for NodeValueLiteral
impl AstVisitor for NodeValueLiteral
fn visit( &self, emitter: &mut dyn AstConverting ) -> Result<TraversalResult, String>
source§impl Clone for NodeValueLiteral
impl Clone for NodeValueLiteral
source§fn clone(&self) -> NodeValueLiteral
fn clone(&self) -> NodeValueLiteral
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for NodeValueLiteral
impl Debug for NodeValueLiteral
source§impl PartialEq for NodeValueLiteral
impl PartialEq for NodeValueLiteral
source§fn eq(&self, other: &NodeValueLiteral) -> bool
fn eq(&self, other: &NodeValueLiteral) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for NodeValueLiteral
impl PartialOrd for NodeValueLiteral
source§fn partial_cmp(&self, other: &NodeValueLiteral) -> Option<Ordering>
fn partial_cmp(&self, other: &NodeValueLiteral) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for NodeValueLiteral
impl StructuralEq for NodeValueLiteral
impl StructuralPartialEq for NodeValueLiteral
Auto Trait Implementations§
impl RefUnwindSafe for NodeValueLiteral
impl Send for NodeValueLiteral
impl Sync for NodeValueLiteral
impl Unpin for NodeValueLiteral
impl UnwindSafe for NodeValueLiteral
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more