Fixes infinite loop in parsing blocks

This commit is contained in:
Deukhoofd 2018-11-25 21:50:18 +01:00
parent 55206f3807
commit 8f91b7f550
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ namespace Upsilon.Parser
{
var statements = ImmutableArray.CreateBuilder<StatementSyntax>();
SyntaxToken current = null;
while (!endTokens.Contains(Current.Kind))
while (!endTokens.Contains(Current.Kind) && Current.Kind != SyntaxKind.EndOfFile)
{
if (current == Current)
{