Clean up
This commit is contained in:
parent
285e9e7217
commit
35eca1f7b4
@ -557,7 +557,7 @@ pub struct Function {
|
|||||||
impl Function {
|
impl Function {
|
||||||
pub fn call(
|
pub fn call(
|
||||||
self,
|
self,
|
||||||
type_arguments: Option<Vec<Type>>,
|
_type_arguments: Option<Vec<Type>>,
|
||||||
value_arguments: Option<Vec<Value>>,
|
value_arguments: Option<Vec<Value>>,
|
||||||
variables: &HashMap<Identifier, Value>,
|
variables: &HashMap<Identifier, Value>,
|
||||||
) -> Result<Option<Value>, VmError<()>> {
|
) -> Result<Option<Value>, VmError<()>> {
|
||||||
|
@ -94,7 +94,7 @@ impl<P: Copy> Vm<P> {
|
|||||||
type_arguments: _,
|
type_arguments: _,
|
||||||
value_arguments: value_nodes,
|
value_arguments: value_nodes,
|
||||||
} => {
|
} => {
|
||||||
let mut values = if let Some(nodes) = value_nodes {
|
let values = if let Some(nodes) = value_nodes {
|
||||||
let mut values = Vec::new();
|
let mut values = Vec::new();
|
||||||
|
|
||||||
for node in nodes {
|
for node in nodes {
|
||||||
@ -119,7 +119,7 @@ impl<P: Copy> Vm<P> {
|
|||||||
Statement::Constant(value) => Ok(Some(value.clone())),
|
Statement::Constant(value) => Ok(Some(value.clone())),
|
||||||
Statement::FunctionCall {
|
Statement::FunctionCall {
|
||||||
function: function_node,
|
function: function_node,
|
||||||
type_arguments: type_parameter_nodes,
|
type_arguments: _,
|
||||||
value_arguments: value_parameter_nodes,
|
value_arguments: value_parameter_nodes,
|
||||||
} => {
|
} => {
|
||||||
let function_position = function_node.position;
|
let function_position = function_node.position;
|
||||||
@ -208,8 +208,8 @@ impl<P: Copy> Vm<P> {
|
|||||||
value,
|
value,
|
||||||
Statement::BuiltInFunctionCall {
|
Statement::BuiltInFunctionCall {
|
||||||
function,
|
function,
|
||||||
type_arguments,
|
type_arguments: _,
|
||||||
value_arguments: mut value_argument_nodes,
|
value_arguments: value_argument_nodes,
|
||||||
},
|
},
|
||||||
) = (left_value, right.statement)
|
) = (left_value, right.statement)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user