Initial repository commit.
This commit is contained in:
commit
fce97e04ff
21 files changed
+613
No files matched your search
@@ -0,0 +1,33 @@
|
||||
#include "__if.h"
|
||||
#include "Exception.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace jet {
|
||||
|
||||
__if::__if(coreutils::ZString &in, coreutils::MString &out) : Tag(in, out) {
|
||||
|
||||
if(keywordExists(coreutils::ZString("value1"))) {
|
||||
if(keywordExists(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"))) {
|
||||
// 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")))
|
||||
throw coreutils::Exception("value2 should not be specified with expr.");
|
||||
if(keywordExists(coreutils::ZString("type")))
|
||||
throw coreutils::Exception("type should not be specified with expr.");
|
||||
// process here
|
||||
}
|
||||
|
||||
if(true) {
|
||||
parseContainer(container);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user