Skip to content
Source
Sign inSign up
TanStack/highlight

Fix Swift macro declarations with short names #33

Mergedkahwee(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/33/headmerged by tannerlinsley

Recognize macro as a keyword in declarations such as public macro m() and public macro m<T>(). The existing contextual-keyword rule misses these short lowercase names.

Keep identifiers (let macro = value) and member calls (value.macro()) unchanged. Add a focused regression test and patch changeset.

This isolates the Swift fix previously included in #26. It was branched from main at 0541f2f and has no PowerShell dependency.

Validation on Node 24.19.0:

  • The regression test fails on unchanged main and passes with the fix.
  • pnpm run verify passes: typecheck, build, docs, skills, package lint, package/packed tests, 217 tests, size budgets, and benchmarks.
  • pnpm run changeset:status reports a patch; git diff --check passes.

CI for daab0dc passed verification and the Node 18, 20, 22, 24, and 26 runtime checks.

    1. changeset-bot[bot](GitHub profile, opens in a new tab)commented

      🦋 Changeset detected

      Latest commit: 889f797a2757d14e01078cbc31d7bcec644c898f

      The changes in this PR will be included in the next version bump.

      This PR includes changesets to release 1 package
      NameType
      @tanstack/highlightPatch

      Not sure what this means? Click here to learn what changesets are.

      Click here if you're a maintainer who wants to add another changeset to this PR

    2. chatgpt-codex-connector[bot](GitHub profile, opens in a new tab)commented

      Codex Review Summary

      This comment shows the latest Codex review activity on this pull request.

      ReviewStatusCommitReview trigger
      📝 Code Review✅ Completed 2026-10-21T02:06:28.816792Zdaab0dcPR opened
      ℹ️ About Codex in GitHub

      Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

      • Open a pull request for review
      • Mark a draft as ready
      • Comment "@codex review" or "@codex security review".

      Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

    3. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Warning

      Review limit reached

      You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

      Next included review available in 59 minutes.

      Check out review usage here.

      View limit details

      Limit details: You’ve used the included review currently available.

      Learn how review limits work.

      Review configuration:

      Run configuration
      • Source mode: Auto
      • Repository: Unavailable
      • Branch: Unavailable
      • File: No configuration file from this repository applied
      • Commit: Unavailable
      • Layers: defaults
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: a12cbd02-3d09-437f-85c8-455c506c2c4b
      Commits

      Reviewing files that changed from the base of the PR and between 59cc1d177a6b9b7797a66ca741491fef4af88a96 and 889f797a2757d14e01078cbc31d7bcec644c898f.

      Files selected for processing: 7
      • .changeset/swift-reentrant-strings.md
      • .changeset/swift-short-macro.md
      • src/languages/swift.ts
      • test/swift-pre-exec.test.ts
      • test/swift-reentry.test.ts
      • test/swift-spacing.test.ts
      • test/swift.test.ts
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      Share

      CodeRabbit Verify

      • Run CodeRabbit Verify to test the changes in this pull request.
    4. Thanks for the Swift fix! I brought the branch up to date and kept short macro names working with spaces before the signature too.

      AI review notes: Commit f1679a90a13105b6ec83d0f6ddcb3fc26f94e7b0 resolves the current-main conflict, preserves identifier/member-call behavior, and adds macro-spacing coverage. It also fixes a separately reproduced cached string-cursor reentry bug, with a regression. These source changes passed local current-main composition checks; the updated PR branch still needs its own current CI before merging.

    5. tannerlinsley merged this9c88155

    6. tannerlinsley closed this

Sign in to join this conversation.