aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/parsingtoolbox.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2016-11-28 00:36:15 +0100
committerRenaud G <renaud@rolisteam.org>2016-11-28 00:36:15 +0100
commit13e297604b00615d47352538e3c82ea1ac700d4c (patch)
tree567efe03594d261831897f03a7821c4c6eeac59b /parsingtoolbox.cpp
parentcdd1716bd1aa8d9bbd0137aa98ff24867b6b3a0e (diff)
downloadOneRoll-13e297604b00615d47352538e3c82ea1ac700d4c.tar.gz
OneRoll-13e297604b00615d47352538e3c82ea1ac700d4c.zip
-Add API for copying a branch of execution node.
-Allow to use if node several times.
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;