aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/diceparser.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2020-08-21 22:56:05 +0200
committerRenaud G <renaud@rolisteam.org>2020-08-21 22:58:21 +0200
commit8ee9c4372efce878e817c49b375a8fd904ea5a43 (patch)
tree3c853d74becfefd444bb842805086a7ce68b7fb2 /diceparser.cpp
parentb48e29ad3cc1be1b0ee66b54bf19537a0bfdc782 (diff)
downloadOneRoll-8ee9c4372efce878e817c49b375a8fd904ea5a43.tar.gz
OneRoll-8ee9c4372efce878e817c49b375a8fd904ea5a43.zip
draft to fix repeater node.
Diffstat (limited to 'diceparser.cpp')
-rw-r--r--diceparser.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/diceparser.cpp b/diceparser.cpp
index 44a725a..e32d9e8 100644
--- a/diceparser.cpp
+++ b/diceparser.cpp
@@ -258,36 +258,7 @@ bool DiceParser::hasDiceResult() const
}
bool DiceParser::hasStringResult() const
{
- bool result= false;
- for(auto node : m_parsingToolbox->getStartNodes())
- {
- QVariant var;
- result|= hasResultOfType(Dice::RESULT_TYPE::STRING, node, var);
- }
- return result;
-}
-bool DiceParser::hasResultOfType(Dice::RESULT_TYPE type, ExecutionNode* node, QVariant& value, bool notthelast)
-{
- bool scalarDone= false;
- ExecutionNode* next= ParsingToolBox::getLeafNode(node);
- Result* result= next->getResult();
- while((result != nullptr) && (!scalarDone))
- {
- bool lastResult= false;
- if(notthelast)
- lastResult= (nullptr == result->getPrevious());
-
- if(result->hasResultOfType(type) && !lastResult)
- {
- scalarDone= true;
- value= result->getResult(type);
- }
- result= result->getPrevious();
- }
- return scalarDone;
-=======
return m_parsingToolbox->hasStringResult();
->>>>>>> Rework exporting
}
int DiceParser::startNodeCount() const