Implement structures
This commit is contained in:
parent
84cb17e75c
commit
2a7988f9a6
@ -1,11 +1,11 @@
|
|||||||
dictionary = {
|
Info = struct {
|
||||||
dust = "awesome"
|
dust = "awesome"
|
||||||
answer = 42
|
answer = 42
|
||||||
}
|
}
|
||||||
|
|
||||||
output(
|
output(
|
||||||
'Dust is '
|
'Dust is '
|
||||||
+ dictionary:dust
|
+ Info:dust
|
||||||
+ '! The answer is '
|
+ '! The answer is '
|
||||||
+ dictionary:answer
|
+ Info:answer
|
||||||
)
|
)
|
||||||
|
@ -51,17 +51,14 @@ impl AbstractTree for FunctionCall {
|
|||||||
let get_type = variables.get(identifier.inner());
|
let get_type = variables.get(identifier.inner());
|
||||||
|
|
||||||
if let Some((_, r#type)) = get_type {
|
if let Some((_, r#type)) = get_type {
|
||||||
r#type
|
r#type.clone()
|
||||||
} else {
|
} else {
|
||||||
return Err(Error::FunctionIdentifierNotFound(
|
return Err(Error::FunctionIdentifierNotFound(
|
||||||
identifier.inner().clone(),
|
identifier.inner().clone(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FunctionExpression::FunctionCall(_) => todo!(),
|
function_expression => function_expression.expected_type(context)?,
|
||||||
FunctionExpression::Value(_) => todo!(),
|
|
||||||
FunctionExpression::Index(_) => todo!(),
|
|
||||||
FunctionExpression::Yield(_) => todo!(),
|
|
||||||
};
|
};
|
||||||
let parameter_types = if let Type::Function {
|
let parameter_types = if let Type::Function {
|
||||||
parameter_types, ..
|
parameter_types, ..
|
||||||
|
Loading…
Reference in New Issue
Block a user