forked from solstice/solstice
18 lines
356 B
C
18 lines
356 B
C
|
|
#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();
|
||
|
|
|
||
|
|
};
|
||
|
|
}
|