Skip to content

Commit

Permalink
String unescaping on tokenizer before adding string token to list.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Sep 13, 2024
1 parent c464868 commit 287e8ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/parser/Tokenizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include <parser/Tokenizer.hpp>
#include <util/StringUnescape.hpp>

std::unique_ptr<Tokenizer> Tokenizer::loadFile(const std::string& filePath) {
std::ifstream file(filePath);
Expand Down Expand Up @@ -79,6 +80,7 @@ void Tokenizer::scan() {
index++;
column++;

str = ZhivoUtil::replaceEscapeSequences(std::move(str));
this->tokens.emplace_back(
str,
fileName,
Expand Down

0 comments on commit 287e8ca

Please sign in to comment.