tree-sitter-kotlin-updated

Crates.iotree-sitter-kotlin-updated
lib.rstree-sitter-kotlin-updated
version0.1.0
created_at2025-09-11 18:43:50.324693+00
updated_at2025-09-11 18:43:50.324693+00
descriptionKotlin grammar for the tree-sitter parsing library
homepage
repositoryhttps://github.com/c-gamble/tree-sitter-kotlin
max_upload_size
id1834330
size32,125,414
Cooper Gamble (c-gamble)

documentation

README

Kotlin Grammar for Tree-sitter

This crate provides a Kotlin grammar for the tree-sitter parsing library. To use this crate, add it to the [dependencies] section of your Cargo.toml file:

tree-sitter = "0.23"
tree-sitter-kotlin = "0.3.9"

Typically, you will use the language function to add this grammar to a tree-sitter Parser, and then use the parser to parse some code:

let code = r#"
  data class Point(
    val x: Int,
    val y: Int
  )
"#;
let mut parser = Parser::new();
parser.set_language(&tree_sitter_kotlin::language()).expect("Error loading Kotlin grammar");
let parsed = parser.parse(code, None);
Commit count: 374

cargo fmt