From 45b0f4be2d098d8790574fe83ed2e6ca3090ddf2 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Fri, 10 May 2024 16:55:44 +0300 Subject: [PATCH] origin value --- src/logic/CommandsInterpreter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/logic/CommandsInterpreter.cpp b/src/logic/CommandsInterpreter.cpp index 8aa28cdf..da8e6957 100644 --- a/src/logic/CommandsInterpreter.cpp +++ b/src/logic/CommandsInterpreter.cpp @@ -295,11 +295,13 @@ public: while (hasNext()) { bool relative = false; + dynamic::Value value = dynamic::NONE; if (peek() == '~') { relative = true; + value = 0; nextChar(); } - dynamic::Value value = dynamic::NONE; + if (hasNext() && peekNoJump() != ' ') { value = parseValue(); @@ -317,6 +319,9 @@ public: if (arg == nullptr) { throw error("extra positional argument"); } + if (arg->origin.index() && relative) { + break; + } } while (!typeCheck(arg, value)); if (relative) {