From 2a7c403c5667017f62fa118f79e36dd10ddb8c36 Mon Sep 17 00:00:00 2001 From: bakk Date: Mon, 24 May 2021 22:32:33 +0200 Subject: [PATCH] Support syntax like sin2x --- kalk/src/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalk/src/parser.rs b/kalk/src/parser.rs index 3572568..10e893b 100644 --- a/kalk/src/parser.rs +++ b/kalk/src/parser.rs @@ -504,7 +504,7 @@ fn parse_identifier(context: &mut Context) -> Result { { // If there is a function with this name, parse it as a function, with the next token as the argument. if context.symbol_table.contains_fn(&identifier.pure_name) { - let parameter = parse_primary(context)?; + let parameter = parse_factor(context)?; return Ok(Expr::FnCall(identifier, vec![parameter])); } }