Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81270 / js2html / Token.h
blob: b56cb0e31c7e40f3b05814101c06857426552bcf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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