diff options
| author | 2019-09-26 14:00:35 +0200 | |
|---|---|---|
| committer | 2019-09-26 14:00:35 +0200 | |
| commit | d94207bc22768e579766b281c28f211d25d2d9d4 (patch) | |
| tree | 0bd17e71b96e624080581eca6fc213f68c97bf0c /diceparser.cpp | |
| parent | 69a238f0d1937fe5bc97b69e3cc4af0bf0ddde2b (diff) | |
| download | OneRoll-d94207bc22768e579766b281c28f211d25d2d9d4.tar.gz OneRoll-d94207bc22768e579766b281c28f211d25d2d9d4.zip | |
Add operator T
Diffstat (limited to 'diceparser.cpp')
| -rw-r--r-- | diceparser.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/diceparser.cpp b/diceparser.cpp index 83e8ce9..3f346e9 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -26,6 +26,7 @@ #include <QStringList> #include <functional> +#include "node/allsamenode.h" #include "node/bind.h" #include "node/countexecutenode.h" #include "node/dicerollernode.h" @@ -86,6 +87,7 @@ DiceParser::DiceParser() m_OptionOp->insert(QStringLiteral("f"), Filter); m_OptionOp->insert(QStringLiteral("y"), Split); m_OptionOp->insert(QStringLiteral("u"), Unique); + m_OptionOp->insert(QStringLiteral("t"), AllSameExplode); m_OptionOp->insert(QStringLiteral("g"), Group); m_OptionOp->insert(QStringLiteral("b"), Bind); m_OptionOp->insert(QStringLiteral("o"), Occurences); @@ -1192,6 +1194,14 @@ bool DiceParser::readOption(QString& str, ExecutionNode* previous) //, found= true; } break; + case AllSameExplode: + { + AllSameNode* allSame = new AllSameNode(); + previous->setNextNode(allSame); + node=allSame; + found = true; + } + break; case Bind: { BindNode* bindNode= new BindNode(); |