File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 11name : Docs
22
3- run-name : ${{github.event.workflow_run.head_commit.message}}
3+ run-name : Update API docs
44
55on :
66 workflow_run :
77 workflows : [CI]
88 types : [completed]
99 branches : [master]
10+ push :
11+ branches : [master]
12+ paths :
13+ - ktreesitter/README.md
1014
1115concurrency :
1216 cancel-in-progress : true
2024 docs :
2125 runs-on : ubuntu-latest
2226 name : Publish docs on GitHub pages
23- if : github.event.workflow_run.conclusion == 'success'
27+ if : >-
28+ github.event_name == 'push' ||
29+ github.event.workflow_run.conclusion == 'success'
2430 environment :
2531 name : github-pages
2632 url : ${{steps.deployment.outputs.page_url}}
Original file line number Diff line number Diff line change @@ -26,5 +26,5 @@ Some bundled languages that are relevant to Kotlin development.
2626[ tree-sitter ] : https://tree-sitter.github.io/tree-sitter/
2727[ ci ] : https://img.shields.io/github/actions/workflow/status/tree-sitter/kotlin-tree-sitter/ci.yml?logo=github&label=CI
2828[ central ] : https://img.shields.io/maven-central/v/io.github.tree-sitter/ktreesitter?logo=sonatype&label=Maven%20Central
29- [ portal ] : https://img.shields.io/gradle-plugin-portal/v/io.github.treesitter .ktreesitter-plugin?logo=gradle&label=Gradle%20Plugin%20Portal
29+ [ portal ] : https://img.shields.io/gradle-plugin-portal/v/io.github.tree-sitter .ktreesitter-plugin?logo=gradle&label=Gradle%20Plugin%20Portal
3030[ docs ] : https://img.shields.io/github/deployments/tree-sitter/kotlin-tree-sitter/github-pages?logo=kotlin&label=API%20Docs
Original file line number Diff line number Diff line change @@ -26,14 +26,14 @@ repositories {
2626## Basic usage
2727
2828``` kotlin
29- import io.github.treesitter.ktreesitter.*
30- import io.github.treesitter.ktreesitter.java.TreeSitterJava
31-
32- val language = Language (TreeSitterJava .language())
29+ val language = Language (TreeSitterKotlin .language())
3330val parser = Parser (language)
34- val tree = parser.parse(" class Foo {}" )
31+ val tree = parser.parse(" fun main() {}" )
32+ val rootNode = tree.rootNode
3533
36- assert (tree.rootNode.type == " program" )
34+ assert (rootNode.type == " source_file" )
35+ assert (rootNode.startPoint.column == 0 )
36+ assert (rootNode.endPoint.column == 13 )
3737```
3838
3939[ tree-sitter ] : https://tree-sitter.github.io/tree-sitter/
You can’t perform that action at this time.
0 commit comments