From 031b73750b7ab20c3eef296a6013fbed2e4d6ab5 Mon Sep 17 00:00:00 2001 From: orangain Date: Sun, 30 Apr 2023 17:05:30 +0900 Subject: [PATCH 1/4] Improve test command in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e4535c4ef..a3ddebe53 100644 --- a/README.md +++ b/README.md @@ -161,10 +161,10 @@ the extra map becomes invalid on this step. This is not solved in the library ye The tests rely on a checked out version of the [Kotlin source repository](https://github.com/JetBrains/kotlin) since it uses the test data there to build a corpus to test against. The path to the base of the repo needs to be set as the -`KOTLIN_REPO` environment variable. Once set, run: +`KOTLIN_REPO` environment variable. For example, run: ``` -./gradlew :ast-psi:test +KOTLIN_REPO=~/kotlin ./gradlew :ast-psi:test ``` This will ignore all Kotlin files with expected parse errors and only test against the ones that are valid (178 as of From 541b9122fbf1eb49028c1d02e4f2b3ce88166e9b Mon Sep 17 00:00:00 2001 From: orangain Date: Mon, 1 May 2023 14:08:56 +0900 Subject: [PATCH 2/4] Add link to ktcodeshift --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index a3ddebe53..20a935f2b 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,9 @@ Another kotlin AST parsing library is [kotlinx.ast](https://github.com/kotlinx/a Compiler, but uses ANTLR and official Kotlin Grammar. Currently, it seems that the library's summary AST classes are limited. +[ktcodeshift](https://github.com/orangain/ktcodeshift) is a toolkit for running codemods over multiple Kotlin files +built on top of ktast. It is useful when modifying Kotlin source codes. + ## Usage ### Getting started From 6713aec38b794b1f3b57665b2b3070e7dc232c4f Mon Sep 17 00:00:00 2001 From: orangain Date: Mon, 1 May 2023 14:09:26 +0900 Subject: [PATCH 3/4] Add link to KDoc --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 20a935f2b..024c4da8b 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,12 @@ dependencies { } ``` +### Documentation + +API document is available at: + +https://orangain.github.io/ktast/0.8.2/api/ + ### Examples Examples below are simple Kotlin scripts. From 6ef4e2f4645e298d36f2a772506e5ee6519d9102 Mon Sep 17 00:00:00 2001 From: orangain Date: Mon, 1 May 2023 14:14:10 +0900 Subject: [PATCH 4/4] Bump version to 0.8.3 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 024c4da8b..6f3fa1175 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ repositories { } dependencies { - implementation("com.github.orangain.ktast:ast-psi:0.8.2") + implementation("com.github.orangain.ktast:ast-psi:0.8.3") } ``` @@ -51,7 +51,7 @@ multiplatform projects. If you need the AST only, instead use: ```kts dependencies { - implementation("com.github.orangain.ktast:ast:0.8.2") + implementation("com.github.orangain.ktast:ast:0.8.3") } ``` @@ -59,7 +59,7 @@ dependencies { API document is available at: -https://orangain.github.io/ktast/0.8.2/api/ +https://orangain.github.io/ktast/0.8.3/api/ ### Examples