Repository navigation
Releases
v0.2.1
Fixed
- The Python sdist now includes the vendored
src/tree_sitter/*.hheaders
and thequeries/files, so installing from source works on platforms
with no prebuilt wheel (e.g. Linux aarch64, macOS x86_64). Every
previously published sdist (0.1.0, 0.1.1, 0.2.0) was unbuildable, failing
withtree_sitter/parser.h: No such file or directory(#80). - Python wheels no longer install the C source
tree_sitter_irules/binding.c
intosite-packagesnext to the compiled_bindingmodule (#80).
v0.2.0
Changed
make testno longer runs the suite under aulimit -vaddress-space
cap. The cap worked around an unbounded allocation intree-sitter-cli's
highlight-assertion runner, fixed upstream in
tree-sitter/tree-sitter#5097
and released intree-sitter-cli0.26.10 via therelease-0.26backport
#5674; this project
pins 0.27.0, so a malformed assertion now reports a clean failure on its
own (#32).- Bumped the pinned
tree-sitter-clifrom 0.26.13 to 0.27.0 and the Rust
tree-sitterdev-dependency from 0.26 to 0.27. Regenerating under 0.27.0
leavessrc/parser.c,src/grammar.json,src/node-types.jsonand the
vendoredsrc/tree_sitter/*.hbyte-identical (parser ABI stays 15), so
the change is contributor-facing only: it is the CLI version CI now
resolves frompackage-lock.json. - BREAKING: the Python binding now requires 3.11 or newer
(requires-python = ">=3.11", was>=3.9). This collapses four
floors that had drifted apart: metadata said 3.9,cibuildwheelbuilt
cp39-*,setup.pyforced the wheel tag tocp38, and the extension
compiled against the 3.8 limited API — so the published wheel was
taggedcp38-abi3whileRequires-Pythonblocked 3.8 from installing
it. All four now say 3.11 and wheels tagcp311-abi3, installable on
3.11 through 3.14+. Python 3.9 reached EOL 2025-10-31 and 3.10 reaches
it 2026-10-31. setup.pyimportsbdist_wheelfromsetuptools.command.bdist_wheel
rather thanwheel.bdist_wheel; setuptools adopted the command in
70.1.0 and the build already requiressetuptools>=82.wheelis
dropped from[build-system] requires, since nothing imports it now.- Upgraded
eslintfrom 9 to 10.9.1 and moved the CI lint job from Node
20 (EOL April 2026) to Node 24. Two blockers in
eslint-config-treesitter1.0.2 are handled locally rather than by
waiting on upstream, which has not republished since 2024-09-23: an
overridesentry forceseslint-plugin-jsdocto^62.9.0(the first
major peering eslint 10; 63+ would raise the Node floor to 22.13), and
globalsis declared as a direct devDependency because the config
imports it without declaring it and eslint 10 removed the
@eslint/eslintrctransitive that used to supply it.engines.node
stays>=20— eslint is a devDependency and must not narrow who can
install the published parser.
Fixed
- Added the missing
go.sum. It had never been committed, sogo build,
go test, andgo list -m allall failed withmissing go.sum entry for go.mod file, and nothing pinned the Go dependency checksums —
CodeQL's Go job stayed green only because its autobuilder silently ran
its owngo mod downloadfirst.go mod tidyrecords the hashes with
no change togo.mod; both dependencies were already at their newest
published versions.
v0.1.1
Fixed
regexpnow honors--as an end-of-options marker, so a pattern whose
literal text is a recognized switch token (e.g.regexp -- -nocase $s,
regexp -all -- -- $s) parses as the pattern instead of collapsing to an
(ERROR)node (#31).
v0.1.0
Initial fork of
tree-sitter-tcl
by Lewis Russell, redistributed under the MIT license. Author copyright
is retained alongside a new project copyright.
Added
-
Grammar.
regexprule now accepts all TCL 8.6 switches
(-about,-expanded,-indices,-line,-linestop,
-lineanchor,-nocase,-all,-inline,-start index,--)
between the keyword and the pattern argument. Forms like
regexp -nocase -all -- {pattern} $string matchVarnow produce a
structured(regexp ...)node instead of falling through to generic
command parsing (#11). -
Grammar.
switchrule now accepts-matchvar varNameand
-indexvar varNameoptions (TCL 8.5+), and supports the un-braced
form where pattern/body pairs appear as flat arguments without
surrounding braces. GLR conflicts resolve the ambiguity between the
braced-form delimiter and a braced pattern (#15). -
Grammar.
tryrule now modelstrap pattern variableList script
handlers alongsideon code variableList script, supports multiple
chained handlers, and accepts any TCL result code (ok,error,
return,break,continue, or integer) — not justerror(#16). -
Queries. Added 31 missing F5-documented iRules namespace prefixes
(ADM,APM,ASN1,BWC,CONNECTOR,DATAGRAM,DHCP,
DNSMSG,ECA,FLOW,FLOWTABLE,HTML,IKE,IMAP,IPFIX,
ISESSION,ISTATS,IVS,L7CHECK,LSN,MESSAGE,NSH,
PCP,POLICY,POP3,PSC,SIDEBAND,SIPALG,SMTPS,
SOCKS,SSE) to the@function.builtincapture regex in
highlights.scm(total: 136 prefixes). Updated the README namespace
table to match. Added highlight assertions for 10 representative new
namespaces intest/highlight/irules_namespaces.irules(#12). -
Grammar.
and,or, andnotkeyword operators added to
binop_expr/unop_expr, matching iRules' word-form Boolean operator
surface alongside the existing&&/||/!symbol operators
(#5). -
Tests. Corpus coverage for the seven iRules-specific expression
operators (starts_with,ends_with,contains,equals,matches,
matches_regex,matches_glob) and their interaction with the
word-form Boolean operators (#10). -
Grammar. Dedicated
forrule withinit,condition,step,
andbodyfields, replacing what previously parsed as a generic
command (#6). -
Grammar. Dedicated
switchrule withswitch_armchildren,
exposing pattern/body structure for folds, indents, and highlight
tooling. Supports-exact/-glob/-regexp/-nocase/--
switches, the dash-body fall-through form, bracketed values, and
#-comments /;separators between arms (#7). -
Grammar. Dedicated
dict_for,dict_update, anddict_withrules
for the threedictscript-body subcommands, each carrying abody
field. Value-returning forms (dict get,dict set,dict create,
dict exists,dict keys,dict values,dict merge,dict size,
dict unset,dict incr,dict append) continue to parse as generic
commands (#8). -
Grammar.
when_eventrule for iRules event handlers
(when EVENT_NAME [priority N] [timing on|off] { body }), with
event_nameconstrained to a screaming-snake identifier and
event_modifiercarrying typedpriority: (number)/timing: on|off
fields. Seven iRules expression operators (starts_with,ends_with,
contains,equals,matches,matches_regex,matches_glob)
added tobinop_expratPREC.equal_string. -
Queries.
queries/irules/highlights.scmtagswhenas
@keyword,event_nameas@constant, modifier tokens
(priority/timing/on/off) as@keyword, ~105 iRules namespace
prefixes (HTTP::,IP::,LB::,SSL::, …) as@function.builtin
via a single(#match? "^…::")predicate, 45 iRules global commands
(pool,virtual,drop,persist,table,event,call,
clientside,serverside,connect,recv,send,matchclass,
…) as@function.builtin, iRules expression operators as@operator,
andstatic/tmm_idas@variable.builtin. Names sourced from
F5'siRulesReference.html,Commands.html, andOperators.html. -
Tests. Corpus tests under
test/corpus/irules.txt(8 tests) and
test/corpus/irules_events.txt(26 tests, including an ERROR-pinning
regression forset static::foo bar) covering event handler shapes,
iRules string
operators, modifier ordering, nested command substitution, switch
forms, sideband I/O, and a rate-limiter pattern. Highlight assertions
intest/highlight/irules.irules(22),irules_namespaces.irules
(32),irules_globals.irules(48), andtcl_builtins.irules(12),
with negative cases confirming unknown namespaces / user procs don't
pick up the@function.builtintag. Inherited TCL corpus tests are
kept verbatim as a regression suite. -
Bindings. Full rename
tree_sitter_tcl→tree_sitter_irules
across C, Go, Node, Python, Rust, Swift — symbol names, module names,
package metadata, and build inputs. Rustlib.rsadditionally
exposesHIGHLIGHTS_QUERYviainclude_str!(…). Node
binding_test.jsskips gracefully when the optionaltree-sitter
peer is absent.Cargo.tomldeclarestree-sitter = "0.25"as a
dev-dependency so the in-crate test and the lib-doc doctest compile. -
CI.
.github/workflows/ci.ymlruns lint,tree-sitter generate,
tree-sitter test, andcargo build/cargo test(via
parser-test-action'stest-rust: true, pinned to Rust 1.94) on
Ubuntu, macOS, and Windows. Thetree-sitter-cliversion is
resolved frompackage-lock.json(validated against a SemVer regex
before being written to$GITHUB_OUTPUT) and passed to
setup-action/cli@v2, so the CI CLI always matches the version that
generated the committedsrc/parser.c. Thepathsfilter is shared
betweenpushandpull_requestvia a YAML anchor and covers every
metadata file that affects builds. Additional jobs: clippy
(-D warnings),cargo deny(advisories / licenses / bans /
sources), and repo tooling (typos,taplo format --check,
markdownlint-cli2). All third-party actions SHA-pinned with a
# vNcomment so Dependabot can still bump them. A scanner-diff-
gatedfuzzjob runstree-sitter/fuzz-actiononly when
src/scanner.cchanged, with aHEAD^guard for shallow clones. -
CI.
.github/workflows/codeql.ymlruns CodeQL on every push and
PR (and weekly on a schedule) acrossactions,c-cpp,
javascript-typescript,python,go, andrust. Configuration
in.github/codeql/codeql-config.ymlexcludes generated parser
outputs so analysis focuses on the hand-written scanner and binding
code. -
Release pipeline.
.github/workflows/release.ymlis triggered by
pushing avX.Y.Ztag and publishes to all three registries via
OIDC Trusted Publishing — crates.io
(rust-lang/crates-io-auth-action), npm (npm publish --provenance, requires npm ≥ 11.5.1), and PyPI
(pypa/gh-action-pypi-publishwithskip-existing: true). A
validatejob cross-checks that the tag matches the version in
tree-sitter.json,package.json,pyproject.toml, and
Cargo.toml, that the package names on each registry match
expectations, and thatCHANGELOG.mdhas a section for the version.
npm-prebuildsandpypi-wheelsmatrix-build native artifacts for
Ubuntu / macOS / Windows. After all three publishes succeed a
github-releasejob extracts the matching CHANGELOG section and
creates the GitHub Release withgh release create --verify-tag.
Re-runs on the same tag (workflow_dispatch --ref vX.Y.Z) are
idempotent — each publish job short-circuits if the version already
landed on its registry. -
Repo policy. Added
dependabot.ymlcovering all six package
ecosystems (github-actions, npm, cargo, gomod, pip, swift) with
grouped minor/patch PRs;eslintmajor is held viaignore(the
pinned config supports only eslint 9). Atree-sitter-clibump is
allowed to land:regenerate.ymlregeneratesparser.con the
Dependabot PR and the CI "verify generated parser artifacts are up to
date" step blocks any drift. AddedCONTRIBUTING.md,SECURITY.md,
CODE_OF_CONDUCT.md, bug / feature issue templates, a PR template,
anddocs/cutting-a-release.mddocumenting the Trusted-Publishing
setup and per-release procedure. Repo tooling configs:
.taplo.toml,.typos.toml,deny.toml,
.markdownlint-cli2.jsonc. -
Docs. README with canonical repo URL, CI / license
badges, "Recognised iRules surface", "TCL baseline", "Known
limitations", per-ecosystem install snippets (with guidance for
swapping each to a pinnedvX.Y.Zform once a release is cut), a
query-loading note for editor integrations, the
parser.c-must-match-locked-tree-sitter-cliinvariant, and a
Contributing section. AI assets (AGENTS.md,CLAUDE.md, six
skills under.claude/skills/) tailored for the tree-sitter grammar
context. Project conventions formally adopted: Conventional Commits
1.0.0, Semantic Versioning 2.0.0, Keep a Changelog 1.1.0. -
Editor integration.
ftdetect/irules.luaships with the grammar
so Neovim auto-detects*.iruleand*.irulesas filetypeirules;
the existingftplugin/irules.luathen calls
vim.treesitter.start(). README gains a "Filetype detection" section
covering modeline, per-project autocmd, and content-based opt-in
patterns for users whose iRules are stored as plain.tcl. -
Node binding.
bindings/node/index.jsnow exposes
HIGHLIGHTS_QUERYas a lazy property that reads
queries/irules/highlights.scmon first access (cached thereafter
by replacing the getter with the string value, matching the upstream
tree-sitterCLI template). Brings the Node binding to parity with
...