Repository navigation
Commit c6f391c
authored
format: guide when to use
Document when a `gather` context is the right tool and when a flat
context object is preferred.
The context schema is open: a single object composes any number of
disjoint discriminator keys (`code`, `variables`, `invoke`, `return`,
and so on) as siblings, and that flat form is preferred. Reserve
`gather` for what a flat object cannot express — two or more facts that
collide on the same key, such as multiple `frame`s (each with its own
`code` range) or multiple `variables` blocks. A `gather` over disjoint
keys is equivalent to the flat object and collapses to it.gather vs flat context composition (#259)1 parent 5603954 commit c6f391c
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments