Use string_view instead of string in Token
This commit is contained in:
parent
1a0207687c
commit
74b7cf9f89
@ -3,6 +3,7 @@
|
||||
#include "object.hh"
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
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;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user