Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 458 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 458 Bytes

ast-grep napi language for lua

Installation

In a pnpm project, run:

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

Usage

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

registerDynamicLanguage({ lua })

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