aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/yuescript/yue_compiler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp
index f952e9a..3768fc9 100644
--- a/src/yuescript/yue_compiler.cpp
+++ b/src/yuescript/yue_compiler.cpp
@@ -9179,7 +9179,7 @@ private:
9179 } 9179 }
9180 9180
9181 void transformYAMLMultiline(YAMLMultiline_t* multiline, str_list& out) { 9181 void transformYAMLMultiline(YAMLMultiline_t* multiline, str_list& out) {
9182 std::optional<std::string_view> indent; 9182 std::optional<std::string> indent;
9183 str_list temp; 9183 str_list temp;
9184 for (auto line_ : multiline->lines.objects()) { 9184 for (auto line_ : multiline->lines.objects()) {
9185 auto line = static_cast<YAMLLine_t*>(line_); 9185 auto line = static_cast<YAMLLine_t*>(line_);
@@ -9210,7 +9210,7 @@ private:
9210 if (pos == std::string::npos) { 9210 if (pos == std::string::npos) {
9211 throw CompileError("expecting first line indent"sv, line); 9211 throw CompileError("expecting first line indent"sv, line);
9212 } 9212 }
9213 indent = std::string_view{lineStr.c_str(), pos}; 9213 indent = std::string{lineStr.c_str(), pos};
9214 } else { 9214 } else {
9215 if (std::string_view{lineStr}.substr(0, indent.value().size()) != indent.value()) { 9215 if (std::string_view{lineStr}.substr(0, indent.value().size()) != indent.value()) {
9216 throw CompileError("inconsistent indent"sv, line); 9216 throw CompileError("inconsistent indent"sv, line);