From 1bcdd1ba7b116c1eadb155c41776cd9333f4e855 Mon Sep 17 00:00:00 2001 From: Federico Tomassetti Date: Mon, 20 Aug 2018 19:46:39 +0200 Subject: [PATCH 1/2] minor --- .../org/antlr/v4/kotlinruntime/DefaultErrorStrategy.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/antlr-kotlin-runtime-common/src/main/kotlin/org/antlr/v4/kotlinruntime/DefaultErrorStrategy.kt b/antlr-kotlin-runtime-common/src/main/kotlin/org/antlr/v4/kotlinruntime/DefaultErrorStrategy.kt index c2a24f1bbd..311cad9d10 100644 --- a/antlr-kotlin-runtime-common/src/main/kotlin/org/antlr/v4/kotlinruntime/DefaultErrorStrategy.kt +++ b/antlr-kotlin-runtime-common/src/main/kotlin/org/antlr/v4/kotlinruntime/DefaultErrorStrategy.kt @@ -485,11 +485,10 @@ open class DefaultErrorStrategy : ANTLRErrorStrategy { } // even that didn't work; must throw the exception - val e: InputMismatchException - if (nextTokensContext == null) { - e = InputMismatchException(recognizer) + val e: InputMismatchException = if (nextTokensContext == null) { + InputMismatchException(recognizer) } else { - e = InputMismatchException(recognizer, nextTokensState, nextTokensContext!!) + InputMismatchException(recognizer, nextTokensState, nextTokensContext!!) } throw e From 44db8045c68d323fff65ebcadddc21b574f0bcfd Mon Sep 17 00:00:00 2001 From: Federico Tomassetti Date: Mon, 20 Aug 2018 19:49:22 +0200 Subject: [PATCH 2/2] confugirnt antlr-kotlin-gradle-plugin in a way that builds on jit --- antlr-kotlin-gradle-plugin/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/antlr-kotlin-gradle-plugin/build.gradle b/antlr-kotlin-gradle-plugin/build.gradle index 92811f3af1..08dfc066f1 100644 --- a/antlr-kotlin-gradle-plugin/build.gradle +++ b/antlr-kotlin-gradle-plugin/build.gradle @@ -27,6 +27,6 @@ repositories { dependencies { compileOnly gradleApi() compileOnly "org.antlr:antlr4:${antlrVersion}@jar" - compileOnly "com.strumenta.antlr-kotlin:antlr-kotlin-target:${projectVersion}@jar" + compileOnly project(':antlr-kotlin-target') implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" }