Crates.io | tree-sitter-rslox |
lib.rs | tree-sitter-rslox |
version | 0.1.1 |
source | src |
created_at | 2023-07-04 08:36:21.55486 |
updated_at | 2023-07-04 08:46:53.498816 |
description | lox(rust) grammar for the tree-sitter parsing library |
homepage | |
repository | https://github.com/boycgit/tree-sitter-rslox |
max_upload_size | |
id | 907799 |
size | 212,639 |
适配 Lox programming language 的语法高亮解析器
先安装 tree-sitter-cli
:
cargo install tree-sitter-cli
通过以下命令生成 bindings:
tree-sitter generate
更改语法后,只需再次运行
tree-sitter generate
即可
运行测试:
tree-sitter test
如果想要生成 wasm,执行:
npm run build:wasm
注:打包成 wasm 需要依赖 emscripten 或者 docker 环境
查看效果:
npm install
node main.js