[JS IR] Add CLI argument to setup error tolerance policy

-  Make sure dev mode is enabled if code with errors is allowed
This commit is contained in:
Roman Artemev
2020-07-08 14:16:52 +03:00
parent 8a810e2a5e
commit a60782f3df
8 changed files with 67 additions and 19 deletions
@@ -175,6 +175,9 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
@Argument(value = "-Xdisable-fake-override-validator", description = "Disable IR fake override validator")
var disableFakeOverrideValidator: Boolean by FreezableVar(false)
@Argument(value = "-Xerror-tolerance-policy", description = "Set up error tolerance policy (NONE, SEMANTIC, SYNTAX, ALL)")
var errorTolerancePolicy: String? by NullableStringFreezableVar(null)
override fun checkIrSupport(languageVersionSettings: LanguageVersionSettings, collector: MessageCollector) {
if (!isIrBackendEnabled()) return