Skip to content

Commit

Permalink
fix #20912 lexing problem with #define // comments
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Feb 25, 2025
1 parent 152815e commit 09835b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/src/dmd/lexer.d
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ class Lexer
case 0:
case 0x1A:
error(t.loc, "unterminated /* */ comment");
p = end;
//p = end;
t.loc = loc();
t.value = TOK.endOfFile;
return;
Expand Down Expand Up @@ -927,7 +927,7 @@ class Lexer
getDocComment(t, lastLine == startLoc.linnum, startLoc.linnum - lastDocLine > 1);
lastDocLine = linnum;
}
p = end;
//p = end;
t.loc = loc();
t.value = TOK.endOfFile;
return;
Expand Down Expand Up @@ -1003,7 +1003,7 @@ class Lexer
case 0:
case 0x1A:
error(t.loc, "unterminated /+ +/ comment");
p = end;
//p = end;
t.loc = loc();
t.value = TOK.endOfFile;
return;
Expand Down

0 comments on commit 09835b9

Please sign in to comment.