attempt at getting variables to work.

This commit is contained in:
Brad Arant committed 2024-02-16 15:44:03 -08:00
1 parent 59fe0d5bd6
commit 50270bbc91
8 files changed
+41 -35

No files matched your search

+7 -7
View File
@@ -6,20 +6,20 @@ namespace jet {
__while::__while(coreutils::ZString &in, coreutils::MString &out, Global &global) : Tag(in, out, global) {
if(keywordExists(coreutils::ZString("value1"))) {
if(keywordExists(coreutils::ZString("expr")))
if(variableDefined(coreutils::ZString("value1"))) {
if(variableDefined(coreutils::ZString("expr")))
throw coreutils::Exception("Either value1 or expr can be specified but not both.");
if(keywordExists(coreutils::ZString("value2"))) {
if(keywordExists(coreutils::ZString("type"))) {
if(variableDefined(coreutils::ZString("value2"))) {
if(variableDefined(coreutils::ZString("type"))) {
// process here
} else
throw coreutils::Exception("type expected if value1 and value2 specified.");
} else
throw coreutils::Exception("value2 required if value1 specified.");
} else if(keywordExists(coreutils::ZString("expr"))) {
if(keywordExists(coreutils::ZString("value2")))
} else if(variableDefined(coreutils::ZString("expr"))) {
if(variableDefined(coreutils::ZString("value2")))
throw coreutils::Exception("value2 should not be specified with expr.");
if(keywordExists(coreutils::ZString("type")))
if(variableDefined(coreutils::ZString("type")))
throw coreutils::Exception("type should not be specified with expr.");
// process here
}