Skip to content

feat: expose typed parameter names as fields - #34

Merged
exKAZUu merged 2 commits into
mainfrom
feat/typed-parameter-name-fields
Oct 20, 2026
Merged

exKAZUu merged 2 commits into
mainfrom
feat/typed-parameter-name-fields

Conversation

@exKAZUu

@exKAZUu exKAZUu commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Why

Typed parameters lack the name field that defaulted parameters expose, forcing consumers to infer which child represents the name. This addresses the typed-parameter inconsistency reported in tree-sitter/tree-sitter-python#199.

Requirements

  • required: Improve our forked grammar repositories, ignoring backward compatibility, with a dedicated PR for each actionable upstream item.
  • chosen: Expose the existing typed parameter name or splat pattern through a name field, matching the pattern-valued names already supported by default parameters without changing parameter node kinds.

Customer Summary

Queries can select ordinary, variadic positional, and variadic keyword typed parameter names directly through typed_parameter name:.

Technical Summary

Add a field to the existing typed-parameter alternatives and regenerate the parser and node metadata. Splat names point to their existing pattern nodes. Update corpus field expectations and test querying real parsed declarations through the published WASM API.

Testing

  • bun run verify passed; code-gauge reports no violations in changed code.
  • bun wb test test/unit/typedParameterNames.test.ts test/unit/corpus.test.ts passed, including all 207 corpus cases.
  • The regression query fails on the previous grammar because typed_parameter name: is invalid.
  • PR CI passed, including full integration and Rust checks.
  • Five automated reviewers completed without findings. The completion revision was reviewed by at least one successful exploration session; full coverage is unverified.

exKAZUu and others added 2 commits October 21, 2026 00:39
Co-authored-by: WillBooster (Codex CLI) <codex@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <codex@willbooster.com>
@exKAZUu exKAZUu self-assigned this Oct 20, 2026
@exKAZUu
exKAZUu merged commit 7d53f55 into main Oct 20, 2026
10 checks passed
@exKAZUu
exKAZUu deleted the feat/typed-parameter-name-fields branch October 20, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant