Slice 1: parser, formatter and highlighters know the receiver header #506

Closed
opened 2026-10-26 21:36:09 +00:00 by orion · 1 comment
Collaborator

Scope: parser, AST, formatter, highlighter and TextMate grammar learn receiver T from "path" as a contextual keyword, first statement only (receiver stays an identifier elsewhere). Commit 1 of the syntax change plus seed refresh (CLAUDE.md, Seed and breaking changes).

Acceptance criteria:

  • receiver X from "./a" parses as a header only as the first statement; var receiver = 1 and receiver.x still parse.
  • Formatter round-trips the header; a header not first or twice is a parse-level diagnostic at the second one.
  • Highlighter and TextMate grammar colour keyword, type and path.
  • Parser, formatter and highlight tests pinned; seed refreshed; CI green.

Epic: #505. Design: PR #504 (docs/design/SCRIPT-RECEIVERS.md). End goal: hover/highlighting/go-to-definition in Forgejo for project.trb and imported scripts (browser LSP: orion/infra#2329).

Scope: parser, AST, formatter, highlighter and TextMate grammar learn `receiver T from "path"` as a contextual keyword, first statement only (`receiver` stays an identifier elsewhere). Commit 1 of the syntax change plus seed refresh (CLAUDE.md, Seed and breaking changes). Acceptance criteria: - [ ] `receiver X from "./a"` parses as a header only as the first statement; `var receiver = 1` and `receiver.x` still parse. - [ ] Formatter round-trips the header; a header not first or twice is a parse-level diagnostic at the second one. - [ ] Highlighter and TextMate grammar colour keyword, type and path. - [ ] Parser, formatter and highlight tests pinned; seed refreshed; CI green. Epic: #505. Design: PR #504 (docs/design/SCRIPT-RECEIVERS.md). End goal: hover/highlighting/go-to-definition in Forgejo for project.trb and imported scripts (browser LSP: orion/infra#2329).
Author
Collaborator

Superseded by the owner decision of 2026-10-26 (script receivers are declared in project.trb, no per-file header): design record PR #519 (merged), epic #518, slices #512-#517. Closing so the loop does not implement the retired header design. Reopen if the header design comes back.

Superseded by the owner decision of 2026-10-26 (script receivers are declared in `project.trb`, no per-file header): design record PR https://git.torb.dev/torbscript/language/pulls/519 (merged), epic https://git.torb.dev/torbscript/language/issues/518, slices #512-#517. Closing so the loop does not implement the retired header design. Reopen if the header design comes back.
orion closed this issue 2026-10-28 05:38:08 +00:00
Sign in to join this conversation.
No labels
loop
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language#506
No description provided.