feat(lang): prev alias and numeric path segments in refs analysis#15
Merged
Conversation
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.
What
Closes the two analysis blind spots in the refs grammar:
{{$prev.path}}— both grammars parse the positional alias (newprev/Prevnode, canonical kindprevin the cross-grammar contract). Analysis mirrors the runtime:$prevresolves to the closest aliased executable block above (error when none), navigation roots at the response itself — no{response, status}envelope — and the db first-row view arms at the root. Typed hover, field completion after{{$prev.and typo squiggles all work through the previous block's inferred shape.$previs deliberately absent from the alias completion list (product parity).{{q1.response.results.0.rows.0.id}}) —path_segmentaccepts numbers in both grammars; in shape resolution a numeric segment consumes one array level (the sampled element) and indexes objects by literal key, so these refs now get the full typed treatment instead of falling out as parse errors.Tests
86 unit/integration checks (12 new), 13 tree-sitter corpus cases, 14 Lezer cases, 13 cross-grammar sync cases — all green.