origin value

This commit is contained in:
MihailRis 2024-05-10 16:55:44 +03:00
parent 88d0553eda
commit 45b0f4be2d

View File

@ -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) {