Crates.io | tree-sitter-kotlin-sg |
lib.rs | tree-sitter-kotlin-sg |
version | |
source | src |
created_at | 2024-05-07 00:43:26.137417 |
updated_at | 2024-12-08 20:03:51.823679 |
description | Kotlin grammar for the tree-sitter parsing library |
homepage | |
repository | https://github.com/fwcd/tree-sitter-kotlin |
max_upload_size | |
id | 1231691 |
Cargo.toml error: | TOML parse error at line 23, column 1 | 23 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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.22"
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);