pub enum NodeFullExpression {
LocalVariableDeclaration {
identifier_name: WithMetaData<String>,
expression: Box<WithMetaData<NodeFullExpression>>,
type_annotation: Option<WithMetaData<NodeTypeAnnotation>>,
containing_expression: Box<WithMetaData<NodeFullExpression>>,
},
FunctionDeclaration {
identier_value: WithMetaData<String>,
type_annotation: WithMetaData<NodeTypeAnnotation>,
expression: Box<WithMetaData<NodeFullExpression>>,
},
FunctionCall {
function_name: WithMetaData<NodeVariableIdentifier>,
argument_list: Vec<WithMetaData<NodeVariableIdentifier>>,
},
ExpressionAtomic(Box<WithMetaData<NodeAtomicExpression>>),
ExpressionBuiltin {
b: WithMetaData<String>,
targs: Option<WithMetaData<NodeContractTypeArguments>>,
xs: WithMetaData<NodeBuiltinArguments>,
},
Message(Vec<WithMetaData<NodeMessageEntry>>),
Match {
match_expression: WithMetaData<NodeVariableIdentifier>,
clauses: Vec<WithMetaData<NodePatternMatchExpressionClause>>,
},
ConstructorCall {
identifier_name: WithMetaData<NodeMetaIdentifier>,
contract_type_arguments: Option<WithMetaData<NodeContractTypeArguments>>,
argument_list: Vec<WithMetaData<NodeVariableIdentifier>>,
},
TemplateFunction {
identifier_name: WithMetaData<String>,
expression: Box<WithMetaData<NodeFullExpression>>,
},
TApp {
identifier_name: WithMetaData<NodeVariableIdentifier>,
type_arguments: Vec<WithMetaData<NodeTypeArgument>>,
},
}
Expand description
NodeFullExpression represents a full expression node in the AST
Variants§
LocalVariableDeclaration
Represents a local variable declaration
Example: let x = "variable";
Fields
identifier_name: WithMetaData<String>
expression: Box<WithMetaData<NodeFullExpression>>
type_annotation: Option<WithMetaData<NodeTypeAnnotation>>
containing_expression: Box<WithMetaData<NodeFullExpression>>
FunctionDeclaration
Represents a function declaration
Example: let f = fun (arg : ArgType) => arg;
Fields
identier_value: WithMetaData<String>
type_annotation: WithMetaData<NodeTypeAnnotation>
expression: Box<WithMetaData<NodeFullExpression>>
FunctionCall
Represents a function call
Example: f(arg);
Fields
function_name: WithMetaData<NodeVariableIdentifier>
argument_list: Vec<WithMetaData<NodeVariableIdentifier>>
ExpressionAtomic(Box<WithMetaData<NodeAtomicExpression>>)
Represents an atomic expression
Example: let x = "atomic";
ExpressionBuiltin
Represents a built-in expression
Example: let x = builtin f arg;
Message(Vec<WithMetaData<NodeMessageEntry>>)
Represents a message
Example: msg = { _tag : "tag", _recipient : "0x123", _amount : "0", param : "value" };
Match
Represents a match expression
Example: match x with | Nil => "nil" | Cons a b => "cons" end
Fields
match_expression: WithMetaData<NodeVariableIdentifier>
clauses: Vec<WithMetaData<NodePatternMatchExpressionClause>>
ConstructorCall
Represents a constructor call
Example: let x = CustomType arg;
Fields
identifier_name: WithMetaData<NodeMetaIdentifier>
contract_type_arguments: Option<WithMetaData<NodeContractTypeArguments>>
argument_list: Vec<WithMetaData<NodeVariableIdentifier>>
TemplateFunction
Represents a template function
Example: let x = tfun 'A => fun (arg : 'A) => arg;
TApp
Represents a type application
Example: let x = @CustomType arg;
Fields
identifier_name: WithMetaData<NodeVariableIdentifier>
type_arguments: Vec<WithMetaData<NodeTypeArgument>>
Trait Implementations§
Source§impl AstVisitor for NodeFullExpression
impl AstVisitor for NodeFullExpression
fn visit( &self, emitter: &mut dyn AstConverting, ) -> Result<TraversalResult, String>
Source§impl Clone for NodeFullExpression
impl Clone for NodeFullExpression
Source§fn clone(&self) -> NodeFullExpression
fn clone(&self) -> NodeFullExpression
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more