Skip to content

Avoid building the same Location twice - #1866

Merged
TwitchBronBron merged 5 commits into
flatten-locationsfrom
dedupe-getlocation-calls
Oct 15, 2026
Merged

TwitchBronBron merged 5 commits into
flatten-locationsfrom
dedupe-getlocation-calls

Conversation

@TwitchBronBron

Copy link
Copy Markdown
Member

Stacked on #1845. util.getLocation() builds a new Location on every call, and a few spots called it two to five times for the same token or node. This hoists those into a local in inlay hints, semantic tokens, the doc parser, and BrsFile's function scope declarations. No behavior change.

Verified with npm run test:nocover.

🤖 Generated with Claude Code

TwitchBronBron and others added 2 commits October 2, 2026 16:08
Hoist repeated util.getLocation() calls on the same token/node into a local in inlay hints, semantic tokens, the doc parser, and BrsFile's function scope declarations.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@TwitchBronBron
TwitchBronBron marked this pull request as ready for review October 15, 2026 20:13
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TwitchBronBron
TwitchBronBron merged commit 74e1145 into flatten-locations Oct 15, 2026
11 checks passed
@TwitchBronBron
TwitchBronBron deleted the dedupe-getlocation-calls branch October 15, 2026 20:20
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