Skip to main content

Objectscript grammar for tree-sitter

Project description

tree-sitter-objectscript

CI npm crates-udl crates-playground pypi

Tree-sitter grammars for InterSystems ObjectScript.

Grammars

This repository publishes five related grammars:

  • objectscript: playground/snippet grammar.
  • objectscript_udl: class-file grammar for .cls.
  • objectscript_core: routine/statement grammar.
  • objectscript_expr: expression grammar.
  • objectscript_routine: routine-header grammar for .mac, .inc, and .int.

Grammar extension graph: objectscript_expr -> objectscript_core -> objectscript_udl -> objectscript objectscript_expr -> objectscript_core -> objectscript_routine

Packages

  • npm: tree-sitter-objectscript
  • PyPI: tree-sitter-objectscript
  • Rust crates:
    • tree-sitter-objectscript (UDL + routine grammars)
    • 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/rust and bindings/rust-playground
  • Swift: bindings/swift

Quick binding checks from repo root:

nvm use
npm ci
cargo test --lib --package tree-sitter-objectscript
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -U pip setuptools wheel pytest tree-sitter
python3 setup.py build_ext --inplace
PYTHONPATH=$PWD/bindings/python python3 -m pytest -q bindings/python/tests/test_binding.py
npm test
go test ./bindings/go/...
swift test
make test

For Node bindings specifically, .nvmrc pins the expected Node version.

Editor Integration

  • Zed: ObjectScript extension
  • Neovim (nvim-treesitter):
    • Install grammars with :TSInstall objectscript_udl, :TSInstall objectscript, and :TSInstall objectscript_routine
    • Optional filetype mapping for .cls:
vim.filetype.add({
  extension = {
    cls = "objectscript_udl",
  },
})

Quick Development

Install the tree-sitter CLI, then run commands from a grammar directory (objectscript, udl, core, expr, or objectscript_routine):

tree-sitter generate
tree-sitter test
tree-sitter build

For playground work:

tree-sitter build --wasm
tree-sitter playground

If you change an upstream grammar (expr or core), regenerate downstream grammars as needed (udl, objectscript, objectscript_routine).

Contributing

See CONTRIBUTING.md for setup, workflow, query sync, and binding test instructions.

References

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree_sitter_objectscript-1.6.3.tar.gz (15.7 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_objectscript-1.6.3-cp38-abi3-win_arm64.whl (4.1 MB view details)

Uploaded CPython 3.8+Windows ARM64

tree_sitter_objectscript-1.6.3-cp38-abi3-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.8+Windows x86-64

tree_sitter_objectscript-1.6.3-cp38-abi3-musllinux_1_2_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

tree_sitter_objectscript-1.6.3-cp38-abi3-musllinux_1_2_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ ARM64

tree_sitter_objectscript-1.6.3-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tree_sitter_objectscript-1.6.3-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

tree_sitter_objectscript-1.6.3-cp38-abi3-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

tree_sitter_objectscript-1.6.3-cp38-abi3-macosx_10_9_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.8+macOS 10.9+ x86-64

File details

Details for the file tree_sitter_objectscript-1.6.3.tar.gz.

File metadata

  • Download URL: tree_sitter_objectscript-1.6.3.tar.gz
  • Upload date:
  • Size: 15.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tree_sitter_objectscript-1.6.3.tar.gz
Algorithm Hash digest
SHA256 3868400980276d85807803f894f706716f24007fa559fa907d323a87260c454a
MD5 12748d809bd37609c8ef44c46164d0e2
BLAKE2b-256 0bc5de5a58317d65f04b75edb89a0ca30a8bbdf132c6168b36340f5f0c3e28a8

See more details on using hashes here.

File details

Details for the file tree_sitter_objectscript-1.6.3-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.3-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 188f705fd590e2dda96a5a6454bbc2d28fb4eec31d60d9ccf5662a05be78e483
MD5 450b2f7b9469434fad9033a36bf1a88d
BLAKE2b-256 10cb7aac9775bfbc2f07b3050ef6e1e9ad21682b798797f30a2e4f8251978c02

See more details on using hashes here.

File details

Details for the file tree_sitter_objectscript-1.6.3-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.3-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9ac3b4d35078bf9f429cb7614748c1fd8168b5cd9abcda7f7ea22f747e5499e2
MD5 2e748e59204f2cf8db42f623c189e092
BLAKE2b-256 dacdf28e53cd5c2e595348db2c768876ea044a58a8f03c2194d848cb87e37835

See more details on using hashes here.

File details

Details for the file tree_sitter_objectscript-1.6.3-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.3-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 72a9b016228f3b03715ecbede4f7be38f8a72f7d38dd6477693e26373646420d
MD5 50a165592d0c93e5b521592121610ba0
BLAKE2b-256 7c5a7c477a5afc30fc44f03dcd6efb0c5ca2e86169ae4aa4f55473c625c35332

See more details on using hashes here.

File details

Details for the file tree_sitter_objectscript-1.6.3-cp38-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.3-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 337debd36d5c614b5b4f153a072495e0c2eaf88ace25befc676f2f227d17c8ae
MD5 bccebcde0c42f0ed14a4305f20e559d9
BLAKE2b-256 f225f6059114abb23cf1c2f31a5c2a91265cbbba161133bcf38f3e1f9476bf7d

See more details on using hashes here.

File details

Details for the file tree_sitter_objectscript-1.6.3-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.3-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 70af0fec8417992041c2cf0a421ec5840d04ace6ac0e851058180e39dd459885
MD5 def6f714f583743c42c5db44771f686e
BLAKE2b-256 3257b8009997fbfd75256ba995f4d3298638ff7a1abffb03d644408015c1f742

See more details on using hashes here.

File details

Details for the file tree_sitter_objectscript-1.6.3-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.3-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f35bf8a4c9b996f8ce178c608746e053ae7a7941ef546f1e65b6cf44c24c7027
MD5 c3373cca9d964532a204671c41b2b3bb
BLAKE2b-256 a7e3b6f5f4ad74286605203d59468e3e2b013853fe42c15184d9bfb00aac8cce

See more details on using hashes here.

File details

Details for the file tree_sitter_objectscript-1.6.3-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 caf18393acb4fe40ebe1ac0f391fc33253eab07845863c16495ef8b1b37ed989
MD5 ad7581c9708288a47a3ddce9a265fdbd
BLAKE2b-256 f521c822e8a31426230c56463fc552c63d3abb751c27a77fff04ecc8ff291663

See more details on using hashes here.

File details

Details for the file tree_sitter_objectscript-1.6.3-cp38-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.3-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fff205f868ddde243c647ec3dae29891c38e7477630f78a5c650165ce5ec34d1
MD5 577274a7567d82e28deb469c0b0aab22
BLAKE2b-256 7c2cf9dc7342b3fb0b81a775f52697d491a6ddae22d916f0803f17fd4be049b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page