Skip to content

Commit

Permalink
Fix a character skip after string line splices (#1690)
Browse files Browse the repository at this point in the history
  • Loading branch information
wixoaGit authored Mar 1, 2024
1 parent c09aac2 commit ccbbdc8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions DMCompiler/Compiler/DMPreprocessor/DMPreprocessorLexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,10 @@ private Token LexString(bool isLong) {

if (HandleLineEnd()) { //Line splice
// Ignore newlines & all incoming whitespace
do {
Advance();
} while (HandleLineEnd() || GetCurrent() == ' ' || GetCurrent() == '\t');
while (AtLineEnd() || GetCurrent() is ' ' or '\t') {
if (!HandleLineEnd())
Advance(); // Was a space or tab so advance it
}
} else {
textBuilder.Append(stringC);
textBuilder.Append(GetCurrent());
Expand Down

0 comments on commit ccbbdc8

Please sign in to comment.