Skip to content

Releases

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 19 Nov 22:50

Fixed

  • The Python sdist now includes the vendored src/tree_sitter/*.h headers
    and the queries/ 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
    with tree_sitter/parser.h: No such file or directory (#80).
  • Python wheels no longer install the C source tree_sitter_irules/binding.c
    into site-packages next to the compiled _binding module (#80).

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 30 Aug 19:11

Changed

  • make test no longer runs the suite under a ulimit -v address-space
    cap. The cap worked around an unbounded allocation in tree-sitter-cli's
    highlight-assertion runner, fixed upstream in
    tree-sitter/tree-sitter#5097
    and released in tree-sitter-cli 0.26.10 via the release-0.26 backport
    #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-cli from 0.26.13 to 0.27.0 and the Rust
    tree-sitter dev-dependency from 0.26 to 0.27. Regenerating under 0.27.0
    leaves src/parser.c, src/grammar.json, src/node-types.json and the
    vendored src/tree_sitter/*.h byte-identical (parser ABI stays 15), so
    the change is contributor-facing only: it is the CLI version CI now
    resolves from package-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, cibuildwheel built
    cp39-*, setup.py forced the wheel tag to cp38, and the extension
    compiled against the 3.8 limited API — so the published wheel was
    tagged cp38-abi3 while Requires-Python blocked 3.8 from installing
    it. All four now say 3.11 and wheels tag cp311-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.py imports bdist_wheel from setuptools.command.bdist_wheel
    rather than wheel.bdist_wheel; setuptools adopted the command in
    70.1.0 and the build already requires setuptools>=82. wheel is
    dropped from [build-system] requires, since nothing imports it now.
  • Upgraded eslint from 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-treesitter 1.0.2 are handled locally rather than by
    waiting on upstream, which has not republished since 2024-09-23: an
    overrides entry forces eslint-plugin-jsdoc to ^62.9.0 (the first
    major peering eslint 10; 63+ would raise the Node floor to 22.13), and
    globals is declared as a direct devDependency because the config
    imports it without declaring it and eslint 10 removed the
    @eslint/eslintrc transitive 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, so go build,
    go test, and go list -m all all failed with missing 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 own go mod download first. go mod tidy records the hashes with
    no change to go.mod; both dependencies were already at their newest
    published versions.

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 31 May 04:07
dccebe1

Fixed

  • regexp now 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

Choose a tag to compare

@github-actions github-actions released this 31 May 00:13
bfed485

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. regexp rule 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 matchVar now produce a
    structured (regexp ...) node instead of falling through to generic
    command parsing (#11).

  • Grammar. switch rule now accepts -matchvar varName and
    -indexvar varName options (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. try rule now models trap pattern variableList script
    handlers alongside on code variableList script, supports multiple
    chained handlers, and accepts any TCL result code (ok, error,
    return, break, continue, or integer) — not just error (#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.builtin capture regex in
    highlights.scm (total: 136 prefixes). Updated the README namespace
    table to match. Added highlight assertions for 10 representative new
    namespaces in test/highlight/irules_namespaces.irules (#12).

  • Grammar. and, or, and not keyword 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 for rule with init, condition, step,
    and body fields, replacing what previously parsed as a generic
    command (#6).

  • Grammar. Dedicated switch rule with switch_arm children,
    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, and dict_with rules
    for the three dict script-body subcommands, each carrying a body
    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_event rule for iRules event handlers
    (when EVENT_NAME [priority N] [timing on|off] { body }), with
    event_name constrained to a screaming-snake identifier and
    event_modifier carrying typed priority: (number) / timing: on|off
    fields. Seven iRules expression operators (starts_with, ends_with,
    contains, equals, matches, matches_regex, matches_glob)
    added to binop_expr at PREC.equal_string.

  • Queries. queries/irules/highlights.scm tags when as
    @keyword, event_name as @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,
    and static / tmm_id as @variable.builtin. Names sourced from
    F5's iRulesReference.html, Commands.html, and Operators.html.

  • Tests. Corpus tests under test/corpus/irules.txt (8 tests) and
    test/corpus/irules_events.txt (26 tests, including an ERROR-pinning
    regression for set 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
    in test/highlight/irules.irules (22), irules_namespaces.irules
    (32), irules_globals.irules (48), and tcl_builtins.irules (12),
    with negative cases confirming unknown namespaces / user procs don't
    pick up the @function.builtin tag. 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. Rust lib.rs additionally
    exposes HIGHLIGHTS_QUERY via include_str!(…). Node
    binding_test.js skips gracefully when the optional tree-sitter
    peer is absent. Cargo.toml declares tree-sitter = "0.25" as a
    dev-dependency so the in-crate test and the lib-doc doctest compile.

  • CI. .github/workflows/ci.yml runs lint, tree-sitter generate,
    tree-sitter test, and cargo build / cargo test (via
    parser-test-action's test-rust: true, pinned to Rust 1.94) on
    Ubuntu, macOS, and Windows. The tree-sitter-cli version is
    resolved from package-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 committed src/parser.c. The paths filter is shared
    between push and pull_request via 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
    # vN comment so Dependabot can still bump them. A scanner-diff-
    gated fuzz job runs tree-sitter/fuzz-action only when
    src/scanner.c changed, with a HEAD^ guard for shallow clones.

  • CI. .github/workflows/codeql.yml runs CodeQL on every push and
    PR (and weekly on a schedule) across actions, c-cpp,
    javascript-typescript, python, go, and rust. Configuration
    in .github/codeql/codeql-config.yml excludes generated parser
    outputs so analysis focuses on the hand-written scanner and binding
    code.

  • Release pipeline. .github/workflows/release.yml is triggered by
    pushing a vX.Y.Z tag 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-publish with skip-existing: true). A
    validate job 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 that CHANGELOG.md has a section for the version.
    npm-prebuilds and pypi-wheels matrix-build native artifacts for
    Ubuntu / macOS / Windows. After all three publishes succeed a
    github-release job extracts the matching CHANGELOG section and
    creates the GitHub Release with gh 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.yml covering all six package
    ecosystems (github-actions, npm, cargo, gomod, pip, swift) with
    grouped minor/patch PRs; eslint major is held via ignore (the
    pinned config supports only eslint 9). A tree-sitter-cli bump is
    allowed to land: regenerate.yml regenerates parser.c on the
    Dependabot PR and the CI "verify generated parser artifacts are up to
    date" step blocks any drift. Added CONTRIBUTING.md, SECURITY.md,
    CODE_OF_CONDUCT.md, bug / feature issue templates, a PR template,
    and docs/cutting-a-release.md documenting 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 pinned vX.Y.Z form once a release is cut), a
    query-loading note for editor integrations, the
    parser.c-must-match-locked-tree-sitter-cli invariant, 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.lua ships with the grammar
    so Neovim auto-detects *.irule and *.irules as filetype irules;
    the existing ftplugin/irules.lua then 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.js now exposes
    HIGHLIGHTS_QUERY as a lazy property that reads
    queries/irules/highlights.scm on first access (cached thereafter
    by replacing the getter with the string value, matching the upstream
    tree-sitter CLI template). Brings the Node binding to parity with
    ...

Read more