From c8b1e6dc81a13c33fce48491b6da9fb857bbcc4c Mon Sep 17 00:00:00 2001 From: Riyyi Date: Wed, 12 Apr 2023 23:03:43 +0200 Subject: [PATCH] AST+Lexer: Move Keyword prefix character to the constructor --- src/ast.cpp | 2 +- src/lexer.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ast.cpp b/src/ast.cpp index 1a8c59b..5c4bd93 100644 --- a/src/ast.cpp +++ b/src/ast.cpp @@ -65,7 +65,7 @@ String::String(const std::string& data) // ----------------------------------------- Keyword::Keyword(const std::string& data) - : m_data(data) + : m_data(std::string(1, 0x7f) + data) // 127 { } diff --git a/src/lexer.cpp b/src/lexer.cpp index a7738c9..ba76f7b 100644 --- a/src/lexer.cpp +++ b/src/lexer.cpp @@ -170,7 +170,6 @@ bool Lexer::consumeKeyword() { size_t column = m_column; std::string keyword; - keyword += 0x7f; // 127 ignore(); // :