From 22bec9ff40ab29a2baf49a59cf61ad8b25ab91b9 Mon Sep 17 00:00:00 2001 From: PaddiM8 Date: Wed, 22 Sep 2021 15:04:21 +0200 Subject: [PATCH] Fixed tick symbol resulting in panic --- kalk/src/parser.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kalk/src/parser.rs b/kalk/src/parser.rs index 3496910..cf126be 100644 --- a/kalk/src/parser.rs +++ b/kalk/src/parser.rs @@ -699,7 +699,11 @@ fn parse_identifier(context: &mut Context) -> Result { } } - split_into_variables(context, &identifier) + if identifier.pure_name.len() > 1 { + split_into_variables(context, &identifier) + } else { + Err(CalcError::UndefinedVar(identifier.full_name)) + } } }