pub enum NodeStatement {
Show 16 variants
Load {
left_hand_side: WithMetaData<String>,
right_hand_side: WithMetaData<NodeVariableIdentifier>,
},
RemoteFetch(Box<NodeRemoteFetchStatement>),
Store {
left_hand_side: WithMetaData<String>,
right_hand_side: WithMetaData<NodeVariableIdentifier>,
},
Bind {
left_hand_side: WithMetaData<String>,
right_hand_side: Box<WithMetaData<NodeFullExpression>>,
},
ReadFromBC {
left_hand_side: WithMetaData<String>,
type_name: WithMetaData<NodeTypeNameIdentifier>,
arguments: Option<NodeBlockchainFetchArguments>,
},
MapGet {
left_hand_side: WithMetaData<String>,
keys: Vec<WithMetaData<NodeMapAccess>>,
right_hand_side: WithMetaData<String>,
},
MapGetExists {
left_hand_side: WithMetaData<String>,
keys: Vec<WithMetaData<NodeMapAccess>>,
right_hand_side: WithMetaData<String>,
},
MapUpdate {
left_hand_side: WithMetaData<String>,
keys: Vec<WithMetaData<NodeMapAccess>>,
right_hand_side: WithMetaData<NodeVariableIdentifier>,
},
MapUpdateDelete {
left_hand_side: WithMetaData<String>,
keys: Vec<WithMetaData<NodeMapAccess>>,
},
Accept,
Send {
identifier_name: WithMetaData<NodeVariableIdentifier>,
},
CreateEvnt {
identifier_name: WithMetaData<NodeVariableIdentifier>,
},
Throw {
error_variable: Option<WithMetaData<NodeVariableIdentifier>>,
},
MatchStmt {
variable: WithMetaData<NodeVariableIdentifier>,
clauses: Vec<WithMetaData<NodePatternMatchClause>>,
},
CallProc {
component_id: WithMetaData<NodeComponentId>,
arguments: Vec<WithMetaData<NodeVariableIdentifier>>,
},
Iterate {
identifier_name: WithMetaData<NodeVariableIdentifier>,
component_id: WithMetaData<NodeComponentId>,
},
}
Expand description
NodeStatement represents a statement node in the AST It can be one of many different types of statements
Variants§
Load
Represents a load statement
Example: load x;
RemoteFetch(Box<NodeRemoteFetchStatement>)
Represents a remote fetch statement
Example: fetch x from remote;
Store
Represents a store statement
Example: store x;
Bind
Represents a bind statement
Example: bind x = y;
ReadFromBC
Represents a read from blockchain statement
Example: read x from bc;
Fields
left_hand_side: WithMetaData<String>
type_name: WithMetaData<NodeTypeNameIdentifier>
arguments: Option<NodeBlockchainFetchArguments>
MapGet
Represents a map get statement
Example: get x from map;
Fields
left_hand_side: WithMetaData<String>
keys: Vec<WithMetaData<NodeMapAccess>>
right_hand_side: WithMetaData<String>
MapGetExists
Represents a map get exists statement
Example: get x from map if exists;
Fields
left_hand_side: WithMetaData<String>
keys: Vec<WithMetaData<NodeMapAccess>>
right_hand_side: WithMetaData<String>
MapUpdate
Represents a map update statement
Example: update x in map;
Fields
left_hand_side: WithMetaData<String>
keys: Vec<WithMetaData<NodeMapAccess>>
right_hand_side: WithMetaData<NodeVariableIdentifier>
MapUpdateDelete
Represents a map update delete statement
Example: delete x from map;
Accept
Represents an accept statement
Example: accept;
Send
Represents a send statement
Example: send x;
Fields
identifier_name: WithMetaData<NodeVariableIdentifier>
CreateEvnt
Represents a create event statement
Example: create event x;
Fields
identifier_name: WithMetaData<NodeVariableIdentifier>
Throw
Represents a throw statement
Example: throw x;
Fields
error_variable: Option<WithMetaData<NodeVariableIdentifier>>
MatchStmt
Represents a match statement
Example: match x with | Nil => "nil" | Cons a b => "cons" end
Fields
variable: WithMetaData<NodeVariableIdentifier>
clauses: Vec<WithMetaData<NodePatternMatchClause>>
CallProc
Represents a call procedure statement
Example: call proc x;
Fields
component_id: WithMetaData<NodeComponentId>
arguments: Vec<WithMetaData<NodeVariableIdentifier>>
Iterate
Represents an iterate statement
Example: iterate x over y;
Fields
identifier_name: WithMetaData<NodeVariableIdentifier>
component_id: WithMetaData<NodeComponentId>
Trait Implementations§
Source§impl AstVisitor for NodeStatement
impl AstVisitor for NodeStatement
fn visit( &self, emitter: &mut dyn AstConverting, ) -> Result<TraversalResult, String>
Source§impl Clone for NodeStatement
impl Clone for NodeStatement
Source§fn clone(&self) -> NodeStatement
fn clone(&self) -> NodeStatement
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more