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.2.10
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Kotlin Grammar for Tree-Sitter

Build

Kotlin language grammar for Tree-Sitter.

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

Web-UI

After compiling the grammar to WebAssembly, you can invoke

npm run web-ui

to launch an interactive editing environment that displays the parsed syntax tree on-the-fly:

Screenshot

Documentation

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

See also

Keywords

FAQs

Package last updated on 11 Oct 2021

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