tree-sitter-objectscript
v1.5.1
Published
Tree Sitter Grammar for InterSystems ObjectScript
Maintainers
Readme
tree-sitter-objectscript
Tree-sitter grammars for InterSystems ObjectScript.
Grammars
This repository publishes four related grammars:
objectscript: playground/snippet grammar.objectscript_udl: class-file grammar for.cls.objectscript_core: routine/statement grammar.objectscript_expr: expression grammar.
Grammar extension chain:
objectscript -> objectscript_udl -> objectscript_core -> objectscript_expr
Packages
- npm:
tree-sitter-objectscript - PyPI:
tree-sitter-objectscript - Rust crates:
tree-sitter-objectscript(UDL grammar)tree-sitter-objectscript-playground(playground grammar)
Bindings
Language bindings are available under bindings/:
- C:
bindings/c - Go:
bindings/go - Node.js:
bindings/node - Python:
bindings/python - Rust:
bindings/rustandbindings/rust-playground - Swift:
bindings/swift
Quick binding checks from repo root:
nvm use
npm install
cargo test --lib --package tree-sitter-objectscript
python3 -m pip install -e .
python3 -m pytest -q bindings/python/tests/test_binding.py
npm test
go test ./bindings/go/...
swift test
make testFor Node bindings specifically, .nvmrc pins the expected Node version.
Editor Integration
- Zed: ObjectScript extension
- Neovim (
nvim-treesitter):- Install grammars with
:TSInstall objectscript_udland:TSInstall objectscript - Optional filetype mapping for
.cls:
- Install grammars with
vim.filetype.add({
extension = {
cls = "objectscript_udl",
},
})- Emacs: emacs-objectscript-ts-mode
Quick Development
Install the tree-sitter CLI, then run commands from a grammar directory (objectscript, udl, core, or expr):
tree-sitter generate
tree-sitter test
tree-sitter buildFor playground work:
tree-sitter build --wasm
tree-sitter playgroundIf you change an upstream grammar (expr, core, udl), regenerate downstream grammars as needed.
Contributing
See CONTRIBUTING.md for setup, workflow, query sync, and binding test instructions.
References
License
MIT. See LICENSE.
