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

+2 -4
View File
@@ -39,8 +39,7 @@ namespace jet {
throw coreutils::Exception("type should not be specified with expr.");
exprMethod = true;
exprSaved = variables["expr"];
resolveKeyword("expr");
booleanResult = Operand(variables["expr"]).boolean;
booleanResult = Operand(variables["expr"], global, parent->variables).boolean;
}
while(booleanResult) {
processContainer(container);
@@ -48,8 +47,7 @@ namespace jet {
if(exprMethod) {
variables["expr"].reset();
variables["expr"] = exprSaved;
resolveKeyword("expr");
booleanResult = Operand(variables["expr"]).boolean;
booleanResult = Operand(variables["expr"], global, parent->variables).boolean;
} else {
booleanResult = false;
int rc = variables["value1"].compare(variables["value2"]);