Skip to content

feat(lang): prev alias and numeric path segments in refs analysis#15

Merged
gandarfh merged 1 commit into
mainfrom
feat/prev-and-numeric-path
Jun 11, 2026
Merged

feat(lang): prev alias and numeric path segments in refs analysis#15
gandarfh merged 1 commit into
mainfrom
feat/prev-and-numeric-path

Conversation

@gandarfh

Copy link
Copy Markdown
Member

What

Closes the two analysis blind spots in the refs grammar:

  • {{$prev.path}} — both grammars parse the positional alias (new prev/Prev node, canonical kind prev in the cross-grammar contract). Analysis mirrors the runtime: $prev resolves 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. $prev is deliberately absent from the alias completion list (product parity).
  • Numeric dotted segments ({{q1.response.results.0.rows.0.id}}) — path_segment accepts 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.

@gandarfh
gandarfh merged commit 99ca467 into main Jun 11, 2026
6 checks passed
@gandarfh
gandarfh deleted the feat/prev-and-numeric-path branch June 11, 2026 01:52
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