OPerand now does its own expression parsing.

This commit is contained in:
brad Arant committed 2024-11-16 10:23:16 -08:00
1 parent 4d016197d2
commit 839f7e2eb8
11 files changed
+120 -115

No files matched your search

+3 -4
View File
@@ -24,13 +24,12 @@ namespace jet {
resolveKeyword("name");
if(variableDefined("expr")) {
resolveKeyword("expr");
if(!variableDefined("scope") || (variables["scope"] == "global"))
global.variables[variables["name"]] = Operand(variables["expr"]).string;
global.variables[variables["name"]] = Operand(variables["expr"], global, parent->variables).string;
else if(variables["scope"] == "local")
parent->variables[variables["name"]] = Operand(variables["expr"]).string;
parent->variables[variables["name"]] = Operand(variables["expr"], global, parent->variables).string;
else if(variables["scope"] == "parent")
parent->parent->variables[variables["name"]] = Operand(variables["expr"]).string;
parent->parent->variables[variables["name"]] = Operand(variables["expr"], global, parent->variables).string;
} else if(hasContainer) {
processContainer(container);
if(evaluate) {