aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--diceparser.cpp16
-rw-r--r--diceparser.h4
2 files changed, 19 insertions, 1 deletions
diff --git a/diceparser.cpp b/diceparser.cpp
index 91e4af0..2c533dc 100644
--- a/diceparser.cpp
+++ b/diceparser.cpp
@@ -504,6 +504,10 @@ bool DiceParser::readDice(QString& str,ExecutionNode* & node)
node = lsrNode;
return true;
}
+ else
+ {
+ m_errorMap.insert(ExecutionNode::BAD_SYNTAXE,QObject::tr("List is missing after the L operator. Please, add it (e.g : 1L[sword,spear,gun,arrow]"));
+ }
}
}
@@ -762,6 +766,10 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice)
node = countNode;
isFine = true;
}
+ else
+ {
+ m_errorMap.insert(ExecutionNode::BAD_SYNTAXE,QObject::tr("Validator is missing after the c operator. Please, change it"));
+ }
}
break;
case Reroll:
@@ -784,6 +792,10 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice)
}
+ else
+ {
+ m_errorMap.insert(ExecutionNode::BAD_SYNTAXE,QObject::tr("Validator is missing after the %1 operator. Please, change it").arg(m_OptionOp->value(tmp)==Reroll?"r":"a"));
+ }
}
break;
@@ -803,6 +815,10 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice)
isFine = true;
}
+ else
+ {
+ m_errorMap.insert(ExecutionNode::BAD_SYNTAXE,QObject::tr("Validator is missing after the e operator. Please, change it"));
+ }
}
diff --git a/diceparser.h b/diceparser.h
index e4ea0e3..683be88 100644
--- a/diceparser.h
+++ b/diceparser.h
@@ -73,7 +73,9 @@ public:
* @brief The OptionOperator enum gathering all options availables for result.
*/
enum OptionOperator {KeepAndExplose,Keep,Reroll,Explosing,Sort,Count,RerollAndAdd};
-
+ /**
+ * @brief The CommandOperator enum
+ */
enum CommandOperator {};
/**