From 13f074686970cf037cbd8a4c492033bb7b14562d Mon Sep 17 00:00:00 2001 From: Bilyal Mestanov Date: Wed, 7 Nov 2018 14:49:11 +0200 Subject: Add homework 1 (#23) --- homework/81270/js2html/Token.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 homework/81270/js2html/Token.h (limited to 'homework/81270/js2html/Token.h') 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 +#include +#include +#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 -- cgit v1.3.1-26-gb76a