Read the syntax around a reference from selection ranges - #55
Merged
PiotrRogulski merged 1 commit intoSep 17, 2026
Conversation
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 09:29
34eb050 to
317308f
Compare
This was referenced Sep 17, 2026
PiotrRogulski
added this pull request to stack #57
September 17, 2026 09:35
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 10:16
317308f to
40cb9c6
Compare
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 10:37
40cb9c6 to
56cadbe
Compare
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 10:38
56cadbe to
b48d104
Compare
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 10:39
b48d104 to
6a7fe10
Compare
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 11:42
6a7fe10 to
7423770
Compare
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 11:44
7423770 to
9ab37da
Compare
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 11:49
9ab37da to
9fa3749
Compare
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
2 times, most recently
from
September 17, 2026 11:55
8fc12c4 to
0f2b828
Compare
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 12:08
0f2b828 to
1afdca5
Compare
PiotrRogulski
commented
Sep 17, 2026
PiotrRogulski
commented
Sep 17, 2026
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 12:30
1afdca5 to
ed9af72
Compare
PiotrRogulski
commented
Sep 17, 2026
PiotrRogulski
commented
Sep 17, 2026
PiotrRogulski
commented
Sep 17, 2026
PiotrRogulski
commented
Sep 17, 2026
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
3 times, most recently
from
September 17, 2026 12:39
90cd786 to
d87e93b
Compare
PiotrRogulski
marked this pull request as ready for review
September 17, 2026 12:45
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 12:56
d87e93b to
b4843a5
Compare
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 13:15
b4843a5 to
56fca2b
Compare
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 19:32
56fca2b to
5bc5c68
Compare
Komoszek
reviewed
Sep 17, 2026
textDocument/selectionRange returns the syntax nodes enclosing a position, innermost first. Use them for type patterns, Enum.values iteration, a bare `values` in an enum body, and redirecting factories, instead of matching brackets in ciach's own token stream. The finder fetches the ranges it needs before classification, one request per file. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0146xh6qZsHDegsCAoRBEqwz
PiotrRogulski
force-pushed
the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
from
September 17, 2026 19:48
5bc5c68 to
952dd15
Compare
Komoszek
approved these changes
Sep 17, 2026
PiotrRogulski
deleted the
claude/quirky-hawking-jdfvsx-3-selection-ranges
branch
September 17, 2026 20:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
textDocument/selectionRangereturns the syntax nodes enclosing a position, innermost first, many positions per request. Nodes have ranges but no kinds, so "this is acaseclause" is checked by the node's first semantic token.LspClient.selectionRangesand a per-position cache; the finder fetches the positions the checks need before classification, one request per file.isPatternRef: the type heads a pattern whose parent opens withcase, or starts a switch-expression arm whose parent opens withswitch.isDotValuesRef/enumIteratesOwnValues: the reference andvaluesform one node; a barevaluesstarts its own expression.isRedirectingFactory: the last token's chain reaches the declaration without crossing a body node.lexing.dartstill backs two constructor checks (next PR).Same verdicts on the fixture package. A position without a chain reads as "not the special shape", which keeps code.
🤖 Generated with Claude Code
https://claude.ai/code/session_0146xh6qZsHDegsCAoRBEqwz