mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-13 18:10:42 +01:00
Fixed panic for parenthesis-less function calls
This commit is contained in:
parent
7b0435d3ec
commit
1273206d6a
@ -387,17 +387,21 @@ fn build_fn_call(
|
|||||||
|
|
||||||
new_arguments
|
new_arguments
|
||||||
}
|
}
|
||||||
Expr::Group(argument) => {
|
_ => {
|
||||||
|
let argument = if let Expr::Group(argument) = adjacent_expr {
|
||||||
|
*argument
|
||||||
|
} else {
|
||||||
|
adjacent_expr
|
||||||
|
};
|
||||||
if let Some(log_base) = log_base {
|
if let Some(log_base) = log_base {
|
||||||
return Ok(Expr::FnCall(
|
return Ok(Expr::FnCall(
|
||||||
Identifier::from_full_name("log"),
|
Identifier::from_full_name("log"),
|
||||||
vec![analyse_expr(context, *argument)?, log_base],
|
vec![analyse_expr(context, argument)?, log_base],
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
vec![analyse_expr(context, *argument)?]
|
vec![analyse_expr(context, argument)?]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => unreachable!(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if is_integral {
|
if is_integral {
|
||||||
|
Loading…
Reference in New Issue
Block a user