a bit of further work

This commit is contained in:
2021-06-30 23:29:09 +02:00
parent 5c7908ac4b
commit b55115f7c3
10 changed files with 309 additions and 56 deletions

12
lexer.h
View File

@@ -54,12 +54,6 @@ struct Token {
};
class Lexer {
private:
std::string code_str;
std::vector<Token> tokens;
int index = 0;
bool eof = false;
public:
Lexer() {};
@@ -84,4 +78,10 @@ private:
TokenType type(const std::string &token);
std::string stringLiteral(std::string token);
static std::string typeToString(TokenType token_type);
private:
std::string m_code_str;
std::vector<Token> m_tokens;
int m_index = 0;
};