Blang/src/lib/src/Lexer.hpp

33 lines
429 B
C++

#ifndef LEXER_HPP
#define LEXER_HPP
#include <map>
#include <regex>
#include "Token.hpp"
#include "TokenList.hpp"
namespace Blang{
class Buffer{
public:
Buffer(const std::string& text);
char nextChar();
std::string nextChars(int n);
private:
std::string _text;
};
class Lexer
{
public:
TokenList tokenize(const std::string& text);
TokenList tokenizeFile(const std::string& filename);
};
}
#endif