Simplify readString

This commit is contained in:
Rangi42
2025-07-13 13:26:59 -04:00
parent ce78280af3
commit 21a6d35b8b

View File

@@ -1546,17 +1546,16 @@ static void readString(std::string &str, bool rawString) {
if (rawMode) { if (rawMode) {
str += '"'; str += '"';
} }
if (peek() == '"') { if (peek() != '"') {
// """ begins a multi-line string
shiftChar();
if (rawMode) {
str += '"';
}
multiline = true;
} else {
// "" is an empty string, skip the loop // "" is an empty string, skip the loop
return; return;
} }
// """ begins a multi-line string
shiftChar();
if (rawMode) {
str += '"';
}
multiline = true;
} }
for (;;) { for (;;) {