Fix infinite loop in autocompletion
This commit is contained in:
parent
059726b662
commit
4247cff0bd
|
|
@ -571,7 +571,6 @@ T getExpression(T)(T beforeTokens)
|
|||
size_t i = beforeTokens.length - 1;
|
||||
IdType open;
|
||||
IdType close;
|
||||
bool hasSpecialPrefix = false;
|
||||
expressionLoop: while (true)
|
||||
{
|
||||
switch (beforeTokens[i].type)
|
||||
|
|
@ -603,15 +602,9 @@ T getExpression(T)(T beforeTokens)
|
|||
case tok!"creal":
|
||||
case tok!"this":
|
||||
case tok!"identifier":
|
||||
if (hasSpecialPrefix)
|
||||
i++;
|
||||
break;
|
||||
case tok!".":
|
||||
break;
|
||||
case tok!"*":
|
||||
case tok!"&":
|
||||
hasSpecialPrefix = true;
|
||||
break;
|
||||
case tok!")":
|
||||
open = tok!")";
|
||||
close = tok!"(";
|
||||
|
|
@ -653,8 +646,6 @@ T getExpression(T)(T beforeTokens)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
if (hasSpecialPrefix)
|
||||
i++;
|
||||
i++;
|
||||
break expressionLoop;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue