From 21a6d35b8b1f1cebacabed4fb47f94cb13736fb0 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Sun, 13 Jul 2025 13:26:59 -0400 Subject: [PATCH] Simplify `readString` --- src/asm/lexer.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/asm/lexer.cpp b/src/asm/lexer.cpp index 21c207a2..89713ad7 100644 --- a/src/asm/lexer.cpp +++ b/src/asm/lexer.cpp @@ -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 (;;) {