wip: add parser stub, cleanup scratch comments in tokenizer

This commit is contained in:
hiro 2025-12-22 21:41:23 -05:00
parent 1e7ea750f6
commit f2e188cf1f
2 changed files with 22 additions and 2 deletions

22
parser.hpp Normal file
View File

@ -0,0 +1,22 @@
#pragma once
#ifndef PARSER_HPP
#define PARSER_HPP
class Parser {
std::vector<PBToken> tokens;
public:
Parser(std::vector);
std::vector parse();
};
#endif

View File

@ -31,9 +31,7 @@ typedef struct {
} PBToken; } PBToken;
class Tokenizer { class Tokenizer {
//std::unordered_map<PBTokenType, std::regex> tokentypes;
std::vector<std::pair<std::string, std::regex>> tokentypes; std::vector<std::pair<std::string, std::regex>> tokentypes;
//std::vector<std::regex> tokentypes;
std::string code; std::string code;
public: public:
Tokenizer(std::string); Tokenizer(std::string);