feat: add ci workflow, update queries, and add print statements#28
Merged
davem-intersys merged 4 commits intointersystems:mainfrom Mar 13, 2026
Merged
feat: add ci workflow, update queries, and add print statements#28davem-intersys merged 4 commits intointersystems:mainfrom
davem-intersys merged 4 commits intointersystems:mainfrom
Conversation
the workflow added includes:
- ci.yml: runs parser tests for all four grammar directories,
and runs the bindings tests (rust + node + python + go + swift)
- lint.yml: runs eslint on .js files, and runs lint job on queries, making
sure they follow the same standards as nvimtreesitter
- fuzz.yml: runs scanner fuzzing
- sync-queries.yml: Verifies Python query directories stay synced with source query directories.
- publish.yml: publishes a new npm package, pypi package, and two rust crates for tree-sitter-objectscript
the query changes were done to follow nvimtreesitter query rules.
finally zprint and print statements were added to the core grammar.
Squashed commit of the following:
commit 714be7c
Author: Hannah <hannah.kimura@intersystems.com>
Date: Thu Mar 12 21:13:30 2026 -0400
testing
commit 2ae1abf
Author: Hannah <hannah.kimura@intersystems.com>
Date: Thu Mar 12 17:12:20 2026 -0400
fix: split up rust crates into playground and udl crates.
commit 36aaced
Author: Hannah <hannah.kimura@intersystems.com>
Date: Thu Mar 12 15:19:36 2026 -0400
use commit that uses supported runner labels
commit 17ffccb
Author: Hannah <hannah.kimura@intersystems.com>
Date: Thu Mar 12 15:16:01 2026 -0400
fix: remove attestations
commit e146e7d
Author: Hannah <hannah.kimura@intersystems.com>
Date: Thu Mar 12 15:11:54 2026 -0400
fix: pin specific commit for pypi and npm job
commit fbb7a76
Author: Hannah <hannah.kimura@intersystems.com>
Date: Thu Mar 12 14:48:18 2026 -0400
remove attestations
commit 728cc32
Author: Hannah <hannah.kimura@intersystems.com>
Date: Thu Mar 12 14:34:55 2026 -0400
chore: bump version to 1.5.0
commit d507f86
Author: Hannah <hannah.kimura@intersystems.com>
Date: Thu Mar 12 09:38:56 2026 -0400
chore: bump npx tree-sitter-cli version to 0.26.6
commit d3cb5d5
Author: Hannah <hannah.kimura@intersystems.com>
Date: Thu Mar 12 00:10:20 2026 -0400
fix: enable npm ci in lint job and fix grammars lint issues
commit afcb75a
Author: Hannah <hannah.kimura@intersystems.com>
Date: Wed Mar 11 23:51:45 2026 -0400
fix(package-json.lock): remove package-json.lock from gitignore so the install modules step works as intended
commit 0795fc5
Author: Hannah <hannah.kimura@intersystems.com>
Date: Wed Mar 11 23:33:49 2026 -0400
fix: set node-version in actions/setup-node
commit c76600a
Author: Hannah <hannah.kimura@intersystems.com>
Date: Wed Mar 11 23:29:40 2026 -0400
update paths for testing
commit 8363c52
Author: Hannah <hannah.kimura@intersystems.com>
Date: Wed Mar 11 23:27:45 2026 -0400
fix: pin node version in test job
commit f2a5c03
Author: Hannah <hannah.kimura@intersystems.com>
Date: Wed Mar 11 23:13:48 2026 -0400
add git hook to automate updating queries
commit d089e3b
Author: Hannah <hannah.kimura@intersystems.com>
Date: Wed Mar 11 22:46:53 2026 -0400
feature: add workflow that automatically syncs query files
workflow added so that when a commit is added and a query file
was changed, the workflow automatically syncs query files such
that the udl highlights file contains the highlights from expr, core,
and udl,
and the core highlights file contains the highlights from core and expr,
and the expr highlights is just the expr highlights. This also updates
the queries in the python binding.
commit 4a2a181
Author: Hannah <hannah.kimura@intersystems.com>
Date: Wed Mar 11 21:04:40 2026 -0400
fix: read grammar path and name from tree-sitter.json
commit c79712f
Author: Hannah <hannah.kimura@intersystems.com>
Date: Wed Mar 11 20:27:32 2026 -0400
fix(package.json): update tree-sitter-cli version
commit ba0c19f
Author: Hannah <hannah.kimura@intersystems.com>
Date: Wed Mar 11 17:07:01 2026 -0400
fix: update common/grammar.js to common/define_grammar.js for test job in workflow to work.
commit ee2c6a7
Author: Hannah <hannah.kimura@intersystems.com>
Date: Wed Mar 11 16:34:35 2026 -0400
fix: update package.json with name field
commit e61082d
Author: Hannah <hannah.kimura@intersystems.com>
Date: Wed Mar 11 16:19:58 2026 -0400
feat(workflow): add ci workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds the required workflows and query updates needed to be added as a tree-sitter grammar in the
nvimtreesitterrepo.Key Changes
tree-sitter-objectscript(UDL grammar)tree-sitter-objectscript-playground(playground grammar)PRINT/ZPRINTparsing support and corpus tests.scripts/sync_queries.py) and git pre-commit hook.Workflow Changes (Detailed)
.github/workflows/ci.ymlpush,pull_request(branchmain), andworkflow_dispatch.concurrencycancellation for in-progress duplicate runs.testjob:tree-sitter/parser-test-action@v3.objectscript,udl,core,expr).queryjob:ts_query_ls.make checkquery.examplesjob:examples/*.clsfiles with UDL parser..github/workflows/lint.ymlpush,pull_request(branchmain), andworkflow_dispatch.lint_jsjob:npm ci --legacy-peer-deps --ignore-scripts.npm run lint).lint_queriesjob:ts_query_ls.make formatqueryand fails if formatting changed query files.make lintquery..github/workflows/fuzz.ymlpush,pull_request(branchmain), andworkflow_dispatch.tree-sitter/fuzz-action@v4.objectscript,udl,core.common/scanner.h) or missing parent commit..github/workflows/sync-queries.ymlpush,pull_request(branchmain), andworkflow_dispatch.python3 scripts/sync_queries.py --check-python.github/workflows/publish.ymlon.push.tags: ["*"]).contents,id-token, andattestations.if: github.repository == 'intersystems/tree-sitter-objectscript'.github: reusabletree-sitter/workflowsrelease workflow (generate: true).npm: reusable npm package workflow withNPM_TOKEN.pypi: reusable PyPI package workflow withPYPI_API_TOKEN.crates: reusable crates.io workflow withCARGO_REGISTRY_TOKEN.crates_playground: custom publish job fortree-sitter-objectscript-playground, usingscripts/rust_playground_crate.sh publish.Publishing and Package Distribution
Package Links
npm
1.5.1).package.jsonfilesexpanded to includecoreandexprgrammar/query/source assets, in addition toobjectscriptandudl..nvmrc(Node 22) andengines.PyPI
pyproject.tomlupdated:1.5.1requires-pythonbumped to>=3.9cp38-*tocp39-*tree_sitter_objectscripttree_sitter_objectscript_udlcrates.io (Rust)
tree-sitter-objectscriptnow targets UDL grammar only.bindings/rust-playground/fortree-sitter-objectscript-playground.scripts/rust_playground_crate.shto stage/package/publish playground crate from canonical sources without committing duplicate payload.cargo_readme.md(UDL crate)cargo_readme_playground.md(playground crate)Binding Changes
Node bindings
objectscript_coreandobjectscript_exprexports from Node native binding and TypeScript declarations.objectscriptobjectscript_udlbinding.gyptrimmed to compile only objectscript + UDL C sources.Python bindings
objectscriptandobjectscript_udlmodules.setup.py) adjusted to include only these two Python packages and their query files.scripts/sync_queries.py.githooks/pre-commitauto-runs sync and stages generated query updates.sync-queries.yml) to prevent divergence.Go bindings
bindings/go/*.go.bindings/go/binding_test.go.objectscriptobjectscript_udlobjectscript_coreobjectscript_exprRust bindings
bindings/rustnow compiles only UDL parser/scanner and exposes UDL query/node-type constants.bindings/rust-playgroundcrate target for playground grammar.Grammar Feature:
PRINTandZPRINTAdded language support
core/grammar.js:print_statementprint_argumentkeyword_print(P/PRINT)keyword_zprint(ZP/ZPRINT)PRINT,ZPRINT, abbreviations)PRINT:pc)label^routine:label^routine)Added tests
Added tests for the print/zprint statements
Query lint/ changes
.tsqueryrc.json, which is used in the lint workflow to verify the queries are valid according tonvimtreesitterstandardsscripts/sync_queries.pyfor layered query composition and Python query copying. Now, for example, udl highlights.scm file contains all the highlights it needs (expr + core + udl).formatquery,lintquery,checkquery,query).make installhooks).Documentation
CONTRIBUTING.md.README.mdinto concise overview + links to contributing instructions..github/ISSUE_TEMPLATE/.