diff options
| author | 2018-12-15 16:02:07 +0100 | |
|---|---|---|
| committer | 2018-12-15 16:02:07 +0100 | |
| commit | b18145b6e97714fc093a261984b4248acb370151 (patch) | |
| tree | df873fff737954305bdc5c575fd454b1cd5d7490 /diceparser.cpp | |
| parent | 20a3f37a66a5dc4bd1bd359cad2a7d6870061fc6 (diff) | |
| download | OneRoll-b18145b6e97714fc093a261984b4248acb370151.tar.gz OneRoll-b18145b6e97714fc093a261984b4248acb370151.zip | |
Small modification to validate tests.
Diffstat (limited to 'diceparser.cpp')
| -rw-r--r-- | diceparser.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/diceparser.cpp b/diceparser.cpp index c65ef74..04e9af6 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -181,6 +181,9 @@ bool DiceParser::parseLine(QString str, bool allowAlias) m_warningMap.insert(ExecutionNode::UNEXPECTED_CHARACTER,QObject::tr("Unexpected character at %1 - end of command was ignored \"%2\"").arg(i).arg(str)); } + if(!m_errorMap.isEmpty()) + value = false; + return value; } @@ -812,6 +815,7 @@ bool DiceParser::readCommand(QString& str,ExecutionNode* & node) { if(str== QLatin1String("help")) { + str=str.remove(0,QLatin1String("help").size()); HelpNode* help = new HelpNode(); if(!m_helpPath.isEmpty()) { @@ -822,6 +826,7 @@ bool DiceParser::readCommand(QString& str,ExecutionNode* & node) } else if(str== QLatin1String("la")) { + str=str.remove(0,QLatin1String("la").size()); node = new ListAliasNode(m_aliasList); } return true; |