Browse Source

AST+Lexer: Move Keyword prefix character to the constructor

master
Riyyi 1 year ago
parent
commit
c8b1e6dc81
  1. 2
      src/ast.cpp
  2. 1
      src/lexer.cpp

2
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
{
}

1
src/lexer.cpp

@ -170,7 +170,6 @@ bool Lexer::consumeKeyword()
{
size_t column = m_column;
std::string keyword;
keyword += 0x7f; // 127
ignore(); // :

Loading…
Cancel
Save