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:
= "0.20"
= "0.3.5"
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 = new;
parser.set_language.expect;
let parsed = parser.parse;