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) {
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 (;;) {