-
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 #91 from ethdebug/pointer-scopes
Add scope collection to pointer schema and fix storage string pointer example
- Loading branch information
Showing
6 changed files
with
150 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
|
||
import SchemaViewer from "@site/src/components/SchemaViewer"; | ||
|
||
# Scope | ||
|
||
<SchemaViewer | ||
schema={{ id: "schema:ethdebug/format/pointer/collection/scope" }} | ||
/> |
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,42 @@ | ||
$schema: "https://json-schema.org/draft/2020-12/schema" | ||
$id: "schema:ethdebug/format/pointer/collection/scope" | ||
|
||
title: ethdebug/format/pointer/collection/scope | ||
description: | | ||
A pointer defined with the aid of additional variables with values specified | ||
as expressions. | ||
Variables are specified by the `define` field as an object mapping of | ||
expression by identifier. Variables are specified **in order**, so that | ||
later appearing variables may reference earlier ones in the same object. | ||
type: object | ||
|
||
properties: | ||
define: | ||
title: Mapping of variables to expression value | ||
type: object | ||
patternProperties: | ||
"^[a-zA-Z_\\-]+[a-zA-Z0-9$_\\-]*$": | ||
$ref: "schema:ethdebug/format/pointer/expression" | ||
additionalProperties: false | ||
in: | ||
$ref: "schema:ethdebug/format/pointer" | ||
|
||
required: | ||
- define | ||
- in | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- define: | ||
example-offset: | ||
$sum: [1, 2] | ||
example-length: | ||
$product: [2, $wordsize] | ||
in: | ||
name: example | ||
location: memory | ||
offset: example-offset | ||
length: example-length |
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