Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81270 / js2html / Token.h
diff options
context:
space:
mode:
Commit13f074686970cf037cbd8a4c492033bb7b14562d (patch)
Author
 Bilyal Mestanov <bmestanov@gmail.com>
2018-11-07 14:49:11 +0200
Committer
 dtrendafilov <trendafilov.dn@gmail.com>
2018-11-07 14:49:11 +0200
Files5fc01ccd3947a8baaf62433be16c6b9f68a3d181 /homework/81270/js2html/Token.h
IPL-13f074686970cf037cbd8a4c492033bb7b14562d.tar
IPL-13f074686970cf037cbd8a4c492033bb7b14562d.tar.gz
IPL-13f074686970cf037cbd8a4c492033bb7b14562d.zip
Parent93cd8cac8a616ae13bd42dcbee0bb9da278eb49d (diff)
Add homework 1 (#23)
1 files changed, 37 insertions, 0 deletions
-rw-r--r--homework/81270/js2html/Token.h37
diff --git a/homework/81270/js2html/Token.h b/homework/81270/js2html/Token.h
new file mode 100644
index 0000000..b56cb0e
--- /dev/null
+++ b/homework/81270/js2html/Token.h
@@ -0,0 +1,37 @@
+//
+// Created by bmestanov on 23.10.18.
+//
+
+#ifndef ES2HTML_LEXER_H
+#define ES2HTML_LEXER_H
+
+#include <vector>
+#include <string>
+#include <functional>
+#include "Token.h"
+#include "Common.h"
+
+enum TokenType {
+ Whitespace,
+ NewLine,
+ Raw,
+ Comment,
+ Keyword,
+ BooleanLiteral,
+ NumericLiteral,
+ StringLiteral,
+ TemplateLiteral,
+ Regex,
+ Identifier,
+ Global
+};
+
+struct Token {
+ TokenType type;
+ IPLString lexeme;
+
+ Token(const TokenType &type, const char *lexeme);
+};
+
+
+#endif //ES2HTML_LEXER_H