From 592c8271364fee6471be333dccbcf30cad9e3655 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 14 Dec 2017 00:50:04 +0100 Subject: -Fix comment --- diceparser.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'diceparser.cpp') 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)) -- cgit v1.2.3-70-g09d2