Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tree-sitter-kotlin

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-sitter-kotlin

Tree-sitter grammar for Kotlin

  • 0.3.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12K
increased by6.79%
Maintainers
1
Weekly downloads
 
Created
Source

Kotlin Grammar for Tree-sitter

Build NPM crates.io

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

FileDescription
grammar.jsThe Tree-sitter grammar
grammar-reference.jsA direct translation of the Kotlin language grammar that is, however, ambiguous to Tree-sitter
srcThe 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

Keywords

FAQs

Package last updated on 13 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc