#ifndef PORYGONLANG_LEXER_HPP
#define PORYGONLANG_LEXER_HPP
#include <string>
#include <vector>
#include "Token.hpp"
#include "../Script.hpp"

using namespace std;

namespace Porygon::Parser{
    class Lexer {
        const u16string& _scriptString;
#ifdef TESTS_BUILD
    public:
#endif
        unsigned int _position;
        unsigned int _scriptSize;
        char16_t Peek();
        char16_t Next();
        Token* LexNext(char16_t c);
        Token* LexNumber(char16_t c);
        Token* LexIdentifierOrKeyword();
        Token* LexString(char16_t c);
    public:
        Porygon::Script* ScriptData;

        vector<const Token*> Lex();
        explicit Lexer(const u16string& scriptString, Porygon::Script* script);

    };
}


#endif //PORYGONLANG_LEXER_HPP
