From 35bcbdc7d2974c2a8d2a76225016c51b47177861 Mon Sep 17 00:00:00 2001 From: "Renaud G." Date: Mon, 6 Jul 2015 12:52:38 +0200 Subject: Update HelpMe.md Fix counter display --- HelpMe.md | 1 + 1 file changed, 1 insertion(+) diff --git a/HelpMe.md b/HelpMe.md index 42260b7..a1bffbc 100644 --- a/HelpMe.md +++ b/HelpMe.md @@ -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] -- cgit v1.2.3-70-g09d2 From 775897c44bb8ff27733598dfad9733afb98143d0 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Wed, 8 Jul 2015 08:13:43 +0200 Subject: add error of type: nothing understood --- node/executionnode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- cgit v1.2.3-70-g09d2 From 9dade3a68ffa28a681701dcd7d4d1bc0d136e3b0 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Wed, 8 Jul 2015 08:14:14 +0200 Subject: add management of understood commands --- diceparser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/diceparser.cpp b/diceparser.cpp index 570c96b..4a972d6 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; } } -- cgit v1.2.3-70-g09d2