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.0.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.0-cp38-abi3-win_arm64.whl (4.1 MB view details)

Uploaded CPython 3.8+Windows ARM64

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

Uploaded CPython 3.8+Windows x86-64

tree_sitter_objectscript-1.6.0-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.0-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.0-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.0-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.0-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.0-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.0.tar.gz.

File metadata

  • Download URL: tree_sitter_objectscript-1.6.0.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.0.tar.gz
Algorithm Hash digest
SHA256 3205ef8175917679b37df82d5d0fa142c817b3b387fe542ce1ba36018b2ce297
MD5 3621783aedbf9894b82212e0ececc2c1
BLAKE2b-256 7e3c732edbe959d1d5ff56e41d70f938d4c5377d1f8d6b357a7d03a3d151785a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 245c6b2d8df46738dab826d5b525531aa5aa1bc93fc8b05d50d88086c81a474a
MD5 55c9394578687fd8a2ee6f7bf74125cf
BLAKE2b-256 55d5afec9bbf8bd58986adaa163ec60e53449c00d3e17fdd59af90f099da9367

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4b4380315058ab774c45ce5f4e3d4e5ec78d7d13debc23143db83fdd7c2e3716
MD5 3acc79c7e0bd8f7ac3d1d8cd44f42b3d
BLAKE2b-256 5aa8dd9d130fdc6ef1e7f56840b192682df241f4e7c1fd0f9a743d2837f92e1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.0-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c8eb25a7892b7214074927f45dacb6e931417c79ecfb62ae0f1a003ac8e2b953
MD5 8a2f6a5a0261dd457723c1715f78a4f5
BLAKE2b-256 2a7c5143bf9ddb0dc7519f66e724ee553cdc09f3c883a23edc55ffc639ca70ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.0-cp38-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0824a214a87b34ce5b5014971fc3b744a3c8c4f91415dc7bb72eca1a0e83a32b
MD5 0d550990061299701fcffd1c0d6da065
BLAKE2b-256 3ed3416da9f53667457768894143ccc9ccc68b624063ee6e0dd9c43b0c25566d

See more details on using hashes here.

File details

Details for the file tree_sitter_objectscript-1.6.0-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.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3eef681738b767b1f76787c9764f88284395d838c2427491d04fc15f94351b6b
MD5 0b06924b464a3aecca158a39f8caa392
BLAKE2b-256 1638b0c917cd8671e722d774569c331a11ff39802004b30c39b379829f95276d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2b5e8fb40d79f86c4e385115a1b2f4fe9b3d2e201a3cfbd2efeaa6a26d4f7bbc
MD5 83d6824b8e43799e0e4e41fb9d685d37
BLAKE2b-256 03ed18f835bf603318c75df84588686b564d7354fab3cf20c2a0a9d9a41ac066

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 03efb860157e3562dd74513282acf18929c35e9466bcf95621f409a6da87fe6e
MD5 e382a2725de2587f065dd4625bf8d2da
BLAKE2b-256 4367556b28cc1cb5ede3b551b87c4f48c166002189ed7061aa7f7dcfef6cf4cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_objectscript-1.6.0-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 84ee897958e0348ad822313ab9abfbe57a19ab752d5507ac1181751069a10573
MD5 e3b2fe330f0073a80d448a5b6adac371
BLAKE2b-256 f713ffc8070c4d9e2391faea2bc1b3e5671a3f69ae392815a048707667ed8b31

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