Fix infinite loop in identifier lexing
This commit is contained in:
parent
bf7f098799
commit
b682648b27
|
@ -1363,6 +1363,11 @@ public struct DLexer
|
|||
import std.stdio;
|
||||
mixin (tokenStart);
|
||||
uint hash = 0;
|
||||
if (isSeparating(0) || range.empty)
|
||||
{
|
||||
error("Invalid identifier");
|
||||
range.popFront();
|
||||
}
|
||||
while (!range.empty && !isSeparating(0))
|
||||
{
|
||||
hash = StringCache.hashStep(range.front, hash);
|
||||
|
|
Loading…
Reference in New Issue