Skip to content

refactor(gen-tm): deduplicate callee-token detection from #58#60

Merged
johnsoncodehk merged 1 commit into
masterfrom
cleanup-gen-tm-callee
Jul 11, 2026
Merged

refactor(gen-tm): deduplicate callee-token detection from #58#60
johnsoncodehk merged 1 commit into
masterfrom
cleanup-gen-tm-callee

Conversation

@johnsoncodehk

Copy link
Copy Markdown
Owner

Summary

Post-merge cleanup of the code smells noted while reviewing #58 — no behavior change:

  • The callee-token predicate (function-scoped token whose pattern is gated on a following () was duplicated between the lineComment continuation-bracket call variant and the contextualScopes ctx-call-args region. Extracted as findCalleeToken() so the two derived call regions cannot drift apart.
  • Removed the vacuous (o !== '(' || true) clause in the ctx-pair filter (always true; the ( pair is excluded where it matters, at region emission).
  • Fixed the mis-indented ctx-call-args repository entry.

Validation

…filter clause

Post-merge cleanup for #58: the callee-token predicate was copy-pasted in the
continuation-bracket call variant and the contextualScopes call-args region —
extract findCalleeToken() so the two derived call regions cannot drift apart.
Also removes the always-true `(o !== '(' || true)` leftover in the ctx-pair
filter and fixes the mis-indented ctx-call-args entry. No behavior change:
zero `npm run gen` drift, env-spec-regressions 28/28, highlighter gates 10/10.
@johnsoncodehk johnsoncodehk merged commit 9223cf9 into master Jul 11, 2026
3 checks passed
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