Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/web/spec/program/context/remark.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_position: 6
---

import SchemaViewer from "@site/src/components/SchemaViewer";

# Human-readable annotations

Contexts may include a human-readable comment. This feature is included to
assist in human annotation of **ethdebug/format** data and is not primarily
for compilers to use.

<SchemaViewer
schema={{ id: "schema:ethdebug/format/program/context/remark" }}
/>
2 changes: 1 addition & 1 deletion packages/web/src/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const programSchemaIndex: SchemaIndex = {
},

...(
["code", "variables"].map(name => ({
["code", "variables", "remark"].map(name => ({
[`schema:ethdebug/format/program/context/${name}`]: {
href: `/spec/program/context/${name}`
}
Expand Down
1 change: 1 addition & 0 deletions schemas/program/context.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type: object
anyOf:
- $ref: "schema:ethdebug/format/program/context/code"
- $ref: "schema:ethdebug/format/program/context/variables"
- $ref: "schema:ethdebug/format/program/context/remark"

minProperties: 1
unevaluatedProperties: false
Expand Down
19 changes: 19 additions & 0 deletions schemas/program/context/remark.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "schema:ethdebug/format/program/context/remark"

title: ethdebug/format/program/context/remark
description: |
Human-readable information about the instruction. This field is intended
primarily not for compilers to use directly, but rather for humans
(directly or indirectly) to use as an annotation field.

type: object
properties:
remark:
type: string

required:
- remark

examples:
- remark: "jump to end if zero"