Skip to content

Commit 9681e65

Browse files
committed
Remove unicode detection
This could cause a false positive for unicode line endings.
1 parent 7a8459c commit 9681e65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/src/dmd/lexer.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,7 +1973,7 @@ class Lexer
19731973
t.postfix = *p;
19741974
p++;
19751975
// disallow e.g. `@r"_"dtype var;`
1976-
if (!Ccompile && (isalpha(*p) || *p & 0x80))
1976+
if (!Ccompile && isalpha(*p))
19771977
{
19781978
const loc = loc();
19791979
error(loc, "identifier character cannot follow string `%c` postfix without whitespace",
@@ -2211,7 +2211,7 @@ LIntegerSuffix:
22112211
break;
22122212
default:
22132213
// disallow e.g. `Foo!5Luvar;`
2214-
if (!Ccompile && flags >= FLAGS.unsigned && (isalpha(*p) || *p & 0x80))
2214+
if (!Ccompile && flags >= FLAGS.unsigned && isalpha(*p))
22152215
{
22162216
const loc = loc();
22172217
error(loc, "identifier character cannot follow integer `%c` suffix without whitespace",
@@ -2640,7 +2640,7 @@ LcheckI:
26402640
gotSuffix = true;
26412641
}
26422642
// disallow e.g. `Foo!5fvar;`
2643-
if (!Ccompile && gotSuffix && (isalpha(*p) || *p & 0x80))
2643+
if (!Ccompile && gotSuffix && isalpha(*p))
26442644
{
26452645
const loc = loc();
26462646
error(loc, "identifier character cannot follow float `%c` suffix without whitespace",

0 commit comments

Comments
 (0)