tree-sitter-rslox

Crates.iotree-sitter-rslox
lib.rstree-sitter-rslox
version0.1.1
sourcesrc
created_at2023-07-04 08:36:21.55486
updated_at2023-07-04 08:46:53.498816
descriptionlox(rust) grammar for the tree-sitter parsing library
homepage
repositoryhttps://github.com/boycgit/tree-sitter-rslox
max_upload_size
id907799
size212,639
JSCON (boycgit)

documentation

README

tree-sitter-rslox

适配 Lox programming language 的语法高亮解析器

Local setup

先安装 tree-sitter-cli:

cargo install tree-sitter-cli

通过以下命令生成 bindings:

tree-sitter generate

更改语法后,只需再次运行 tree-sitter generate 即可

运行测试:

tree-sitter test

生成 wasm

如果想要生成 wasm,执行:

npm run build:wasm

注:打包成 wasm 需要依赖 emscripten 或者 docker 环境

查看效果:

npm install
node main.js

参考

Commit count: 11

cargo fmt