From a9e49a09fd70d32da34e6c1ec6ee70b244cd2cb3 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Tue, 1 Oct 2024 22:41:55 -0400 Subject: [PATCH] Allow tab character after backslash line continuation --- src/asm/lexer.cpp | 3 +++ test/asm/line-continuation-string.asm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/asm/lexer.cpp b/src/asm/lexer.cpp index 1b57bb8d..76b54e29 100644 --- a/src/asm/lexer.cpp +++ b/src/asm/lexer.cpp @@ -1373,6 +1373,7 @@ static std::string readString(bool raw) { // Line continuation case ' ': + case '\t': case '\r': case '\n': discardLineContinuation(); @@ -1505,6 +1506,7 @@ static void appendStringLiteral(std::string &str, bool raw) { // Line continuation case ' ': + case '\t': case '\r': case '\n': discardLineContinuation(); @@ -1982,6 +1984,7 @@ backslash: break; case ' ': + case '\t': case '\r': case '\n': discardLineContinuation(); diff --git a/test/asm/line-continuation-string.asm b/test/asm/line-continuation-string.asm index cb08b0d9..84d062d1 100644 --- a/test/asm/line-continuation-string.asm +++ b/test/asm/line-continuation-string.asm @@ -1,3 +1,3 @@ println "Line \ ; this comment is ignored -continuations\ ; so is this one +continuations\ ; so is this one work!" ; =)