diff options
1 files changed, 37 insertions, 0 deletions
| -rw-r--r-- | homework/81270/js2html/Token.h | 37 |
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 |
