aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/diceparser.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2018-12-15 16:02:07 +0100
committerRenaud G <renaud@rolisteam.org>2018-12-15 16:02:07 +0100
commitb18145b6e97714fc093a261984b4248acb370151 (patch)
treedf873fff737954305bdc5c575fd454b1cd5d7490 /diceparser.cpp
parent20a3f37a66a5dc4bd1bd359cad2a7d6870061fc6 (diff)
downloadOneRoll-b18145b6e97714fc093a261984b4248acb370151.tar.gz
OneRoll-b18145b6e97714fc093a261984b4248acb370151.zip
Small modification to validate tests.
Diffstat (limited to 'diceparser.cpp')
-rw-r--r--diceparser.cpp5
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;