34 lines
460 B
C++
34 lines
460 B
C++
#pragma once
|
|
#include <string>
|
|
#include <vector>
|
|
namespace BoxScript::Lexer
|
|
{
|
|
enum LexTokenType
|
|
{
|
|
PLUS,
|
|
MINUS,
|
|
MULTIPLY,
|
|
DIVIDE,
|
|
MOD,
|
|
LPAREN,
|
|
RPAREN,
|
|
IDENTIFER,
|
|
NUMBER,
|
|
EQUALS,
|
|
COMMA,
|
|
ERROR,
|
|
SEMI,
|
|
LBRACE,
|
|
RBRACE,
|
|
STRING
|
|
};
|
|
class LexToken
|
|
{
|
|
public:
|
|
std::string text;
|
|
LexTokenType type;
|
|
LexToken();
|
|
LexToken(std::string _text);
|
|
};
|
|
std::vector<LexToken> Lex(std::string text);
|
|
}; |