Bob/headers/Lexer.h
2023-05-20 16:07:51 -04:00

32 lines
394 B
C++

#pragma once
#include <string>
#include <map>
enum TokenType{
Identifier,
Number,
Equals,
OpenParenthesis,
CloseParenthesis,
BinaryOperator,
Test
};
const std::map<std::string, TokenType> KEYWORDS {
{"test", Test}
};
struct Token
{
TokenType type;
std::string value;
};
class Lexer{
public:
std::vector<Token> Tokenize(std::string source);
};