From 74b7cf9f89de233e6a34efe2a3dcd9ef32ad9698 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 8 Jun 2025 15:10:38 +0100 Subject: [PATCH] Use string_view instead of string in Token --- cclox_src/token.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cclox_src/token.hh b/cclox_src/token.hh index 16d86d2..f303749 100644 --- a/cclox_src/token.hh +++ b/cclox_src/token.hh @@ -3,6 +3,7 @@ #include "object.hh" #include #include +#include enum class TokenType : uint8_t { // Single-character tokens. @@ -31,7 +32,7 @@ struct Token { {}; TokenType type; - std::string lexeme; + std::string_view lexeme; Object literal; int line; };