Simplify readString

This commit is contained in:
Rangi42 committed 2025-07-13 13:26:59 -04:00
1 parent ce78280af3
commit 21a6d35b8b
1 file changed
+7 -8
+7 -8
View File
@@ -1546,17 +1546,16 @@ static void readString(std::string &str, bool rawString) {
if (rawMode) {
str += '"';
}
if (peek() == '"') {
// """ begins a multi-line string
shiftChar();
if (rawMode) {
str += '"';
}
multiline = true;
} else {
if (peek() != '"') {
// "" is an empty string, skip the loop
return;
}
// """ begins a multi-line string
shiftChar();
if (rawMode) {
str += '"';
}
multiline = true;
}
for (;;) {