Refactor code flow statements by extracting function call and exit handling methods

This commit is contained in:
Stone_Red
2026-03-05 22:45:03 +01:00
parent 13ef994d8b
commit 276ae421e8
2 changed files with 39 additions and 56 deletions
+2 -1
View File
@@ -126,7 +126,8 @@ internal static partial class Evaluator
string[] parts = input.Split(op);
//Weird fix
// If the expression starts with the operator (e.g. "-3 + 5" split by '-' gives ["", "3 + 5"]),
// prepend the operator back onto the first real part so it isn't lost.
if (parts.Length >= 2 && string.IsNullOrWhiteSpace(parts[0]))
{
parts[1] = $"{op}{parts[1]}";