Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 476 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 476 Bytes

ast-grep napi language for kotlin

Installation

In a pnpm project, run:

pnpm install @ast-grep/lang-kotlin
pnpm install @ast-grep/napi
# install the tree-sitter-cli if no prebuild is available
pnpm install @tree-sitter/cli --save-dev

Usage

import kotlin from '@ast-grep/lang-kotlin'
import { registerDynamicLanguage, parse } from '@ast-grep/napi'

registerDynamicLanguage({ kotlin })

const sg = parse('kotlin', `your code`)
sg.root().kind()