-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from ethdebug/pointer-templates
Define pointer templates
- Loading branch information
Showing
12 changed files
with
228 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
sidebar_position: 7 | ||
--- | ||
|
||
import SchemaViewer from "@site/src/components/SchemaViewer"; | ||
|
||
# Pointer templates | ||
|
||
This format provides the concept of a **pointer template** to allow | ||
deduplicating representations. Pointer templates are defined to specify the | ||
variables they expect in scope and the pointer definition that uses those | ||
variables. | ||
|
||
<SchemaViewer | ||
schema={{ | ||
id: "schema:ethdebug/format/pointer/template" | ||
}} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
$schema: "https://json-schema.org/draft/2020-12/schema" | ||
$id: "schema:ethdebug/format/pointer/collection/reference" | ||
|
||
title: ethdebug/format/pointer/collection/reference | ||
description: | | ||
A pointer by named reference to a pointer template (defined elsewhere). | ||
type: object | ||
|
||
properties: | ||
template: | ||
title: Template identifier | ||
$ref: "schema:ethdebug/format/pointer/identifier" | ||
|
||
required: | ||
- template | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- template: "string-storage-pointer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
$schema: "https://json-schema.org/draft/2020-12/schema" | ||
$id: "schema:ethdebug/format/pointer/template" | ||
|
||
title: ethdebug/format/pointer/template | ||
description: | | ||
A schema for representing a pointer defined in terms of some variables whose | ||
values are to be provided when invoking the template. | ||
type: object | ||
properties: | ||
expect: | ||
title: Template variables | ||
description: | | ||
An array of variable identifiers used in the definition of the | ||
pointer template. | ||
type: array | ||
items: | ||
$ref: "schema:ethdebug/format/pointer/identifier" | ||
additionalItems: false | ||
|
||
for: | ||
$ref: "schema:ethdebug/format/pointer" | ||
|
||
required: | ||
- expect | ||
- for | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- expect: ["slot"] | ||
for: | ||
location: storage | ||
slot: "slot" |