aboutsummaryrefslogtreecommitdiff
path: root/include/lexer/token.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lexer/token.h')
-rw-r--r--include/lexer/token.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/lexer/token.h b/include/lexer/token.h
new file mode 100644
index 0000000..54ac116
--- /dev/null
+++ b/include/lexer/token.h
@@ -0,0 +1,17 @@
+#ifndef TOKEN_H
+#define TOKEN_H
+
+#include "token_type.h"
+
+#include <string>
+
+struct Token {
+ TokenType type;
+ std::string value;
+ int line;
+ int column;
+
+ Token(TokenType t, const std::string& val, int line, int col) : type{t}, value{val}, line{line}, column{col} {};
+};
+
+#endif