aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/parsingtoolbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parsingtoolbox.cpp')
-rw-r--r--parsingtoolbox.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/parsingtoolbox.cpp b/parsingtoolbox.cpp
index f792d7a..8bd52b7 100644
--- a/parsingtoolbox.cpp
+++ b/parsingtoolbox.cpp
@@ -24,6 +24,7 @@
#include "parsingtoolbox.h"
#include "node/sortresult.h"
+
QHash<QString,QString>* ParsingToolBox::m_variableHash = NULL;
ParsingToolBox::ParsingToolBox()
@@ -199,6 +200,22 @@ Validator* ParsingToolBox::readValidator(QString& str)
}
return returnVal;
}
+IfNode::ConditionType ParsingToolBox::readConditionType(QString& str)
+{
+ IfNode::ConditionType type = IfNode::OnEach;
+ if(str.startsWith('.'))
+ {
+ str=str.remove(0,1);
+ type = IfNode::OneOfThem;
+ }
+ else if(str.startsWith('*'))
+ {
+ str=str.remove(0,1);
+ type = IfNode::AllOfThem;
+ }
+ return type;
+}
+
Validator* ParsingToolBox::readCompositeValidator(QString& str)
{
bool expectSquareBrasket=false;