Finish pattern matcher
diff --git a/Token.h b/Token.h
index bb46127..a0a5eaa 100644
--- a/Token.h
+++ b/Token.h
@@ -13,9 +13,8 @@
explicit Token(QList<Token> &&parenthesized);
Token(char varType, const QString &&name);
- bool operator ==(const Token &other);
-
- ~Token();
+ bool operator ==(const Token &other) const;
+ bool operator !=(const Token &other) const;
bool isSym();
bool isIdent();
@@ -24,6 +23,9 @@
QList<Token> parenContent();
+ char varType() const;
+ const QString &name() const;
+
private:
enum Type {
SYM, IDENT, PAREN, VAR,
@@ -31,6 +33,8 @@
int _type = 0;
QString _stringVal = "";
- QList<Token> *_listVal = nullptr;
+ QList<Token> _listVal;
QChar _charVal = 0;
};
+
+using LTok = QList<Token>;