From 8f91b7f550a303fd17b2e78d90c4d6ace9d6d6f2 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 25 Nov 2018 21:50:18 +0100 Subject: [PATCH] Fixes infinite loop in parsing blocks --- Upsilon/Parser/Parser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Upsilon/Parser/Parser.cs b/Upsilon/Parser/Parser.cs index 4a4bfe7..c5d3e48 100644 --- a/Upsilon/Parser/Parser.cs +++ b/Upsilon/Parser/Parser.cs @@ -103,7 +103,7 @@ namespace Upsilon.Parser { var statements = ImmutableArray.CreateBuilder(); SyntaxToken current = null; - while (!endTokens.Contains(Current.Kind)) + while (!endTokens.Contains(Current.Kind) && Current.Kind != SyntaxKind.EndOfFile) { if (current == Current) {