Implement structures

This commit is contained in:
Jeff 2024-01-04 21:12:45 -05:00
parent 84cb17e75c
commit 2a7988f9a6
2 changed files with 5 additions and 8 deletions

View File

@ -1,11 +1,11 @@
dictionary = {
Info = struct {
dust = "awesome"
answer = 42
}
output(
'Dust is '
+ dictionary:dust
+ Info:dust
+ '! The answer is '
+ dictionary:answer
+ Info:answer
)

View File

@ -51,17 +51,14 @@ impl AbstractTree for FunctionCall {
let get_type = variables.get(identifier.inner());
if let Some((_, r#type)) = get_type {
r#type
r#type.clone()
} else {
return Err(Error::FunctionIdentifierNotFound(
identifier.inner().clone(),
));
}
}
FunctionExpression::FunctionCall(_) => todo!(),
FunctionExpression::Value(_) => todo!(),
FunctionExpression::Index(_) => todo!(),
FunctionExpression::Yield(_) => todo!(),
function_expression => function_expression.expected_type(context)?,
};
let parameter_types = if let Type::Function {
parameter_types, ..