Skip to content

Commit fa32d7a

Browse files
committed
Add spec page and schemas.ts entry for context/name
Add name.mdx doc page following the pattern of sibling context pages (remark, frame, etc.). Register the schema ID in schemas.ts so the spec site links to the new page.
1 parent 11cbed5 commit fa32d7a

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
sidebar_position: 6
3+
---
4+
5+
import SchemaViewer from "@site/src/components/SchemaViewer";
6+
7+
# Named contexts
8+
9+
Contexts may include a `name` property for distinguishing them from
10+
other contexts. This is particularly useful inside `pick` alternatives,
11+
where several possible contexts may apply at a given point in execution
12+
and runtime information is needed to select which one is active.
13+
14+
<SchemaViewer
15+
schema={{ id: "schema:ethdebug/format/program/context/name" }}
16+
/>

packages/web/src/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ const programSchemaIndex: SchemaIndex = {
224224
href: "/spec/program/context",
225225
},
226226

227-
...["code", "variables", "remark", "pick", "gather", "frame"]
227+
...["name", "code", "variables", "remark", "pick", "gather", "frame"]
228228
.map((name) => ({
229229
[`schema:ethdebug/format/program/context/${name}`]: {
230230
href: `/spec/program/context/${name}`,

0 commit comments

Comments
 (0)