diff options
| author | 2017-10-18 18:15:32 +0200 | |
|---|---|---|
| committer | 2017-10-18 18:15:32 +0200 | |
| commit | 53d4f802d3e9327c45c5e437bcfea474e6ad943a (patch) | |
| tree | f5f03420f6395f33a7bab76fd05b49bbed0090c5 /diceparser.cpp | |
| parent | 91d8d763be0f1c2f0eef8bcb4a1b249b52bdb340 (diff) | |
| download | OneRoll-53d4f802d3e9327c45c5e437bcfea474e6ad943a.tar.gz OneRoll-53d4f802d3e9327c45c5e437bcfea474e6ad943a.zip | |
add 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; } } |