diff options
| author | 2015-07-09 00:05:07 +0200 | |
|---|---|---|
| committer | 2015-07-09 00:05:07 +0200 | |
| commit | 933c19b4d9208eafa7cb25816a5da096b0e75e81 (patch) | |
| tree | 53221d89e2d41e1ef82a3d310aac654d0904463f | |
| parent | 9472944c0603c4e28e94b1fdf16b077bea4c63da (diff) | |
| parent | 9f72316b05176c7d94be1289880731b4311131c2 (diff) | |
| download | OneRoll-933c19b4d9208eafa7cb25816a5da096b0e75e81.tar.gz OneRoll-933c19b4d9208eafa7cb25816a5da096b0e75e81.zip | |
Merge branch 'master' of github.com:obiwankennedy/DiceParser
| -rw-r--r-- | diceparser.cpp | 5 | ||||
| -rw-r--r-- | node/executionnode.h | 2 |
2 files changed, 4 insertions, 3 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; } } 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 */ |