Skip to content

Commit

Permalink
Remove unicode detection
Browse files Browse the repository at this point in the history
This could cause a false positive for unicode line endings.
  • Loading branch information
ntrel committed Jul 10, 2023
1 parent 7a8459c commit 9681e65
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 @@ -1973,7 +1973,7 @@ class Lexer
t.postfix = *p;
p++;
// disallow e.g. `@r"_"dtype var;`
if (!Ccompile && (isalpha(*p) || *p & 0x80))
if (!Ccompile && isalpha(*p))
{
const loc = loc();
error(loc, "identifier character cannot follow string `%c` postfix without whitespace",
Expand Down Expand Up @@ -2211,7 +2211,7 @@ LIntegerSuffix:
break;
default:
// disallow e.g. `Foo!5Luvar;`
if (!Ccompile && flags >= FLAGS.unsigned && (isalpha(*p) || *p & 0x80))
if (!Ccompile && flags >= FLAGS.unsigned && isalpha(*p))
{
const loc = loc();
error(loc, "identifier character cannot follow integer `%c` suffix without whitespace",
Expand Down Expand Up @@ -2640,7 +2640,7 @@ LcheckI:
gotSuffix = true;
}
// disallow e.g. `Foo!5fvar;`
if (!Ccompile && gotSuffix && (isalpha(*p) || *p & 0x80))
if (!Ccompile && gotSuffix && isalpha(*p))
{
const loc = loc();
error(loc, "identifier character cannot follow float `%c` suffix without whitespace",
Expand Down

0 comments on commit 9681e65

Please sign in to comment.