All Projects → fwcd → tree-sitter-kotlin

fwcd / tree-sitter-kotlin

Licence: MIT License
Kotlin grammar for Tree-Sitter

Programming Languages

javascript
184084 projects - #8 most used programming language
rust
11053 projects
C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to tree-sitter-kotlin

zee
A modern text editor for the terminal written in Rust
Stars: ✭ 1,120 (+3100%)
Mutual labels:  tree-sitter
ruby-tree-sitter
Ruby bindings to tree-sitter
Stars: ✭ 48 (+37.14%)
Mutual labels:  tree-sitter
tree-sitter-sql
SQL syntax highlighting for tree-sitter
Stars: ✭ 33 (-5.71%)
Mutual labels:  tree-sitter
tree-hugger
A light-weight, extendable, high level, universal code parser built on top of tree-sitter
Stars: ✭ 96 (+174.29%)
Mutual labels:  tree-sitter
rust-tree-sitter
Rust bindings to Tree-sitter
Stars: ✭ 29 (-17.14%)
Mutual labels:  tree-sitter
tree-sitter-verilog
Verilog grammar for tree-sitter
Stars: ✭ 49 (+40%)
Mutual labels:  tree-sitter
tree-sitter-elisp
tree-sitter grammar for emacs lisp
Stars: ✭ 20 (-42.86%)
Mutual labels:  tree-sitter
spellsitter.nvim
Treesitter powered spellchecker
Stars: ✭ 251 (+617.14%)
Mutual labels:  tree-sitter
tree-sitter-markdown
A markdown grammar for tree-sitter
Stars: ✭ 168 (+380%)
Mutual labels:  tree-sitter
tree-sitter-vue
Vue grammar for tree-sitter
Stars: ✭ 38 (+8.57%)
Mutual labels:  tree-sitter
SwiftTreeSitter
Swift wrappers for the tree-sitter incremental parsing system
Stars: ✭ 116 (+231.43%)
Mutual labels:  tree-sitter
tree-sitter-tlaplus
A tree-sitter grammar for TLA+
Stars: ✭ 31 (-11.43%)
Mutual labels:  tree-sitter
canonix
Experiment in Nix formatting
Stars: ✭ 18 (-48.57%)
Mutual labels:  tree-sitter
tree-sitter-legesher-python
✨ Legesher's Python grammar for Tree-Sitter 🌳
Stars: ✭ 40 (+14.29%)
Mutual labels:  tree-sitter
tree-edit
🌲 Structural editing in Emacs for any™ language!
Stars: ✭ 211 (+502.86%)
Mutual labels:  tree-sitter
tree-sitter-html
HTML grammar for Tree-sitter
Stars: ✭ 56 (+60%)
Mutual labels:  tree-sitter
nvim-yati
Yet another tree-sitter powered indent plugin for Neovim.
Stars: ✭ 60 (+71.43%)
Mutual labels:  tree-sitter
tree-sitter-yaml
YAML grammar for tree-sitter
Stars: ✭ 29 (-17.14%)
Mutual labels:  tree-sitter
tree-sitter-rescript
ReScript parser for Tree-Sitter
Stars: ✭ 20 (-42.86%)
Mutual labels:  tree-sitter
tree-sitter-clojure
No description or website provided.
Stars: ✭ 71 (+102.86%)
Mutual labels:  tree-sitter

Kotlin Grammar for Tree-Sitter

Build

Kotlin language grammar for Tree-Sitter. You can try it out directly on the web.

Icon

The grammar is based on the official language grammar.

Project Structure

File Description
grammar.js The Tree-Sitter grammar
grammar-reference.js A direct translation of the Kotlin language grammar that is, however, ambiguous to Tree-Sitter
src The generated parser

Setup

npm install

Development

Compilation

To (re-)compile the grammar, run:

npm run generate

Note that the grammar is written completely in JavaScript (grammar.js), the other source files are generated by tree-sitter.

Testing

To run the unit tests, run:

npm run test

WebAssembly

Compilation

First make sure to have Emscripten installed. If you use Homebrew, you can brew install emscripten. Then run:

npm run build-wasm

Playground

After compiling the grammar to WebAssembly, you can invoke

npm run playground

to launch an interactive editing environment that displays the parsed syntax tree on-the-fly in the browser. You can also view a deployed version of this playground on the web.

Screenshot

Documentation

More documentation on how to create Tree-Sitter grammars can be found here.

See also

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].