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

+8 -8
View File
@@ -9,22 +9,22 @@ namespace jet {
coreutils::MString result;
if(keywordExists("value1")) {
if(keywordExists("expr"))
if(variableDefined("value1")) {
if(variableDefined("expr"))
throw coreutils::Exception("Either value1 or expr can be specified but not both.");
if(keywordExists("value2")) {
if(keywordExists("type")) {
if(variableDefined("value2")) {
if(variableDefined("type")) {
} else
throw coreutils::Exception("type expected if value1 and value2 specified.");
} else
throw coreutils::Exception("value2 required if value1 specified.");
} else if(keywordExists("expr")) {
if(keywordExists("value2"))
} else if(variableDefined("expr")) {
if(variableDefined("value2"))
throw coreutils::Exception("value2 should not be specified with expr.");
if(keywordExists("type"))
if(variableDefined("type"))
throw coreutils::Exception("type should not be specified with expr.");
result = Expression(keywords["expr"]);
result = Expression(variables["expr"]);
std::cout << "result1: " << result << std::endl;
}
std::cout << "result2: " << result << std::endl;