fix: empty file yields an error

This commit is contained in:
TopchetoEU 2024-12-25 02:53:53 +02:00
parent c3432306f7
commit a705bf296e
Signed by: topchetoeu
GPG Key ID: 6531B8583E5F6ED4

View File

@ -233,6 +233,7 @@ public final class JavaScript {
int i = 0; int i = 0;
while (true) { while (true) {
i += Parsing.skipEmpty(src, i);
if (i >= src.size()) break; if (i >= src.size()) break;
var res = parseStatement(src, i); var res = parseStatement(src, i);