stop after a couple of parse errors (it's not useful to continue for long if there are parse errors)

This commit is contained in:
Irmen de Jong 2021-04-04 12:29:56 +02:00
parent 6b4896b8f5
commit 38ccbac97c

View File

@ -62,6 +62,8 @@ class ModuleImporter {
is prog8Parser -> System.err.println("${recognizer.inputStream.sourceName}:$line:$charPositionInLine: $msg")
else -> System.err.println("$line:$charPositionInLine $msg")
}
if(numberOfErrors>=5)
throw ParsingFailedError("There are too many parse errors. Stopping.")
}
}