diff options
| author | 2017-10-18 18:19:36 +0200 | |
|---|---|---|
| committer | 2017-10-18 18:19:36 +0200 | |
| commit | 82141918f49cccdc7d7845dfb86a3b3999652d71 (patch) | |
| tree | 833bff0fac823f625835be5e56ace73ea9650e9d /diceparser.cpp | |
| parent | 06fffb804b7ba80eedad966d2205bd2ca6f4c6ee (diff) | |
| parent | 53d4f802d3e9327c45c5e437bcfea474e6ad943a (diff) | |
| download | OneRoll-82141918f49cccdc7d7845dfb86a3b3999652d71.tar.gz OneRoll-82141918f49cccdc7d7845dfb86a3b3999652d71.zip | |
Merge branch 'group'
Diffstat (limited to 'diceparser.cpp')
| -rw-r--r-- | diceparser.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/diceparser.cpp b/diceparser.cpp index 796850f..f58faf0 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -44,6 +44,7 @@ #include "node/paintnode.h" #include "node/stringnode.h" #include "node/splitnode.h" +#include "node/groupnode.h" #define DEFAULT_FACES_NUMBER 10 @@ -71,6 +72,7 @@ DiceParser::DiceParser() m_OptionOp->insert(QStringLiteral("p"),Painter); m_OptionOp->insert(QStringLiteral("f"),Filter); m_OptionOp->insert(QStringLiteral("u"),Split); + m_OptionOp->insert(QStringLiteral("g"),Group); m_aliasList = new QList<DiceAlias*>(); @@ -1070,6 +1072,19 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous)//, found = true; } break; + case Group: + { + qint64 groupNumber=0; + if(m_parsingToolbox->readNumber(str,groupNumber)) + { + GroupNode* groupNode = new GroupNode(); + groupNode->setGroupValue(groupNumber); + previous->setNextNode(groupNode); + node = groupNode; + found = true; + } + } + break; } } |