Skip to content

Commit ce69adf

Browse files
committed
Remove unicode detection
This could cause a false positive for unicode line endings.
1 parent d558168 commit ce69adf

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
@@ -1974,7 +1974,7 @@ class Lexer
19741974
t.postfix = *p;
19751975
p++;
19761976
// disallow e.g. `@r"_"dtype var;`
1977-
if (!Ccompile && (isalpha(*p) || *p & 0x80))
1977+
if (!Ccompile && isalpha(*p))
19781978
{
19791979
const loc = loc();
19801980
error(loc, "identifier character cannot follow string `%c` postfix without whitespace",
@@ -2212,7 +2212,7 @@ LIntegerSuffix:
22122212
break;
22132213
default:
22142214
// disallow e.g. `Foo!5Luvar;`
2215-
if (!Ccompile && flags >= FLAGS.unsigned && (isalpha(*p) || *p & 0x80))
2215+
if (!Ccompile && flags >= FLAGS.unsigned && isalpha(*p))
22162216
{
22172217
const loc = loc();
22182218
error(loc, "identifier character cannot follow integer `%c` suffix without whitespace",
@@ -2641,7 +2641,7 @@ LcheckI:
26412641
gotSuffix = true;
26422642
}
26432643
// disallow e.g. `Foo!5fvar;`
2644-
if (!Ccompile && gotSuffix && (isalpha(*p) || *p & 0x80))
2644+
if (!Ccompile && gotSuffix && isalpha(*p))
26452645
{
26462646
const loc = loc();
26472647
error(loc, "identifier character cannot follow float `%c` suffix without whitespace",

0 commit comments

Comments
 (0)