commit 12ca3ac3d871017edf5ed88ddb96c865d4c7f08a
parent 49ad658854de8129abd83efb89e1b0f7ea7e29ef
Author: Adam Malone <1319733+freddyz@users.noreply.github.com>
Date: Tue, 6 Aug 2019 13:29:47 -0500
atExpand accepts an integer type for the steps count. Allows something like 3@<12>
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/dtpulse.cpp b/src/dtpulse.cpp
@@ -388,6 +388,7 @@ void whoKnowsLaundryPoly(std::string input) {
}
LaundryPoly::LaundryPoly(std::string formula) {
std::string newFormula = "";
+ inError=false;
for(int i = 0; i < 16; i++ ) {
newFormula = formula;
replaceAll(newFormula,"#","<"+std::to_string(static_cast<long long>(i+1))+">");
@@ -1098,7 +1099,7 @@ int Parser::ParseAtPart(Token t) {
int atNum = -1;
if (t.type == "At") {
t = skipAndPeekToken();
- while (t.type == "Digit") {
+ while (t.type == "Digit" || t.type=="Integer") {
atString += t.value;
t = skipAndPeekToken();
}
diff --git a/src/dtpulse.hpp b/src/dtpulse.hpp
@@ -148,7 +148,7 @@ class LaundryPoly {
LaundryPoly(std::string formula);
LaundryPoly();
void print();
- bool inError=false;
+ bool inError;
};
bool matchesAny(std::string val, std::vector<std::string> whitelist);
bool is_digits(const std::string &str);