Finished up the keyword resolution issue and fixed for, while and until. Other tags still need work.

This commit is contained in:
brad Arant committed 2024-11-10 18:45:12 -08:00
1 parent 93a520f152
commit 6da620971e
8 files changed
+61 -47

No files matched your search

+9 -5
View File
@@ -10,6 +10,7 @@ namespace jet {
coreutils::MString result;
bool booleanResult = false;
bool exprMethod = false;
coreutils::MString exprSaved;
if(variableDefined("value1")) {
@@ -37,15 +38,18 @@ namespace jet {
if(variableDefined("type"))
throw coreutils::Exception("type should not be specified with expr.");
exprMethod = true;
exprSaved = variables["expr"];
resolveKeyword("expr");
booleanResult = Operand(variables["expr"]).boolean;
}
while(booleanResult) {
while(booleanResult) {
processContainer(container);
container.reset();
if(exprMethod) {
variables["expr"].reset();
booleanResult = Operand(variables["expr"]).boolean;
if(exprMethod) {
variables["expr"].reset();
variables["expr"] = exprSaved;
resolveKeyword("expr");
booleanResult = Operand(variables["expr"]).boolean;
} else {
booleanResult = false;
int rc = variables["value1"].compare(variables["value2"]);