forked from solstice/solstice
refactor
This commit is contained in:
17
src/lexer.h
Normal file
17
src/lexer.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <string>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
namespace Solstice {
|
||||
class Lexer {
|
||||
std::string input;
|
||||
size_t size;
|
||||
size_t current;
|
||||
std::optional<char> peek(int ahead = 1);
|
||||
std::optional<char> consume();
|
||||
public:
|
||||
Lexer(std::string in);
|
||||
std::vector<std::string> lex();
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user