diff options
| -rw-r--r-- | HelpMe.md | 1 | ||||
| -rw-r--r-- | diceparser.cpp | 5 | ||||
| -rw-r--r-- | node/executionnode.h | 2 |
3 files changed, 5 insertions, 3 deletions
@@ -73,6 +73,7 @@ The dice list is sorted in descending order. > 10d6sl Roll 6 dice at 6 faces and then sort them ascendingly + ### Counter > 3D10c[Validator] diff --git a/diceparser.cpp b/diceparser.cpp index 4f0645e..1ab5e30 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -172,13 +172,14 @@ bool DiceParser::parseLine(QString str) } } - if(m_errorMap.isEmpty()) + if((m_errorMap.isEmpty())&&(NULL!=newNode)) { return true; } else { - return false; + m_errorMap.insert(ExecutionNode::NOTHING_UNDERSTOOD,QObject::tr("Nothing was understood")); + return false; } } diff --git a/node/executionnode.h b/node/executionnode.h index 834b062..39d714b 100644 --- a/node/executionnode.h +++ b/node/executionnode.h @@ -9,7 +9,7 @@ class ExecutionNode { public: - enum ERROR_CODE {NO_ERROR,DIE_RESULT_EXPECTED,BAD_SYNTAXE,ENDLESS_LOOP_ERROR,DIVIDE_BY_ZERO}; + enum ERROR_CODE {NO_ERROR,DIE_RESULT_EXPECTED,BAD_SYNTAXE,ENDLESS_LOOP_ERROR,DIVIDE_BY_ZERO,NOTHING_UNDERSTOOD}; /** * @brief ExecutionNode */ |