{"id":33926932,"url":"https://github.com/intersystems/tree-sitter-objectscript","last_synced_at":"2026-04-06T06:33:04.899Z","repository":{"id":310663497,"uuid":"1011917157","full_name":"intersystems/tree-sitter-objectscript","owner":"intersystems","description":"A tree-sitter grammar for InterSystems ObjectScript","archived":false,"fork":false,"pushed_at":"2026-03-30T14:21:18.000Z","size":336200,"stargazers_count":9,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-30T16:28:04.109Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intersystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-01T14:26:05.000Z","updated_at":"2026-03-30T14:22:37.000Z","dependencies_parsed_at":"2025-10-28T17:25:04.811Z","dependency_job_id":null,"html_url":"https://github.com/intersystems/tree-sitter-objectscript","commit_stats":null,"previous_names":["intersystems/tree-sitter-objectscript"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/intersystems/tree-sitter-objectscript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intersystems%2Ftree-sitter-objectscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intersystems%2Ftree-sitter-objectscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intersystems%2Ftree-sitter-objectscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intersystems%2Ftree-sitter-objectscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intersystems","download_url":"https://codeload.github.com/intersystems/tree-sitter-objectscript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intersystems%2Ftree-sitter-objectscript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31463014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-12T10:36:50.897Z","updated_at":"2026-04-06T06:33:04.893Z","avatar_url":"https://github.com/intersystems.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tree-sitter-objectscript\n\n[![CI][ci]](https://github.com/intersystems/tree-sitter-objectscript/actions/workflows/ci.yml)\n[![npm][npm]](https://www.npmjs.com/package/tree-sitter-objectscript)\n[![crates-udl][crates-udl]](https://crates.io/crates/tree-sitter-objectscript)\n[![crates-routine][crates-routine]](https://crates.io/crates/tree-sitter-objectscript-routine)\n[![crates-playground][crates-playground]](https://crates.io/crates/tree-sitter-objectscript-playground)\n[![pypi][pypi]](https://pypi.org/project/tree-sitter-objectscript/)\n\nTree-sitter grammars for InterSystems ObjectScript.\n\n## Grammars\n\nThis repository publishes five related grammars:\n\n- `objectscript`: playground/snippet grammar.\n- `objectscript_udl`: class-file grammar for `.cls`.\n- `objectscript_core`: routine/statement grammar.\n- `objectscript_expr`: expression grammar.\n- `objectscript_routine`: routine-header grammar for `.mac`, `.inc`, `.rtn`, and `.int`.\n\nGrammar extension graph:\n`objectscript_expr -\u003e objectscript_core -\u003e objectscript_udl -\u003e objectscript`\n`objectscript_expr -\u003e objectscript_core -\u003e objectscript_routine`\n\n## Packages\n\n- npm: `tree-sitter-objectscript`\n- PyPI: `tree-sitter-objectscript` (ships `tree_sitter_objectscript`, `tree_sitter_objectscript_udl`, and `tree_sitter_objectscript_routine`)\n- Rust crates:\n  - `tree-sitter-objectscript` (UDL grammar)\n  - `tree-sitter-objectscript-routine` (routine grammar)\n  - `tree-sitter-objectscript-playground` (playground grammar)\n\n## Bindings\n\nLanguage bindings are available under `bindings/`:\n\n- C: `bindings/c`\n- Go: `bindings/go`\n- Node.js: `bindings/node`\n- Python: `bindings/python`\n- Rust: `bindings/rust`, `bindings/rust-routine`, and `bindings/rust-playground`\n- Swift: `bindings/swift`\n\nQuick binding checks from repo root:\n\n```bash\nnvm use\nnpm ci\ncargo test --lib --package tree-sitter-objectscript\npython3 -m venv .venv\nsource .venv/bin/activate\npython3 -m pip install -U pip setuptools wheel pytest tree-sitter\npython3 setup.py build_ext --inplace\nPYTHONPATH=$PWD/bindings/python python3 -m pytest -q bindings/python/tests/test_binding.py\nnpm test\ngo test ./bindings/go/...\nswift test\nmake test\n```\n\nFor Node bindings specifically, `.nvmrc` pins the expected Node version.\n\n## Editor Integration\n\n- Zed: [ObjectScript extension](https://zed.dev/extensions/objectscript)\n- Neovim (`nvim-treesitter`):\n  - Install grammars with `:TSInstall objectscript_udl`, `:TSInstall objectscript`, and `:TSInstall objectscript_routine`\n  - Optional filetype mapping for `.cls` and routine extensions:\n\n```lua\nvim.filetype.add({\n  extension = {\n    cls = \"objectscript_udl\",\n    mac = \"objectscript_routine\",\n    inc = \"objectscript_routine\",\n    int = \"objectscript_routine\",\n    rtn = \"objectscript_routine\",\n  },\n})\n```\n\n- Emacs: [emacs-objectscript-ts-mode](https://github.com/intersystems/emacs-objectscript-ts-mode)\n\n## Quick Development\n\nInstall the [tree-sitter CLI](https://tree-sitter.github.io/tree-sitter/creating-parsers/1-getting-started.html), then run commands from a grammar directory (`objectscript`, `udl`, `core`, `expr`, or `objectscript_routine`):\n\n```bash\ntree-sitter generate\ntree-sitter test\ntree-sitter build\n```\n\nFor playground work:\n\n```bash\ntree-sitter build --wasm\ntree-sitter playground\n```\n\nIf you change an upstream grammar (`expr` or `core`), regenerate downstream grammars as needed (`udl`, `objectscript`, `objectscript_routine`).\n\n## Corpus Sync\n\n`objectscript/test/corpus` is treated as a synced corpus directory. On commit, the repository `pre-commit` hook:\n\n- Replaces `objectscript/test/corpus` contents with files from:\n  - `core/test/corpus`\n  - `udl/test/corpus`\n  - `objectscript_routine/test/corpus`\n- Removes `objectscript/test/corpus/invalid.txt`\n- Removes `objectscript/test/corpus/compiled-header.txt`\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for setup, workflow, query sync, and binding test instructions.\n\n## References\n\n- [InterSystems ObjectScript documentation](https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCOS_intro)\n- [Tree-sitter documentation](https://tree-sitter.github.io/tree-sitter/)\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n\n[ci]: https://img.shields.io/github/actions/workflow/status/intersystems/tree-sitter-objectscript/ci.yml?logo=github\u0026label=CI\n[npm]: https://img.shields.io/npm/v/tree-sitter-objectscript?logo=npm\n[crates-udl]: https://img.shields.io/crates/v/tree-sitter-objectscript?logo=rust\n[crates-routine]: https://img.shields.io/crates/v/tree-sitter-objectscript-routine?logo=rust\n[crates-playground]: https://img.shields.io/crates/v/tree-sitter-objectscript-playground?logo=rust\n[pypi]: https://img.shields.io/pypi/v/tree-sitter-objectscript?logo=pypi\u0026logoColor=ffd242\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintersystems%2Ftree-sitter-objectscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintersystems%2Ftree-sitter-objectscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintersystems%2Ftree-sitter-objectscript/lists"}