From b9f44f8dffef37a182ed4b9fdba68c935a972026 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sun, 7 Feb 2021 02:43:54 +0100 Subject: Add SwitchCaseNode --- include/parsingtoolbox.h | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/parsingtoolbox.h b/include/parsingtoolbox.h index 1817704..d83e063 100644 --- a/include/parsingtoolbox.h +++ b/include/parsingtoolbox.h @@ -40,6 +40,7 @@ class RepeaterNode; class DiceAlias; class ExplodeDiceNode; +class SwitchCaseNode; class SubtituteInfo { @@ -89,24 +90,25 @@ public: }; enum OptionOperator { - KeepAndExplode, - Keep, - Reroll, - RerollUntil, - Explode, - Sort, - Count, - RerollAndAdd, - Merge, - ifOperator, - Painter, - Filter, - Split, - Group, - Occurences, - Unique, - Bind, - AllSameExplode + KeepAndExplode, // K + Keep, // k + Reroll, // r + RerollUntil, // R + Explode, // e + Sort, // s + Count, // c + RerollAndAdd, // a + Merge, // m + ifOperator, // i + Painter, // p + Filter, // f + Split, // y + Group, // g + Occurences, // o + Unique, // u + Bind, // b + AllSameExplode, // t + SwitchCaseOption // S }; enum DiceOperator { @@ -131,6 +133,7 @@ public: // parsing tools static bool readAscending(QString& str); + static bool readStopAtFirst(QString& str); bool readLogicOperator(QString& str, BooleanCondition::LogicOperator& op); Validator* readValidator(QString& str, bool hasSquare= false); ValidatorList* readValidatorList(QString& str); @@ -181,6 +184,7 @@ public: bool readBlocInstruction(QString& str, ExecutionNode*& resultnode); bool readOption(QString&, ExecutionNode* node); // OptionOperator& option, bool readValuesList(QString& str, ExecutionNode*& node); + bool readSwitchCaseNode(QString& str, SwitchCaseNode* node); // Error bool hasError() const; -- cgit v1.2.3-70-g09d2