wip: add parser stub, cleanup scratch comments in tokenizer
This commit is contained in:
parent
1e7ea750f6
commit
f2e188cf1f
22
parser.hpp
Normal file
22
parser.hpp
Normal 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
|
||||||
@ -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);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user