Skip to content

Commit

Permalink
Fix incorrect line counter when lexing line-spliced strings (#1689)
Browse files Browse the repository at this point in the history
  • Loading branch information
wixoaGit authored Feb 29, 2024
1 parent e764074 commit 50def0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DMCompiler/Compiler/DMPreprocessor/DMPreprocessorLexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,11 @@ private Token LexString(bool isLong) {
} else if (stringC == '\\') {
Advance();

if (AtLineEnd()) { //Line splice
if (HandleLineEnd()) { //Line splice
// Ignore newlines & all incoming whitespace
do {
Advance();
} while (AtLineEnd() || GetCurrent() == ' ' || GetCurrent() == '\t');
} while (HandleLineEnd() || GetCurrent() == ' ' || GetCurrent() == '\t');
} else {
textBuilder.Append(stringC);
textBuilder.Append(GetCurrent());
Expand Down

0 comments on commit 50def0e

Please sign in to comment.