aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/diceparser.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2017-12-14 00:50:04 +0100
committerRenaud G <renaud@rolisteam.org>2018-01-11 18:37:00 +0100
commit592c8271364fee6471be333dccbcf30cad9e3655 (patch)
tree22377e4036260964fe81aa5151826216af9098c5 /diceparser.cpp
parente9b3545b597dcadeafcc749f3e9bc06f9e92b695 (diff)
downloadOneRoll-592c8271364fee6471be333dccbcf30cad9e3655.tar.gz
OneRoll-592c8271364fee6471be333dccbcf30cad9e3655.zip
-Fix comment
Diffstat (limited to 'diceparser.cpp')
-rw-r--r--diceparser.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/diceparser.cpp b/diceparser.cpp
index 2db7bcd..4337c46 100644
--- a/diceparser.cpp
+++ b/diceparser.cpp
@@ -230,6 +230,7 @@ bool DiceParser::readExpression(QString& str,ExecutionNode* & node)
{
operandNode= ParsingToolBox::getLatestNode(operandNode);
};
+ return true;
}
else if(readCommand(str,operandNode))
{
@@ -264,12 +265,7 @@ bool DiceParser::readExpression(QString& str,ExecutionNode* & node)
return false;
}
}
- if(m_parsingToolbox->readComment(str,result,comment))
- {
- m_command.remove(comment);
- m_comment = result;
- }
- return true;
+ return false;
}
bool DiceParser::readOptionFromNull(QString& str,ExecutionNode* & node)
{
@@ -845,6 +841,13 @@ bool DiceParser::readInstructionList(QString& str)
}
else
{
+ QString result;
+ QString comment;
+ if(m_parsingToolbox->readComment(str,result,comment))
+ {
+ m_command.remove(comment);
+ m_comment = result;
+ }
readInstruction = false;
}
}
@@ -884,7 +887,7 @@ bool DiceParser::readOperator(QString& str,ExecutionNode* previous)
{
parent = nodeExecOrChild;
nodeExecOrChild = nodeExecOrChild->getNextNode();
- qDebug() << node->getPriority() << nodeExecOrChild->getPriority() << "###########";
+ //qDebug() << node->getPriority() << nodeExecOrChild->getPriority() << "###########";
}
// management of operator priority
if((nullptr != nodeExecOrChild)&&(nodeExec != nodeExecOrChild))