From e398a47fc9ef8ded356c56b5739808ce1192e3d2 Mon Sep 17 00:00:00 2001
From: Ferenc Szontágh <szf@fsociety.hu>
Date: Fri, 18 Apr 2025 05:37:07 +0000
Subject: [PATCH] fix syntax, add expected to errors
---
src/Parser/Parser.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp
index 37c2081..38ff418 100644
--- a/src/Parser/Parser.cpp
+++ b/src/Parser/Parser.cpp
@@ -175,7 +175,8 @@
if (startIt != tokens_.end() && endIt != tokens_.end() && startIt < endIt) {
filtered_tokens = std::vector<Lexer::Tokens::Token>(startIt + 1, endIt);
}
- std::string_view input_string = input_str_view_.substr(opening_brace.end_pos, closing_brace.end_pos);
+ auto len = closing_brace.start_pos - opening_brace.end_pos;
+ std::string_view input_string = input_str_view_.substr(opening_brace.end_pos, len);
current_token_index_ = tokenIndex;
expect(Lexer::Tokens::Type::PUNCTUATION, "}");
--
Gitblit v1.9.3