aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/diceparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'diceparser.cpp')
-rw-r--r--diceparser.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/diceparser.cpp b/diceparser.cpp
index ae0cdc6..b7bd952 100644
--- a/diceparser.cpp
+++ b/diceparser.cpp
@@ -225,6 +225,13 @@ bool DiceParser::readDiceExpression(QString& str,ExecutionNode* & node)
{
int number=1;
bool returnVal=false;
+ if(readParantheses(str))
+ {
+ str=str.remove(0,number.size());
+
+ readDiceExpression();
+
+ }
bool hasRead = readNumber(str,number);
@@ -491,6 +498,16 @@ bool DiceParser::readLogicOperator(QString& str,BooleanCondition::LogicOperator&
return false;
}
+bool DiceParser::readParentheses(QString& str)
+{
+ if(str.startsWith("("))
+ {
+ str=str.remove(0,1);
+ return true;
+ }
+ else
+ return false;
+}
ExecutionNode* DiceParser::addSort(ExecutionNode* e,bool b)
{