commit b87bfbe5630ff1d8bdfa0004ae7e8efe747c0406
parent bf621ea30241efaf0add47d8894d73e8f1f5d5c0
Author: Adam Malone <1319733+freddyz@users.noreply.github.com>
Date: Mon, 12 Aug 2019 16:22:06 -0500
added copy constructor to token. PolyLaundry still not functional
Diffstat:
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/dtpulse.cpp b/src/dtpulse.cpp
@@ -652,7 +652,12 @@ Token::Token(std::string t, std::string v, int dex, int dur) {
index = dex;
duration = dur;
}
-
+Token::Token(const Token& source) {
+ type=source.type;
+ value=source.value;
+ index=source.index;
+ duration=source.duration;
+}
Parser::Parser(std::string expr) {
tokens = tokenizeString(expr);
expression = expr;
diff --git a/src/dtpulse.hpp b/src/dtpulse.hpp
@@ -27,7 +27,7 @@ class Token {
Token(std::string t, std::string v);
Token(std::string t, std::string v, int dex, int dur);
Token(std::string t, std::string v, int dex);
-
+ Token(const Token& source);
void print();
};
class Parser {