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 .rtn.

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 install
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 and :TSInstall objectscript
    • 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.1.tar.gz (15.6 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.1-cp38-abi3-win_arm64.whl (4.1 MB view details)

Uploaded CPython 3.8+Windows ARM64

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

Uploaded CPython 3.8+Windows x86-64

tree_sitter_objectscript-1.6.1-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.1-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.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: tree_sitter_objectscript-1.6.1.tar.gz
  • Upload date:
  • Size: 15.6 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.1.tar.gz
Algorithm Hash digest
SHA256 11032fa56e1d99982bf554a45a979509ea25fc15684a00db6ad6fc7180fa8d11
MD5 6414f67211a68348074ee0c66dfa674c
BLAKE2b-256 7d3a270ea0e06a7831f256f82745ef588b5ab6f350f1857df1073ec0b80985f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.1-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 83315295386d21cca81967560d242c56bcb6805c3354039a04378fdcf3b8ee5f
MD5 b08b0db9326919a5581d31162f0df286
BLAKE2b-256 0eab93abba64a13a3448069dab852e7efd7e13e84bd221b1e2d9bee18c30aa43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 609cd60bb9416c1d617230d3d76f86ce72d1406f4715bc62a198022f55315eda
MD5 b872b38d9a7ff97728ff10045774b7ec
BLAKE2b-256 13db62118c59eceba105ae933000071de04cc5c02e81df068f5912576b295a2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.1-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9977dbe1dd0ecbf483a41973df8ef4b2d40c72acb3e2daf50033899d2d04b409
MD5 b92786cd9fb4cc197c3acf61e6af3c8a
BLAKE2b-256 f97269b0f8e4074fc831122a15734f91aeafb71336ff45e06b45dd465c6d7f25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.1-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 06ad6018a1c0356005162b2d4d4dbec05459a10f47c7a4b8e5d9fa51cef77114
MD5 7d4224bb72056dd1be1ff34da301be14
BLAKE2b-256 7d8712e122a2868a8d3d59431fd29f103f2645929865b9f2ec2c7e3503815239

See more details on using hashes here.

File details

Details for the file tree_sitter_objectscript-1.6.1-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.1-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b6e16b8472f4701ae78e539ec2db36367308b35e99cfbe56474309b6444b50ab
MD5 d2a9b15b35f585707870e4ad38c55720
BLAKE2b-256 ce9ed7db5e55198484159ad5b04434293eb567c47d282749386cc99490405f2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.1-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 db675210d33f4bae030390640672990a90d4d3de1a99303fb70cb0098c9fda73
MD5 b7fa3dd86e294c0b2c653b2ad0855e27
BLAKE2b-256 e5b04608ac6e0f9c879ead02ea647dc5c60185bbfeeae1e1538fc19db55047a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4794574a284f9b18f3c2f0144aa2fa5c2402549f459c98fc4297a8ba1dd1c4f3
MD5 4185746ad44eafc640c7f68ea5ad5380
BLAKE2b-256 32800848b310f11f601e83c31326f29fb91de861c88e42f3d9e5e71d38d2ad22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.1-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e99259ef8365528213db1fdc87df09a4d9de11ed39299458b458ff879e85b8f5
MD5 ad00bc60e0ddf2b87fa7f138f81fee75
BLAKE2b-256 f87b826d1c710f7d762c28ffb56b0fef3a0ed8de09dd6a4fb2f59758e6bbdfd6

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