Some work on Expression and Operand.
This commit is contained in:
1 parent
ea3d1a7ad0
commit
8475ef01d1
6 files changed
+96
-18
No files matched your search
@@ -1,4 +1,3 @@
|
||||
|
||||
#include "__if.h"
|
||||
#include "Exception.h"
|
||||
#include <iostream>
|
||||
@@ -15,11 +14,12 @@ namespace jet {
|
||||
throw coreutils::Exception("Either value1 or expr can be specified but not both.");
|
||||
if(variableDefined("value2")) {
|
||||
if(variableDefined("type")) {
|
||||
result = "true";
|
||||
result = Expression(variables["expr"]);
|
||||
} else
|
||||
throw coreutils::Exception("type expected if value1 and value2 specified.");
|
||||
} else
|
||||
throw coreutils::Exception("value2 required if value1 specified.");
|
||||
std::cout << variables["value1"].str() << "' and value2 '" << variables["value2"].str() << "' comparison" << std::endl;
|
||||
} else if(variableDefined("expr")) {
|
||||
if(variableDefined("value2"))
|
||||
throw coreutils::Exception("value2 should not be specified with expr.");
|
||||
|
||||
Reference in new issue
Block a user