A simple scripting language in C++
Ferenc Szontágh
2025-04-17 36ec04c00fa540fcee0f2cff1f7b81dd8a98101a
src/Lexer/Token.hpp
@@ -2,10 +2,10 @@
#define TOKEN_HPP
#include <iostream>
#include <string>               // <<< Hozzáadva
#include <string_view>          // <<< Hozzáadva
#include <string>
#include <string_view>
#include "Lexer/TokenType.hpp"  // Feltételezzük, hogy ez definiálja Type-ot és TypeToString-ot
#include "Lexer/TokenType.hpp"
namespace Lexer::Tokens {
@@ -27,6 +27,14 @@
                  << ", Lexeme: \"" << std::string(lexeme) << "\""
                  << " }" << '\n';
    }
    std::string dump() const {
        return + "Token { Type: " + Lexer::Tokens::TypeToString(type) + ", Value: \"" + value + "\""
               + ", Pos: [" + std::to_string(start_pos) + ", " + std::to_string(end_pos)
               + ")"
               + ", Lexeme: \"" + std::string(lexeme) + "\""
               + " }" + '\n';
    }
};
inline bool operator==(const Token & lhs, const Token & rhs) {