#ifndef LEXER_H #define LEXER_H #include #include #include "token.h" class Lexer { public: Lexer(const std::string& source); std::vector tokenize(); private: std::string source; size_t position; size_t length; int line; int column; std::vector tokenBuffer; int interpolationDepth = 0; bool resumingString = false; char peek(int offset = 0) const; char advance(); bool isAtEnd() const; void skipWhitespace(); Token makeToken(TokenType type, std::string value); Token scanToken(); Token identifierOrKeyword(); Token number(); Token string(); Token stringPart(); }; #endif // LEXER_H