boxscript-interperter-c/source/lexer.hpp

34 lines
460 B
C++
Raw Permalink Normal View History

2022-12-01 03:27:30 +00:00
#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);
};