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§impl PartialOrd for NodeValueLiteral
impl PartialOrd for NodeValueLiteral
impl Eq for NodeValueLiteral
impl StructuralPartialEq for NodeValueLiteral
Auto Trait Implementations§
impl Freeze for NodeValueLiteral
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