open-standards/wai/tools/tree-sitter-openqasm/package-lock.json
Transaction Science 4fd44dfbac wai/tools/tree-sitter-openqasm: OpenQASM 3 as a tree-sitter grammar
The grammar reads every statement of OpenQASM 3.1 (declarations of every
type, gates, subroutines and externs, modifiers and gphase, control flow,
timing, calibrations kept as text with their braces matched, pragmas and
annotations) and OpenQASM 2's qreg, creg, opaque, measure q -> c and
if(c==1). The parser is generated at ABI 14 with the pinned command line
(0.26.13) and committed; regenerating it reproduces it byte for byte.

Queries for highlighting, scopes and folds; 17 corpus tests checked tree
for tree, and the highlighting checked by 15 assertions.
script/check-programs.mjs parses every program in the repository's
conformance material and examples (the tracked .qasm files, the Studio's
worked examples, the language service's samples, the programs in the
command line's README and smoke script): 25 of 25 parse with no error,
and a broken program is refused, so a clean result means something.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 19:51:34 -04:00

30 lines
777 B
JSON

{
"name": "tree-sitter-openqasm",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "tree-sitter-openqasm",
"version": "0.1.0",
"license": "Apache-2.0",
"devDependencies": {
"tree-sitter-cli": "0.26.13"
}
},
"node_modules/tree-sitter-cli": {
"version": "0.26.13",
"resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.26.13.tgz",
"integrity": "sha512-SIC74lxT2jsygxaIGGb50Bpf8jtll24aXju98Y3eJienBTXCRQ+5k3YigwN31pASEUZKcKh98EPSZWky7ugUMA==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"bin": {
"tree-sitter": "cli.js"
},
"engines": {
"node": ">=12.0.0"
}
}
}
}