From 1f43580953b0b83308facc5cb13328fa009b95ab Mon Sep 17 00:00:00 2001 From: blitz-1306 Date: Tue, 27 Apr 2021 17:14:01 +0500 Subject: [PATCH 1/4] Added support for Solidity 0.8.4 --- NODE_LIST.md | 2 + package-lock.json | 549 +- package.json | 23 +- src/ast/ast_node_factory.ts | 37 +- .../declaration/contract_definition.ts | 26 + .../declaration/error_definition.ts | 61 + src/ast/implementation/declaration/index.ts | 1 + src/ast/implementation/meta/source_unit.ts | 11 + src/ast/implementation/statement/index.ts | 1 + .../statement/revert_statement.ts | 29 + .../legacy/contract_definition_processor.ts | 1 + src/ast/modern/configuration.ts | 16 + .../modern/contract_definition_processor.ts | 2 + src/ast/modern/error_definition_processor.ts | 31 + src/ast/modern/index.ts | 2 + src/ast/modern/revert_statement_processor.ts | 20 + ...structured_documentation_reconstruction.ts | 3 + src/ast/sanity.ts | 27 +- src/ast/writing/ast_mapping.ts | 29 +- src/compile/constants.ts | 2 +- test/integration/compile/latest_08.spec.ts | 39 +- .../declarations/contract_050.nodes.txt | 10 + test/samples/solidity/latest_08.nodes.txt | 5509 +++++++++++------ test/samples/solidity/latest_08.sol | 48 + test/samples/solidity/latest_08.sourced.sol | Bin 3212 -> 4297 bytes test/unit/ast/ast_node_factory/copy.spec.ts | 2 + test/unit/ast/ast_node_factory/make.spec.ts | 3 + .../ast/nodes/contract_definition.spec.ts | 11 + 28 files changed, 4260 insertions(+), 2235 deletions(-) create mode 100644 src/ast/implementation/declaration/error_definition.ts create mode 100644 src/ast/implementation/statement/revert_statement.ts create mode 100644 src/ast/modern/error_definition_processor.ts create mode 100644 src/ast/modern/revert_statement_processor.ts diff --git a/NODE_LIST.md b/NODE_LIST.md index b1bf819e..be814e56 100644 --- a/NODE_LIST.md +++ b/NODE_LIST.md @@ -17,6 +17,7 @@ ElementaryTypeNameExpression EmitStatement EnumDefinition EnumValue +ErrorDefinition EventDefinition ExpressionStatement ForStatement @@ -43,6 +44,7 @@ ParameterList PlaceholderStatement PragmaDirective Return +RevertStatement SourceUnit StructDefinition StructuredDocumentation diff --git a/package-lock.json b/package-lock.json index b1983143..fc150652 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "solc-typed-ast", "version": "4.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "3.2.2", + "version": "4.0.0", "license": "Apache-2.0", "dependencies": { "findup-sync": "^4.0.0", @@ -69,31 +69,32 @@ "solc-0.8.1": "npm:solc-0.8.1-fixed@0.8.1", "solc-0.8.2": "npm:solc@0.8.2", "solc-0.8.3": "npm:solc@0.8.3", + "solc-0.8.4": "npm:solc@0.8.4", "src-location": "^1.1.0", - "web3-eth-abi": "^1.3.4" + "web3-eth-abi": "^1.3.5" }, "bin": { "sol-ast-compile": "dist/bin/compile.js" }, "devDependencies": { - "@types/fs-extra": "^9.0.9", + "@types/fs-extra": "^9.0.11", "@types/minimist": "^1.2.1", "@types/mocha": "^8.2.2", - "@types/node": "^12.20.7", - "@types/semver": "^7.3.4", - "@typescript-eslint/eslint-plugin": "^4.19.0", - "@typescript-eslint/parser": "^4.19.0", + "@types/node": "^12.20.10", + "@types/semver": "^7.3.5", + "@typescript-eslint/eslint-plugin": "^4.22.0", + "@typescript-eslint/parser": "^4.22.0", "codecov": "^3.8.1", - "eslint": "^7.23.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-prettier": "^3.3.1", + "eslint": "^7.25.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-prettier": "^3.4.0", "expect": "^26.6.2", "mocha": "^8.3.2", "nyc": "^15.1.0", "prettier": "2.2.1", "ts-node": "^9.1.1", - "typedoc": "^0.20.34", - "typescript": "^4.2.3" + "typedoc": "^0.20.36", + "typescript": "^4.2.4" } }, "node_modules/@babel/code-frame": { @@ -802,9 +803,9 @@ "dev": true }, "node_modules/@types/fs-extra": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.9.tgz", - "integrity": "sha512-5TqDycCl0oMzwzd1cIjSJWMKMvLCDVErle4ZTjU4EmHDURR/+yZghe6GDHMCpHtcVfq0x0gMoOM546/5TbYHrg==", + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.11.tgz", + "integrity": "sha512-mZsifGG4QeQ7hlkhO56u7zt/ycBgGxSVsFI/6lGTU34VtwkiqrrSDgw0+ygs8kFGWcXnFQWMrzF2h7TtDFNixA==", "dev": true, "dependencies": { "@types/node": "*" @@ -853,15 +854,15 @@ "dev": true }, "node_modules/@types/node": { - "version": "12.20.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.7.tgz", - "integrity": "sha512-gWL8VUkg8VRaCAUgG9WmhefMqHmMblxe2rVpMF86nZY/+ZysU+BkAp+3cz03AixWDSSz0ks5WX59yAhv/cDwFA==", + "version": "12.20.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.10.tgz", + "integrity": "sha512-TxCmnSSppKBBOzYzPR2BR25YlX5Oay8z2XGwFBInuA/Co0V9xJhLlW4kjbxKtgeNo3NOMbQP1A5Rc03y+XecPw==", "dev": true }, "node_modules/@types/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-iotVxtCCsPLRAvxMFFgxL8HD2l4mAZ2Oin7/VJ2ooWO0VOK4EGOGmZWZn1uCq7RofR3I/1IOSjCHlFT71eVK0Q==", "dev": true }, "node_modules/@types/stack-utils": { @@ -886,13 +887,13 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.19.0.tgz", - "integrity": "sha512-CRQNQ0mC2Pa7VLwKFbrGVTArfdVDdefS+gTw0oC98vSI98IX5A8EVH4BzJ2FOB0YlCmm8Im36Elad/Jgtvveaw==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", + "integrity": "sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "4.19.0", - "@typescript-eslint/scope-manager": "4.19.0", + "@typescript-eslint/experimental-utils": "4.22.0", + "@typescript-eslint/scope-manager": "4.22.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", @@ -902,70 +903,110 @@ }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.19.0.tgz", - "integrity": "sha512-9/23F1nnyzbHKuoTqFN1iXwN3bvOm/PRIXSBR3qFAYotK/0LveEOHr5JT1WZSzcD6BESl8kPOG3OoDRKO84bHA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz", + "integrity": "sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.19.0", - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/typescript-estree": "4.19.0", + "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/typescript-estree": "4.22.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" } }, "node_modules/@typescript-eslint/parser": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.19.0.tgz", - "integrity": "sha512-/uabZjo2ZZhm66rdAu21HA8nQebl3lAIDcybUoOxoI7VbZBYavLIwtOOmykKCJy+Xq6Vw6ugkiwn8Js7D6wieA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.0.tgz", + "integrity": "sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "4.19.0", - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/typescript-estree": "4.19.0", + "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/typescript-estree": "4.22.0", "debug": "^4.1.1" }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.19.0.tgz", - "integrity": "sha512-GGy4Ba/hLXwJXygkXqMzduqOMc+Na6LrJTZXJWVhRrSuZeXmu8TAnniQVKgj8uTRKe4igO2ysYzH+Np879G75g==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz", + "integrity": "sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/visitor-keys": "4.19.0" + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/visitor-keys": "4.22.0" }, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/types": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.19.0.tgz", - "integrity": "sha512-A4iAlexVvd4IBsSTNxdvdepW0D4uR/fwxDrKUa+iEY9UWvGREu2ZyB8ylTENM1SH8F7bVC9ac9+si3LWNxcBuA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.0.tgz", + "integrity": "sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA==", "dev": true, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.19.0.tgz", - "integrity": "sha512-3xqArJ/A62smaQYRv2ZFyTA+XxGGWmlDYrsfZG68zJeNbeqRScnhf81rUVa6QG4UgzHnXw5VnMT5cg75dQGDkA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz", + "integrity": "sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/visitor-keys": "4.19.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/visitor-keys": "4.22.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -974,19 +1015,32 @@ }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.19.0.tgz", - "integrity": "sha512-aGPS6kz//j7XLSlgpzU2SeTqHPsmRYxFztj2vPuMMFJXZudpRSehE3WCV+BaxwZFvfAqMoSd86TEuM0PQ59E/A==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz", + "integrity": "sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/types": "4.22.0", "eslint-visitor-keys": "^2.0.0" }, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@ungap/promise-all-settled": { @@ -1690,9 +1744,9 @@ } }, "node_modules/eslint": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", - "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.25.0.tgz", + "integrity": "sha512-TVpSovpvCNpLURIScDRB6g5CYu/ZFq9GfX2hLNIV4dSBKxIWojeDODvYl3t0k0VtMxYeR8OXPCFE5+oHMlGfhw==", "dev": true, "dependencies": { "@babel/code-frame": "7.12.11", @@ -1738,27 +1792,42 @@ }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-config-prettier": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz", - "integrity": "sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", + "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" } }, "node_modules/eslint-plugin-prettier": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz", - "integrity": "sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz", + "integrity": "sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==", "dev": true, "dependencies": { "prettier-linter-helpers": "^1.0.0" }, "engines": { "node": ">=6.0.0" + }, + "peerDependencies": { + "eslint": ">=5.0.0", + "prettier": ">=1.13.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } } }, "node_modules/eslint-scope": { @@ -2549,6 +2618,9 @@ }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/graceful-fs": { @@ -3495,9 +3567,9 @@ } }, "node_modules/marked": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.1.tgz", - "integrity": "sha512-5+/fKgMv2hARmMW7DOpykr2iLhl0NgjyELk5yn92iE7z8Se1IS9n3UsFm86hFXIkvMBmVxki8+ckcpjBeyo/hw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.3.tgz", + "integrity": "sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA==", "dev": true, "bin": { "marked": "bin/marked" @@ -4877,7 +4949,21 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/randombytes": { "version": "2.1.0", @@ -5039,6 +5125,20 @@ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { "queue-microtask": "^1.2.2" } @@ -5130,7 +5230,21 @@ "node_modules/simple-concat": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/simple-get": { "version": "2.8.1", @@ -10019,6 +10133,65 @@ "semver": "bin/semver" } }, + "node_modules/solc-0.8.4": { + "name": "solc", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.4.tgz", + "integrity": "sha512-krEdbucX9yY362l79gXTK2UHhsZ02aQjQOYTzcgTd/waApueo3yWGzjX0CDJ1ByOuW46WuKAyzfbRWdFNr6OYQ==", + "dependencies": { + "command-exists": "^1.2.8", + "commander": "3.0.2", + "follow-redirects": "^1.12.1", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solcjs" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/solc-0.8.4/node_modules/fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "node_modules/solc-0.8.4/node_modules/jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/solc-0.8.4/node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/solc-0.8.4/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -10491,9 +10664,9 @@ } }, "node_modules/typedoc": { - "version": "0.20.34", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.20.34.tgz", - "integrity": "sha512-es+N/KyGPcHl9cAuYh1Z5m7HzwcmfNLghkmb2pzGz7HRDS5GS2uA3hu/c2cv4gCxDsw8pPUPCOvww+Hzf48Kug==", + "version": "0.20.36", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.20.36.tgz", + "integrity": "sha512-qFU+DWMV/hifQ9ZAlTjdFO9wbUIHuUBpNXzv68ZyURAP9pInjZiO4+jCPeAzHVcaBCHER9WL/+YzzTt6ZlN/Nw==", "dev": true, "dependencies": { "colors": "^1.4.0", @@ -10501,24 +10674,27 @@ "handlebars": "^4.7.7", "lodash": "^4.17.21", "lunr": "^2.3.9", - "marked": "^2.0.1", + "marked": "^2.0.3", "minimatch": "^3.0.0", "progress": "^2.0.3", "shelljs": "^0.8.4", "shiki": "^0.9.3", - "typedoc-default-themes": "^0.12.9" + "typedoc-default-themes": "^0.12.10" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { "node": ">= 10.8.0" + }, + "peerDependencies": { + "typescript": "3.9.x || 4.0.x || 4.1.x || 4.2.x" } }, "node_modules/typedoc-default-themes": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.12.9.tgz", - "integrity": "sha512-Jd5fYTiqzinZdoIY382W7tQXTwAzWRdg8KbHfaxmb78m1/3jL9riXtk23oBOKwhi8GFVykCOdPzEJKY87/D0LQ==", + "version": "0.12.10", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.12.10.tgz", + "integrity": "sha512-fIS001cAYHkyQPidWXmHuhs8usjP5XVJjWB8oZGqkTowZaz3v7g3KDZeeqE82FBrmkAnIBOY3jgy7lnPnqATbA==", "dev": true, "engines": { "node": ">= 8" @@ -10531,9 +10707,9 @@ "dev": true }, "node_modules/typescript": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", - "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -10625,22 +10801,22 @@ "dev": true }, "node_modules/web3-eth-abi": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.3.4.tgz", - "integrity": "sha512-PVSLXJ2dzdXsC+R24llIIEOS6S1KhG5qwNznJjJvXZFe3sqgdSe47eNvwUamZtCBjcrdR/HQr+L/FTxqJSf80Q==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.3.5.tgz", + "integrity": "sha512-bkbG2v/mOW5DH6rF/SEgqunusjYoEi2IBw+fkmD3rzWDaEY7+/i1xY94AeO257d06QMgld75GtV/N+aEs7A6vQ==", "dependencies": { "@ethersproject/abi": "5.0.7", "underscore": "1.9.1", - "web3-utils": "1.3.4" + "web3-utils": "1.3.5" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-utils": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.4.tgz", - "integrity": "sha512-/vC2v0MaZNpWooJfpRw63u0Y3ag2gNjAWiLtMSL6QQLmCqCy4SQIndMt/vRyx0uMoeGt1YTwSXEcHjUzOhLg0A==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", + "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", "dependencies": { "bn.js": "^4.11.9", "eth-lib": "0.2.8", @@ -11481,9 +11657,9 @@ "dev": true }, "@types/fs-extra": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.9.tgz", - "integrity": "sha512-5TqDycCl0oMzwzd1cIjSJWMKMvLCDVErle4ZTjU4EmHDURR/+yZghe6GDHMCpHtcVfq0x0gMoOM546/5TbYHrg==", + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.11.tgz", + "integrity": "sha512-mZsifGG4QeQ7hlkhO56u7zt/ycBgGxSVsFI/6lGTU34VtwkiqrrSDgw0+ygs8kFGWcXnFQWMrzF2h7TtDFNixA==", "dev": true, "requires": { "@types/node": "*" @@ -11532,15 +11708,15 @@ "dev": true }, "@types/node": { - "version": "12.20.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.7.tgz", - "integrity": "sha512-gWL8VUkg8VRaCAUgG9WmhefMqHmMblxe2rVpMF86nZY/+ZysU+BkAp+3cz03AixWDSSz0ks5WX59yAhv/cDwFA==", + "version": "12.20.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.10.tgz", + "integrity": "sha512-TxCmnSSppKBBOzYzPR2BR25YlX5Oay8z2XGwFBInuA/Co0V9xJhLlW4kjbxKtgeNo3NOMbQP1A5Rc03y+XecPw==", "dev": true }, "@types/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-iotVxtCCsPLRAvxMFFgxL8HD2l4mAZ2Oin7/VJ2ooWO0VOK4EGOGmZWZn1uCq7RofR3I/1IOSjCHlFT71eVK0Q==", "dev": true }, "@types/stack-utils": { @@ -11565,13 +11741,13 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.19.0.tgz", - "integrity": "sha512-CRQNQ0mC2Pa7VLwKFbrGVTArfdVDdefS+gTw0oC98vSI98IX5A8EVH4BzJ2FOB0YlCmm8Im36Elad/Jgtvveaw==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", + "integrity": "sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.19.0", - "@typescript-eslint/scope-manager": "4.19.0", + "@typescript-eslint/experimental-utils": "4.22.0", + "@typescript-eslint/scope-manager": "4.22.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", @@ -11581,55 +11757,55 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.19.0.tgz", - "integrity": "sha512-9/23F1nnyzbHKuoTqFN1iXwN3bvOm/PRIXSBR3qFAYotK/0LveEOHr5JT1WZSzcD6BESl8kPOG3OoDRKO84bHA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz", + "integrity": "sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.19.0", - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/typescript-estree": "4.19.0", + "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/typescript-estree": "4.22.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.19.0.tgz", - "integrity": "sha512-/uabZjo2ZZhm66rdAu21HA8nQebl3lAIDcybUoOxoI7VbZBYavLIwtOOmykKCJy+Xq6Vw6ugkiwn8Js7D6wieA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.0.tgz", + "integrity": "sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.19.0", - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/typescript-estree": "4.19.0", + "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/typescript-estree": "4.22.0", "debug": "^4.1.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.19.0.tgz", - "integrity": "sha512-GGy4Ba/hLXwJXygkXqMzduqOMc+Na6LrJTZXJWVhRrSuZeXmu8TAnniQVKgj8uTRKe4igO2ysYzH+Np879G75g==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz", + "integrity": "sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q==", "dev": true, "requires": { - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/visitor-keys": "4.19.0" + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/visitor-keys": "4.22.0" } }, "@typescript-eslint/types": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.19.0.tgz", - "integrity": "sha512-A4iAlexVvd4IBsSTNxdvdepW0D4uR/fwxDrKUa+iEY9UWvGREu2ZyB8ylTENM1SH8F7bVC9ac9+si3LWNxcBuA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.0.tgz", + "integrity": "sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.19.0.tgz", - "integrity": "sha512-3xqArJ/A62smaQYRv2ZFyTA+XxGGWmlDYrsfZG68zJeNbeqRScnhf81rUVa6QG4UgzHnXw5VnMT5cg75dQGDkA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz", + "integrity": "sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/visitor-keys": "4.19.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/visitor-keys": "4.22.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -11638,12 +11814,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.19.0.tgz", - "integrity": "sha512-aGPS6kz//j7XLSlgpzU2SeTqHPsmRYxFztj2vPuMMFJXZudpRSehE3WCV+BaxwZFvfAqMoSd86TEuM0PQ59E/A==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz", + "integrity": "sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw==", "dev": true, "requires": { - "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/types": "4.22.0", "eslint-visitor-keys": "^2.0.0" } }, @@ -12218,9 +12394,9 @@ "dev": true }, "eslint": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", - "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.25.0.tgz", + "integrity": "sha512-TVpSovpvCNpLURIScDRB6g5CYu/ZFq9GfX2hLNIV4dSBKxIWojeDODvYl3t0k0VtMxYeR8OXPCFE5+oHMlGfhw==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", @@ -12342,15 +12518,16 @@ } }, "eslint-config-prettier": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz", - "integrity": "sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==", - "dev": true + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", + "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "dev": true, + "requires": {} }, "eslint-plugin-prettier": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz", - "integrity": "sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz", + "integrity": "sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" @@ -13651,9 +13828,9 @@ } }, "marked": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.1.tgz", - "integrity": "sha512-5+/fKgMv2hARmMW7DOpykr2iLhl0NgjyELk5yn92iE7z8Se1IS9n3UsFm86hFXIkvMBmVxki8+ckcpjBeyo/hw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.3.tgz", + "integrity": "sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA==", "dev": true }, "mem": { @@ -18950,6 +19127,54 @@ } } }, + "solc-0.8.4": { + "version": "npm:solc@0.8.4", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.4.tgz", + "integrity": "sha512-krEdbucX9yY362l79gXTK2UHhsZ02aQjQOYTzcgTd/waApueo3yWGzjX0CDJ1ByOuW46WuKAyzfbRWdFNr6OYQ==", + "requires": { + "command-exists": "^1.2.8", + "commander": "3.0.2", + "follow-redirects": "^1.12.1", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "dependencies": { + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -19330,9 +19555,9 @@ } }, "typedoc": { - "version": "0.20.34", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.20.34.tgz", - "integrity": "sha512-es+N/KyGPcHl9cAuYh1Z5m7HzwcmfNLghkmb2pzGz7HRDS5GS2uA3hu/c2cv4gCxDsw8pPUPCOvww+Hzf48Kug==", + "version": "0.20.36", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.20.36.tgz", + "integrity": "sha512-qFU+DWMV/hifQ9ZAlTjdFO9wbUIHuUBpNXzv68ZyURAP9pInjZiO4+jCPeAzHVcaBCHER9WL/+YzzTt6ZlN/Nw==", "dev": true, "requires": { "colors": "^1.4.0", @@ -19340,12 +19565,12 @@ "handlebars": "^4.7.7", "lodash": "^4.17.21", "lunr": "^2.3.9", - "marked": "^2.0.1", + "marked": "^2.0.3", "minimatch": "^3.0.0", "progress": "^2.0.3", "shelljs": "^0.8.4", "shiki": "^0.9.3", - "typedoc-default-themes": "^0.12.9" + "typedoc-default-themes": "^0.12.10" }, "dependencies": { "lodash": { @@ -19357,15 +19582,15 @@ } }, "typedoc-default-themes": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.12.9.tgz", - "integrity": "sha512-Jd5fYTiqzinZdoIY382W7tQXTwAzWRdg8KbHfaxmb78m1/3jL9riXtk23oBOKwhi8GFVykCOdPzEJKY87/D0LQ==", + "version": "0.12.10", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.12.10.tgz", + "integrity": "sha512-fIS001cAYHkyQPidWXmHuhs8usjP5XVJjWB8oZGqkTowZaz3v7g3KDZeeqE82FBrmkAnIBOY3jgy7lnPnqATbA==", "dev": true }, "typescript": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", - "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", "dev": true }, "uglify-js": { @@ -19438,19 +19663,19 @@ "dev": true }, "web3-eth-abi": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.3.4.tgz", - "integrity": "sha512-PVSLXJ2dzdXsC+R24llIIEOS6S1KhG5qwNznJjJvXZFe3sqgdSe47eNvwUamZtCBjcrdR/HQr+L/FTxqJSf80Q==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.3.5.tgz", + "integrity": "sha512-bkbG2v/mOW5DH6rF/SEgqunusjYoEi2IBw+fkmD3rzWDaEY7+/i1xY94AeO257d06QMgld75GtV/N+aEs7A6vQ==", "requires": { "@ethersproject/abi": "5.0.7", "underscore": "1.9.1", - "web3-utils": "1.3.4" + "web3-utils": "1.3.5" } }, "web3-utils": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.4.tgz", - "integrity": "sha512-/vC2v0MaZNpWooJfpRw63u0Y3ag2gNjAWiLtMSL6QQLmCqCy4SQIndMt/vRyx0uMoeGt1YTwSXEcHjUzOhLg0A==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", + "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", "requires": { "bn.js": "^4.11.9", "eth-lib": "0.2.8", diff --git a/package.json b/package.json index c91f242b..2119a34f 100644 --- a/package.json +++ b/package.json @@ -86,28 +86,29 @@ "solc-0.8.1": "npm:solc-0.8.1-fixed@0.8.1", "solc-0.8.2": "npm:solc@0.8.2", "solc-0.8.3": "npm:solc@0.8.3", + "solc-0.8.4": "npm:solc@0.8.4", "src-location": "^1.1.0", - "web3-eth-abi": "^1.3.4" + "web3-eth-abi": "^1.3.5" }, "devDependencies": { - "@types/fs-extra": "^9.0.9", + "@types/fs-extra": "^9.0.11", "@types/minimist": "^1.2.1", "@types/mocha": "^8.2.2", - "@types/node": "^12.20.7", - "@types/semver": "^7.3.4", - "@typescript-eslint/eslint-plugin": "^4.19.0", - "@typescript-eslint/parser": "^4.19.0", + "@types/node": "^12.20.10", + "@types/semver": "^7.3.5", + "@typescript-eslint/eslint-plugin": "^4.22.0", + "@typescript-eslint/parser": "^4.22.0", "codecov": "^3.8.1", - "eslint": "^7.23.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-prettier": "^3.3.1", + "eslint": "^7.25.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-prettier": "^3.4.0", "expect": "^26.6.2", "mocha": "^8.3.2", "nyc": "^15.1.0", "prettier": "2.2.1", "ts-node": "^9.1.1", - "typedoc": "^0.20.34", - "typescript": "^4.2.3" + "typedoc": "^0.20.36", + "typescript": "^4.2.4" }, "homepage": "https://consensys.github.io/solc-typed-ast", "bugs": "https://github.com/ConsenSys/solc-typed-ast/issues", diff --git a/src/ast/ast_node_factory.ts b/src/ast/ast_node_factory.ts index 63e5a092..77c488fd 100644 --- a/src/ast/ast_node_factory.ts +++ b/src/ast/ast_node_factory.ts @@ -4,6 +4,7 @@ import { FunctionStateMutability, FunctionVisibility } from "./constants"; import { ContractDefinition } from "./implementation/declaration/contract_definition"; import { EnumDefinition } from "./implementation/declaration/enum_definition"; import { EnumValue } from "./implementation/declaration/enum_value"; +import { ErrorDefinition } from "./implementation/declaration/error_definition"; import { EventDefinition } from "./implementation/declaration/event_definition"; import { FunctionDefinition } from "./implementation/declaration/function_definition"; import { ModifierDefinition } from "./implementation/declaration/modifier_definition"; @@ -46,6 +47,7 @@ import { IfStatement } from "./implementation/statement/if_statement"; import { InlineAssembly } from "./implementation/statement/inline_assembly"; import { PlaceholderStatement } from "./implementation/statement/placeholder_statement"; import { Return } from "./implementation/statement/return"; +import { RevertStatement } from "./implementation/statement/revert_statement"; import { Statement } from "./implementation/statement/statement"; import { Throw } from "./implementation/statement/throw"; import { TryCatchClause } from "./implementation/statement/try_catch_clause"; @@ -96,6 +98,7 @@ const argExtractionMapping = new Map, (node: any) => node.abstract, node.fullyImplemented, node.linearizedBaseContracts, + node.usedErrors, node.documentation, node.children, node.nameLocation, @@ -120,6 +123,16 @@ const argExtractionMapping = new Map, (node: any) => node.raw ] ], + [ + ErrorDefinition, + (node: ErrorDefinition): Specific> => [ + node.name, + node.vParameters, + node.documentation, + node.nameLocation, + node.raw + ] + ], [ EventDefinition, (node: EventDefinition): Specific> => [ @@ -535,6 +548,14 @@ const argExtractionMapping = new Map, (node: any) => node.raw ] ], + [ + RevertStatement, + (node: RevertStatement): Specific> => [ + node.errorCall, + node.documentation, + node.raw + ] + ], [ Statement, (node: Statement): Specific> => [ @@ -677,6 +698,12 @@ export class ASTNodeFactory { return this.make(EnumValue, ...args); } + makeErrorDefinition( + ...args: Specific> + ): ErrorDefinition { + return this.make(ErrorDefinition, ...args); + } + makeEventDefinition( ...args: Specific> ): EventDefinition { @@ -905,6 +932,12 @@ export class ASTNodeFactory { return this.make(Return, ...args); } + makeRevertStatement( + ...args: Specific> + ): RevertStatement { + return this.make(RevertStatement, ...args); + } + makeStatement(...args: Specific>): Statement { return this.make(Statement, ...args); } @@ -977,6 +1010,7 @@ export class ASTNodeFactory { | ContractDefinition | FunctionDefinition | StructDefinition + | ErrorDefinition | EventDefinition | EnumDefinition | ImportDirective @@ -1007,7 +1041,7 @@ export class ASTNodeFactory { typeString = result.join(" "); } else if (target instanceof ContractDefinition) { typeString = `type(contract ${target.name})`; - } else if (target instanceof EventDefinition) { + } else if (target instanceof EventDefinition || target instanceof ErrorDefinition) { const args = target.vParameters.vParameters.map(this.typeExtractor); typeString = `function (${args.join(",")})`; @@ -1092,6 +1126,7 @@ export class ASTNodeFactory { if (node instanceof ContractDefinition) { node.linearizedBaseContracts = node.linearizedBaseContracts.map(patch); + node.usedErrors = node.usedErrors.map(patch); } if ( diff --git a/src/ast/implementation/declaration/contract_definition.ts b/src/ast/implementation/declaration/contract_definition.ts index be4819f4..f5460b4b 100644 --- a/src/ast/implementation/declaration/contract_definition.ts +++ b/src/ast/implementation/declaration/contract_definition.ts @@ -5,6 +5,7 @@ import { SourceUnit } from "../meta/source_unit"; import { StructuredDocumentation } from "../meta/structured_documentation"; import { UsingForDirective } from "../meta/using_for_directive"; import { EnumDefinition } from "./enum_definition"; +import { ErrorDefinition } from "./error_definition"; import { EventDefinition } from "./event_definition"; import { FunctionDefinition } from "./function_definition"; import { ModifierDefinition } from "./modifier_definition"; @@ -54,6 +55,11 @@ export class ContractDefinition extends ASTNodeWithChildren { */ linearizedBaseContracts: number[]; + /** + * Used error definition ids (including external definition ids) + */ + usedErrors: number[]; + constructor( id: number, src: string, @@ -64,6 +70,7 @@ export class ContractDefinition extends ASTNodeWithChildren { abstract: boolean, fullyImplemented: boolean, linearizedBaseContracts: number[], + usedErrors: number[], documentation?: string | StructuredDocumentation, children?: Iterable, nameLocation?: string, @@ -77,6 +84,7 @@ export class ContractDefinition extends ASTNodeWithChildren { this.abstract = abstract; this.fullyImplemented = fullyImplemented; this.linearizedBaseContracts = linearizedBaseContracts; + this.usedErrors = usedErrors; if (children) { for (const node of children) { @@ -150,6 +158,15 @@ export class ContractDefinition extends ASTNodeWithChildren { return this.linearizedBaseContracts.map((id) => context.locate(id)) as ContractDefinition[]; } + /** + * Used error definitions (including external definitions) + */ + get vUsedErrors(): readonly ErrorDefinition[] { + const context = this.requiredContext; + + return this.usedErrors.map((id) => context.locate(id)) as ErrorDefinition[]; + } + /** * Inheritance specifiers */ @@ -188,6 +205,15 @@ export class ContractDefinition extends ASTNodeWithChildren { ) as EventDefinition[]; } + /** + * Errors of the contract + */ + get vErrors(): readonly ErrorDefinition[] { + return this.ownChildren.filter( + (node) => node instanceof ErrorDefinition + ) as ErrorDefinition[]; + } + /** * Functions of the contract */ diff --git a/src/ast/implementation/declaration/error_definition.ts b/src/ast/implementation/declaration/error_definition.ts new file mode 100644 index 00000000..03d096e9 --- /dev/null +++ b/src/ast/implementation/declaration/error_definition.ts @@ -0,0 +1,61 @@ +import { ASTNode } from "../../ast_node"; +import { ParameterList } from "../meta/parameter_list"; +import { StructuredDocumentation } from "../meta/structured_documentation"; +import { ContractDefinition } from "./contract_definition"; + +export class ErrorDefinition extends ASTNode { + /** + * The name of the error + */ + name: string; + + /** + * The source range for name string + */ + nameLocation?: string; + + /** + * Optional documentation appearing above the error definition: + * - Is `undefined` when not specified. + * - Is type of `string` when specified and compiler version is older than `0.6.3`. + * - Is instance of `StructuredDocumentation` when specified and compiler version is `0.6.3` or newer. + */ + documentation?: string | StructuredDocumentation; + + /** + * A list of values that is passed on to the EVM logging facility + */ + vParameters: ParameterList; + + constructor( + id: number, + src: string, + type: string, + name: string, + parameters: ParameterList, + documentation?: string | StructuredDocumentation, + nameLocation?: string, + raw?: any + ) { + super(id, src, type, raw); + + this.name = name; + this.documentation = documentation; + this.nameLocation = nameLocation; + + this.vParameters = parameters; + + this.acceptChildren(); + } + + get children(): readonly ASTNode[] { + return this.pickNodes(this.documentation, this.vParameters); + } + + /** + * Reference to its scoped contract + */ + get vScope(): ContractDefinition { + return this.parent as ContractDefinition; + } +} diff --git a/src/ast/implementation/declaration/index.ts b/src/ast/implementation/declaration/index.ts index 4d5e2711..49fcaeaa 100644 --- a/src/ast/implementation/declaration/index.ts +++ b/src/ast/implementation/declaration/index.ts @@ -1,6 +1,7 @@ export * from "./contract_definition"; export * from "./enum_definition"; export * from "./enum_value"; +export * from "./error_definition"; export * from "./event_definition"; export * from "./function_definition"; export * from "./modifier_definition"; diff --git a/src/ast/implementation/meta/source_unit.ts b/src/ast/implementation/meta/source_unit.ts index d4941551..b2f078aa 100644 --- a/src/ast/implementation/meta/source_unit.ts +++ b/src/ast/implementation/meta/source_unit.ts @@ -1,6 +1,7 @@ import { ASTNode, ASTNodeWithChildren } from "../../ast_node"; import { ContractDefinition } from "../declaration/contract_definition"; import { EnumDefinition } from "../declaration/enum_definition"; +import { ErrorDefinition } from "../declaration/error_definition"; import { FunctionDefinition } from "../declaration/function_definition"; import { StructDefinition } from "../declaration/struct_definition"; import { VariableDeclaration } from "../declaration/variable_declaration"; @@ -11,6 +12,7 @@ export type ExportedSymbol = | ContractDefinition | StructDefinition | EnumDefinition + | ErrorDefinition | FunctionDefinition | VariableDeclaration | ImportDirective; @@ -97,6 +99,15 @@ export class SourceUnit extends ASTNodeWithChildren { ) as EnumDefinition[]; } + /** + * References to file-level error definitions + */ + get vErrors(): readonly ErrorDefinition[] { + return this.ownChildren.filter( + (node) => node instanceof ErrorDefinition + ) as ErrorDefinition[]; + } + /** * References to file-level struct definitions */ diff --git a/src/ast/implementation/statement/index.ts b/src/ast/implementation/statement/index.ts index daf6c285..48dd7476 100644 --- a/src/ast/implementation/statement/index.ts +++ b/src/ast/implementation/statement/index.ts @@ -9,6 +9,7 @@ export * from "./if_statement"; export * from "./inline_assembly"; export * from "./placeholder_statement"; export * from "./return"; +export * from "./revert_statement"; export * from "./statement"; export * from "./throw"; export * from "./try_catch_clause"; diff --git a/src/ast/implementation/statement/revert_statement.ts b/src/ast/implementation/statement/revert_statement.ts new file mode 100644 index 00000000..0232b614 --- /dev/null +++ b/src/ast/implementation/statement/revert_statement.ts @@ -0,0 +1,29 @@ +import { ASTNode } from "../../ast_node"; +import { FunctionCall } from "../expression/function_call"; +import { Statement } from "./statement"; + +export class RevertStatement extends Statement { + /** + * A function call to the error definition + */ + errorCall: FunctionCall; + + constructor( + id: number, + src: string, + type: string, + errorCall: FunctionCall, + documentation?: string, + raw?: any + ) { + super(id, src, type, documentation, raw); + + this.errorCall = errorCall; + + this.acceptChildren(); + } + + get children(): readonly ASTNode[] { + return this.pickNodes(this.errorCall); + } +} diff --git a/src/ast/legacy/contract_definition_processor.ts b/src/ast/legacy/contract_definition_processor.ts index fe7d2afc..e535fcb8 100644 --- a/src/ast/legacy/contract_definition_processor.ts +++ b/src/ast/legacy/contract_definition_processor.ts @@ -41,6 +41,7 @@ export class LegacyContractDefinitionProcessor extends LegacyNodeProcessor { + process( + reader: ASTReader, + config: ASTReaderConfiguration, + raw: any + ): ConstructorParameters { + const [id, src, type] = super.process(reader, config, raw); + + const name: string = raw.name; + const nameLocation: string | undefined = raw.nameLocation; + + let documentation: string | StructuredDocumentation | undefined; + + if (raw.documentation) { + documentation = + typeof raw.documentation === "string" + ? raw.documentation + : reader.convert(raw.documentation, config); + } + + const parameters = reader.convert(raw.parameters, config) as ParameterList; + + return [id, src, type, name, parameters, documentation, nameLocation, raw]; + } +} diff --git a/src/ast/modern/index.ts b/src/ast/modern/index.ts index 9757998a..26502674 100644 --- a/src/ast/modern/index.ts +++ b/src/ast/modern/index.ts @@ -14,6 +14,7 @@ export * from "./elementary_type_name_processor"; export * from "./emit_statement_processor"; export * from "./enum_definition_processor"; export * from "./enum_value_processor"; +export * from "./error_definition_processor"; export * from "./event_definition_processor"; export * from "./expression_processor"; export * from "./expression_statement_processor"; @@ -42,6 +43,7 @@ export * from "./parameter_list_processor"; export * from "./placeholder_statement_processor"; export * from "./pragma_directive_processor"; export * from "./return_processor"; +export * from "./revert_statement_processor"; export * from "./source_unit_processor"; export * from "./structured_documentation_processor"; export * from "./struct_definition_processor"; diff --git a/src/ast/modern/revert_statement_processor.ts b/src/ast/modern/revert_statement_processor.ts new file mode 100644 index 00000000..bfbf8d14 --- /dev/null +++ b/src/ast/modern/revert_statement_processor.ts @@ -0,0 +1,20 @@ +import { ASTReader, ASTReaderConfiguration } from "../ast_reader"; +import { FunctionCall } from "../implementation/expression/function_call"; +import { RevertStatement } from "../implementation/statement/revert_statement"; +import { ModernNodeProcessor } from "./node_processor"; + +export class ModernRevertStatementProcessor extends ModernNodeProcessor { + process( + reader: ASTReader, + config: ASTReaderConfiguration, + raw: any + ): ConstructorParameters { + const [id, src, type] = super.process(reader, config, raw); + + const documentation: string | undefined = raw.documentation; + + const errorCall = reader.convert(raw.errorCall, config) as FunctionCall; + + return [id, src, type, errorCall, documentation, raw]; + } +} diff --git a/src/ast/postprocessing/structured_documentation_reconstruction.ts b/src/ast/postprocessing/structured_documentation_reconstruction.ts index b09898dc..5f5d2c67 100644 --- a/src/ast/postprocessing/structured_documentation_reconstruction.ts +++ b/src/ast/postprocessing/structured_documentation_reconstruction.ts @@ -2,6 +2,7 @@ import { ASTNode } from "../ast_node"; import { ASTContext, ASTNodePostprocessor } from "../ast_reader"; import { ContractDefinition, + ErrorDefinition, EventDefinition, FunctionDefinition, ModifierDefinition, @@ -121,6 +122,7 @@ type SupportedNode = | FunctionDefinition | ContractDefinition | VariableDeclaration + | ErrorDefinition | EventDefinition | ModifierDefinition; @@ -162,6 +164,7 @@ export class StructuredDocumentationReconstructingPostprocessor implements ASTNo return ( node instanceof FunctionDefinition || node instanceof ContractDefinition || + node instanceof ErrorDefinition || node instanceof EventDefinition || node instanceof ModifierDefinition || (node instanceof VariableDeclaration && diff --git a/src/ast/sanity.ts b/src/ast/sanity.ts index 04e0a0ba..70a806ad 100644 --- a/src/ast/sanity.ts +++ b/src/ast/sanity.ts @@ -15,6 +15,7 @@ import { EmitStatement, EnumDefinition, EnumValue, + ErrorDefinition, EventDefinition, ExpressionStatement, ForStatement, @@ -41,6 +42,7 @@ import { PlaceholderStatement, PragmaDirective, Return, + RevertStatement, SourceUnit, StructDefinition, StructuredDocumentation, @@ -401,7 +403,8 @@ export function checkSane(unit: SourceUnit, ctx: ASTContext): void { "vEnums", "vStructs", "vFunctions", - "vVariables" + "vVariables", + "vErrors" ); } else if (node instanceof ImportDirective) { /** @@ -462,14 +465,18 @@ export function checkSane(unit: SourceUnit, ctx: ASTContext): void { ); } - checkFieldAndVFieldMatch(node, `linearizedBaseContracts`, `vLinearizedBaseContracts`); - checkVFieldCtx(node, `vLinearizedBaseContracts`, ctx); + checkFieldAndVFieldMatch(node, "linearizedBaseContracts", "vLinearizedBaseContracts"); + checkVFieldCtx(node, "vLinearizedBaseContracts", ctx); + + checkFieldAndVFieldMatch(node, "usedErrors", "vUsedErrors"); + checkVFieldCtx(node, "vUsedErrors", ctx); const fields: Array = [ "documentation", "vInheritanceSpecifiers", "vStateVariables", "vModifiers", + "vErrors", "vEvents", "vFunctions", "vUsingForDirectives", @@ -489,6 +496,18 @@ export function checkSane(unit: SourceUnit, ctx: ASTContext): void { checkVFieldCtx(node, "vScope", ctx); checkDirectChildren(node, "vMembers"); + } else if (node instanceof ErrorDefinition) { + checkVFieldCtx(node, "vScope", ctx); + + const fields: Array = ["vParameters"]; + + if (node.documentation instanceof StructuredDocumentation) { + checkVFieldCtx(node, "documentation", ctx); + + fields.push("documentation"); + } + + checkDirectChildren(node, ...fields); } else if (node instanceof EventDefinition) { checkVFieldCtx(node, "vScope", ctx); @@ -564,6 +583,8 @@ export function checkSane(unit: SourceUnit, ctx: ASTContext): void { checkDirectChildren(node, "vCondition", "vBody"); } else if (node instanceof EmitStatement) { checkDirectChildren(node, "vEventCall"); + } else if (node instanceof RevertStatement) { + checkDirectChildren(node, "errorCall"); } else if (node instanceof ExpressionStatement) { checkDirectChildren(node, "vExpression"); } else if (node instanceof ForStatement) { diff --git a/src/ast/writing/ast_mapping.ts b/src/ast/writing/ast_mapping.ts index 2518b39c..65ed5842 100644 --- a/src/ast/writing/ast_mapping.ts +++ b/src/ast/writing/ast_mapping.ts @@ -12,6 +12,7 @@ import { ContractDefinition, EnumDefinition, EnumValue, + ErrorDefinition, EventDefinition, FunctionDefinition, ModifierDefinition, @@ -58,6 +59,7 @@ import { InlineAssembly, PlaceholderStatement, Return, + RevertStatement, Statement, Throw, TryCatchClause, @@ -677,6 +679,12 @@ class ReturnWriter extends SimpleStatementWriter { } } +class RevertStatementWriter extends SimpleStatementWriter { + writeInner(node: RevertStatement, writer: ASTWriter): SrcDesc { + return writer.desc("revert ", node.errorCall); + } +} + class BreakWriter extends SimpleStatementWriter { writeInner(): SrcDesc { return ["break"]; @@ -933,6 +941,16 @@ class UncheckedBlockWriter extends ASTNodeWriter { } } +class ErrorDefinitionWriter extends ASTNodeWriter { + writeInner(node: ErrorDefinition, writer: ASTWriter): SrcDesc { + return writer.desc("error ", node.name, node.vParameters, ";"); + } + + writeWhole(node: ErrorDefinition, writer: ASTWriter): SrcDesc { + return [...writeDocs(node.documentation, writer), [node, this.writeInner(node, writer)]]; + } +} + class EventDefinitionWriter extends ASTNodeWriter { writeInner(node: EventDefinition, writer: ASTWriter): SrcDesc { return writer.desc( @@ -1187,6 +1205,10 @@ class ContractDefinitionWriter extends ASTNodeWriter { result.push(...flatJoin(node.vEnums.map(writeLineFn), wrap), wrap); } + if (node.vErrors.length) { + result.push(...flatJoin(node.vErrors.map(writeLineFn), wrap), wrap); + } + if (node.vEvents.length) { result.push(...flatJoin(node.vEvents.map(writeLineFn), wrap), wrap); } @@ -1293,7 +1315,10 @@ class SourceUnitWriter extends ASTNodeWriter { result.push(...flatten(node.vVariables.map((n) => [...writeFn(n), ";", wrap])), wrap); } - const otherDefs = (node.vFunctions as readonly ASTNode[]).concat(node.vContracts); + const otherDefs = (node.vErrors as readonly ASTNode[]).concat( + node.vFunctions, + node.vContracts + ); if (otherDefs.length > 0) { result.push(...flatJoin(otherDefs.map(writeLineFn), wrap)); @@ -1337,6 +1362,7 @@ export const DefaultASTWriterMapping = new Map, ASTN [DoWhileStatement, new DoWhileStatementWriter()], [Return, new ReturnWriter()], [EmitStatement, new EmitStatementWriter()], + [RevertStatement, new RevertStatementWriter()], [PlaceholderStatement, new PlaceholderStatementWriter()], [InlineAssembly, new InlineAssemblyWriter()], [TryCatchClause, new TryCatchClauseWriter()], @@ -1349,6 +1375,7 @@ export const DefaultASTWriterMapping = new Map, ASTN [OverrideSpecifier, new OverrideSpecifierWriter()], [FunctionDefinition, new FunctionDefinitionWriter()], [ModifierDefinition, new ModifierDefinitionWriter()], + [ErrorDefinition, new ErrorDefinitionWriter()], [EventDefinition, new EventDefinitionWriter()], [StructDefinition, new StructDefinitionWriter()], [EnumValue, new EnumValueWriter()], diff --git a/src/compile/constants.ts b/src/compile/constants.ts index 17a75a95..1f467499 100644 --- a/src/compile/constants.ts +++ b/src/compile/constants.ts @@ -54,7 +54,7 @@ export const CompilerVersions06 = [ export const CompilerVersions07 = ["0.7.0", "0.7.1", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6"]; -export const CompilerVersions08 = ["0.8.0", "0.8.1", "0.8.2", "0.8.3"]; +export const CompilerVersions08 = ["0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4"]; export const CompilerSeries = [ CompilerVersions04, diff --git a/test/integration/compile/latest_08.spec.ts b/test/integration/compile/latest_08.spec.ts index bdb2fa5d..dab5e8d6 100644 --- a/test/integration/compile/latest_08.spec.ts +++ b/test/integration/compile/latest_08.spec.ts @@ -28,28 +28,28 @@ const encounters = new Map([ ["ImportDirective", 1], ["EnumDefinition", 2], ["EnumValue", 6], - ["ContractDefinition", 5], - ["FunctionDefinition", 7], - ["ParameterList", 20], - ["VariableDeclaration", 15], - ["ElementaryTypeName", 14], - ["Block", 24], - ["VariableDeclarationStatement", 8], - ["Literal", 18], + ["ContractDefinition", 7], + ["FunctionDefinition", 13], + ["ParameterList", 35], + ["VariableDeclaration", 21], + ["ElementaryTypeName", 21], + ["Block", 30], + ["VariableDeclarationStatement", 9], + ["Literal", 21], ["UncheckedBlock", 2], ["ExpressionStatement", 7], ["UnaryOperation", 2], - ["Identifier", 15], - ["Return", 3], + ["Identifier", 20], + ["Return", 4], ["InheritanceSpecifier", 1], ["IdentifierPath", 11], ["UsingForDirective", 1], ["UserDefinedTypeName", 6], ["ModifierInvocation", 2], - ["FunctionCall", 12], - ["MemberAccess", 6], + ["FunctionCall", 16], + ["MemberAccess", 8], ["OverrideSpecifier", 1], - ["ElementaryTypeNameExpression", 2], + ["ElementaryTypeNameExpression", 3], ["NewExpression", 2], ["TryStatement", 2], ["TryCatchClause", 8], @@ -65,7 +65,10 @@ const encounters = new Map([ ["DoWhileStatement", 1], ["Break", 1], ["ForStatement", 1], - ["InlineAssembly", 1] + ["InlineAssembly", 2], + ["ErrorDefinition", 3], + ["StructuredDocumentation", 3], + ["RevertStatement", 3] ]); describe(`Compile ${mainSample} with ${compilerVersion} compiler`, () => { @@ -98,11 +101,11 @@ describe(`Compile ${mainSample} with ${compilerVersion} compiler`, () => { const sourceUnit = sourceUnits[0]; - expect(sourceUnit.id).toEqual(227); - expect(sourceUnit.src).toEqual("0:3351:0"); + expect(sourceUnit.id).toEqual(298); + expect(sourceUnit.src).toEqual("0:4474:0"); expect(sourceUnit.absolutePath).toEqual(mainSample); - expect(sourceUnit.children.length).toEqual(9); - expect(sourceUnit.getChildren().length).toEqual(223); + expect(sourceUnit.children.length).toEqual(12); + expect(sourceUnit.getChildren().length).toEqual(292); }); it(`Validate parsed output (${kind})`, () => { diff --git a/test/samples/solidity/declarations/contract_050.nodes.txt b/test/samples/solidity/declarations/contract_050.nodes.txt index 29a6a863..cf187370 100644 --- a/test/samples/solidity/declarations/contract_050.nodes.txt +++ b/test/samples/solidity/declarations/contract_050.nodes.txt @@ -11,6 +11,7 @@ SourceUnit #146 vImportDirectives: Array(0) vContracts: Array(3) [ ContractDefinition #90, ContractDefinition #100, ContractDefinition #145 ] vEnums: Array(0) + vErrors: Array(0) vStructs: Array(0) vFunctions: Array(0) vVariables: Array(0) @@ -33,6 +34,7 @@ SourceUnit #146 abstract: false fullyImplemented: true linearizedBaseContracts: Array(1) [ 90 ] + usedErrors: Array(0) docString: undefined nameLocation: undefined context: ASTContext #1000 @@ -40,10 +42,12 @@ SourceUnit #146 documentation: undefined vScope: SourceUnit #146 vLinearizedBaseContracts: Array(1) [ ContractDefinition #90 ] + vUsedErrors: Array(0) vInheritanceSpecifiers: Array(0) vStateVariables: Array(0) vModifiers: Array(0) vEvents: Array(0) + vErrors: Array(0) vFunctions: Array(1) [ FunctionDefinition #89 ] vUsingForDirectives: Array(0) vStructs: Array(0) @@ -402,6 +406,7 @@ SourceUnit #146 abstract: false fullyImplemented: false linearizedBaseContracts: Array(1) [ 100 ] + usedErrors: Array(0) docString: undefined nameLocation: undefined context: ASTContext #1000 @@ -409,10 +414,12 @@ SourceUnit #146 documentation: undefined vScope: SourceUnit #146 vLinearizedBaseContracts: Array(1) [ ContractDefinition #100 ] + vUsedErrors: Array(0) vInheritanceSpecifiers: Array(0) vStateVariables: Array(0) vModifiers: Array(0) vEvents: Array(0) + vErrors: Array(0) vFunctions: Array(1) [ FunctionDefinition #99 ] vUsingForDirectives: Array(0) vStructs: Array(0) @@ -646,6 +653,7 @@ SourceUnit #146 abstract: false fullyImplemented: true linearizedBaseContracts: Array(2) [ 145, 100 ] + usedErrors: Array(0) docString: undefined nameLocation: undefined context: ASTContext #1000 @@ -653,10 +661,12 @@ SourceUnit #146 documentation: undefined vScope: SourceUnit #146 vLinearizedBaseContracts: Array(2) [ ContractDefinition #145, ContractDefinition #100 ] + vUsedErrors: Array(0) vInheritanceSpecifiers: Array(1) [ InheritanceSpecifier #102 ] vStateVariables: Array(1) [ VariableDeclaration #118 ] vModifiers: Array(0) vEvents: Array(1) [ EventDefinition #106 ] + vErrors: Array(0) vFunctions: Array(2) [ FunctionDefinition #129, FunctionDefinition #144 ] vUsingForDirectives: Array(1) [ UsingForDirective #116 ] vStructs: Array(1) [ StructDefinition #109 ] diff --git a/test/samples/solidity/latest_08.nodes.txt b/test/samples/solidity/latest_08.nodes.txt index cb7f75db..56e9c57b 100644 --- a/test/samples/solidity/latest_08.nodes.txt +++ b/test/samples/solidity/latest_08.nodes.txt @@ -1,194 +1,198 @@ -SourceUnit #467 - id: 467 +SourceUnit #607 + id: 607 src: "0:0:0" type: "SourceUnit" sourceEntryKey: "./test/samples/solidity/latest_08.sol" sourceListIndex: 0 absolutePath: "./test/samples/solidity/latest_08.sol" - exportedSymbols: Map(7) { "CatchPanic" -> 381, "EmitsIdentifierPath" -> 303, "EnumABC" -> 250, "Features082" -> 466, "LI" -> 246, "UncheckedMathExample" -> 267, "UsesNewAddressMembers" -> 324 } + exportedSymbols: Map(10) { "CatchPanic" -> 452, "EmitsIdentifierPath" -> 374, "EnumABC" -> 321, "Features082" -> 537, "Features084" -> 606, "LI" -> 317, "LibErrors084" -> 548, "UncheckedMathExample" -> 338, "UnitLevelError084" -> 542, "UsesNewAddressMembers" -> 395 } context: ASTContext #1000 - vPragmaDirectives: Array(2) [ PragmaDirective #244, PragmaDirective #245 ] - vImportDirectives: Array(1) [ ImportDirective #246 ] - vContracts: Array(5) [ ContractDefinition #267, ContractDefinition #303, ContractDefinition #324, ContractDefinition #381, ContractDefinition #466 ] - vEnums: Array(1) [ EnumDefinition #250 ] + vPragmaDirectives: Array(2) [ PragmaDirective #315, PragmaDirective #316 ] + vImportDirectives: Array(1) [ ImportDirective #317 ] + vContracts: Array(7) [ ContractDefinition #338, ContractDefinition #374, ContractDefinition #395, ContractDefinition #452, ContractDefinition #537, ContractDefinition #548, ContractDefinition #606 ] + vEnums: Array(1) [ EnumDefinition #321 ] + vErrors: Array(1) [ ErrorDefinition #542 ] vStructs: Array(0) vFunctions: Array(0) vVariables: Array(0) - vExportedSymbols: Map(7) { "CatchPanic" -> ContractDefinition #381, "EmitsIdentifierPath" -> ContractDefinition #303, "EnumABC" -> EnumDefinition #250, "Features082" -> ContractDefinition #466, "LI" -> ImportDirective #246, "UncheckedMathExample" -> ContractDefinition #267, "UsesNewAddressMembers" -> ContractDefinition #324 } - children: Array(9) [ PragmaDirective #244, PragmaDirective #245, ImportDirective #246, EnumDefinition #250, ContractDefinition #267, ContractDefinition #303, ContractDefinition #324, ContractDefinition #381, ContractDefinition #466 ] - firstChild: PragmaDirective #244 - lastChild: ContractDefinition #466 + vExportedSymbols: Map(10) { "CatchPanic" -> ContractDefinition #452, "EmitsIdentifierPath" -> ContractDefinition #374, "EnumABC" -> EnumDefinition #321, "Features082" -> ContractDefinition #537, "Features084" -> ContractDefinition #606, "LI" -> ImportDirective #317, "LibErrors084" -> ContractDefinition #548, "UncheckedMathExample" -> ContractDefinition #338, "UnitLevelError084" -> ErrorDefinition #542, "UsesNewAddressMembers" -> ContractDefinition #395 } + children: Array(12) [ PragmaDirective #315, PragmaDirective #316, ImportDirective #317, EnumDefinition #321, ContractDefinition #338, ContractDefinition #374, ContractDefinition #395, ContractDefinition #452, ContractDefinition #537, ErrorDefinition #542, ContractDefinition #548, ContractDefinition #606 ] + firstChild: PragmaDirective #315 + lastChild: ContractDefinition #606 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - PragmaDirective #244 - id: 244 + PragmaDirective #315 + id: 315 src: "0:0:0" type: "PragmaDirective" literals: Array(4) [ "solidity", "^", "0.8", ".0" ] context: ASTContext #1000 - parent: SourceUnit #467 + parent: SourceUnit #607 vIdentifier: "solidity" vValue: "^0.8.0" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: PragmaDirective #245 - root: SourceUnit #467 + nextSibling: PragmaDirective #316 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - PragmaDirective #245 - id: 245 + PragmaDirective #316 + id: 316 src: "0:0:0" type: "PragmaDirective" literals: Array(2) [ "abicoder", "v2" ] context: ASTContext #1000 - parent: SourceUnit #467 + parent: SourceUnit #607 vIdentifier: "abicoder" vValue: "v2" children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: PragmaDirective #244 - nextSibling: ImportDirective #246 - root: SourceUnit #467 + previousSibling: PragmaDirective #315 + nextSibling: ImportDirective #317 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ImportDirective #246 - id: 246 + ImportDirective #317 + id: 317 src: "0:0:0" type: "ImportDirective" file: "./latest_imports_08.sol" absolutePath: "./test/samples/solidity/latest_imports_08.sol" unitAlias: "LI" symbolAliases: Array(0) - scope: 467 - sourceUnit: 243 + scope: 607 + sourceUnit: 314 context: ASTContext #1000 - parent: SourceUnit #467 + parent: SourceUnit #607 children: Array(0) - vScope: SourceUnit #467 - vSourceUnit: SourceUnit #243 + vScope: SourceUnit #607 + vSourceUnit: SourceUnit #314 vSymbolAliases: Array(0) firstChild: undefined lastChild: undefined - previousSibling: PragmaDirective #245 - nextSibling: EnumDefinition #250 - root: SourceUnit #467 + previousSibling: PragmaDirective #316 + nextSibling: EnumDefinition #321 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - EnumDefinition #250 - id: 250 + EnumDefinition #321 + id: 321 src: "0:0:0" type: "EnumDefinition" name: "EnumABC" canonicalName: "EnumABC" nameLocation: "91:7:0" context: ASTContext #1000 - parent: SourceUnit #467 - vMembers: Array(3) [ EnumValue #247, EnumValue #248, EnumValue #249 ] - vScope: SourceUnit #467 - children: Array(3) [ EnumValue #247, EnumValue #248, EnumValue #249 ] - firstChild: EnumValue #247 - lastChild: EnumValue #249 - previousSibling: ImportDirective #246 - nextSibling: ContractDefinition #267 - root: SourceUnit #467 + parent: SourceUnit #607 + vMembers: Array(3) [ EnumValue #318, EnumValue #319, EnumValue #320 ] + vScope: SourceUnit #607 + children: Array(3) [ EnumValue #318, EnumValue #319, EnumValue #320 ] + firstChild: EnumValue #318 + lastChild: EnumValue #320 + previousSibling: ImportDirective #317 + nextSibling: ContractDefinition #338 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - EnumValue #247 - id: 247 + EnumValue #318 + id: 318 src: "0:0:0" type: "EnumValue" name: "A" nameLocation: "105:1:0" context: ASTContext #1000 - parent: EnumDefinition #250 + parent: EnumDefinition #321 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: EnumValue #248 - root: SourceUnit #467 + nextSibling: EnumValue #319 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - EnumValue #248 - id: 248 + EnumValue #319 + id: 319 src: "0:0:0" type: "EnumValue" name: "B" nameLocation: "108:1:0" context: ASTContext #1000 - parent: EnumDefinition #250 + parent: EnumDefinition #321 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: EnumValue #247 - nextSibling: EnumValue #249 - root: SourceUnit #467 + previousSibling: EnumValue #318 + nextSibling: EnumValue #320 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - EnumValue #249 - id: 249 + EnumValue #320 + id: 320 src: "0:0:0" type: "EnumValue" name: "C" nameLocation: "111:1:0" context: ASTContext #1000 - parent: EnumDefinition #250 + parent: EnumDefinition #321 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: EnumValue #248 + previousSibling: EnumValue #319 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ContractDefinition #267 - id: 267 + ContractDefinition #338 + id: 338 src: "0:0:0" type: "ContractDefinition" name: "UncheckedMathExample" - scope: 467 + scope: 607 kind: "contract" abstract: false fullyImplemented: true - linearizedBaseContracts: Array(1) [ 267 ] + linearizedBaseContracts: Array(1) [ 338 ] + usedErrors: Array(0) docString: undefined nameLocation: "125:20:0" context: ASTContext #1000 - parent: SourceUnit #467 + parent: SourceUnit #607 documentation: undefined - vScope: SourceUnit #467 - vLinearizedBaseContracts: Array(1) [ ContractDefinition #267 ] + vScope: SourceUnit #607 + vLinearizedBaseContracts: Array(1) [ ContractDefinition #338 ] + vUsedErrors: Array(0) vInheritanceSpecifiers: Array(0) vStateVariables: Array(0) vModifiers: Array(0) vEvents: Array(0) - vFunctions: Array(1) [ FunctionDefinition #266 ] + vErrors: Array(0) + vFunctions: Array(1) [ FunctionDefinition #337 ] vUsingForDirectives: Array(0) vStructs: Array(0) vEnums: Array(0) vConstructor: undefined interfaceId: undefined - children: Array(1) [ FunctionDefinition #266 ] - firstChild: FunctionDefinition #266 - lastChild: FunctionDefinition #266 - previousSibling: EnumDefinition #250 - nextSibling: ContractDefinition #303 - root: SourceUnit #467 + children: Array(1) [ FunctionDefinition #337 ] + firstChild: FunctionDefinition #337 + lastChild: FunctionDefinition #337 + previousSibling: EnumDefinition #321 + nextSibling: ContractDefinition #374 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionDefinition #266 - id: 266 + FunctionDefinition #337 + id: 337 src: "0:0:0" type: "FunctionDefinition" implemented: true virtual: false - scope: 267 + scope: 338 kind: "function" name: "test" visibility: "public" @@ -196,62 +200,62 @@ SourceUnit #467 isConstructor: false documentation: undefined nameLocation: "161:4:0" - vParameters: ParameterList #251 - vReturnParameters: ParameterList #254 + vParameters: ParameterList #322 + vReturnParameters: ParameterList #325 vModifiers: Array(0) vOverrideSpecifier: undefined - vBody: Block #265 + vBody: Block #336 context: ASTContext #1000 - parent: ContractDefinition #267 - children: Array(3) [ ParameterList #251, ParameterList #254, Block #265 ] - vScope: ContractDefinition #267 + parent: ContractDefinition #338 + children: Array(3) [ ParameterList #322, ParameterList #325, Block #336 ] + vScope: ContractDefinition #338 canonicalSignature: "test()" canonicalSignatureHash: "f8a8fd6d" - firstChild: ParameterList #251 - lastChild: Block #265 + firstChild: ParameterList #322 + lastChild: Block #336 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #251 - id: 251 + ParameterList #322 + id: 322 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #266 + parent: FunctionDefinition #337 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: ParameterList #254 - root: SourceUnit #467 + nextSibling: ParameterList #325 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #254 - id: 254 + ParameterList #325 + id: 325 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #266 - vParameters: Array(1) [ VariableDeclaration #253 ] - children: Array(1) [ VariableDeclaration #253 ] - firstChild: VariableDeclaration #253 - lastChild: VariableDeclaration #253 - previousSibling: ParameterList #251 - nextSibling: Block #265 - root: SourceUnit #467 + parent: FunctionDefinition #337 + vParameters: Array(1) [ VariableDeclaration #324 ] + children: Array(1) [ VariableDeclaration #324 ] + firstChild: VariableDeclaration #324 + lastChild: VariableDeclaration #324 + previousSibling: ParameterList #322 + nextSibling: Block #336 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #253 - id: 253 + VariableDeclaration #324 + id: 324 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "" - scope: 266 + scope: 337 stateVariable: false storageLocation: "default" visibility: "internal" @@ -259,82 +263,82 @@ SourceUnit #467 typeString: "uint256" documentation: undefined nameLocation: "-1:-1:-1" - vType: ElementaryTypeName #252 + vType: ElementaryTypeName #323 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: ParameterList #254 - children: Array(1) [ ElementaryTypeName #252 ] - vScope: FunctionDefinition #266 + parent: ParameterList #325 + children: Array(1) [ ElementaryTypeName #323 ] + vScope: FunctionDefinition #337 canonicalSignatureType: "uint256" getterCanonicalSignature: "()" getterCanonicalSignatureHash: "861731d5" - firstChild: ElementaryTypeName #252 - lastChild: ElementaryTypeName #252 + firstChild: ElementaryTypeName #323 + lastChild: ElementaryTypeName #323 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #252 - id: 252 + ElementaryTypeName #323 + id: 323 src: "0:0:0" type: "ElementaryTypeName" typeString: "uint256" name: "uint" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #253 + parent: VariableDeclaration #324 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #265 - id: 265 + Block #336 + id: 336 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: FunctionDefinition #266 - vStatements: Array(3) [ VariableDeclarationStatement #258, UncheckedBlock #262, Return #264 ] - children: Array(3) [ VariableDeclarationStatement #258, UncheckedBlock #262, Return #264 ] - firstChild: VariableDeclarationStatement #258 - lastChild: Return #264 - previousSibling: ParameterList #254 + parent: FunctionDefinition #337 + vStatements: Array(3) [ VariableDeclarationStatement #329, UncheckedBlock #333, Return #335 ] + children: Array(3) [ VariableDeclarationStatement #329, UncheckedBlock #333, Return #335 ] + firstChild: VariableDeclarationStatement #329 + lastChild: Return #335 + previousSibling: ParameterList #325 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclarationStatement #258 - id: 258 + VariableDeclarationStatement #329 + id: 329 src: "0:0:0" type: "VariableDeclarationStatement" documentation: undefined - assignments: Array(1) [ 256 ] - vDeclarations: Array(1) [ VariableDeclaration #256 ] - vInitialValue: Literal #257 + assignments: Array(1) [ 327 ] + vDeclarations: Array(1) [ VariableDeclaration #327 ] + vInitialValue: Literal #328 context: ASTContext #1000 - parent: Block #265 - children: Array(2) [ VariableDeclaration #256, Literal #257 ] - firstChild: VariableDeclaration #256 - lastChild: Literal #257 + parent: Block #336 + children: Array(2) [ VariableDeclaration #327, Literal #328 ] + firstChild: VariableDeclaration #327 + lastChild: Literal #328 previousSibling: undefined - nextSibling: UncheckedBlock #262 - root: SourceUnit #467 + nextSibling: UncheckedBlock #333 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #256 - id: 256 + VariableDeclaration #327 + id: 327 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "x" - scope: 265 + scope: 336 stateVariable: false storageLocation: "default" visibility: "internal" @@ -342,42 +346,42 @@ SourceUnit #467 typeString: "uint256" documentation: undefined nameLocation: "210:1:0" - vType: ElementaryTypeName #255 + vType: ElementaryTypeName #326 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: VariableDeclarationStatement #258 - children: Array(1) [ ElementaryTypeName #255 ] - vScope: Block #265 + parent: VariableDeclarationStatement #329 + children: Array(1) [ ElementaryTypeName #326 ] + vScope: Block #336 canonicalSignatureType: "uint256" getterCanonicalSignature: "x()" getterCanonicalSignatureHash: "0c55699c" - firstChild: ElementaryTypeName #255 - lastChild: ElementaryTypeName #255 + firstChild: ElementaryTypeName #326 + lastChild: ElementaryTypeName #326 previousSibling: undefined - nextSibling: Literal #257 - root: SourceUnit #467 + nextSibling: Literal #328 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #255 - id: 255 + ElementaryTypeName #326 + id: 326 src: "0:0:0" type: "ElementaryTypeName" typeString: "uint256" name: "uint" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #256 + parent: VariableDeclaration #327 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #257 - id: 257 + Literal #328 + id: 328 src: "0:0:0" type: "Literal" typeString: "int_const 0" @@ -386,265 +390,268 @@ SourceUnit #467 value: "0" subdenomination: undefined context: ASTContext #1000 - parent: VariableDeclarationStatement #258 + parent: VariableDeclarationStatement #329 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: VariableDeclaration #256 + previousSibling: VariableDeclaration #327 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - UncheckedBlock #262 - id: 262 + UncheckedBlock #333 + id: 333 src: "0:0:0" type: "UncheckedBlock" documentation: undefined context: ASTContext #1000 - parent: Block #265 - vStatements: Array(1) [ ExpressionStatement #261 ] - children: Array(1) [ ExpressionStatement #261 ] - firstChild: ExpressionStatement #261 - lastChild: ExpressionStatement #261 - previousSibling: VariableDeclarationStatement #258 - nextSibling: Return #264 - root: SourceUnit #467 + parent: Block #336 + vStatements: Array(1) [ ExpressionStatement #332 ] + children: Array(1) [ ExpressionStatement #332 ] + firstChild: ExpressionStatement #332 + lastChild: ExpressionStatement #332 + previousSibling: VariableDeclarationStatement #329 + nextSibling: Return #335 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ExpressionStatement #261 - id: 261 + ExpressionStatement #332 + id: 332 src: "0:0:0" type: "ExpressionStatement" documentation: undefined - vExpression: UnaryOperation #260 + vExpression: UnaryOperation #331 context: ASTContext #1000 - parent: UncheckedBlock #262 - children: Array(1) [ UnaryOperation #260 ] - firstChild: UnaryOperation #260 - lastChild: UnaryOperation #260 + parent: UncheckedBlock #333 + children: Array(1) [ UnaryOperation #331 ] + firstChild: UnaryOperation #331 + lastChild: UnaryOperation #331 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - UnaryOperation #260 - id: 260 + UnaryOperation #331 + id: 331 src: "0:0:0" type: "UnaryOperation" typeString: "uint256" prefix: false operator: "--" - vSubExpression: Identifier #259 + vSubExpression: Identifier #330 context: ASTContext #1000 - parent: ExpressionStatement #261 - children: Array(1) [ Identifier #259 ] - firstChild: Identifier #259 - lastChild: Identifier #259 + parent: ExpressionStatement #332 + children: Array(1) [ Identifier #330 ] + firstChild: Identifier #330 + lastChild: Identifier #330 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #259 - id: 259 + Identifier #330 + id: 330 src: "0:0:0" type: "Identifier" typeString: "uint256" name: "x" - referencedDeclaration: 256 + referencedDeclaration: 327 context: ASTContext #1000 - parent: UnaryOperation #260 - vReferencedDeclaration: VariableDeclaration #256 + parent: UnaryOperation #331 + vReferencedDeclaration: VariableDeclaration #327 vIdentifierType: "userDefined" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Return #264 - id: 264 + Return #335 + id: 335 src: "0:0:0" type: "Return" documentation: undefined functionReturnParameters: 11 - vExpression: Identifier #263 + vExpression: Identifier #334 context: ASTContext #1000 - parent: Block #265 - children: Array(1) [ Identifier #263 ] + parent: Block #336 + children: Array(1) [ Identifier #334 ] vFunctionReturnParameters: ParameterList #11 - firstChild: Identifier #263 - lastChild: Identifier #263 - previousSibling: UncheckedBlock #262 + firstChild: Identifier #334 + lastChild: Identifier #334 + previousSibling: UncheckedBlock #333 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #263 - id: 263 + Identifier #334 + id: 334 src: "0:0:0" type: "Identifier" typeString: "uint256" name: "x" - referencedDeclaration: 256 + referencedDeclaration: 327 context: ASTContext #1000 - parent: Return #264 - vReferencedDeclaration: VariableDeclaration #256 + parent: Return #335 + vReferencedDeclaration: VariableDeclaration #327 vIdentifierType: "userDefined" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ContractDefinition #303 - id: 303 + ContractDefinition #374 + id: 374 src: "0:0:0" type: "ContractDefinition" name: "EmitsIdentifierPath" - scope: 467 + scope: 607 kind: "contract" abstract: false fullyImplemented: true - linearizedBaseContracts: Array(2) [ 303, 241 ] + linearizedBaseContracts: Array(2) [ 374, 312 ] + usedErrors: Array(0) docString: undefined nameLocation: "302:19:0" context: ASTContext #1000 - parent: SourceUnit #467 + parent: SourceUnit #607 documentation: undefined - vScope: SourceUnit #467 - vLinearizedBaseContracts: Array(2) [ ContractDefinition #303, ContractDefinition #241 ] - vInheritanceSpecifiers: Array(1) [ InheritanceSpecifier #269 ] + vScope: SourceUnit #607 + vLinearizedBaseContracts: Array(2) [ ContractDefinition #374, ContractDefinition #312 ] + vUsedErrors: Array(0) + vInheritanceSpecifiers: Array(1) [ InheritanceSpecifier #340 ] vStateVariables: Array(0) vModifiers: Array(0) vEvents: Array(0) - vFunctions: Array(3) [ FunctionDefinition #279, FunctionDefinition #292, FunctionDefinition #302 ] - vUsingForDirectives: Array(1) [ UsingForDirective #273 ] + vErrors: Array(0) + vFunctions: Array(3) [ FunctionDefinition #350, FunctionDefinition #363, FunctionDefinition #373 ] + vUsingForDirectives: Array(1) [ UsingForDirective #344 ] vStructs: Array(0) vEnums: Array(0) - vConstructor: FunctionDefinition #279 + vConstructor: FunctionDefinition #350 interfaceId: undefined - children: Array(5) [ InheritanceSpecifier #269, UsingForDirective #273, FunctionDefinition #279, FunctionDefinition #292, FunctionDefinition #302 ] - firstChild: InheritanceSpecifier #269 - lastChild: FunctionDefinition #302 - previousSibling: ContractDefinition #267 - nextSibling: ContractDefinition #324 - root: SourceUnit #467 + children: Array(5) [ InheritanceSpecifier #340, UsingForDirective #344, FunctionDefinition #350, FunctionDefinition #363, FunctionDefinition #373 ] + firstChild: InheritanceSpecifier #340 + lastChild: FunctionDefinition #373 + previousSibling: ContractDefinition #338 + nextSibling: ContractDefinition #395 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - InheritanceSpecifier #269 - id: 269 + InheritanceSpecifier #340 + id: 340 src: "0:0:0" type: "InheritanceSpecifier" - vBaseType: IdentifierPath #268 + vBaseType: IdentifierPath #339 vArguments: Array(0) context: ASTContext #1000 - parent: ContractDefinition #303 - children: Array(1) [ IdentifierPath #268 ] - firstChild: IdentifierPath #268 - lastChild: IdentifierPath #268 + parent: ContractDefinition #374 + children: Array(1) [ IdentifierPath #339 ] + firstChild: IdentifierPath #339 + lastChild: IdentifierPath #339 previousSibling: undefined - nextSibling: UsingForDirective #273 - root: SourceUnit #467 + nextSibling: UsingForDirective #344 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IdentifierPath #268 - id: 268 + IdentifierPath #339 + id: 339 src: "0:0:0" type: "IdentifierPath" name: "LI.SomeContract" - referencedDeclaration: 241 + referencedDeclaration: 312 context: ASTContext #1000 - parent: InheritanceSpecifier #269 - vReferencedDeclaration: ContractDefinition #241 + parent: InheritanceSpecifier #340 + vReferencedDeclaration: ContractDefinition #312 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - UsingForDirective #273 - id: 273 + UsingForDirective #344 + id: 344 src: "0:0:0" type: "UsingForDirective" - vLibraryName: IdentifierPath #270 - vTypeName: UserDefinedTypeName #272 + vLibraryName: IdentifierPath #341 + vTypeName: UserDefinedTypeName #343 context: ASTContext #1000 - parent: ContractDefinition #303 - children: Array(2) [ IdentifierPath #270, UserDefinedTypeName #272 ] - firstChild: IdentifierPath #270 - lastChild: UserDefinedTypeName #272 - previousSibling: InheritanceSpecifier #269 - nextSibling: FunctionDefinition #279 - root: SourceUnit #467 + parent: ContractDefinition #374 + children: Array(2) [ IdentifierPath #341, UserDefinedTypeName #343 ] + firstChild: IdentifierPath #341 + lastChild: UserDefinedTypeName #343 + previousSibling: InheritanceSpecifier #340 + nextSibling: FunctionDefinition #350 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IdentifierPath #270 - id: 270 + IdentifierPath #341 + id: 341 src: "0:0:0" type: "IdentifierPath" name: "LI.SomeLib" - referencedDeclaration: 242 + referencedDeclaration: 313 context: ASTContext #1000 - parent: UsingForDirective #273 - vReferencedDeclaration: ContractDefinition #242 + parent: UsingForDirective #344 + vReferencedDeclaration: ContractDefinition #313 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: UserDefinedTypeName #272 - root: SourceUnit #467 + nextSibling: UserDefinedTypeName #343 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - UserDefinedTypeName #272 - id: 272 + UserDefinedTypeName #343 + id: 343 src: "0:0:0" type: "UserDefinedTypeName" typeString: "struct SomeContract.SomeStruct" name: undefined - referencedDeclaration: 232 - path: IdentifierPath #271 + referencedDeclaration: 303 + path: IdentifierPath #342 context: ASTContext #1000 - parent: UsingForDirective #273 - children: Array(1) [ IdentifierPath #271 ] - vReferencedDeclaration: StructDefinition #232 - firstChild: IdentifierPath #271 - lastChild: IdentifierPath #271 - previousSibling: IdentifierPath #270 + parent: UsingForDirective #344 + children: Array(1) [ IdentifierPath #342 ] + vReferencedDeclaration: StructDefinition #303 + firstChild: IdentifierPath #342 + lastChild: IdentifierPath #342 + previousSibling: IdentifierPath #341 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IdentifierPath #271 - id: 271 + IdentifierPath #342 + id: 342 src: "0:0:0" type: "IdentifierPath" name: "LI.SomeContract.SomeStruct" - referencedDeclaration: 232 + referencedDeclaration: 303 context: ASTContext #1000 - parent: UserDefinedTypeName #272 - vReferencedDeclaration: StructDefinition #232 + parent: UserDefinedTypeName #343 + vReferencedDeclaration: StructDefinition #303 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionDefinition #279 - id: 279 + FunctionDefinition #350 + id: 350 src: "0:0:0" type: "FunctionDefinition" implemented: true virtual: false - scope: 303 + scope: 374 kind: "constructor" name: "" visibility: "public" @@ -652,112 +659,112 @@ SourceUnit #467 isConstructor: true documentation: undefined nameLocation: "-1:-1:-1" - vParameters: ParameterList #274 - vReturnParameters: ParameterList #275 - vModifiers: Array(1) [ ModifierInvocation #277 ] + vParameters: ParameterList #345 + vReturnParameters: ParameterList #346 + vModifiers: Array(1) [ ModifierInvocation #348 ] vOverrideSpecifier: undefined - vBody: Block #278 + vBody: Block #349 context: ASTContext #1000 - parent: ContractDefinition #303 - children: Array(4) [ ParameterList #274, ModifierInvocation #277, ParameterList #275, Block #278 ] - vScope: ContractDefinition #303 + parent: ContractDefinition #374 + children: Array(4) [ ParameterList #345, ModifierInvocation #348, ParameterList #346, Block #349 ] + vScope: ContractDefinition #374 canonicalSignature: "" canonicalSignatureHash: "" - firstChild: ParameterList #274 - lastChild: Block #278 - previousSibling: UsingForDirective #273 - nextSibling: FunctionDefinition #292 - root: SourceUnit #467 + firstChild: ParameterList #345 + lastChild: Block #349 + previousSibling: UsingForDirective #344 + nextSibling: FunctionDefinition #363 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #274 - id: 274 + ParameterList #345 + id: 345 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #279 + parent: FunctionDefinition #350 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: ModifierInvocation #277 - root: SourceUnit #467 + nextSibling: ModifierInvocation #348 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ModifierInvocation #277 - id: 277 + ModifierInvocation #348 + id: 348 src: "0:0:0" type: "ModifierInvocation" - kind: undefined - vModifierName: IdentifierPath #276 + kind: "baseConstructorSpecifier" + vModifierName: IdentifierPath #347 vArguments: Array(0) context: ASTContext #1000 - parent: FunctionDefinition #279 - children: Array(1) [ IdentifierPath #276 ] - vModifier: ContractDefinition #241 - firstChild: IdentifierPath #276 - lastChild: IdentifierPath #276 - previousSibling: ParameterList #274 - nextSibling: ParameterList #275 - root: SourceUnit #467 + parent: FunctionDefinition #350 + children: Array(1) [ IdentifierPath #347 ] + vModifier: ContractDefinition #312 + firstChild: IdentifierPath #347 + lastChild: IdentifierPath #347 + previousSibling: ParameterList #345 + nextSibling: ParameterList #346 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IdentifierPath #276 - id: 276 + IdentifierPath #347 + id: 347 src: "0:0:0" type: "IdentifierPath" name: "LI.SomeContract" - referencedDeclaration: 241 + referencedDeclaration: 312 context: ASTContext #1000 - parent: ModifierInvocation #277 - vReferencedDeclaration: ContractDefinition #241 + parent: ModifierInvocation #348 + vReferencedDeclaration: ContractDefinition #312 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #275 - id: 275 + ParameterList #346 + id: 346 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #279 + parent: FunctionDefinition #350 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ModifierInvocation #277 - nextSibling: Block #278 - root: SourceUnit #467 + previousSibling: ModifierInvocation #348 + nextSibling: Block #349 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #278 - id: 278 + Block #349 + id: 349 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: FunctionDefinition #279 + parent: FunctionDefinition #350 vStatements: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ParameterList #275 + previousSibling: ParameterList #346 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionDefinition #292 - id: 292 + FunctionDefinition #363 + id: 363 src: "0:0:0" type: "FunctionDefinition" implemented: true virtual: false - scope: 303 + scope: 374 kind: "function" name: "test" visibility: "public" @@ -765,96 +772,96 @@ SourceUnit #467 isConstructor: false documentation: undefined nameLocation: "450:4:0" - vParameters: ParameterList #280 - vReturnParameters: ParameterList #281 + vParameters: ParameterList #351 + vReturnParameters: ParameterList #352 vModifiers: Array(0) vOverrideSpecifier: undefined - vBody: Block #291 + vBody: Block #362 context: ASTContext #1000 - parent: ContractDefinition #303 - children: Array(3) [ ParameterList #280, ParameterList #281, Block #291 ] - vScope: ContractDefinition #303 + parent: ContractDefinition #374 + children: Array(3) [ ParameterList #351, ParameterList #352, Block #362 ] + vScope: ContractDefinition #374 canonicalSignature: "test()" canonicalSignatureHash: "f8a8fd6d" - firstChild: ParameterList #280 - lastChild: Block #291 - previousSibling: FunctionDefinition #279 - nextSibling: FunctionDefinition #302 - root: SourceUnit #467 + firstChild: ParameterList #351 + lastChild: Block #362 + previousSibling: FunctionDefinition #350 + nextSibling: FunctionDefinition #373 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #280 - id: 280 + ParameterList #351 + id: 351 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #292 + parent: FunctionDefinition #363 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: ParameterList #281 - root: SourceUnit #467 + nextSibling: ParameterList #352 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #281 - id: 281 + ParameterList #352 + id: 352 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #292 + parent: FunctionDefinition #363 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ParameterList #280 - nextSibling: Block #291 - root: SourceUnit #467 + previousSibling: ParameterList #351 + nextSibling: Block #362 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #291 - id: 291 + Block #362 + id: 362 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: FunctionDefinition #292 - vStatements: Array(1) [ VariableDeclarationStatement #290 ] - children: Array(1) [ VariableDeclarationStatement #290 ] - firstChild: VariableDeclarationStatement #290 - lastChild: VariableDeclarationStatement #290 - previousSibling: ParameterList #281 + parent: FunctionDefinition #363 + vStatements: Array(1) [ VariableDeclarationStatement #361 ] + children: Array(1) [ VariableDeclarationStatement #361 ] + firstChild: VariableDeclarationStatement #361 + lastChild: VariableDeclarationStatement #361 + previousSibling: ParameterList #352 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclarationStatement #290 - id: 290 + VariableDeclarationStatement #361 + id: 361 src: "0:0:0" type: "VariableDeclarationStatement" documentation: undefined - assignments: Array(1) [ 284 ] - vDeclarations: Array(1) [ VariableDeclaration #284 ] - vInitialValue: FunctionCall #289 + assignments: Array(1) [ 355 ] + vDeclarations: Array(1) [ VariableDeclaration #355 ] + vInitialValue: FunctionCall #360 context: ASTContext #1000 - parent: Block #291 - children: Array(2) [ VariableDeclaration #284, FunctionCall #289 ] - firstChild: VariableDeclaration #284 - lastChild: FunctionCall #289 + parent: Block #362 + children: Array(2) [ VariableDeclaration #355, FunctionCall #360 ] + firstChild: VariableDeclaration #355 + lastChild: FunctionCall #360 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #284 - id: 284 + VariableDeclaration #355 + id: 355 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "s" - scope: 291 + scope: 362 stateVariable: false storageLocation: "memory" visibility: "internal" @@ -862,143 +869,143 @@ SourceUnit #467 typeString: "struct SomeContract.SomeStruct" documentation: undefined nameLocation: "508:1:0" - vType: UserDefinedTypeName #283 + vType: UserDefinedTypeName #354 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: VariableDeclarationStatement #290 - children: Array(1) [ UserDefinedTypeName #283 ] - vScope: Block #291 + parent: VariableDeclarationStatement #361 + children: Array(1) [ UserDefinedTypeName #354 ] + vScope: Block #362 canonicalSignatureType: "(uint256)" getterCanonicalSignature: "s()" getterCanonicalSignatureHash: "86b714e2" - firstChild: UserDefinedTypeName #283 - lastChild: UserDefinedTypeName #283 + firstChild: UserDefinedTypeName #354 + lastChild: UserDefinedTypeName #354 previousSibling: undefined - nextSibling: FunctionCall #289 - root: SourceUnit #467 + nextSibling: FunctionCall #360 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - UserDefinedTypeName #283 - id: 283 + UserDefinedTypeName #354 + id: 354 src: "0:0:0" type: "UserDefinedTypeName" typeString: "struct SomeContract.SomeStruct" name: undefined - referencedDeclaration: 232 - path: IdentifierPath #282 + referencedDeclaration: 303 + path: IdentifierPath #353 context: ASTContext #1000 - parent: VariableDeclaration #284 - children: Array(1) [ IdentifierPath #282 ] - vReferencedDeclaration: StructDefinition #232 - firstChild: IdentifierPath #282 - lastChild: IdentifierPath #282 + parent: VariableDeclaration #355 + children: Array(1) [ IdentifierPath #353 ] + vReferencedDeclaration: StructDefinition #303 + firstChild: IdentifierPath #353 + lastChild: IdentifierPath #353 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IdentifierPath #282 - id: 282 + IdentifierPath #353 + id: 353 src: "0:0:0" type: "IdentifierPath" name: "LI.SomeContract.SomeStruct" - referencedDeclaration: 232 + referencedDeclaration: 303 context: ASTContext #1000 - parent: UserDefinedTypeName #283 - vReferencedDeclaration: StructDefinition #232 + parent: UserDefinedTypeName #354 + vReferencedDeclaration: StructDefinition #303 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #289 - id: 289 + FunctionCall #360 + id: 360 src: "0:0:0" type: "FunctionCall" typeString: "struct SomeContract.SomeStruct memory" kind: "structConstructorCall" fieldNames: undefined - vExpression: MemberAccess #287 - vArguments: Array(1) [ Literal #288 ] + vExpression: MemberAccess #358 + vArguments: Array(1) [ Literal #359 ] context: ASTContext #1000 - parent: VariableDeclarationStatement #290 - children: Array(2) [ MemberAccess #287, Literal #288 ] + parent: VariableDeclarationStatement #361 + children: Array(2) [ MemberAccess #358, Literal #359 ] vIdentifier: undefined vMemberName: "SomeStruct" vFunctionCallType: "userDefined" - vReferencedDeclaration: StructDefinition #232 + vReferencedDeclaration: StructDefinition #303 vFunctionName: "SomeStruct" - vCallee: MemberAccess #287 - firstChild: MemberAccess #287 - lastChild: Literal #288 - previousSibling: VariableDeclaration #284 + vCallee: MemberAccess #358 + firstChild: MemberAccess #358 + lastChild: Literal #359 + previousSibling: VariableDeclaration #355 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - MemberAccess #287 - id: 287 + MemberAccess #358 + id: 358 src: "0:0:0" type: "MemberAccess" typeString: "type(struct SomeContract.SomeStruct storage pointer)" - vExpression: MemberAccess #286 + vExpression: MemberAccess #357 memberName: "SomeStruct" - referencedDeclaration: 232 + referencedDeclaration: 303 context: ASTContext #1000 - parent: FunctionCall #289 - children: Array(1) [ MemberAccess #286 ] - vReferencedDeclaration: StructDefinition #232 - firstChild: MemberAccess #286 - lastChild: MemberAccess #286 + parent: FunctionCall #360 + children: Array(1) [ MemberAccess #357 ] + vReferencedDeclaration: StructDefinition #303 + firstChild: MemberAccess #357 + lastChild: MemberAccess #357 previousSibling: undefined - nextSibling: Literal #288 - root: SourceUnit #467 + nextSibling: Literal #359 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - MemberAccess #286 - id: 286 + MemberAccess #357 + id: 357 src: "0:0:0" type: "MemberAccess" typeString: "type(contract SomeContract)" - vExpression: Identifier #285 + vExpression: Identifier #356 memberName: "SomeContract" - referencedDeclaration: 241 + referencedDeclaration: 312 context: ASTContext #1000 - parent: MemberAccess #287 - children: Array(1) [ Identifier #285 ] - vReferencedDeclaration: ContractDefinition #241 - firstChild: Identifier #285 - lastChild: Identifier #285 + parent: MemberAccess #358 + children: Array(1) [ Identifier #356 ] + vReferencedDeclaration: ContractDefinition #312 + firstChild: Identifier #356 + lastChild: Identifier #356 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #285 - id: 285 + Identifier #356 + id: 356 src: "0:0:0" type: "Identifier" typeString: "module \"./test/samples/solidity/latest_imports_08.sol\"" name: "LI" - referencedDeclaration: 246 + referencedDeclaration: 317 context: ASTContext #1000 - parent: MemberAccess #286 - vReferencedDeclaration: ImportDirective #246 + parent: MemberAccess #357 + vReferencedDeclaration: ImportDirective #317 vIdentifierType: "userDefined" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #288 - id: 288 + Literal #359 + id: 359 src: "0:0:0" type: "Literal" typeString: "int_const 10" @@ -1007,22 +1014,22 @@ SourceUnit #467 value: "10" subdenomination: undefined context: ASTContext #1000 - parent: FunctionCall #289 + parent: FunctionCall #360 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: MemberAccess #287 + previousSibling: MemberAccess #358 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionDefinition #302 - id: 302 + FunctionDefinition #373 + id: 373 src: "0:0:0" type: "FunctionDefinition" implemented: true virtual: false - scope: 303 + scope: 374 kind: "function" name: "some" visibility: "public" @@ -1030,94 +1037,94 @@ SourceUnit #467 isConstructor: false documentation: undefined nameLocation: "564:4:0" - vParameters: ParameterList #293 - vReturnParameters: ParameterList #296 + vParameters: ParameterList #364 + vReturnParameters: ParameterList #367 vModifiers: Array(0) - vOverrideSpecifier: OverrideSpecifier #298 - vBody: Block #301 + vOverrideSpecifier: OverrideSpecifier #369 + vBody: Block #372 context: ASTContext #1000 - parent: ContractDefinition #303 - children: Array(4) [ ParameterList #293, OverrideSpecifier #298, ParameterList #296, Block #301 ] - vScope: ContractDefinition #303 + parent: ContractDefinition #374 + children: Array(4) [ ParameterList #364, OverrideSpecifier #369, ParameterList #367, Block #372 ] + vScope: ContractDefinition #374 canonicalSignature: "some()" canonicalSignatureHash: "c03ee3d3" - firstChild: ParameterList #293 - lastChild: Block #301 - previousSibling: FunctionDefinition #292 + firstChild: ParameterList #364 + lastChild: Block #372 + previousSibling: FunctionDefinition #363 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #293 - id: 293 + ParameterList #364 + id: 364 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #302 + parent: FunctionDefinition #373 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: OverrideSpecifier #298 - root: SourceUnit #467 + nextSibling: OverrideSpecifier #369 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - OverrideSpecifier #298 - id: 298 + OverrideSpecifier #369 + id: 369 src: "0:0:0" type: "OverrideSpecifier" context: ASTContext #1000 - parent: FunctionDefinition #302 - vOverrides: Array(1) [ IdentifierPath #297 ] - children: Array(1) [ IdentifierPath #297 ] - firstChild: IdentifierPath #297 - lastChild: IdentifierPath #297 - previousSibling: ParameterList #293 - nextSibling: ParameterList #296 - root: SourceUnit #467 + parent: FunctionDefinition #373 + vOverrides: Array(1) [ IdentifierPath #368 ] + children: Array(1) [ IdentifierPath #368 ] + firstChild: IdentifierPath #368 + lastChild: IdentifierPath #368 + previousSibling: ParameterList #364 + nextSibling: ParameterList #367 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IdentifierPath #297 - id: 297 + IdentifierPath #368 + id: 368 src: "0:0:0" type: "IdentifierPath" name: "LI.SomeContract" - referencedDeclaration: 241 + referencedDeclaration: 312 context: ASTContext #1000 - parent: OverrideSpecifier #298 - vReferencedDeclaration: ContractDefinition #241 + parent: OverrideSpecifier #369 + vReferencedDeclaration: ContractDefinition #312 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #296 - id: 296 + ParameterList #367 + id: 367 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #302 - vParameters: Array(1) [ VariableDeclaration #295 ] - children: Array(1) [ VariableDeclaration #295 ] - firstChild: VariableDeclaration #295 - lastChild: VariableDeclaration #295 - previousSibling: OverrideSpecifier #298 - nextSibling: Block #301 - root: SourceUnit #467 + parent: FunctionDefinition #373 + vParameters: Array(1) [ VariableDeclaration #366 ] + children: Array(1) [ VariableDeclaration #366 ] + firstChild: VariableDeclaration #366 + lastChild: VariableDeclaration #366 + previousSibling: OverrideSpecifier #369 + nextSibling: Block #372 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #295 - id: 295 + VariableDeclaration #366 + id: 366 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "" - scope: 302 + scope: 373 stateVariable: false storageLocation: "default" visibility: "internal" @@ -1125,76 +1132,76 @@ SourceUnit #467 typeString: "uint256" documentation: undefined nameLocation: "-1:-1:-1" - vType: ElementaryTypeName #294 + vType: ElementaryTypeName #365 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: ParameterList #296 - children: Array(1) [ ElementaryTypeName #294 ] - vScope: FunctionDefinition #302 + parent: ParameterList #367 + children: Array(1) [ ElementaryTypeName #365 ] + vScope: FunctionDefinition #373 canonicalSignatureType: "uint256" getterCanonicalSignature: "()" getterCanonicalSignatureHash: "861731d5" - firstChild: ElementaryTypeName #294 - lastChild: ElementaryTypeName #294 + firstChild: ElementaryTypeName #365 + lastChild: ElementaryTypeName #365 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #294 - id: 294 + ElementaryTypeName #365 + id: 365 src: "0:0:0" type: "ElementaryTypeName" typeString: "uint256" name: "uint" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #295 + parent: VariableDeclaration #366 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #301 - id: 301 + Block #372 + id: 372 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: FunctionDefinition #302 - vStatements: Array(1) [ Return #300 ] - children: Array(1) [ Return #300 ] - firstChild: Return #300 - lastChild: Return #300 - previousSibling: ParameterList #296 + parent: FunctionDefinition #373 + vStatements: Array(1) [ Return #371 ] + children: Array(1) [ Return #371 ] + firstChild: Return #371 + lastChild: Return #371 + previousSibling: ParameterList #367 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Return #300 - id: 300 + Return #371 + id: 371 src: "0:0:0" type: "Return" documentation: undefined functionReturnParameters: 58 - vExpression: Literal #299 + vExpression: Literal #370 context: ASTContext #1000 - parent: Block #301 - children: Array(1) [ Literal #299 ] + parent: Block #372 + children: Array(1) [ Literal #370 ] vFunctionReturnParameters: ParameterList #58 - firstChild: Literal #299 - lastChild: Literal #299 + firstChild: Literal #370 + lastChild: Literal #370 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #299 - id: 299 + Literal #370 + id: 370 src: "0:0:0" type: "Literal" typeString: "int_const 2" @@ -1203,57 +1210,60 @@ SourceUnit #467 value: "2" subdenomination: undefined context: ASTContext #1000 - parent: Return #300 + parent: Return #371 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ContractDefinition #324 - id: 324 + ContractDefinition #395 + id: 395 src: "0:0:0" type: "ContractDefinition" name: "UsesNewAddressMembers" - scope: 467 + scope: 607 kind: "contract" abstract: false fullyImplemented: true - linearizedBaseContracts: Array(1) [ 324 ] + linearizedBaseContracts: Array(1) [ 395 ] + usedErrors: Array(0) docString: undefined nameLocation: "656:21:0" context: ASTContext #1000 - parent: SourceUnit #467 + parent: SourceUnit #607 documentation: undefined - vScope: SourceUnit #467 - vLinearizedBaseContracts: Array(1) [ ContractDefinition #324 ] + vScope: SourceUnit #607 + vLinearizedBaseContracts: Array(1) [ ContractDefinition #395 ] + vUsedErrors: Array(0) vInheritanceSpecifiers: Array(0) vStateVariables: Array(0) vModifiers: Array(0) vEvents: Array(0) - vFunctions: Array(1) [ FunctionDefinition #323 ] + vErrors: Array(0) + vFunctions: Array(1) [ FunctionDefinition #394 ] vUsingForDirectives: Array(0) vStructs: Array(0) vEnums: Array(0) vConstructor: undefined interfaceId: undefined - children: Array(1) [ FunctionDefinition #323 ] - firstChild: FunctionDefinition #323 - lastChild: FunctionDefinition #323 - previousSibling: ContractDefinition #303 - nextSibling: ContractDefinition #381 - root: SourceUnit #467 + children: Array(1) [ FunctionDefinition #394 ] + firstChild: FunctionDefinition #394 + lastChild: FunctionDefinition #394 + previousSibling: ContractDefinition #374 + nextSibling: ContractDefinition #452 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionDefinition #323 - id: 323 + FunctionDefinition #394 + id: 394 src: "0:0:0" type: "FunctionDefinition" implemented: true virtual: false - scope: 324 + scope: 395 kind: "function" name: "test" visibility: "public" @@ -1261,96 +1271,96 @@ SourceUnit #467 isConstructor: false documentation: undefined nameLocation: "693:4:0" - vParameters: ParameterList #304 - vReturnParameters: ParameterList #305 + vParameters: ParameterList #375 + vReturnParameters: ParameterList #376 vModifiers: Array(0) vOverrideSpecifier: undefined - vBody: Block #322 + vBody: Block #393 context: ASTContext #1000 - parent: ContractDefinition #324 - children: Array(3) [ ParameterList #304, ParameterList #305, Block #322 ] - vScope: ContractDefinition #324 + parent: ContractDefinition #395 + children: Array(3) [ ParameterList #375, ParameterList #376, Block #393 ] + vScope: ContractDefinition #395 canonicalSignature: "test()" canonicalSignatureHash: "f8a8fd6d" - firstChild: ParameterList #304 - lastChild: Block #322 + firstChild: ParameterList #375 + lastChild: Block #393 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #304 - id: 304 + ParameterList #375 + id: 375 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #323 + parent: FunctionDefinition #394 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: ParameterList #305 - root: SourceUnit #467 + nextSibling: ParameterList #376 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #305 - id: 305 + ParameterList #376 + id: 376 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #323 + parent: FunctionDefinition #394 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ParameterList #304 - nextSibling: Block #322 - root: SourceUnit #467 + previousSibling: ParameterList #375 + nextSibling: Block #393 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #322 - id: 322 + Block #393 + id: 393 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: FunctionDefinition #323 - vStatements: Array(2) [ VariableDeclarationStatement #313, VariableDeclarationStatement #321 ] - children: Array(2) [ VariableDeclarationStatement #313, VariableDeclarationStatement #321 ] - firstChild: VariableDeclarationStatement #313 - lastChild: VariableDeclarationStatement #321 - previousSibling: ParameterList #305 + parent: FunctionDefinition #394 + vStatements: Array(2) [ VariableDeclarationStatement #384, VariableDeclarationStatement #392 ] + children: Array(2) [ VariableDeclarationStatement #384, VariableDeclarationStatement #392 ] + firstChild: VariableDeclarationStatement #384 + lastChild: VariableDeclarationStatement #392 + previousSibling: ParameterList #376 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclarationStatement #313 - id: 313 + VariableDeclarationStatement #384 + id: 384 src: "0:0:0" type: "VariableDeclarationStatement" documentation: undefined - assignments: Array(1) [ 307 ] - vDeclarations: Array(1) [ VariableDeclaration #307 ] - vInitialValue: MemberAccess #312 + assignments: Array(1) [ 378 ] + vDeclarations: Array(1) [ VariableDeclaration #378 ] + vInitialValue: MemberAccess #383 context: ASTContext #1000 - parent: Block #322 - children: Array(2) [ VariableDeclaration #307, MemberAccess #312 ] - firstChild: VariableDeclaration #307 - lastChild: MemberAccess #312 + parent: Block #393 + children: Array(2) [ VariableDeclaration #378, MemberAccess #383 ] + firstChild: VariableDeclaration #378 + lastChild: MemberAccess #383 previousSibling: undefined - nextSibling: VariableDeclarationStatement #321 - root: SourceUnit #467 + nextSibling: VariableDeclarationStatement #392 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #307 - id: 307 + VariableDeclaration #378 + id: 378 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "code" - scope: 322 + scope: 393 stateVariable: false storageLocation: "memory" visibility: "internal" @@ -1358,119 +1368,119 @@ SourceUnit #467 typeString: "bytes" documentation: undefined nameLocation: "730:4:0" - vType: ElementaryTypeName #306 + vType: ElementaryTypeName #377 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: VariableDeclarationStatement #313 - children: Array(1) [ ElementaryTypeName #306 ] - vScope: Block #322 + parent: VariableDeclarationStatement #384 + children: Array(1) [ ElementaryTypeName #377 ] + vScope: Block #393 canonicalSignatureType: "bytes" getterCanonicalSignature: "code()" getterCanonicalSignatureHash: "24c12bf6" - firstChild: ElementaryTypeName #306 - lastChild: ElementaryTypeName #306 + firstChild: ElementaryTypeName #377 + lastChild: ElementaryTypeName #377 previousSibling: undefined - nextSibling: MemberAccess #312 - root: SourceUnit #467 + nextSibling: MemberAccess #383 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #306 - id: 306 + ElementaryTypeName #377 + id: 377 src: "0:0:0" type: "ElementaryTypeName" typeString: "bytes" name: "bytes" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #307 + parent: VariableDeclaration #378 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - MemberAccess #312 - id: 312 + MemberAccess #383 + id: 383 src: "0:0:0" type: "MemberAccess" typeString: "bytes memory" - vExpression: FunctionCall #311 + vExpression: FunctionCall #382 memberName: "code" referencedDeclaration: undefined context: ASTContext #1000 - parent: VariableDeclarationStatement #313 - children: Array(1) [ FunctionCall #311 ] + parent: VariableDeclarationStatement #384 + children: Array(1) [ FunctionCall #382 ] vReferencedDeclaration: undefined - firstChild: FunctionCall #311 - lastChild: FunctionCall #311 - previousSibling: VariableDeclaration #307 + firstChild: FunctionCall #382 + lastChild: FunctionCall #382 + previousSibling: VariableDeclaration #378 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #311 - id: 311 + FunctionCall #382 + id: 382 src: "0:0:0" type: "FunctionCall" typeString: "address" kind: "typeConversion" fieldNames: undefined - vExpression: ElementaryTypeNameExpression #309 - vArguments: Array(1) [ Literal #310 ] + vExpression: ElementaryTypeNameExpression #380 + vArguments: Array(1) [ Literal #381 ] context: ASTContext #1000 - parent: MemberAccess #312 - children: Array(2) [ ElementaryTypeNameExpression #309, Literal #310 ] + parent: MemberAccess #383 + children: Array(2) [ ElementaryTypeNameExpression #380, Literal #381 ] vIdentifier: "address" vMemberName: undefined vFunctionCallType: "builtin" vReferencedDeclaration: undefined vFunctionName: "address" - vCallee: ElementaryTypeNameExpression #309 - firstChild: ElementaryTypeNameExpression #309 - lastChild: Literal #310 + vCallee: ElementaryTypeNameExpression #380 + firstChild: ElementaryTypeNameExpression #380 + lastChild: Literal #381 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeNameExpression #309 - id: 309 + ElementaryTypeNameExpression #380 + id: 380 src: "0:0:0" type: "ElementaryTypeNameExpression" typeString: "type(address)" - typeName: ElementaryTypeName #308 + typeName: ElementaryTypeName #379 context: ASTContext #1000 - parent: FunctionCall #311 - children: Array(1) [ ElementaryTypeName #308 ] - firstChild: ElementaryTypeName #308 - lastChild: ElementaryTypeName #308 + parent: FunctionCall #382 + children: Array(1) [ ElementaryTypeName #379 ] + firstChild: ElementaryTypeName #379 + lastChild: ElementaryTypeName #379 previousSibling: undefined - nextSibling: Literal #310 - root: SourceUnit #467 + nextSibling: Literal #381 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #308 - id: 308 + ElementaryTypeName #379 + id: 379 src: "0:0:0" type: "ElementaryTypeName" typeString: undefined name: "address" stateMutability: "nonpayable" context: ASTContext #1000 - parent: ElementaryTypeNameExpression #309 + parent: ElementaryTypeNameExpression #380 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #310 - id: 310 + Literal #381 + id: 381 src: "0:0:0" type: "Literal" typeString: "int_const 0" @@ -1479,41 +1489,41 @@ SourceUnit #467 value: "0" subdenomination: undefined context: ASTContext #1000 - parent: FunctionCall #311 + parent: FunctionCall #382 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ElementaryTypeNameExpression #309 + previousSibling: ElementaryTypeNameExpression #380 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclarationStatement #321 - id: 321 + VariableDeclarationStatement #392 + id: 392 src: "0:0:0" type: "VariableDeclarationStatement" documentation: undefined - assignments: Array(1) [ 315 ] - vDeclarations: Array(1) [ VariableDeclaration #315 ] - vInitialValue: MemberAccess #320 + assignments: Array(1) [ 386 ] + vDeclarations: Array(1) [ VariableDeclaration #386 ] + vInitialValue: MemberAccess #391 context: ASTContext #1000 - parent: Block #322 - children: Array(2) [ VariableDeclaration #315, MemberAccess #320 ] - firstChild: VariableDeclaration #315 - lastChild: MemberAccess #320 - previousSibling: VariableDeclarationStatement #313 + parent: Block #393 + children: Array(2) [ VariableDeclaration #386, MemberAccess #391 ] + firstChild: VariableDeclaration #386 + lastChild: MemberAccess #391 + previousSibling: VariableDeclarationStatement #384 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #315 - id: 315 + VariableDeclaration #386 + id: 386 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "codeHash" - scope: 322 + scope: 393 stateVariable: false storageLocation: "default" visibility: "internal" @@ -1521,119 +1531,119 @@ SourceUnit #467 typeString: "bytes32" documentation: undefined nameLocation: "770:8:0" - vType: ElementaryTypeName #314 + vType: ElementaryTypeName #385 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: VariableDeclarationStatement #321 - children: Array(1) [ ElementaryTypeName #314 ] - vScope: Block #322 + parent: VariableDeclarationStatement #392 + children: Array(1) [ ElementaryTypeName #385 ] + vScope: Block #393 canonicalSignatureType: "bytes32" getterCanonicalSignature: "codeHash()" getterCanonicalSignatureHash: "18edaaf2" - firstChild: ElementaryTypeName #314 - lastChild: ElementaryTypeName #314 + firstChild: ElementaryTypeName #385 + lastChild: ElementaryTypeName #385 previousSibling: undefined - nextSibling: MemberAccess #320 - root: SourceUnit #467 + nextSibling: MemberAccess #391 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #314 - id: 314 + ElementaryTypeName #385 + id: 385 src: "0:0:0" type: "ElementaryTypeName" typeString: "bytes32" name: "bytes32" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #315 + parent: VariableDeclaration #386 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - MemberAccess #320 - id: 320 + MemberAccess #391 + id: 391 src: "0:0:0" type: "MemberAccess" typeString: "bytes32" - vExpression: FunctionCall #319 + vExpression: FunctionCall #390 memberName: "codehash" referencedDeclaration: undefined context: ASTContext #1000 - parent: VariableDeclarationStatement #321 - children: Array(1) [ FunctionCall #319 ] + parent: VariableDeclarationStatement #392 + children: Array(1) [ FunctionCall #390 ] vReferencedDeclaration: undefined - firstChild: FunctionCall #319 - lastChild: FunctionCall #319 - previousSibling: VariableDeclaration #315 + firstChild: FunctionCall #390 + lastChild: FunctionCall #390 + previousSibling: VariableDeclaration #386 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #319 - id: 319 + FunctionCall #390 + id: 390 src: "0:0:0" type: "FunctionCall" typeString: "address" kind: "typeConversion" fieldNames: undefined - vExpression: ElementaryTypeNameExpression #317 - vArguments: Array(1) [ Literal #318 ] + vExpression: ElementaryTypeNameExpression #388 + vArguments: Array(1) [ Literal #389 ] context: ASTContext #1000 - parent: MemberAccess #320 - children: Array(2) [ ElementaryTypeNameExpression #317, Literal #318 ] + parent: MemberAccess #391 + children: Array(2) [ ElementaryTypeNameExpression #388, Literal #389 ] vIdentifier: "address" vMemberName: undefined vFunctionCallType: "builtin" vReferencedDeclaration: undefined vFunctionName: "address" - vCallee: ElementaryTypeNameExpression #317 - firstChild: ElementaryTypeNameExpression #317 - lastChild: Literal #318 + vCallee: ElementaryTypeNameExpression #388 + firstChild: ElementaryTypeNameExpression #388 + lastChild: Literal #389 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeNameExpression #317 - id: 317 + ElementaryTypeNameExpression #388 + id: 388 src: "0:0:0" type: "ElementaryTypeNameExpression" typeString: "type(address)" - typeName: ElementaryTypeName #316 + typeName: ElementaryTypeName #387 context: ASTContext #1000 - parent: FunctionCall #319 - children: Array(1) [ ElementaryTypeName #316 ] - firstChild: ElementaryTypeName #316 - lastChild: ElementaryTypeName #316 + parent: FunctionCall #390 + children: Array(1) [ ElementaryTypeName #387 ] + firstChild: ElementaryTypeName #387 + lastChild: ElementaryTypeName #387 previousSibling: undefined - nextSibling: Literal #318 - root: SourceUnit #467 + nextSibling: Literal #389 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #316 - id: 316 + ElementaryTypeName #387 + id: 387 src: "0:0:0" type: "ElementaryTypeName" typeString: undefined name: "address" stateMutability: "nonpayable" context: ASTContext #1000 - parent: ElementaryTypeNameExpression #317 + parent: ElementaryTypeNameExpression #388 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #318 - id: 318 + Literal #389 + id: 389 src: "0:0:0" type: "Literal" typeString: "int_const 0" @@ -1642,57 +1652,60 @@ SourceUnit #467 value: "0" subdenomination: undefined context: ASTContext #1000 - parent: FunctionCall #319 + parent: FunctionCall #390 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ElementaryTypeNameExpression #317 + previousSibling: ElementaryTypeNameExpression #388 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ContractDefinition #381 - id: 381 + ContractDefinition #452 + id: 452 src: "0:0:0" type: "ContractDefinition" name: "CatchPanic" - scope: 467 + scope: 607 kind: "contract" abstract: false fullyImplemented: true - linearizedBaseContracts: Array(1) [ 381 ] + linearizedBaseContracts: Array(1) [ 452 ] + usedErrors: Array(0) docString: undefined nameLocation: "820:10:0" context: ASTContext #1000 - parent: SourceUnit #467 + parent: SourceUnit #607 documentation: undefined - vScope: SourceUnit #467 - vLinearizedBaseContracts: Array(1) [ ContractDefinition #381 ] + vScope: SourceUnit #607 + vLinearizedBaseContracts: Array(1) [ ContractDefinition #452 ] + vUsedErrors: Array(0) vInheritanceSpecifiers: Array(0) vStateVariables: Array(0) vModifiers: Array(0) vEvents: Array(0) - vFunctions: Array(1) [ FunctionDefinition #380 ] + vErrors: Array(0) + vFunctions: Array(1) [ FunctionDefinition #451 ] vUsingForDirectives: Array(0) vStructs: Array(0) vEnums: Array(0) vConstructor: undefined interfaceId: undefined - children: Array(1) [ FunctionDefinition #380 ] - firstChild: FunctionDefinition #380 - lastChild: FunctionDefinition #380 - previousSibling: ContractDefinition #324 - nextSibling: ContractDefinition #466 - root: SourceUnit #467 + children: Array(1) [ FunctionDefinition #451 ] + firstChild: FunctionDefinition #451 + lastChild: FunctionDefinition #451 + previousSibling: ContractDefinition #395 + nextSibling: ContractDefinition #537 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionDefinition #380 - id: 380 + FunctionDefinition #451 + id: 451 src: "0:0:0" type: "FunctionDefinition" implemented: true virtual: false - scope: 381 + scope: 452 kind: "function" name: "test" visibility: "public" @@ -1700,96 +1713,96 @@ SourceUnit #467 isConstructor: false documentation: undefined nameLocation: "846:4:0" - vParameters: ParameterList #325 - vReturnParameters: ParameterList #326 + vParameters: ParameterList #396 + vReturnParameters: ParameterList #397 vModifiers: Array(0) vOverrideSpecifier: undefined - vBody: Block #379 + vBody: Block #450 context: ASTContext #1000 - parent: ContractDefinition #381 - children: Array(3) [ ParameterList #325, ParameterList #326, Block #379 ] - vScope: ContractDefinition #381 + parent: ContractDefinition #452 + children: Array(3) [ ParameterList #396, ParameterList #397, Block #450 ] + vScope: ContractDefinition #452 canonicalSignature: "test()" canonicalSignatureHash: "f8a8fd6d" - firstChild: ParameterList #325 - lastChild: Block #379 + firstChild: ParameterList #396 + lastChild: Block #450 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #325 - id: 325 + ParameterList #396 + id: 396 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #380 + parent: FunctionDefinition #451 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: ParameterList #326 - root: SourceUnit #467 + nextSibling: ParameterList #397 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #326 - id: 326 + ParameterList #397 + id: 397 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #380 + parent: FunctionDefinition #451 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ParameterList #325 - nextSibling: Block #379 - root: SourceUnit #467 + previousSibling: ParameterList #396 + nextSibling: Block #450 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #379 - id: 379 + Block #450 + id: 450 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: FunctionDefinition #380 - vStatements: Array(2) [ VariableDeclarationStatement #334, TryStatement #378 ] - children: Array(2) [ VariableDeclarationStatement #334, TryStatement #378 ] - firstChild: VariableDeclarationStatement #334 - lastChild: TryStatement #378 - previousSibling: ParameterList #326 + parent: FunctionDefinition #451 + vStatements: Array(2) [ VariableDeclarationStatement #405, TryStatement #449 ] + children: Array(2) [ VariableDeclarationStatement #405, TryStatement #449 ] + firstChild: VariableDeclarationStatement #405 + lastChild: TryStatement #449 + previousSibling: ParameterList #397 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclarationStatement #334 - id: 334 + VariableDeclarationStatement #405 + id: 405 src: "0:0:0" type: "VariableDeclarationStatement" documentation: undefined - assignments: Array(1) [ 329 ] - vDeclarations: Array(1) [ VariableDeclaration #329 ] - vInitialValue: FunctionCall #333 + assignments: Array(1) [ 400 ] + vDeclarations: Array(1) [ VariableDeclaration #400 ] + vInitialValue: FunctionCall #404 context: ASTContext #1000 - parent: Block #379 - children: Array(2) [ VariableDeclaration #329, FunctionCall #333 ] - firstChild: VariableDeclaration #329 - lastChild: FunctionCall #333 + parent: Block #450 + children: Array(2) [ VariableDeclaration #400, FunctionCall #404 ] + firstChild: VariableDeclaration #400 + lastChild: FunctionCall #404 previousSibling: undefined - nextSibling: TryStatement #378 - root: SourceUnit #467 + nextSibling: TryStatement #449 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #329 - id: 329 + VariableDeclaration #400 + id: 400 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "c" - scope: 379 + scope: 450 stateVariable: false storageLocation: "default" visibility: "internal" @@ -1797,291 +1810,291 @@ SourceUnit #467 typeString: "contract UsesNewAddressMembers" documentation: undefined nameLocation: "892:1:0" - vType: UserDefinedTypeName #328 + vType: UserDefinedTypeName #399 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: VariableDeclarationStatement #334 - children: Array(1) [ UserDefinedTypeName #328 ] - vScope: Block #379 + parent: VariableDeclarationStatement #405 + children: Array(1) [ UserDefinedTypeName #399 ] + vScope: Block #450 canonicalSignatureType: "address" getterCanonicalSignature: "c()" getterCanonicalSignatureHash: "c3da42b8" - firstChild: UserDefinedTypeName #328 - lastChild: UserDefinedTypeName #328 + firstChild: UserDefinedTypeName #399 + lastChild: UserDefinedTypeName #399 previousSibling: undefined - nextSibling: FunctionCall #333 - root: SourceUnit #467 + nextSibling: FunctionCall #404 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - UserDefinedTypeName #328 - id: 328 + UserDefinedTypeName #399 + id: 399 src: "0:0:0" type: "UserDefinedTypeName" typeString: "contract UsesNewAddressMembers" name: undefined - referencedDeclaration: 324 - path: IdentifierPath #327 + referencedDeclaration: 395 + path: IdentifierPath #398 context: ASTContext #1000 - parent: VariableDeclaration #329 - children: Array(1) [ IdentifierPath #327 ] - vReferencedDeclaration: ContractDefinition #324 - firstChild: IdentifierPath #327 - lastChild: IdentifierPath #327 + parent: VariableDeclaration #400 + children: Array(1) [ IdentifierPath #398 ] + vReferencedDeclaration: ContractDefinition #395 + firstChild: IdentifierPath #398 + lastChild: IdentifierPath #398 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IdentifierPath #327 - id: 327 + IdentifierPath #398 + id: 398 src: "0:0:0" type: "IdentifierPath" name: "UsesNewAddressMembers" referencedDeclaration: 84 context: ASTContext #1000 - parent: UserDefinedTypeName #328 + parent: UserDefinedTypeName #399 vReferencedDeclaration: ContractDefinition #84 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #333 - id: 333 + FunctionCall #404 + id: 404 src: "0:0:0" type: "FunctionCall" typeString: "contract UsesNewAddressMembers" kind: "functionCall" fieldNames: undefined - vExpression: NewExpression #332 + vExpression: NewExpression #403 vArguments: Array(0) context: ASTContext #1000 - parent: VariableDeclarationStatement #334 - children: Array(1) [ NewExpression #332 ] + parent: VariableDeclarationStatement #405 + children: Array(1) [ NewExpression #403 ] vIdentifier: "new" vMemberName: undefined vFunctionCallType: "builtin" vReferencedDeclaration: undefined vFunctionName: "new" - vCallee: NewExpression #332 - firstChild: NewExpression #332 - lastChild: NewExpression #332 - previousSibling: VariableDeclaration #329 + vCallee: NewExpression #403 + firstChild: NewExpression #403 + lastChild: NewExpression #403 + previousSibling: VariableDeclaration #400 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - NewExpression #332 - id: 332 + NewExpression #403 + id: 403 src: "0:0:0" type: "NewExpression" typeString: "function () returns (contract UsesNewAddressMembers)" - vTypeName: UserDefinedTypeName #331 + vTypeName: UserDefinedTypeName #402 context: ASTContext #1000 - parent: FunctionCall #333 - children: Array(1) [ UserDefinedTypeName #331 ] - firstChild: UserDefinedTypeName #331 - lastChild: UserDefinedTypeName #331 + parent: FunctionCall #404 + children: Array(1) [ UserDefinedTypeName #402 ] + firstChild: UserDefinedTypeName #402 + lastChild: UserDefinedTypeName #402 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - UserDefinedTypeName #331 - id: 331 + UserDefinedTypeName #402 + id: 402 src: "0:0:0" type: "UserDefinedTypeName" typeString: "contract UsesNewAddressMembers" name: undefined - referencedDeclaration: 324 - path: IdentifierPath #330 + referencedDeclaration: 395 + path: IdentifierPath #401 context: ASTContext #1000 - parent: NewExpression #332 - children: Array(1) [ IdentifierPath #330 ] - vReferencedDeclaration: ContractDefinition #324 - firstChild: IdentifierPath #330 - lastChild: IdentifierPath #330 + parent: NewExpression #403 + children: Array(1) [ IdentifierPath #401 ] + vReferencedDeclaration: ContractDefinition #395 + firstChild: IdentifierPath #401 + lastChild: IdentifierPath #401 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IdentifierPath #330 - id: 330 + IdentifierPath #401 + id: 401 src: "0:0:0" type: "IdentifierPath" name: "UsesNewAddressMembers" referencedDeclaration: 84 context: ASTContext #1000 - parent: UserDefinedTypeName #331 + parent: UserDefinedTypeName #402 vReferencedDeclaration: ContractDefinition #84 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TryStatement #378 - id: 378 + TryStatement #449 + id: 449 src: "0:0:0" type: "TryStatement" documentation: undefined - vExternalCall: FunctionCall #337 - vClauses: Array(4) [ TryCatchClause #339, TryCatchClause #348, TryCatchClause #371, TryCatchClause #377 ] + vExternalCall: FunctionCall #408 + vClauses: Array(4) [ TryCatchClause #410, TryCatchClause #419, TryCatchClause #442, TryCatchClause #448 ] context: ASTContext #1000 - parent: Block #379 - children: Array(5) [ FunctionCall #337, TryCatchClause #339, TryCatchClause #348, TryCatchClause #371, TryCatchClause #377 ] - firstChild: FunctionCall #337 - lastChild: TryCatchClause #377 - previousSibling: VariableDeclarationStatement #334 + parent: Block #450 + children: Array(5) [ FunctionCall #408, TryCatchClause #410, TryCatchClause #419, TryCatchClause #442, TryCatchClause #448 ] + firstChild: FunctionCall #408 + lastChild: TryCatchClause #448 + previousSibling: VariableDeclarationStatement #405 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #337 - id: 337 + FunctionCall #408 + id: 408 src: "0:0:0" type: "FunctionCall" typeString: "tuple()" kind: "functionCall" fieldNames: undefined - vExpression: MemberAccess #336 + vExpression: MemberAccess #407 vArguments: Array(0) context: ASTContext #1000 - parent: TryStatement #378 - children: Array(1) [ MemberAccess #336 ] + parent: TryStatement #449 + children: Array(1) [ MemberAccess #407 ] vIdentifier: "c" vMemberName: "test" vFunctionCallType: "userDefined" - vReferencedDeclaration: FunctionDefinition #323 + vReferencedDeclaration: FunctionDefinition #394 vFunctionName: "test" - vCallee: MemberAccess #336 - firstChild: MemberAccess #336 - lastChild: MemberAccess #336 + vCallee: MemberAccess #407 + firstChild: MemberAccess #407 + lastChild: MemberAccess #407 previousSibling: undefined - nextSibling: TryCatchClause #339 - root: SourceUnit #467 + nextSibling: TryCatchClause #410 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - MemberAccess #336 - id: 336 + MemberAccess #407 + id: 407 src: "0:0:0" type: "MemberAccess" typeString: "function () external" - vExpression: Identifier #335 + vExpression: Identifier #406 memberName: "test" - referencedDeclaration: 323 + referencedDeclaration: 394 context: ASTContext #1000 - parent: FunctionCall #337 - children: Array(1) [ Identifier #335 ] - vReferencedDeclaration: FunctionDefinition #323 - firstChild: Identifier #335 - lastChild: Identifier #335 + parent: FunctionCall #408 + children: Array(1) [ Identifier #406 ] + vReferencedDeclaration: FunctionDefinition #394 + firstChild: Identifier #406 + lastChild: Identifier #406 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #335 - id: 335 + Identifier #406 + id: 406 src: "0:0:0" type: "Identifier" typeString: "contract UsesNewAddressMembers" name: "c" - referencedDeclaration: 329 + referencedDeclaration: 400 context: ASTContext #1000 - parent: MemberAccess #336 - vReferencedDeclaration: VariableDeclaration #329 + parent: MemberAccess #407 + vReferencedDeclaration: VariableDeclaration #400 vIdentifierType: "userDefined" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TryCatchClause #339 - id: 339 + TryCatchClause #410 + id: 410 src: "0:0:0" type: "TryCatchClause" documentation: undefined errorName: "" vParameters: undefined - vBlock: Block #338 + vBlock: Block #409 context: ASTContext #1000 - parent: TryStatement #378 - children: Array(1) [ Block #338 ] - firstChild: Block #338 - lastChild: Block #338 - previousSibling: FunctionCall #337 - nextSibling: TryCatchClause #348 - root: SourceUnit #467 + parent: TryStatement #449 + children: Array(1) [ Block #409 ] + firstChild: Block #409 + lastChild: Block #409 + previousSibling: FunctionCall #408 + nextSibling: TryCatchClause #419 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #338 - id: 338 + Block #409 + id: 409 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: TryCatchClause #339 + parent: TryCatchClause #410 vStatements: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TryCatchClause #348 - id: 348 + TryCatchClause #419 + id: 419 src: "0:0:0" type: "TryCatchClause" documentation: undefined errorName: "Error" - vParameters: ParameterList #347 - vBlock: Block #344 + vParameters: ParameterList #418 + vBlock: Block #415 context: ASTContext #1000 - parent: TryStatement #378 - children: Array(2) [ ParameterList #347, Block #344 ] - firstChild: ParameterList #347 - lastChild: Block #344 - previousSibling: TryCatchClause #339 - nextSibling: TryCatchClause #371 - root: SourceUnit #467 + parent: TryStatement #449 + children: Array(2) [ ParameterList #418, Block #415 ] + firstChild: ParameterList #418 + lastChild: Block #415 + previousSibling: TryCatchClause #410 + nextSibling: TryCatchClause #442 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #347 - id: 347 + ParameterList #418 + id: 418 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: TryCatchClause #348 - vParameters: Array(1) [ VariableDeclaration #346 ] - children: Array(1) [ VariableDeclaration #346 ] - firstChild: VariableDeclaration #346 - lastChild: VariableDeclaration #346 + parent: TryCatchClause #419 + vParameters: Array(1) [ VariableDeclaration #417 ] + children: Array(1) [ VariableDeclaration #417 ] + firstChild: VariableDeclaration #417 + lastChild: VariableDeclaration #417 previousSibling: undefined - nextSibling: Block #344 - root: SourceUnit #467 + nextSibling: Block #415 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #346 - id: 346 + VariableDeclaration #417 + id: 417 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "reason" - scope: 348 + scope: 419 stateVariable: false storageLocation: "memory" visibility: "internal" @@ -2089,176 +2102,176 @@ SourceUnit #467 typeString: "string" documentation: undefined nameLocation: "998:6:0" - vType: ElementaryTypeName #345 + vType: ElementaryTypeName #416 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: ParameterList #347 - children: Array(1) [ ElementaryTypeName #345 ] - vScope: TryCatchClause #348 + parent: ParameterList #418 + children: Array(1) [ ElementaryTypeName #416 ] + vScope: TryCatchClause #419 canonicalSignatureType: "string" getterCanonicalSignature: "reason()" getterCanonicalSignatureHash: "e134e33d" - firstChild: ElementaryTypeName #345 - lastChild: ElementaryTypeName #345 + firstChild: ElementaryTypeName #416 + lastChild: ElementaryTypeName #416 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #345 - id: 345 + ElementaryTypeName #416 + id: 416 src: "0:0:0" type: "ElementaryTypeName" typeString: "string" name: "string" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #346 + parent: VariableDeclaration #417 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #344 - id: 344 + Block #415 + id: 415 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: TryCatchClause #348 - vStatements: Array(1) [ ExpressionStatement #343 ] - children: Array(1) [ ExpressionStatement #343 ] - firstChild: ExpressionStatement #343 - lastChild: ExpressionStatement #343 - previousSibling: ParameterList #347 + parent: TryCatchClause #419 + vStatements: Array(1) [ ExpressionStatement #414 ] + children: Array(1) [ ExpressionStatement #414 ] + firstChild: ExpressionStatement #414 + lastChild: ExpressionStatement #414 + previousSibling: ParameterList #418 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ExpressionStatement #343 - id: 343 + ExpressionStatement #414 + id: 414 src: "0:0:0" type: "ExpressionStatement" documentation: undefined - vExpression: FunctionCall #342 + vExpression: FunctionCall #413 context: ASTContext #1000 - parent: Block #344 - children: Array(1) [ FunctionCall #342 ] - firstChild: FunctionCall #342 - lastChild: FunctionCall #342 + parent: Block #415 + children: Array(1) [ FunctionCall #413 ] + firstChild: FunctionCall #413 + lastChild: FunctionCall #413 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #342 - id: 342 + FunctionCall #413 + id: 413 src: "0:0:0" type: "FunctionCall" typeString: "tuple()" kind: "functionCall" fieldNames: undefined - vExpression: Identifier #340 - vArguments: Array(1) [ Identifier #341 ] + vExpression: Identifier #411 + vArguments: Array(1) [ Identifier #412 ] context: ASTContext #1000 - parent: ExpressionStatement #343 - children: Array(2) [ Identifier #340, Identifier #341 ] + parent: ExpressionStatement #414 + children: Array(2) [ Identifier #411, Identifier #412 ] vIdentifier: "revert" vMemberName: undefined vFunctionCallType: "builtin" vReferencedDeclaration: undefined vFunctionName: "revert" - vCallee: Identifier #340 - firstChild: Identifier #340 - lastChild: Identifier #341 + vCallee: Identifier #411 + firstChild: Identifier #411 + lastChild: Identifier #412 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #340 - id: 340 + Identifier #411 + id: 411 src: "0:0:0" type: "Identifier" typeString: "function (string memory) pure" name: "revert" referencedDeclaration: -1 context: ASTContext #1000 - parent: FunctionCall #342 + parent: FunctionCall #413 vReferencedDeclaration: undefined vIdentifierType: "builtin" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Identifier #341 - root: SourceUnit #467 + nextSibling: Identifier #412 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #341 - id: 341 + Identifier #412 + id: 412 src: "0:0:0" type: "Identifier" typeString: "string memory" name: "reason" - referencedDeclaration: 346 + referencedDeclaration: 417 context: ASTContext #1000 - parent: FunctionCall #342 - vReferencedDeclaration: VariableDeclaration #346 + parent: FunctionCall #413 + vReferencedDeclaration: VariableDeclaration #417 vIdentifierType: "userDefined" children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: Identifier #340 + previousSibling: Identifier #411 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TryCatchClause #371 - id: 371 + TryCatchClause #442 + id: 442 src: "0:0:0" type: "TryCatchClause" documentation: undefined errorName: "Panic" - vParameters: ParameterList #370 - vBlock: Block #367 + vParameters: ParameterList #441 + vBlock: Block #438 context: ASTContext #1000 - parent: TryStatement #378 - children: Array(2) [ ParameterList #370, Block #367 ] - firstChild: ParameterList #370 - lastChild: Block #367 - previousSibling: TryCatchClause #348 - nextSibling: TryCatchClause #377 - root: SourceUnit #467 + parent: TryStatement #449 + children: Array(2) [ ParameterList #441, Block #438 ] + firstChild: ParameterList #441 + lastChild: Block #438 + previousSibling: TryCatchClause #419 + nextSibling: TryCatchClause #448 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #370 - id: 370 + ParameterList #441 + id: 441 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: TryCatchClause #371 - vParameters: Array(1) [ VariableDeclaration #369 ] - children: Array(1) [ VariableDeclaration #369 ] - firstChild: VariableDeclaration #369 - lastChild: VariableDeclaration #369 + parent: TryCatchClause #442 + vParameters: Array(1) [ VariableDeclaration #440 ] + children: Array(1) [ VariableDeclaration #440 ] + firstChild: VariableDeclaration #440 + lastChild: VariableDeclaration #440 previousSibling: undefined - nextSibling: Block #367 - root: SourceUnit #467 + nextSibling: Block #438 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #369 - id: 369 + VariableDeclaration #440 + id: 440 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "_code" - scope: 371 + scope: 442 stateVariable: false storageLocation: "default" visibility: "internal" @@ -2266,113 +2279,113 @@ SourceUnit #467 typeString: "uint256" documentation: undefined nameLocation: "1063:5:0" - vType: ElementaryTypeName #368 + vType: ElementaryTypeName #439 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: ParameterList #370 - children: Array(1) [ ElementaryTypeName #368 ] - vScope: TryCatchClause #371 + parent: ParameterList #441 + children: Array(1) [ ElementaryTypeName #439 ] + vScope: TryCatchClause #442 canonicalSignatureType: "uint256" getterCanonicalSignature: "_code()" getterCanonicalSignatureHash: "8d1841e3" - firstChild: ElementaryTypeName #368 - lastChild: ElementaryTypeName #368 + firstChild: ElementaryTypeName #439 + lastChild: ElementaryTypeName #439 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #368 - id: 368 + ElementaryTypeName #439 + id: 439 src: "0:0:0" type: "ElementaryTypeName" typeString: "uint256" name: "uint" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #369 + parent: VariableDeclaration #440 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #367 - id: 367 + Block #438 + id: 438 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: TryCatchClause #371 - vStatements: Array(1) [ IfStatement #366 ] - children: Array(1) [ IfStatement #366 ] - firstChild: IfStatement #366 - lastChild: IfStatement #366 - previousSibling: ParameterList #370 + parent: TryCatchClause #442 + vStatements: Array(1) [ IfStatement #437 ] + children: Array(1) [ IfStatement #437 ] + firstChild: IfStatement #437 + lastChild: IfStatement #437 + previousSibling: ParameterList #441 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IfStatement #366 - id: 366 + IfStatement #437 + id: 437 src: "0:0:0" type: "IfStatement" documentation: undefined - vCondition: BinaryOperation #351 - vTrueBody: Block #356 - vFalseBody: IfStatement #365 + vCondition: BinaryOperation #422 + vTrueBody: Block #427 + vFalseBody: IfStatement #436 context: ASTContext #1000 - parent: Block #367 - children: Array(3) [ BinaryOperation #351, Block #356, IfStatement #365 ] - firstChild: BinaryOperation #351 - lastChild: IfStatement #365 + parent: Block #438 + children: Array(3) [ BinaryOperation #422, Block #427, IfStatement #436 ] + firstChild: BinaryOperation #422 + lastChild: IfStatement #436 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - BinaryOperation #351 - id: 351 + BinaryOperation #422 + id: 422 src: "0:0:0" type: "BinaryOperation" typeString: "bool" operator: "==" - vLeftExpression: Identifier #349 - vRightExpression: Literal #350 + vLeftExpression: Identifier #420 + vRightExpression: Literal #421 context: ASTContext #1000 - parent: IfStatement #366 - children: Array(2) [ Identifier #349, Literal #350 ] - firstChild: Identifier #349 - lastChild: Literal #350 + parent: IfStatement #437 + children: Array(2) [ Identifier #420, Literal #421 ] + firstChild: Identifier #420 + lastChild: Literal #421 previousSibling: undefined - nextSibling: Block #356 - root: SourceUnit #467 + nextSibling: Block #427 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #349 - id: 349 + Identifier #420 + id: 420 src: "0:0:0" type: "Identifier" typeString: "uint256" name: "_code" - referencedDeclaration: 369 + referencedDeclaration: 440 context: ASTContext #1000 - parent: BinaryOperation #351 - vReferencedDeclaration: VariableDeclaration #369 + parent: BinaryOperation #422 + vReferencedDeclaration: VariableDeclaration #440 vIdentifierType: "userDefined" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Literal #350 - root: SourceUnit #467 + nextSibling: Literal #421 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #350 - id: 350 + Literal #421 + id: 421 src: "0:0:0" type: "Literal" typeString: "int_const 1" @@ -2381,93 +2394,93 @@ SourceUnit #467 value: "0x01" subdenomination: undefined context: ASTContext #1000 - parent: BinaryOperation #351 + parent: BinaryOperation #422 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: Identifier #349 + previousSibling: Identifier #420 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #356 - id: 356 + Block #427 + id: 427 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: IfStatement #366 - vStatements: Array(1) [ ExpressionStatement #355 ] - children: Array(1) [ ExpressionStatement #355 ] - firstChild: ExpressionStatement #355 - lastChild: ExpressionStatement #355 - previousSibling: BinaryOperation #351 - nextSibling: IfStatement #365 - root: SourceUnit #467 + parent: IfStatement #437 + vStatements: Array(1) [ ExpressionStatement #426 ] + children: Array(1) [ ExpressionStatement #426 ] + firstChild: ExpressionStatement #426 + lastChild: ExpressionStatement #426 + previousSibling: BinaryOperation #422 + nextSibling: IfStatement #436 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ExpressionStatement #355 - id: 355 + ExpressionStatement #426 + id: 426 src: "0:0:0" type: "ExpressionStatement" documentation: undefined - vExpression: FunctionCall #354 + vExpression: FunctionCall #425 context: ASTContext #1000 - parent: Block #356 - children: Array(1) [ FunctionCall #354 ] - firstChild: FunctionCall #354 - lastChild: FunctionCall #354 + parent: Block #427 + children: Array(1) [ FunctionCall #425 ] + firstChild: FunctionCall #425 + lastChild: FunctionCall #425 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #354 - id: 354 + FunctionCall #425 + id: 425 src: "0:0:0" type: "FunctionCall" typeString: "tuple()" kind: "functionCall" fieldNames: undefined - vExpression: Identifier #352 - vArguments: Array(1) [ Literal #353 ] + vExpression: Identifier #423 + vArguments: Array(1) [ Literal #424 ] context: ASTContext #1000 - parent: ExpressionStatement #355 - children: Array(2) [ Identifier #352, Literal #353 ] + parent: ExpressionStatement #426 + children: Array(2) [ Identifier #423, Literal #424 ] vIdentifier: "revert" vMemberName: undefined vFunctionCallType: "builtin" vReferencedDeclaration: undefined vFunctionName: "revert" - vCallee: Identifier #352 - firstChild: Identifier #352 - lastChild: Literal #353 + vCallee: Identifier #423 + firstChild: Identifier #423 + lastChild: Literal #424 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #352 - id: 352 + Identifier #423 + id: 423 src: "0:0:0" type: "Identifier" typeString: "function (string memory) pure" name: "revert" referencedDeclaration: -1 context: ASTContext #1000 - parent: FunctionCall #354 + parent: FunctionCall #425 vReferencedDeclaration: undefined vIdentifierType: "builtin" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Literal #353 - root: SourceUnit #467 + nextSibling: Literal #424 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #353 - id: 353 + Literal #424 + id: 424 src: "0:0:0" type: "Literal" typeString: "literal_string \"Assertion failed\"" @@ -2476,72 +2489,72 @@ SourceUnit #467 value: "Assertion failed" subdenomination: undefined context: ASTContext #1000 - parent: FunctionCall #354 + parent: FunctionCall #425 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: Identifier #352 + previousSibling: Identifier #423 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IfStatement #365 - id: 365 + IfStatement #436 + id: 436 src: "0:0:0" type: "IfStatement" documentation: undefined - vCondition: BinaryOperation #359 - vTrueBody: Block #364 + vCondition: BinaryOperation #430 + vTrueBody: Block #435 vFalseBody: undefined context: ASTContext #1000 - parent: IfStatement #366 - children: Array(2) [ BinaryOperation #359, Block #364 ] - firstChild: BinaryOperation #359 - lastChild: Block #364 - previousSibling: Block #356 + parent: IfStatement #437 + children: Array(2) [ BinaryOperation #430, Block #435 ] + firstChild: BinaryOperation #430 + lastChild: Block #435 + previousSibling: Block #427 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - BinaryOperation #359 - id: 359 + BinaryOperation #430 + id: 430 src: "0:0:0" type: "BinaryOperation" typeString: "bool" operator: "==" - vLeftExpression: Identifier #357 - vRightExpression: Literal #358 + vLeftExpression: Identifier #428 + vRightExpression: Literal #429 context: ASTContext #1000 - parent: IfStatement #365 - children: Array(2) [ Identifier #357, Literal #358 ] - firstChild: Identifier #357 - lastChild: Literal #358 + parent: IfStatement #436 + children: Array(2) [ Identifier #428, Literal #429 ] + firstChild: Identifier #428 + lastChild: Literal #429 previousSibling: undefined - nextSibling: Block #364 - root: SourceUnit #467 + nextSibling: Block #435 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #357 - id: 357 + Identifier #428 + id: 428 src: "0:0:0" type: "Identifier" typeString: "uint256" name: "_code" - referencedDeclaration: 369 + referencedDeclaration: 440 context: ASTContext #1000 - parent: BinaryOperation #359 - vReferencedDeclaration: VariableDeclaration #369 + parent: BinaryOperation #430 + vReferencedDeclaration: VariableDeclaration #440 vIdentifierType: "userDefined" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Literal #358 - root: SourceUnit #467 + nextSibling: Literal #429 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #358 - id: 358 + Literal #429 + id: 429 src: "0:0:0" type: "Literal" typeString: "int_const 17" @@ -2550,93 +2563,93 @@ SourceUnit #467 value: "0x11" subdenomination: undefined context: ASTContext #1000 - parent: BinaryOperation #359 + parent: BinaryOperation #430 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: Identifier #357 + previousSibling: Identifier #428 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #364 - id: 364 + Block #435 + id: 435 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: IfStatement #365 - vStatements: Array(1) [ ExpressionStatement #363 ] - children: Array(1) [ ExpressionStatement #363 ] - firstChild: ExpressionStatement #363 - lastChild: ExpressionStatement #363 - previousSibling: BinaryOperation #359 + parent: IfStatement #436 + vStatements: Array(1) [ ExpressionStatement #434 ] + children: Array(1) [ ExpressionStatement #434 ] + firstChild: ExpressionStatement #434 + lastChild: ExpressionStatement #434 + previousSibling: BinaryOperation #430 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ExpressionStatement #363 - id: 363 + ExpressionStatement #434 + id: 434 src: "0:0:0" type: "ExpressionStatement" documentation: undefined - vExpression: FunctionCall #362 + vExpression: FunctionCall #433 context: ASTContext #1000 - parent: Block #364 - children: Array(1) [ FunctionCall #362 ] - firstChild: FunctionCall #362 - lastChild: FunctionCall #362 + parent: Block #435 + children: Array(1) [ FunctionCall #433 ] + firstChild: FunctionCall #433 + lastChild: FunctionCall #433 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #362 - id: 362 + FunctionCall #433 + id: 433 src: "0:0:0" type: "FunctionCall" typeString: "tuple()" kind: "functionCall" fieldNames: undefined - vExpression: Identifier #360 - vArguments: Array(1) [ Literal #361 ] + vExpression: Identifier #431 + vArguments: Array(1) [ Literal #432 ] context: ASTContext #1000 - parent: ExpressionStatement #363 - children: Array(2) [ Identifier #360, Literal #361 ] + parent: ExpressionStatement #434 + children: Array(2) [ Identifier #431, Literal #432 ] vIdentifier: "revert" vMemberName: undefined vFunctionCallType: "builtin" vReferencedDeclaration: undefined vFunctionName: "revert" - vCallee: Identifier #360 - firstChild: Identifier #360 - lastChild: Literal #361 + vCallee: Identifier #431 + firstChild: Identifier #431 + lastChild: Literal #432 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #360 - id: 360 + Identifier #431 + id: 431 src: "0:0:0" type: "Identifier" typeString: "function (string memory) pure" name: "revert" referencedDeclaration: -1 context: ASTContext #1000 - parent: FunctionCall #362 + parent: FunctionCall #433 vReferencedDeclaration: undefined vIdentifierType: "builtin" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Literal #361 - root: SourceUnit #467 + nextSibling: Literal #432 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #361 - id: 361 + Literal #432 + id: 432 src: "0:0:0" type: "Literal" typeString: "literal_string \"Underflow/overflow\"" @@ -2645,111 +2658,111 @@ SourceUnit #467 value: "Underflow/overflow" subdenomination: undefined context: ASTContext #1000 - parent: FunctionCall #362 + parent: FunctionCall #433 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: Identifier #360 + previousSibling: Identifier #431 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TryCatchClause #377 - id: 377 + TryCatchClause #448 + id: 448 src: "0:0:0" type: "TryCatchClause" documentation: undefined errorName: "" vParameters: undefined - vBlock: Block #376 + vBlock: Block #447 context: ASTContext #1000 - parent: TryStatement #378 - children: Array(1) [ Block #376 ] - firstChild: Block #376 - lastChild: Block #376 - previousSibling: TryCatchClause #371 + parent: TryStatement #449 + children: Array(1) [ Block #447 ] + firstChild: Block #447 + lastChild: Block #447 + previousSibling: TryCatchClause #442 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #376 - id: 376 + Block #447 + id: 447 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: TryCatchClause #377 - vStatements: Array(1) [ ExpressionStatement #375 ] - children: Array(1) [ ExpressionStatement #375 ] - firstChild: ExpressionStatement #375 - lastChild: ExpressionStatement #375 + parent: TryCatchClause #448 + vStatements: Array(1) [ ExpressionStatement #446 ] + children: Array(1) [ ExpressionStatement #446 ] + firstChild: ExpressionStatement #446 + lastChild: ExpressionStatement #446 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ExpressionStatement #375 - id: 375 + ExpressionStatement #446 + id: 446 src: "0:0:0" type: "ExpressionStatement" documentation: undefined - vExpression: FunctionCall #374 + vExpression: FunctionCall #445 context: ASTContext #1000 - parent: Block #376 - children: Array(1) [ FunctionCall #374 ] - firstChild: FunctionCall #374 - lastChild: FunctionCall #374 + parent: Block #447 + children: Array(1) [ FunctionCall #445 ] + firstChild: FunctionCall #445 + lastChild: FunctionCall #445 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #374 - id: 374 + FunctionCall #445 + id: 445 src: "0:0:0" type: "FunctionCall" typeString: "tuple()" kind: "functionCall" fieldNames: undefined - vExpression: Identifier #372 - vArguments: Array(1) [ Literal #373 ] + vExpression: Identifier #443 + vArguments: Array(1) [ Literal #444 ] context: ASTContext #1000 - parent: ExpressionStatement #375 - children: Array(2) [ Identifier #372, Literal #373 ] + parent: ExpressionStatement #446 + children: Array(2) [ Identifier #443, Literal #444 ] vIdentifier: "revert" vMemberName: undefined vFunctionCallType: "builtin" vReferencedDeclaration: undefined vFunctionName: "revert" - vCallee: Identifier #372 - firstChild: Identifier #372 - lastChild: Literal #373 + vCallee: Identifier #443 + firstChild: Identifier #443 + lastChild: Literal #444 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #372 - id: 372 + Identifier #443 + id: 443 src: "0:0:0" type: "Identifier" typeString: "function (string memory) pure" name: "revert" referencedDeclaration: -1 context: ASTContext #1000 - parent: FunctionCall #374 + parent: FunctionCall #445 vReferencedDeclaration: undefined vIdentifierType: "builtin" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Literal #373 - root: SourceUnit #467 + nextSibling: Literal #444 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #373 - id: 373 + Literal #444 + id: 444 src: "0:0:0" type: "Literal" typeString: "literal_string \"Internal error\"" @@ -2758,95 +2771,98 @@ SourceUnit #467 value: "Internal error" subdenomination: undefined context: ASTContext #1000 - parent: FunctionCall #374 + parent: FunctionCall #445 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: Identifier #372 + previousSibling: Identifier #443 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ContractDefinition #466 - id: 466 + ContractDefinition #537 + id: 537 src: "0:0:0" type: "ContractDefinition" name: "Features082" - scope: 467 + scope: 607 kind: "contract" abstract: false fullyImplemented: true - linearizedBaseContracts: Array(1) [ 466 ] + linearizedBaseContracts: Array(1) [ 537 ] + usedErrors: Array(0) docString: undefined nameLocation: "1333:11:0" context: ASTContext #1000 - parent: SourceUnit #467 + parent: SourceUnit #607 documentation: undefined - vScope: SourceUnit #467 - vLinearizedBaseContracts: Array(1) [ ContractDefinition #466 ] + vScope: SourceUnit #607 + vLinearizedBaseContracts: Array(1) [ ContractDefinition #537 ] + vUsedErrors: Array(0) vInheritanceSpecifiers: Array(0) vStateVariables: Array(0) - vModifiers: Array(1) [ ModifierDefinition #393 ] - vEvents: Array(1) [ EventDefinition #385 ] - vFunctions: Array(1) [ FunctionDefinition #465 ] + vModifiers: Array(1) [ ModifierDefinition #464 ] + vEvents: Array(1) [ EventDefinition #456 ] + vErrors: Array(0) + vFunctions: Array(1) [ FunctionDefinition #536 ] vUsingForDirectives: Array(0) vStructs: Array(0) - vEnums: Array(1) [ EnumDefinition #389 ] + vEnums: Array(1) [ EnumDefinition #460 ] vConstructor: undefined interfaceId: undefined - children: Array(4) [ EventDefinition #385, EnumDefinition #389, ModifierDefinition #393, FunctionDefinition #465 ] - firstChild: EventDefinition #385 - lastChild: FunctionDefinition #465 - previousSibling: ContractDefinition #381 - nextSibling: undefined - root: SourceUnit #467 + children: Array(4) [ EventDefinition #456, EnumDefinition #460, ModifierDefinition #464, FunctionDefinition #536 ] + firstChild: EventDefinition #456 + lastChild: FunctionDefinition #536 + previousSibling: ContractDefinition #452 + nextSibling: ErrorDefinition #542 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - EventDefinition #385 - id: 385 + EventDefinition #456 + id: 456 src: "0:0:0" type: "EventDefinition" anonymous: false name: "Ev" documentation: undefined nameLocation: "1357:2:0" - vParameters: ParameterList #384 + vParameters: ParameterList #455 context: ASTContext #1000 - parent: ContractDefinition #466 - children: Array(1) [ ParameterList #384 ] - vScope: ContractDefinition #466 + parent: ContractDefinition #537 + children: Array(1) [ ParameterList #455 ] + vScope: ContractDefinition #537 canonicalSignature: "Ev(uint256)" canonicalSignatureHash: "b30c6e01" - firstChild: ParameterList #384 - lastChild: ParameterList #384 + firstChild: ParameterList #455 + lastChild: ParameterList #455 previousSibling: undefined - nextSibling: EnumDefinition #389 - root: SourceUnit #467 + nextSibling: EnumDefinition #460 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #384 - id: 384 + ParameterList #455 + id: 455 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: EventDefinition #385 - vParameters: Array(1) [ VariableDeclaration #383 ] - children: Array(1) [ VariableDeclaration #383 ] - firstChild: VariableDeclaration #383 - lastChild: VariableDeclaration #383 + parent: EventDefinition #456 + vParameters: Array(1) [ VariableDeclaration #454 ] + children: Array(1) [ VariableDeclaration #454 ] + firstChild: VariableDeclaration #454 + lastChild: VariableDeclaration #454 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #383 - id: 383 + VariableDeclaration #454 + id: 454 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "a" - scope: 385 + scope: 456 stateVariable: false storageLocation: "default" visibility: "internal" @@ -2854,109 +2870,109 @@ SourceUnit #467 typeString: "uint256" documentation: undefined nameLocation: "1365:1:0" - vType: ElementaryTypeName #382 + vType: ElementaryTypeName #453 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: ParameterList #384 - children: Array(1) [ ElementaryTypeName #382 ] - vScope: EventDefinition #385 + parent: ParameterList #455 + children: Array(1) [ ElementaryTypeName #453 ] + vScope: EventDefinition #456 canonicalSignatureType: "uint256" getterCanonicalSignature: "a()" getterCanonicalSignatureHash: "0dbe671f" - firstChild: ElementaryTypeName #382 - lastChild: ElementaryTypeName #382 + firstChild: ElementaryTypeName #453 + lastChild: ElementaryTypeName #453 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #382 - id: 382 + ElementaryTypeName #453 + id: 453 src: "0:0:0" type: "ElementaryTypeName" typeString: "uint256" name: "uint" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #383 + parent: VariableDeclaration #454 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - EnumDefinition #389 - id: 389 + EnumDefinition #460 + id: 460 src: "0:0:0" type: "EnumDefinition" name: "EnumXYZ" canonicalName: "Features082.EnumXYZ" nameLocation: "1379:7:0" context: ASTContext #1000 - parent: ContractDefinition #466 - vMembers: Array(3) [ EnumValue #386, EnumValue #387, EnumValue #388 ] - vScope: ContractDefinition #466 - children: Array(3) [ EnumValue #386, EnumValue #387, EnumValue #388 ] - firstChild: EnumValue #386 - lastChild: EnumValue #388 - previousSibling: EventDefinition #385 - nextSibling: ModifierDefinition #393 - root: SourceUnit #467 + parent: ContractDefinition #537 + vMembers: Array(3) [ EnumValue #457, EnumValue #458, EnumValue #459 ] + vScope: ContractDefinition #537 + children: Array(3) [ EnumValue #457, EnumValue #458, EnumValue #459 ] + firstChild: EnumValue #457 + lastChild: EnumValue #459 + previousSibling: EventDefinition #456 + nextSibling: ModifierDefinition #464 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - EnumValue #386 - id: 386 + EnumValue #457 + id: 457 src: "0:0:0" type: "EnumValue" name: "X" nameLocation: "1397:1:0" context: ASTContext #1000 - parent: EnumDefinition #389 + parent: EnumDefinition #460 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: EnumValue #387 - root: SourceUnit #467 + nextSibling: EnumValue #458 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - EnumValue #387 - id: 387 + EnumValue #458 + id: 458 src: "0:0:0" type: "EnumValue" name: "Y" nameLocation: "1400:1:0" context: ASTContext #1000 - parent: EnumDefinition #389 + parent: EnumDefinition #460 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: EnumValue #386 - nextSibling: EnumValue #388 - root: SourceUnit #467 + previousSibling: EnumValue #457 + nextSibling: EnumValue #459 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - EnumValue #388 - id: 388 + EnumValue #459 + id: 459 src: "0:0:0" type: "EnumValue" name: "Z" nameLocation: "1403:1:0" context: ASTContext #1000 - parent: EnumDefinition #389 + parent: EnumDefinition #460 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: EnumValue #387 + previousSibling: EnumValue #458 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ModifierDefinition #393 - id: 393 + ModifierDefinition #464 + id: 464 src: "0:0:0" type: "ModifierDefinition" name: "modStructDocs" @@ -2964,75 +2980,75 @@ SourceUnit #467 visibility: "internal" documentation: undefined nameLocation: "1425:13:0" - vParameters: ParameterList #390 + vParameters: ParameterList #461 vOverrideSpecifier: undefined - vBody: Block #392 + vBody: Block #463 context: ASTContext #1000 - parent: ContractDefinition #466 - children: Array(2) [ ParameterList #390, Block #392 ] - vScope: ContractDefinition #466 + parent: ContractDefinition #537 + children: Array(2) [ ParameterList #461, Block #463 ] + vScope: ContractDefinition #537 canonicalSignature: "modStructDocs()" canonicalSignatureHash: "cd8540bf" - firstChild: ParameterList #390 - lastChild: Block #392 - previousSibling: EnumDefinition #389 - nextSibling: FunctionDefinition #465 - root: SourceUnit #467 + firstChild: ParameterList #461 + lastChild: Block #463 + previousSibling: EnumDefinition #460 + nextSibling: FunctionDefinition #536 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #390 - id: 390 + ParameterList #461 + id: 461 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: ModifierDefinition #393 + parent: ModifierDefinition #464 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Block #392 - root: SourceUnit #467 + nextSibling: Block #463 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #392 - id: 392 + Block #463 + id: 463 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: ModifierDefinition #393 - vStatements: Array(1) [ PlaceholderStatement #391 ] - children: Array(1) [ PlaceholderStatement #391 ] - firstChild: PlaceholderStatement #391 - lastChild: PlaceholderStatement #391 - previousSibling: ParameterList #390 + parent: ModifierDefinition #464 + vStatements: Array(1) [ PlaceholderStatement #462 ] + children: Array(1) [ PlaceholderStatement #462 ] + firstChild: PlaceholderStatement #462 + lastChild: PlaceholderStatement #462 + previousSibling: ParameterList #461 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - PlaceholderStatement #391 - id: 391 + PlaceholderStatement #462 + id: 462 src: "0:0:0" type: "PlaceholderStatement" documentation: "PlaceholderStatement docstring" context: ASTContext #1000 - parent: Block #392 + parent: Block #463 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionDefinition #465 - id: 465 + FunctionDefinition #536 + id: 536 src: "0:0:0" type: "FunctionDefinition" implemented: true virtual: false - scope: 466 + scope: 537 kind: "function" name: "stmtStructDocs" visibility: "public" @@ -3040,131 +3056,131 @@ SourceUnit #467 isConstructor: false documentation: undefined nameLocation: "1517:14:0" - vParameters: ParameterList #394 - vReturnParameters: ParameterList #395 - vModifiers: Array(1) [ ModifierInvocation #397 ] + vParameters: ParameterList #465 + vReturnParameters: ParameterList #466 + vModifiers: Array(1) [ ModifierInvocation #468 ] vOverrideSpecifier: undefined - vBody: Block #464 + vBody: Block #535 context: ASTContext #1000 - parent: ContractDefinition #466 - children: Array(4) [ ParameterList #394, ModifierInvocation #397, ParameterList #395, Block #464 ] - vScope: ContractDefinition #466 + parent: ContractDefinition #537 + children: Array(4) [ ParameterList #465, ModifierInvocation #468, ParameterList #466, Block #535 ] + vScope: ContractDefinition #537 canonicalSignature: "stmtStructDocs()" canonicalSignatureHash: "734ea2b8" - firstChild: ParameterList #394 - lastChild: Block #464 - previousSibling: ModifierDefinition #393 + firstChild: ParameterList #465 + lastChild: Block #535 + previousSibling: ModifierDefinition #464 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #394 - id: 394 + ParameterList #465 + id: 465 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #465 + parent: FunctionDefinition #536 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: ModifierInvocation #397 - root: SourceUnit #467 + nextSibling: ModifierInvocation #468 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ModifierInvocation #397 - id: 397 + ModifierInvocation #468 + id: 468 src: "0:0:0" type: "ModifierInvocation" kind: "modifierInvocation" - vModifierName: IdentifierPath #396 + vModifierName: IdentifierPath #467 vArguments: Array(0) context: ASTContext #1000 - parent: FunctionDefinition #465 - children: Array(1) [ IdentifierPath #396 ] + parent: FunctionDefinition #536 + children: Array(1) [ IdentifierPath #467 ] vModifier: ModifierDefinition #153 - firstChild: IdentifierPath #396 - lastChild: IdentifierPath #396 - previousSibling: ParameterList #394 - nextSibling: ParameterList #395 - root: SourceUnit #467 + firstChild: IdentifierPath #467 + lastChild: IdentifierPath #467 + previousSibling: ParameterList #465 + nextSibling: ParameterList #466 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IdentifierPath #396 - id: 396 + IdentifierPath #467 + id: 467 src: "0:0:0" type: "IdentifierPath" name: "modStructDocs" referencedDeclaration: 153 context: ASTContext #1000 - parent: ModifierInvocation #397 + parent: ModifierInvocation #468 vReferencedDeclaration: ModifierDefinition #153 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #395 - id: 395 + ParameterList #466 + id: 466 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #465 + parent: FunctionDefinition #536 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ModifierInvocation #397 - nextSibling: Block #464 - root: SourceUnit #467 + previousSibling: ModifierInvocation #468 + nextSibling: Block #535 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #464 - id: 464 + Block #535 + id: 535 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: FunctionDefinition #465 - vStatements: Array(13) [ VariableDeclarationStatement #402, ExpressionStatement #404, Block #405, EmitStatement #409, WhileStatement #413, DoWhileStatement #417, ForStatement #430, IfStatement #434, VariableDeclarationStatement #442, TryStatement #460, InlineAssembly #461, UncheckedBlock #462, Return #463 ] - children: Array(13) [ VariableDeclarationStatement #402, ExpressionStatement #404, Block #405, EmitStatement #409, WhileStatement #413, DoWhileStatement #417, ForStatement #430, IfStatement #434, VariableDeclarationStatement #442, TryStatement #460, InlineAssembly #461, UncheckedBlock #462, Return #463 ] - firstChild: VariableDeclarationStatement #402 - lastChild: Return #463 - previousSibling: ParameterList #395 + parent: FunctionDefinition #536 + vStatements: Array(13) [ VariableDeclarationStatement #473, ExpressionStatement #475, Block #476, EmitStatement #480, WhileStatement #484, DoWhileStatement #488, ForStatement #501, IfStatement #505, VariableDeclarationStatement #513, TryStatement #531, InlineAssembly #532, UncheckedBlock #533, Return #534 ] + children: Array(13) [ VariableDeclarationStatement #473, ExpressionStatement #475, Block #476, EmitStatement #480, WhileStatement #484, DoWhileStatement #488, ForStatement #501, IfStatement #505, VariableDeclarationStatement #513, TryStatement #531, InlineAssembly #532, UncheckedBlock #533, Return #534 ] + firstChild: VariableDeclarationStatement #473 + lastChild: Return #534 + previousSibling: ParameterList #466 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclarationStatement #402 - id: 402 + VariableDeclarationStatement #473 + id: 473 src: "0:0:0" type: "VariableDeclarationStatement" documentation: "VariableDeclarationStatement docstring" - assignments: Array(1) [ 399 ] - vDeclarations: Array(1) [ VariableDeclaration #399 ] - vInitialValue: TupleExpression #401 + assignments: Array(1) [ 470 ] + vDeclarations: Array(1) [ VariableDeclaration #470 ] + vInitialValue: TupleExpression #472 context: ASTContext #1000 - parent: Block #464 - children: Array(2) [ VariableDeclaration #399, TupleExpression #401 ] - firstChild: VariableDeclaration #399 - lastChild: TupleExpression #401 + parent: Block #535 + children: Array(2) [ VariableDeclaration #470, TupleExpression #472 ] + firstChild: VariableDeclaration #470 + lastChild: TupleExpression #472 previousSibling: undefined - nextSibling: ExpressionStatement #404 - root: SourceUnit #467 + nextSibling: ExpressionStatement #475 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #399 - id: 399 + VariableDeclaration #470 + id: 470 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "a" - scope: 464 + scope: 535 stateVariable: false storageLocation: "default" visibility: "internal" @@ -3172,61 +3188,61 @@ SourceUnit #467 typeString: "uint256" documentation: undefined nameLocation: "1624:1:0" - vType: ElementaryTypeName #398 + vType: ElementaryTypeName #469 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: VariableDeclarationStatement #402 - children: Array(1) [ ElementaryTypeName #398 ] - vScope: Block #464 + parent: VariableDeclarationStatement #473 + children: Array(1) [ ElementaryTypeName #469 ] + vScope: Block #535 canonicalSignatureType: "uint256" getterCanonicalSignature: "a()" getterCanonicalSignatureHash: "0dbe671f" - firstChild: ElementaryTypeName #398 - lastChild: ElementaryTypeName #398 + firstChild: ElementaryTypeName #469 + lastChild: ElementaryTypeName #469 previousSibling: undefined - nextSibling: TupleExpression #401 - root: SourceUnit #467 + nextSibling: TupleExpression #472 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #398 - id: 398 + ElementaryTypeName #469 + id: 469 src: "0:0:0" type: "ElementaryTypeName" typeString: "uint256" name: "uint" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #399 + parent: VariableDeclaration #470 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TupleExpression #401 - id: 401 + TupleExpression #472 + id: 472 src: "0:0:0" type: "TupleExpression" typeString: "int_const 1" isInlineArray: false - vOriginalComponents: Array(1) [ Literal #400 ] + vOriginalComponents: Array(1) [ Literal #471 ] context: ASTContext #1000 - parent: VariableDeclarationStatement #402 - children: Array(1) [ Literal #400 ] - components: Array(1) [ 400 ] - vComponents: Array(1) [ Literal #400 ] - firstChild: Literal #400 - lastChild: Literal #400 - previousSibling: VariableDeclaration #399 + parent: VariableDeclarationStatement #473 + children: Array(1) [ Literal #471 ] + components: Array(1) [ 471 ] + vComponents: Array(1) [ Literal #471 ] + firstChild: Literal #471 + lastChild: Literal #471 + previousSibling: VariableDeclaration #470 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #400 - id: 400 + Literal #471 + id: 471 src: "0:0:0" type: "Literal" typeString: "int_const 1" @@ -3235,33 +3251,33 @@ SourceUnit #467 value: "1" subdenomination: undefined context: ASTContext #1000 - parent: TupleExpression #401 + parent: TupleExpression #472 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ExpressionStatement #404 - id: 404 + ExpressionStatement #475 + id: 475 src: "0:0:0" type: "ExpressionStatement" documentation: "ExpressionStatement docstring" - vExpression: Literal #403 + vExpression: Literal #474 context: ASTContext #1000 - parent: Block #464 - children: Array(1) [ Literal #403 ] - firstChild: Literal #403 - lastChild: Literal #403 - previousSibling: VariableDeclarationStatement #402 - nextSibling: Block #405 - root: SourceUnit #467 + parent: Block #535 + children: Array(1) [ Literal #474 ] + firstChild: Literal #474 + lastChild: Literal #474 + previousSibling: VariableDeclarationStatement #473 + nextSibling: Block #476 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #403 - id: 403 + Literal #474 + id: 474 src: "0:0:0" type: "Literal" typeString: "int_const 1" @@ -3270,93 +3286,93 @@ SourceUnit #467 value: "1" subdenomination: undefined context: ASTContext #1000 - parent: ExpressionStatement #404 + parent: ExpressionStatement #475 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #405 - id: 405 + Block #476 + id: 476 src: "0:0:0" type: "Block" documentation: "Block docstring" context: ASTContext #1000 - parent: Block #464 + parent: Block #535 vStatements: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ExpressionStatement #404 - nextSibling: EmitStatement #409 - root: SourceUnit #467 + previousSibling: ExpressionStatement #475 + nextSibling: EmitStatement #480 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - EmitStatement #409 - id: 409 + EmitStatement #480 + id: 480 src: "0:0:0" type: "EmitStatement" documentation: "EmitStatement docstring" - vEventCall: FunctionCall #408 + vEventCall: FunctionCall #479 context: ASTContext #1000 - parent: Block #464 - children: Array(1) [ FunctionCall #408 ] - firstChild: FunctionCall #408 - lastChild: FunctionCall #408 - previousSibling: Block #405 - nextSibling: WhileStatement #413 - root: SourceUnit #467 + parent: Block #535 + children: Array(1) [ FunctionCall #479 ] + firstChild: FunctionCall #479 + lastChild: FunctionCall #479 + previousSibling: Block #476 + nextSibling: WhileStatement #484 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #408 - id: 408 + FunctionCall #479 + id: 479 src: "0:0:0" type: "FunctionCall" typeString: "tuple()" kind: "functionCall" fieldNames: undefined - vExpression: Identifier #406 - vArguments: Array(1) [ Literal #407 ] + vExpression: Identifier #477 + vArguments: Array(1) [ Literal #478 ] context: ASTContext #1000 - parent: EmitStatement #409 - children: Array(2) [ Identifier #406, Literal #407 ] + parent: EmitStatement #480 + children: Array(2) [ Identifier #477, Literal #478 ] vIdentifier: "Ev" vMemberName: undefined vFunctionCallType: "userDefined" - vReferencedDeclaration: EventDefinition #385 + vReferencedDeclaration: EventDefinition #456 vFunctionName: "Ev" - vCallee: Identifier #406 - firstChild: Identifier #406 - lastChild: Literal #407 + vCallee: Identifier #477 + firstChild: Identifier #477 + lastChild: Literal #478 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #406 - id: 406 + Identifier #477 + id: 477 src: "0:0:0" type: "Identifier" typeString: "function (uint256)" name: "Ev" - referencedDeclaration: 385 + referencedDeclaration: 456 context: ASTContext #1000 - parent: FunctionCall #408 - vReferencedDeclaration: EventDefinition #385 + parent: FunctionCall #479 + vReferencedDeclaration: EventDefinition #456 vIdentifierType: "userDefined" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Literal #407 - root: SourceUnit #467 + nextSibling: Literal #478 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #407 - id: 407 + Literal #478 + id: 478 src: "0:0:0" type: "Literal" typeString: "int_const 1" @@ -3365,34 +3381,34 @@ SourceUnit #467 value: "1" subdenomination: undefined context: ASTContext #1000 - parent: FunctionCall #408 + parent: FunctionCall #479 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: Identifier #406 + previousSibling: Identifier #477 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - WhileStatement #413 - id: 413 + WhileStatement #484 + id: 484 src: "0:0:0" type: "WhileStatement" documentation: "WhileStatement docstring" - vCondition: Literal #410 - vBody: Block #412 + vCondition: Literal #481 + vBody: Block #483 context: ASTContext #1000 - parent: Block #464 - children: Array(2) [ Literal #410, Block #412 ] - firstChild: Literal #410 - lastChild: Block #412 - previousSibling: EmitStatement #409 - nextSibling: DoWhileStatement #417 - root: SourceUnit #467 + parent: Block #535 + children: Array(2) [ Literal #481, Block #483 ] + firstChild: Literal #481 + lastChild: Block #483 + previousSibling: EmitStatement #480 + nextSibling: DoWhileStatement #488 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #410 - id: 410 + Literal #481 + id: 481 src: "0:0:0" type: "Literal" typeString: "bool" @@ -3401,65 +3417,65 @@ SourceUnit #467 value: "false" subdenomination: undefined context: ASTContext #1000 - parent: WhileStatement #413 + parent: WhileStatement #484 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Block #412 - root: SourceUnit #467 + nextSibling: Block #483 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #412 - id: 412 + Block #483 + id: 483 src: "0:0:0" type: "Block" documentation: "Body Block docstring" context: ASTContext #1000 - parent: WhileStatement #413 - vStatements: Array(1) [ Continue #411 ] - children: Array(1) [ Continue #411 ] - firstChild: Continue #411 - lastChild: Continue #411 - previousSibling: Literal #410 + parent: WhileStatement #484 + vStatements: Array(1) [ Continue #482 ] + children: Array(1) [ Continue #482 ] + firstChild: Continue #482 + lastChild: Continue #482 + previousSibling: Literal #481 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Continue #411 - id: 411 + Continue #482 + id: 482 src: "0:0:0" type: "Continue" documentation: "Continue docstring" context: ASTContext #1000 - parent: Block #412 + parent: Block #483 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - DoWhileStatement #417 - id: 417 + DoWhileStatement #488 + id: 488 src: "0:0:0" type: "DoWhileStatement" documentation: "DoWhileStatement docstring" - vCondition: Literal #414 - vBody: Block #416 + vCondition: Literal #485 + vBody: Block #487 context: ASTContext #1000 - parent: Block #464 - children: Array(2) [ Literal #414, Block #416 ] - firstChild: Literal #414 - lastChild: Block #416 - previousSibling: WhileStatement #413 - nextSibling: ForStatement #430 - root: SourceUnit #467 + parent: Block #535 + children: Array(2) [ Literal #485, Block #487 ] + firstChild: Literal #485 + lastChild: Block #487 + previousSibling: WhileStatement #484 + nextSibling: ForStatement #501 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #414 - id: 414 + Literal #485 + id: 485 src: "0:0:0" type: "Literal" typeString: "bool" @@ -3468,91 +3484,91 @@ SourceUnit #467 value: "true" subdenomination: undefined context: ASTContext #1000 - parent: DoWhileStatement #417 + parent: DoWhileStatement #488 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Block #416 - root: SourceUnit #467 + nextSibling: Block #487 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #416 - id: 416 + Block #487 + id: 487 src: "0:0:0" type: "Block" documentation: "Body Block docstring" context: ASTContext #1000 - parent: DoWhileStatement #417 - vStatements: Array(1) [ Break #415 ] - children: Array(1) [ Break #415 ] - firstChild: Break #415 - lastChild: Break #415 - previousSibling: Literal #414 + parent: DoWhileStatement #488 + vStatements: Array(1) [ Break #486 ] + children: Array(1) [ Break #486 ] + firstChild: Break #486 + lastChild: Break #486 + previousSibling: Literal #485 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Break #415 - id: 415 + Break #486 + id: 486 src: "0:0:0" type: "Break" documentation: "Break docstring" context: ASTContext #1000 - parent: Block #416 + parent: Block #487 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ForStatement #430 - id: 430 + ForStatement #501 + id: 501 src: "0:0:0" type: "ForStatement" documentation: "ForStatement docstring" - vInitializationExpression: VariableDeclarationStatement #423 - vCondition: BinaryOperation #426 - vLoopExpression: ExpressionStatement #429 - vBody: Block #418 + vInitializationExpression: VariableDeclarationStatement #494 + vCondition: BinaryOperation #497 + vLoopExpression: ExpressionStatement #500 + vBody: Block #489 context: ASTContext #1000 - parent: Block #464 - children: Array(4) [ VariableDeclarationStatement #423, BinaryOperation #426, ExpressionStatement #429, Block #418 ] - firstChild: VariableDeclarationStatement #423 - lastChild: Block #418 - previousSibling: DoWhileStatement #417 - nextSibling: IfStatement #434 - root: SourceUnit #467 + parent: Block #535 + children: Array(4) [ VariableDeclarationStatement #494, BinaryOperation #497, ExpressionStatement #500, Block #489 ] + firstChild: VariableDeclarationStatement #494 + lastChild: Block #489 + previousSibling: DoWhileStatement #488 + nextSibling: IfStatement #505 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclarationStatement #423 - id: 423 + VariableDeclarationStatement #494 + id: 494 src: "0:0:0" type: "VariableDeclarationStatement" documentation: undefined - assignments: Array(1) [ 420 ] - vDeclarations: Array(1) [ VariableDeclaration #420 ] - vInitialValue: TupleExpression #422 + assignments: Array(1) [ 491 ] + vDeclarations: Array(1) [ VariableDeclaration #491 ] + vInitialValue: TupleExpression #493 context: ASTContext #1000 - parent: ForStatement #430 - children: Array(2) [ VariableDeclaration #420, TupleExpression #422 ] - firstChild: VariableDeclaration #420 - lastChild: TupleExpression #422 + parent: ForStatement #501 + children: Array(2) [ VariableDeclaration #491, TupleExpression #493 ] + firstChild: VariableDeclaration #491 + lastChild: TupleExpression #493 previousSibling: undefined - nextSibling: BinaryOperation #426 - root: SourceUnit #467 + nextSibling: BinaryOperation #497 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #420 - id: 420 + VariableDeclaration #491 + id: 491 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "n" - scope: 430 + scope: 501 stateVariable: false storageLocation: "default" visibility: "internal" @@ -3560,61 +3576,61 @@ SourceUnit #467 typeString: "uint256" documentation: undefined nameLocation: "2258:1:0" - vType: ElementaryTypeName #419 + vType: ElementaryTypeName #490 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: VariableDeclarationStatement #423 - children: Array(1) [ ElementaryTypeName #419 ] - vScope: ForStatement #430 + parent: VariableDeclarationStatement #494 + children: Array(1) [ ElementaryTypeName #490 ] + vScope: ForStatement #501 canonicalSignatureType: "uint256" getterCanonicalSignature: "n()" getterCanonicalSignatureHash: "2e52d606" - firstChild: ElementaryTypeName #419 - lastChild: ElementaryTypeName #419 + firstChild: ElementaryTypeName #490 + lastChild: ElementaryTypeName #490 previousSibling: undefined - nextSibling: TupleExpression #422 - root: SourceUnit #467 + nextSibling: TupleExpression #493 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #419 - id: 419 + ElementaryTypeName #490 + id: 490 src: "0:0:0" type: "ElementaryTypeName" typeString: "uint256" name: "uint" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #420 + parent: VariableDeclaration #491 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TupleExpression #422 - id: 422 + TupleExpression #493 + id: 493 src: "0:0:0" type: "TupleExpression" typeString: "int_const 1" isInlineArray: false - vOriginalComponents: Array(1) [ Literal #421 ] + vOriginalComponents: Array(1) [ Literal #492 ] context: ASTContext #1000 - parent: VariableDeclarationStatement #423 - children: Array(1) [ Literal #421 ] - components: Array(1) [ 421 ] - vComponents: Array(1) [ Literal #421 ] - firstChild: Literal #421 - lastChild: Literal #421 - previousSibling: VariableDeclaration #420 + parent: VariableDeclarationStatement #494 + children: Array(1) [ Literal #492 ] + components: Array(1) [ 492 ] + vComponents: Array(1) [ Literal #492 ] + firstChild: Literal #492 + lastChild: Literal #492 + previousSibling: VariableDeclaration #491 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #421 - id: 421 + Literal #492 + id: 492 src: "0:0:0" type: "Literal" typeString: "int_const 1" @@ -3623,54 +3639,54 @@ SourceUnit #467 value: "1" subdenomination: undefined context: ASTContext #1000 - parent: TupleExpression #422 + parent: TupleExpression #493 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - BinaryOperation #426 - id: 426 + BinaryOperation #497 + id: 497 src: "0:0:0" type: "BinaryOperation" typeString: "bool" operator: "<" - vLeftExpression: Identifier #424 - vRightExpression: Literal #425 + vLeftExpression: Identifier #495 + vRightExpression: Literal #496 context: ASTContext #1000 - parent: ForStatement #430 - children: Array(2) [ Identifier #424, Literal #425 ] - firstChild: Identifier #424 - lastChild: Literal #425 - previousSibling: VariableDeclarationStatement #423 - nextSibling: ExpressionStatement #429 - root: SourceUnit #467 + parent: ForStatement #501 + children: Array(2) [ Identifier #495, Literal #496 ] + firstChild: Identifier #495 + lastChild: Literal #496 + previousSibling: VariableDeclarationStatement #494 + nextSibling: ExpressionStatement #500 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #424 - id: 424 + Identifier #495 + id: 495 src: "0:0:0" type: "Identifier" typeString: "uint256" name: "n" - referencedDeclaration: 420 + referencedDeclaration: 491 context: ASTContext #1000 - parent: BinaryOperation #426 - vReferencedDeclaration: VariableDeclaration #420 + parent: BinaryOperation #497 + vReferencedDeclaration: VariableDeclaration #491 vIdentifierType: "userDefined" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Literal #425 - root: SourceUnit #467 + nextSibling: Literal #496 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #425 - id: 425 + Literal #496 + id: 496 src: "0:0:0" type: "Literal" typeString: "int_const 1" @@ -3679,104 +3695,104 @@ SourceUnit #467 value: "1" subdenomination: undefined context: ASTContext #1000 - parent: BinaryOperation #426 + parent: BinaryOperation #497 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: Identifier #424 + previousSibling: Identifier #495 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ExpressionStatement #429 - id: 429 + ExpressionStatement #500 + id: 500 src: "0:0:0" type: "ExpressionStatement" documentation: undefined - vExpression: UnaryOperation #428 + vExpression: UnaryOperation #499 context: ASTContext #1000 - parent: ForStatement #430 - children: Array(1) [ UnaryOperation #428 ] - firstChild: UnaryOperation #428 - lastChild: UnaryOperation #428 - previousSibling: BinaryOperation #426 - nextSibling: Block #418 - root: SourceUnit #467 + parent: ForStatement #501 + children: Array(1) [ UnaryOperation #499 ] + firstChild: UnaryOperation #499 + lastChild: UnaryOperation #499 + previousSibling: BinaryOperation #497 + nextSibling: Block #489 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - UnaryOperation #428 - id: 428 + UnaryOperation #499 + id: 499 src: "0:0:0" type: "UnaryOperation" typeString: "uint256" prefix: false operator: "++" - vSubExpression: Identifier #427 + vSubExpression: Identifier #498 context: ASTContext #1000 - parent: ExpressionStatement #429 - children: Array(1) [ Identifier #427 ] - firstChild: Identifier #427 - lastChild: Identifier #427 + parent: ExpressionStatement #500 + children: Array(1) [ Identifier #498 ] + firstChild: Identifier #498 + lastChild: Identifier #498 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #427 - id: 427 + Identifier #498 + id: 498 src: "0:0:0" type: "Identifier" typeString: "uint256" name: "n" - referencedDeclaration: 420 + referencedDeclaration: 491 context: ASTContext #1000 - parent: UnaryOperation #428 - vReferencedDeclaration: VariableDeclaration #420 + parent: UnaryOperation #499 + vReferencedDeclaration: VariableDeclaration #491 vIdentifierType: "userDefined" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #418 - id: 418 + Block #489 + id: 489 src: "0:0:0" type: "Block" documentation: "Body Block docstring" context: ASTContext #1000 - parent: ForStatement #430 + parent: ForStatement #501 vStatements: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ExpressionStatement #429 + previousSibling: ExpressionStatement #500 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IfStatement #434 - id: 434 + IfStatement #505 + id: 505 src: "0:0:0" type: "IfStatement" documentation: "IfStatement docstring" - vCondition: Literal #431 - vTrueBody: Block #432 - vFalseBody: Block #433 + vCondition: Literal #502 + vTrueBody: Block #503 + vFalseBody: Block #504 context: ASTContext #1000 - parent: Block #464 - children: Array(3) [ Literal #431, Block #432, Block #433 ] - firstChild: Literal #431 - lastChild: Block #433 - previousSibling: ForStatement #430 - nextSibling: VariableDeclarationStatement #442 - root: SourceUnit #467 + parent: Block #535 + children: Array(3) [ Literal #502, Block #503, Block #504 ] + firstChild: Literal #502 + lastChild: Block #504 + previousSibling: ForStatement #501 + nextSibling: VariableDeclarationStatement #513 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #431 - id: 431 + Literal #502 + id: 502 src: "0:0:0" type: "Literal" typeString: "bool" @@ -3785,73 +3801,73 @@ SourceUnit #467 value: "false" subdenomination: undefined context: ASTContext #1000 - parent: IfStatement #434 + parent: IfStatement #505 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: Block #432 - root: SourceUnit #467 + nextSibling: Block #503 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #432 - id: 432 + Block #503 + id: 503 src: "0:0:0" type: "Block" documentation: "True body Block docstring" context: ASTContext #1000 - parent: IfStatement #434 + parent: IfStatement #505 vStatements: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: Literal #431 - nextSibling: Block #433 - root: SourceUnit #467 + previousSibling: Literal #502 + nextSibling: Block #504 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #433 - id: 433 + Block #504 + id: 504 src: "0:0:0" type: "Block" documentation: "False body Block docstring" context: ASTContext #1000 - parent: IfStatement #434 + parent: IfStatement #505 vStatements: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: Block #432 + previousSibling: Block #503 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclarationStatement #442 - id: 442 + VariableDeclarationStatement #513 + id: 513 src: "0:0:0" type: "VariableDeclarationStatement" documentation: undefined - assignments: Array(1) [ 437 ] - vDeclarations: Array(1) [ VariableDeclaration #437 ] - vInitialValue: FunctionCall #441 + assignments: Array(1) [ 508 ] + vDeclarations: Array(1) [ VariableDeclaration #508 ] + vInitialValue: FunctionCall #512 context: ASTContext #1000 - parent: Block #464 - children: Array(2) [ VariableDeclaration #437, FunctionCall #441 ] - firstChild: VariableDeclaration #437 - lastChild: FunctionCall #441 - previousSibling: IfStatement #434 - nextSibling: TryStatement #460 - root: SourceUnit #467 + parent: Block #535 + children: Array(2) [ VariableDeclaration #508, FunctionCall #512 ] + firstChild: VariableDeclaration #508 + lastChild: FunctionCall #512 + previousSibling: IfStatement #505 + nextSibling: TryStatement #531 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #437 - id: 437 + VariableDeclaration #508 + id: 508 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "cp" - scope: 464 + scope: 535 stateVariable: false storageLocation: "default" visibility: "internal" @@ -3859,291 +3875,291 @@ SourceUnit #467 typeString: "contract CatchPanic" documentation: undefined nameLocation: "2637:2:0" - vType: UserDefinedTypeName #436 + vType: UserDefinedTypeName #507 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: VariableDeclarationStatement #442 - children: Array(1) [ UserDefinedTypeName #436 ] - vScope: Block #464 + parent: VariableDeclarationStatement #513 + children: Array(1) [ UserDefinedTypeName #507 ] + vScope: Block #535 canonicalSignatureType: "address" getterCanonicalSignature: "cp()" getterCanonicalSignatureHash: "7056dc40" - firstChild: UserDefinedTypeName #436 - lastChild: UserDefinedTypeName #436 + firstChild: UserDefinedTypeName #507 + lastChild: UserDefinedTypeName #507 previousSibling: undefined - nextSibling: FunctionCall #441 - root: SourceUnit #467 + nextSibling: FunctionCall #512 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - UserDefinedTypeName #436 - id: 436 + UserDefinedTypeName #507 + id: 507 src: "0:0:0" type: "UserDefinedTypeName" typeString: "contract CatchPanic" name: undefined - referencedDeclaration: 381 - path: IdentifierPath #435 + referencedDeclaration: 452 + path: IdentifierPath #506 context: ASTContext #1000 - parent: VariableDeclaration #437 - children: Array(1) [ IdentifierPath #435 ] - vReferencedDeclaration: ContractDefinition #381 - firstChild: IdentifierPath #435 - lastChild: IdentifierPath #435 + parent: VariableDeclaration #508 + children: Array(1) [ IdentifierPath #506 ] + vReferencedDeclaration: ContractDefinition #452 + firstChild: IdentifierPath #506 + lastChild: IdentifierPath #506 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IdentifierPath #435 - id: 435 + IdentifierPath #506 + id: 506 src: "0:0:0" type: "IdentifierPath" name: "CatchPanic" referencedDeclaration: 141 context: ASTContext #1000 - parent: UserDefinedTypeName #436 + parent: UserDefinedTypeName #507 vReferencedDeclaration: ContractDefinition #141 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #441 - id: 441 + FunctionCall #512 + id: 512 src: "0:0:0" type: "FunctionCall" typeString: "contract CatchPanic" kind: "functionCall" fieldNames: undefined - vExpression: NewExpression #440 + vExpression: NewExpression #511 vArguments: Array(0) context: ASTContext #1000 - parent: VariableDeclarationStatement #442 - children: Array(1) [ NewExpression #440 ] + parent: VariableDeclarationStatement #513 + children: Array(1) [ NewExpression #511 ] vIdentifier: "new" vMemberName: undefined vFunctionCallType: "builtin" vReferencedDeclaration: undefined vFunctionName: "new" - vCallee: NewExpression #440 - firstChild: NewExpression #440 - lastChild: NewExpression #440 - previousSibling: VariableDeclaration #437 + vCallee: NewExpression #511 + firstChild: NewExpression #511 + lastChild: NewExpression #511 + previousSibling: VariableDeclaration #508 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - NewExpression #440 - id: 440 + NewExpression #511 + id: 511 src: "0:0:0" type: "NewExpression" typeString: "function () returns (contract CatchPanic)" - vTypeName: UserDefinedTypeName #439 + vTypeName: UserDefinedTypeName #510 context: ASTContext #1000 - parent: FunctionCall #441 - children: Array(1) [ UserDefinedTypeName #439 ] - firstChild: UserDefinedTypeName #439 - lastChild: UserDefinedTypeName #439 + parent: FunctionCall #512 + children: Array(1) [ UserDefinedTypeName #510 ] + firstChild: UserDefinedTypeName #510 + lastChild: UserDefinedTypeName #510 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - UserDefinedTypeName #439 - id: 439 + UserDefinedTypeName #510 + id: 510 src: "0:0:0" type: "UserDefinedTypeName" typeString: "contract CatchPanic" name: undefined - referencedDeclaration: 381 - path: IdentifierPath #438 + referencedDeclaration: 452 + path: IdentifierPath #509 context: ASTContext #1000 - parent: NewExpression #440 - children: Array(1) [ IdentifierPath #438 ] - vReferencedDeclaration: ContractDefinition #381 - firstChild: IdentifierPath #438 - lastChild: IdentifierPath #438 + parent: NewExpression #511 + children: Array(1) [ IdentifierPath #509 ] + vReferencedDeclaration: ContractDefinition #452 + firstChild: IdentifierPath #509 + lastChild: IdentifierPath #509 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - IdentifierPath #438 - id: 438 + IdentifierPath #509 + id: 509 src: "0:0:0" type: "IdentifierPath" name: "CatchPanic" referencedDeclaration: 141 context: ASTContext #1000 - parent: UserDefinedTypeName #439 + parent: UserDefinedTypeName #510 vReferencedDeclaration: ContractDefinition #141 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TryStatement #460 - id: 460 + TryStatement #531 + id: 531 src: "0:0:0" type: "TryStatement" documentation: "TryStatement docstring" - vExternalCall: FunctionCall #445 - vClauses: Array(4) [ TryCatchClause #447, TryCatchClause #452, TryCatchClause #457, TryCatchClause #459 ] + vExternalCall: FunctionCall #516 + vClauses: Array(4) [ TryCatchClause #518, TryCatchClause #523, TryCatchClause #528, TryCatchClause #530 ] context: ASTContext #1000 - parent: Block #464 - children: Array(5) [ FunctionCall #445, TryCatchClause #447, TryCatchClause #452, TryCatchClause #457, TryCatchClause #459 ] - firstChild: FunctionCall #445 - lastChild: TryCatchClause #459 - previousSibling: VariableDeclarationStatement #442 - nextSibling: InlineAssembly #461 - root: SourceUnit #467 + parent: Block #535 + children: Array(5) [ FunctionCall #516, TryCatchClause #518, TryCatchClause #523, TryCatchClause #528, TryCatchClause #530 ] + firstChild: FunctionCall #516 + lastChild: TryCatchClause #530 + previousSibling: VariableDeclarationStatement #513 + nextSibling: InlineAssembly #532 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionCall #445 - id: 445 + FunctionCall #516 + id: 516 src: "0:0:0" type: "FunctionCall" typeString: "tuple()" kind: "functionCall" fieldNames: undefined - vExpression: MemberAccess #444 + vExpression: MemberAccess #515 vArguments: Array(0) context: ASTContext #1000 - parent: TryStatement #460 - children: Array(1) [ MemberAccess #444 ] + parent: TryStatement #531 + children: Array(1) [ MemberAccess #515 ] vIdentifier: "cp" vMemberName: "test" vFunctionCallType: "userDefined" - vReferencedDeclaration: FunctionDefinition #380 + vReferencedDeclaration: FunctionDefinition #451 vFunctionName: "test" - vCallee: MemberAccess #444 - firstChild: MemberAccess #444 - lastChild: MemberAccess #444 + vCallee: MemberAccess #515 + firstChild: MemberAccess #515 + lastChild: MemberAccess #515 previousSibling: undefined - nextSibling: TryCatchClause #447 - root: SourceUnit #467 + nextSibling: TryCatchClause #518 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - MemberAccess #444 - id: 444 + MemberAccess #515 + id: 515 src: "0:0:0" type: "MemberAccess" typeString: "function () external" - vExpression: Identifier #443 + vExpression: Identifier #514 memberName: "test" - referencedDeclaration: 380 + referencedDeclaration: 451 context: ASTContext #1000 - parent: FunctionCall #445 - children: Array(1) [ Identifier #443 ] - vReferencedDeclaration: FunctionDefinition #380 - firstChild: Identifier #443 - lastChild: Identifier #443 + parent: FunctionCall #516 + children: Array(1) [ Identifier #514 ] + vReferencedDeclaration: FunctionDefinition #451 + firstChild: Identifier #514 + lastChild: Identifier #514 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Identifier #443 - id: 443 + Identifier #514 + id: 514 src: "0:0:0" type: "Identifier" typeString: "contract CatchPanic" name: "cp" - referencedDeclaration: 437 + referencedDeclaration: 508 context: ASTContext #1000 - parent: MemberAccess #444 - vReferencedDeclaration: VariableDeclaration #437 + parent: MemberAccess #515 + vReferencedDeclaration: VariableDeclaration #508 vIdentifierType: "userDefined" children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TryCatchClause #447 - id: 447 + TryCatchClause #518 + id: 518 src: "0:0:0" type: "TryCatchClause" documentation: undefined errorName: "" vParameters: undefined - vBlock: Block #446 + vBlock: Block #517 context: ASTContext #1000 - parent: TryStatement #460 - children: Array(1) [ Block #446 ] - firstChild: Block #446 - lastChild: Block #446 - previousSibling: FunctionCall #445 - nextSibling: TryCatchClause #452 - root: SourceUnit #467 + parent: TryStatement #531 + children: Array(1) [ Block #517 ] + firstChild: Block #517 + lastChild: Block #517 + previousSibling: FunctionCall #516 + nextSibling: TryCatchClause #523 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #446 - id: 446 + Block #517 + id: 517 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: TryCatchClause #447 + parent: TryCatchClause #518 vStatements: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TryCatchClause #452 - id: 452 + TryCatchClause #523 + id: 523 src: "0:0:0" type: "TryCatchClause" documentation: undefined errorName: "Error" - vParameters: ParameterList #451 - vBlock: Block #448 + vParameters: ParameterList #522 + vBlock: Block #519 context: ASTContext #1000 - parent: TryStatement #460 - children: Array(2) [ ParameterList #451, Block #448 ] - firstChild: ParameterList #451 - lastChild: Block #448 - previousSibling: TryCatchClause #447 - nextSibling: TryCatchClause #457 - root: SourceUnit #467 + parent: TryStatement #531 + children: Array(2) [ ParameterList #522, Block #519 ] + firstChild: ParameterList #522 + lastChild: Block #519 + previousSibling: TryCatchClause #518 + nextSibling: TryCatchClause #528 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #451 - id: 451 + ParameterList #522 + id: 522 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: TryCatchClause #452 - vParameters: Array(1) [ VariableDeclaration #450 ] - children: Array(1) [ VariableDeclaration #450 ] - firstChild: VariableDeclaration #450 - lastChild: VariableDeclaration #450 + parent: TryCatchClause #523 + vParameters: Array(1) [ VariableDeclaration #521 ] + children: Array(1) [ VariableDeclaration #521 ] + firstChild: VariableDeclaration #521 + lastChild: VariableDeclaration #521 previousSibling: undefined - nextSibling: Block #448 - root: SourceUnit #467 + nextSibling: Block #519 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #450 - id: 450 + VariableDeclaration #521 + id: 521 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "reason" - scope: 452 + scope: 523 stateVariable: false storageLocation: "memory" visibility: "internal" @@ -4151,97 +4167,97 @@ SourceUnit #467 typeString: "string" documentation: undefined nameLocation: "2854:6:0" - vType: ElementaryTypeName #449 + vType: ElementaryTypeName #520 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: ParameterList #451 - children: Array(1) [ ElementaryTypeName #449 ] - vScope: TryCatchClause #452 + parent: ParameterList #522 + children: Array(1) [ ElementaryTypeName #520 ] + vScope: TryCatchClause #523 canonicalSignatureType: "string" getterCanonicalSignature: "reason()" getterCanonicalSignatureHash: "e134e33d" - firstChild: ElementaryTypeName #449 - lastChild: ElementaryTypeName #449 + firstChild: ElementaryTypeName #520 + lastChild: ElementaryTypeName #520 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #449 - id: 449 + ElementaryTypeName #520 + id: 520 src: "0:0:0" type: "ElementaryTypeName" typeString: "string" name: "string" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #450 + parent: VariableDeclaration #521 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #448 - id: 448 + Block #519 + id: 519 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: TryCatchClause #452 + parent: TryCatchClause #523 vStatements: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ParameterList #451 + previousSibling: ParameterList #522 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TryCatchClause #457 - id: 457 + TryCatchClause #528 + id: 528 src: "0:0:0" type: "TryCatchClause" documentation: undefined errorName: "Panic" - vParameters: ParameterList #456 - vBlock: Block #453 + vParameters: ParameterList #527 + vBlock: Block #524 context: ASTContext #1000 - parent: TryStatement #460 - children: Array(2) [ ParameterList #456, Block #453 ] - firstChild: ParameterList #456 - lastChild: Block #453 - previousSibling: TryCatchClause #452 - nextSibling: TryCatchClause #459 - root: SourceUnit #467 + parent: TryStatement #531 + children: Array(2) [ ParameterList #527, Block #524 ] + firstChild: ParameterList #527 + lastChild: Block #524 + previousSibling: TryCatchClause #523 + nextSibling: TryCatchClause #530 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #456 - id: 456 + ParameterList #527 + id: 527 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: TryCatchClause #457 - vParameters: Array(1) [ VariableDeclaration #455 ] - children: Array(1) [ VariableDeclaration #455 ] - firstChild: VariableDeclaration #455 - lastChild: VariableDeclaration #455 + parent: TryCatchClause #528 + vParameters: Array(1) [ VariableDeclaration #526 ] + children: Array(1) [ VariableDeclaration #526 ] + firstChild: VariableDeclaration #526 + lastChild: VariableDeclaration #526 previousSibling: undefined - nextSibling: Block #453 - root: SourceUnit #467 + nextSibling: Block #524 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #455 - id: 455 + VariableDeclaration #526 + id: 526 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false name: "_code" - scope: 457 + scope: 528 stateVariable: false storageLocation: "default" visibility: "internal" @@ -4249,92 +4265,92 @@ SourceUnit #467 typeString: "uint256" documentation: undefined nameLocation: "2990:5:0" - vType: ElementaryTypeName #454 + vType: ElementaryTypeName #525 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: ParameterList #456 - children: Array(1) [ ElementaryTypeName #454 ] - vScope: TryCatchClause #457 + parent: ParameterList #527 + children: Array(1) [ ElementaryTypeName #525 ] + vScope: TryCatchClause #528 canonicalSignatureType: "uint256" getterCanonicalSignature: "_code()" getterCanonicalSignatureHash: "8d1841e3" - firstChild: ElementaryTypeName #454 - lastChild: ElementaryTypeName #454 + firstChild: ElementaryTypeName #525 + lastChild: ElementaryTypeName #525 previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #454 - id: 454 + ElementaryTypeName #525 + id: 525 src: "0:0:0" type: "ElementaryTypeName" typeString: "uint256" name: "uint" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #455 + parent: VariableDeclaration #526 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #453 - id: 453 + Block #524 + id: 524 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: TryCatchClause #457 + parent: TryCatchClause #528 vStatements: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ParameterList #456 + previousSibling: ParameterList #527 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - TryCatchClause #459 - id: 459 + TryCatchClause #530 + id: 530 src: "0:0:0" type: "TryCatchClause" documentation: undefined errorName: "" vParameters: undefined - vBlock: Block #458 + vBlock: Block #529 context: ASTContext #1000 - parent: TryStatement #460 - children: Array(1) [ Block #458 ] - firstChild: Block #458 - lastChild: Block #458 - previousSibling: TryCatchClause #457 + parent: TryStatement #531 + children: Array(1) [ Block #529 ] + firstChild: Block #529 + lastChild: Block #529 + previousSibling: TryCatchClause #528 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #458 - id: 458 + Block #529 + id: 529 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: TryCatchClause #459 + parent: TryCatchClause #530 vStatements: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - InlineAssembly #461 - id: 461 + InlineAssembly #532 + id: 532 src: "0:0:0" type: "InlineAssembly" documentation: "InlineAssembly docstring" @@ -4342,360 +4358,1774 @@ SourceUnit #467 operations: undefined yul: Object { nodeType: "YulBlock", src: "3235:2:0", statements: Array(0) } context: ASTContext #1000 - parent: Block #464 + parent: Block #535 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: TryStatement #460 - nextSibling: UncheckedBlock #462 - root: SourceUnit #467 + previousSibling: TryStatement #531 + nextSibling: UncheckedBlock #533 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - UncheckedBlock #462 - id: 462 + UncheckedBlock #533 + id: 533 src: "0:0:0" type: "UncheckedBlock" documentation: "UncheckedBlock docstring" context: ASTContext #1000 - parent: Block #464 + parent: Block #535 vStatements: Array(0) children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: InlineAssembly #461 - nextSibling: Return #463 - root: SourceUnit #467 + previousSibling: InlineAssembly #532 + nextSibling: Return #534 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Return #463 - id: 463 + Return #534 + id: 534 src: "0:0:0" type: "Return" documentation: "Return docstring" functionReturnParameters: 157 vExpression: undefined context: ASTContext #1000 - parent: Block #464 + parent: Block #535 children: Array(0) vFunctionReturnParameters: ParameterList #157 firstChild: undefined lastChild: undefined - previousSibling: UncheckedBlock #462 + previousSibling: UncheckedBlock #533 nextSibling: undefined - root: SourceUnit #467 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } -SourceUnit #483 - id: 483 - src: "0:0:0" - type: "SourceUnit" - sourceEntryKey: "./test/samples/solidity/latest_imports_08.sol" - sourceListIndex: 1 - absolutePath: "./test/samples/solidity/latest_imports_08.sol" - exportedSymbols: Map(2) { "SomeContract" -> 481, "SomeLib" -> 482 } - context: ASTContext #1000 - vPragmaDirectives: Array(2) [ PragmaDirective #468, PragmaDirective #469 ] - vImportDirectives: Array(0) - vContracts: Array(2) [ ContractDefinition #481, ContractDefinition #482 ] - vEnums: Array(0) - vStructs: Array(0) - vFunctions: Array(0) - vVariables: Array(0) - vExportedSymbols: Map(2) { "SomeContract" -> ContractDefinition #481, "SomeLib" -> ContractDefinition #482 } - children: Array(4) [ PragmaDirective #468, PragmaDirective #469, ContractDefinition #481, ContractDefinition #482 ] - firstChild: PragmaDirective #468 - lastChild: ContractDefinition #482 - previousSibling: undefined - nextSibling: undefined - root: SourceUnit #483 - sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - - PragmaDirective #468 - id: 468 - src: "0:0:0" - type: "PragmaDirective" - literals: Array(4) [ "solidity", "^", "0.8", ".0" ] - context: ASTContext #1000 - parent: SourceUnit #483 - vIdentifier: "solidity" - vValue: "^0.8.0" - children: Array(0) - firstChild: undefined - lastChild: undefined - previousSibling: undefined - nextSibling: PragmaDirective #469 - root: SourceUnit #483 - sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - - PragmaDirective #469 - id: 469 - src: "0:0:0" - type: "PragmaDirective" - literals: Array(2) [ "abicoder", "v2" ] - context: ASTContext #1000 - parent: SourceUnit #483 - vIdentifier: "abicoder" - vValue: "v2" - children: Array(0) - firstChild: undefined - lastChild: undefined - previousSibling: PragmaDirective #468 - nextSibling: ContractDefinition #481 - root: SourceUnit #483 - sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - - ContractDefinition #481 - id: 481 + ErrorDefinition #542 + id: 542 src: "0:0:0" - type: "ContractDefinition" - name: "SomeContract" - scope: 483 - kind: "contract" - abstract: false - fullyImplemented: true - linearizedBaseContracts: Array(1) [ 481 ] - docString: undefined - nameLocation: "54:12:1" + type: "ErrorDefinition" + name: "UnitLevelError084" + documentation: StructuredDocumentation #541 + nameLocation: "3393:17:0" + vParameters: ParameterList #540 context: ASTContext #1000 - parent: SourceUnit #483 - documentation: undefined - vScope: SourceUnit #483 - vLinearizedBaseContracts: Array(1) [ ContractDefinition #481 ] - vInheritanceSpecifiers: Array(0) - vStateVariables: Array(0) - vModifiers: Array(0) - vEvents: Array(0) - vFunctions: Array(1) [ FunctionDefinition #480 ] - vUsingForDirectives: Array(0) - vStructs: Array(1) [ StructDefinition #472 ] - vEnums: Array(0) - vConstructor: undefined - interfaceId: undefined - children: Array(2) [ StructDefinition #472, FunctionDefinition #480 ] - firstChild: StructDefinition #472 - lastChild: FunctionDefinition #480 - previousSibling: PragmaDirective #469 - nextSibling: ContractDefinition #482 - root: SourceUnit #483 + parent: SourceUnit #607 + children: Array(2) [ StructuredDocumentation #541, ParameterList #540 ] + vScope: SourceUnit #607 + firstChild: StructuredDocumentation #541 + lastChild: ParameterList #540 + previousSibling: ContractDefinition #537 + nextSibling: ContractDefinition #548 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - StructDefinition #472 - id: 472 + StructuredDocumentation #541 + id: 541 src: "0:0:0" - type: "StructDefinition" - name: "SomeStruct" - canonicalName: "SomeContract.SomeStruct" - scope: 481 - visibility: "public" - nameLocation: "80:10:1" + type: "StructuredDocumentation" + text: "UnitLevelError error docstring" context: ASTContext #1000 - parent: ContractDefinition #481 - vMembers: Array(1) [ VariableDeclaration #471 ] - vScope: ContractDefinition #481 - children: Array(1) [ VariableDeclaration #471 ] - firstChild: VariableDeclaration #471 - lastChild: VariableDeclaration #471 + parent: ErrorDefinition #542 + children: Array(0) + firstChild: undefined + lastChild: undefined previousSibling: undefined - nextSibling: FunctionDefinition #480 - root: SourceUnit #483 + nextSibling: ParameterList #540 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #471 - id: 471 + ParameterList #540 + id: 540 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: ErrorDefinition #542 + vParameters: Array(1) [ VariableDeclaration #539 ] + children: Array(1) [ VariableDeclaration #539 ] + firstChild: VariableDeclaration #539 + lastChild: VariableDeclaration #539 + previousSibling: StructuredDocumentation #541 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + VariableDeclaration #539 + id: 539 src: "0:0:0" type: "VariableDeclaration" constant: false indexed: false - name: "n" - scope: 472 + name: "code" + scope: 542 stateVariable: false storageLocation: "default" visibility: "internal" mutability: "mutable" typeString: "uint256" documentation: undefined - nameLocation: "106:1:1" - vType: ElementaryTypeName #470 + nameLocation: "3416:4:0" + vType: ElementaryTypeName #538 vOverrideSpecifier: undefined vValue: undefined context: ASTContext #1000 - parent: StructDefinition #472 - children: Array(1) [ ElementaryTypeName #470 ] - vScope: StructDefinition #472 + parent: ParameterList #540 + children: Array(1) [ ElementaryTypeName #538 ] + vScope: ErrorDefinition #542 canonicalSignatureType: "uint256" - getterCanonicalSignature: "n()" - getterCanonicalSignatureHash: "2e52d606" - firstChild: ElementaryTypeName #470 - lastChild: ElementaryTypeName #470 + getterCanonicalSignature: "code()" + getterCanonicalSignatureHash: "24c12bf6" + firstChild: ElementaryTypeName #538 + lastChild: ElementaryTypeName #538 previousSibling: undefined nextSibling: undefined - root: SourceUnit #483 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #470 - id: 470 + ElementaryTypeName #538 + id: 538 src: "0:0:0" type: "ElementaryTypeName" typeString: "uint256" name: "uint" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #471 + parent: VariableDeclaration #539 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #483 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ContractDefinition #548 + id: 548 + src: "0:0:0" + type: "ContractDefinition" + name: "LibErrors084" + scope: 607 + kind: "library" + abstract: false + fullyImplemented: true + linearizedBaseContracts: Array(1) [ 548 ] + usedErrors: Array(1) [ 547 ] + docString: undefined + nameLocation: "3432:12:0" + context: ASTContext #1000 + parent: SourceUnit #607 + documentation: undefined + vScope: SourceUnit #607 + vLinearizedBaseContracts: Array(1) [ ContractDefinition #548 ] + vUsedErrors: Array(1) [ ErrorDefinition #547 ] + vInheritanceSpecifiers: Array(0) + vStateVariables: Array(0) + vModifiers: Array(0) + vEvents: Array(0) + vErrors: Array(1) [ ErrorDefinition #547 ] + vFunctions: Array(0) + vUsingForDirectives: Array(0) + vStructs: Array(0) + vEnums: Array(0) + vConstructor: undefined + interfaceId: undefined + children: Array(1) [ ErrorDefinition #547 ] + firstChild: ErrorDefinition #547 + lastChild: ErrorDefinition #547 + previousSibling: ErrorDefinition #542 + nextSibling: ContractDefinition #606 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ErrorDefinition #547 + id: 547 + src: "0:0:0" + type: "ErrorDefinition" + name: "Lib" + documentation: StructuredDocumentation #546 + nameLocation: "3498:3:0" + vParameters: ParameterList #545 + context: ASTContext #1000 + parent: ContractDefinition #548 + children: Array(2) [ StructuredDocumentation #546, ParameterList #545 ] + vScope: ContractDefinition #548 + firstChild: StructuredDocumentation #546 + lastChild: ParameterList #545 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + StructuredDocumentation #546 + id: 546 + src: "0:0:0" + type: "StructuredDocumentation" + text: "LibErrors084.Lib error docstring" + context: ASTContext #1000 + parent: ErrorDefinition #547 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: ParameterList #545 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #545 + id: 545 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: ErrorDefinition #547 + vParameters: Array(1) [ VariableDeclaration #544 ] + children: Array(1) [ VariableDeclaration #544 ] + firstChild: VariableDeclaration #544 + lastChild: VariableDeclaration #544 + previousSibling: StructuredDocumentation #546 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + VariableDeclaration #544 + id: 544 + src: "0:0:0" + type: "VariableDeclaration" + constant: false + indexed: false + name: "b" + scope: 547 + stateVariable: false + storageLocation: "default" + visibility: "internal" + mutability: "mutable" + typeString: "bytes" + documentation: undefined + nameLocation: "3508:1:0" + vType: ElementaryTypeName #543 + vOverrideSpecifier: undefined + vValue: undefined + context: ASTContext #1000 + parent: ParameterList #545 + children: Array(1) [ ElementaryTypeName #543 ] + vScope: ErrorDefinition #547 + canonicalSignatureType: "bytes" + getterCanonicalSignature: "b()" + getterCanonicalSignatureHash: "4df7e3d0" + firstChild: ElementaryTypeName #543 + lastChild: ElementaryTypeName #543 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - FunctionDefinition #480 - id: 480 + ElementaryTypeName #543 + id: 543 + src: "0:0:0" + type: "ElementaryTypeName" + typeString: "bytes" + name: "bytes" + stateMutability: "nonpayable" + context: ASTContext #1000 + parent: VariableDeclaration #544 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ContractDefinition #606 + id: 606 + src: "0:0:0" + type: "ContractDefinition" + name: "Features084" + scope: 607 + kind: "contract" + abstract: false + fullyImplemented: true + linearizedBaseContracts: Array(1) [ 606 ] + usedErrors: Array(3) [ 542, 547, 551 ] + docString: undefined + nameLocation: "3524:11:0" + context: ASTContext #1000 + parent: SourceUnit #607 + documentation: undefined + vScope: SourceUnit #607 + vLinearizedBaseContracts: Array(1) [ ContractDefinition #606 ] + vUsedErrors: Array(3) [ ErrorDefinition #542, ErrorDefinition #547, ErrorDefinition #551 ] + vInheritanceSpecifiers: Array(0) + vStateVariables: Array(0) + vModifiers: Array(0) + vEvents: Array(0) + vErrors: Array(1) [ ErrorDefinition #551 ] + vFunctions: Array(6) [ FunctionDefinition #556, FunctionDefinition #573, FunctionDefinition #581, FunctionDefinition #590, FunctionDefinition #597, FunctionDefinition #605 ] + vUsingForDirectives: Array(0) + vStructs: Array(0) + vEnums: Array(0) + vConstructor: undefined + interfaceId: undefined + children: Array(7) [ ErrorDefinition #551, FunctionDefinition #556, FunctionDefinition #573, FunctionDefinition #581, FunctionDefinition #590, FunctionDefinition #597, FunctionDefinition #605 ] + firstChild: ErrorDefinition #551 + lastChild: FunctionDefinition #605 + previousSibling: ContractDefinition #548 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ErrorDefinition #551 + id: 551 + src: "0:0:0" + type: "ErrorDefinition" + name: "Own" + documentation: StructuredDocumentation #550 + nameLocation: "3588:3:0" + vParameters: ParameterList #549 + context: ASTContext #1000 + parent: ContractDefinition #606 + children: Array(2) [ StructuredDocumentation #550, ParameterList #549 ] + vScope: ContractDefinition #606 + firstChild: StructuredDocumentation #550 + lastChild: ParameterList #549 + previousSibling: undefined + nextSibling: FunctionDefinition #556 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + StructuredDocumentation #550 + id: 550 + src: "0:0:0" + type: "StructuredDocumentation" + text: "Features084.Own error docstring" + context: ASTContext #1000 + parent: ErrorDefinition #551 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: ParameterList #549 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #549 + id: 549 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: ErrorDefinition #551 + vParameters: Array(0) + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: StructuredDocumentation #550 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + FunctionDefinition #556 + id: 556 src: "0:0:0" type: "FunctionDefinition" implemented: true - virtual: true - scope: 481 + virtual: false + scope: 606 kind: "function" - name: "some" + name: "testAssemblyHexLiterals" visibility: "public" stateMutability: "nonpayable" isConstructor: false documentation: undefined - nameLocation: "129:4:1" - vParameters: ParameterList #473 - vReturnParameters: ParameterList #476 + nameLocation: "3609:23:0" + vParameters: ParameterList #552 + vReturnParameters: ParameterList #553 vModifiers: Array(0) vOverrideSpecifier: undefined - vBody: Block #479 + vBody: Block #555 context: ASTContext #1000 - parent: ContractDefinition #481 - children: Array(3) [ ParameterList #473, ParameterList #476, Block #479 ] - vScope: ContractDefinition #481 - canonicalSignature: "some()" - canonicalSignatureHash: "c03ee3d3" - firstChild: ParameterList #473 - lastChild: Block #479 - previousSibling: StructDefinition #472 - nextSibling: undefined - root: SourceUnit #483 + parent: ContractDefinition #606 + children: Array(3) [ ParameterList #552, ParameterList #553, Block #555 ] + vScope: ContractDefinition #606 + canonicalSignature: "testAssemblyHexLiterals()" + canonicalSignatureHash: "9fdd8b80" + firstChild: ParameterList #552 + lastChild: Block #555 + previousSibling: ErrorDefinition #551 + nextSibling: FunctionDefinition #573 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #473 - id: 473 + ParameterList #552 + id: 552 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #480 + parent: FunctionDefinition #556 vParameters: Array(0) children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined - nextSibling: ParameterList #476 - root: SourceUnit #483 + nextSibling: ParameterList #553 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ParameterList #476 - id: 476 + ParameterList #553 + id: 553 src: "0:0:0" type: "ParameterList" context: ASTContext #1000 - parent: FunctionDefinition #480 - vParameters: Array(1) [ VariableDeclaration #475 ] - children: Array(1) [ VariableDeclaration #475 ] - firstChild: VariableDeclaration #475 - lastChild: VariableDeclaration #475 - previousSibling: ParameterList #473 - nextSibling: Block #479 - root: SourceUnit #483 + parent: FunctionDefinition #556 + vParameters: Array(0) + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: ParameterList #552 + nextSibling: Block #555 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Block #555 + id: 555 + src: "0:0:0" + type: "Block" + documentation: undefined + context: ASTContext #1000 + parent: FunctionDefinition #556 + vStatements: Array(1) [ InlineAssembly #554 ] + children: Array(1) [ InlineAssembly #554 ] + firstChild: InlineAssembly #554 + lastChild: InlineAssembly #554 + previousSibling: ParameterList #553 + nextSibling: undefined + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - VariableDeclaration #475 - id: 475 + InlineAssembly #554 + id: 554 src: "0:0:0" - type: "VariableDeclaration" - constant: false - indexed: false - name: "" - scope: 480 - stateVariable: false - storageLocation: "default" - visibility: "internal" - mutability: "mutable" - typeString: "uint256" + type: "InlineAssembly" documentation: undefined - nameLocation: "-1:-1:-1" - vType: ElementaryTypeName #474 - vOverrideSpecifier: undefined - vValue: undefined + externalReferences: Array(0) + operations: undefined + yul: Object { nodeType: "YulBlock", src: "3661:221:0", statements: Array(6) [ Object { nodeType: "YulVariableDeclaration", src: "3675:15:0", value: Object { kind: "string", nodeType: "YulLiteral", src: "3684:6:0", type: "", value: "test" }, variables: Array(1) [ Object { name: "a", nodeType: "YulTypedName", src: "3679:1:0", type: "" } ] }, Object { nodeType: "YulVariableDeclaration", src: "3703:54:0", value: Object { kind: "string", nodeType: "YulLiteral", src: "3712:45:0", type: "", value: "\u0011\"3DUfwșʻ̝wș\u0000" }, variables: Array(1) [ Object { name: "x", nodeType: "YulTypedName", src: "3707:1:0", type: "" } ] }, Object { nodeType: "YulVariableDeclaration", src: "3770:23:0", value: Object { kind: "string", nodeType: "YulLiteral", src: "3779:14:0", type: "", value: "\u00124ˍ" }, variables: Array(1) [ Object { name: "y", nodeType: "YulTypedName", src: "3774:1:0", type: "" } ] }, Object { expression: Object { arguments: Array(2) [ Object { kind: "number", nodeType: "YulLiteral", src: "3814:1:0", type: "", value: "0" }, Object { name: "x", nodeType: "YulIdentifier", src: "3817:1:0" } ], functionName: Object { name: "sstore", nodeType: "YulIdentifier", src: "3807:6:0" }, nodeType: "YulFunctionCall", src: "3807:12:0" }, nodeType: "YulExpressionStatement", src: "3807:12:0" }, Object { expression: Object { arguments: Array(2) [ Object { kind: "number", nodeType: "YulLiteral", src: "3839:1:0", type: "", value: "1" }, Object { name: "y", nodeType: "YulIdentifier", src: "3842:1:0" } ], functionName: Object { name: "sstore", nodeType: "YulIdentifier", src: "3832:6:0" }, nodeType: "YulFunctionCall", src: "3832:12:0" }, nodeType: "YulExpressionStatement", src: "3832:12:0" }, Object { expression: Object { arguments: Array(1) [ Object { kind: "string", nodeType: "YulLiteral", src: "3862:9:0", type: "", value: "\"3" } ], functionName: Object { name: "pop", nodeType: "YulIdentifier", src: "3858:3:0" }, nodeType: "YulFunctionCall", src: "3858:14:0" }, nodeType: "YulExpressionStatement", src: "3858:14:0" } ] } context: ASTContext #1000 - parent: ParameterList #476 - children: Array(1) [ ElementaryTypeName #474 ] - vScope: FunctionDefinition #480 - canonicalSignatureType: "uint256" - getterCanonicalSignature: "()" - getterCanonicalSignatureHash: "861731d5" - firstChild: ElementaryTypeName #474 - lastChild: ElementaryTypeName #474 + parent: Block #555 + children: Array(0) + firstChild: undefined + lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #483 + root: SourceUnit #607 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ElementaryTypeName #474 - id: 474 + FunctionDefinition #573 + id: 573 + src: "0:0:0" + type: "FunctionDefinition" + implemented: true + virtual: false + scope: 606 + kind: "function" + name: "testBytesConcatBuiltin" + visibility: "public" + stateMutability: "pure" + isConstructor: false + documentation: undefined + nameLocation: "3903:22:0" + vParameters: ParameterList #561 + vReturnParameters: ParameterList #564 + vModifiers: Array(0) + vOverrideSpecifier: undefined + vBody: Block #572 + context: ASTContext #1000 + parent: ContractDefinition #606 + children: Array(3) [ ParameterList #561, ParameterList #564, Block #572 ] + vScope: ContractDefinition #606 + canonicalSignature: "testBytesConcatBuiltin(bytes,bytes)" + canonicalSignatureHash: "e65caad5" + firstChild: ParameterList #561 + lastChild: Block #572 + previousSibling: FunctionDefinition #556 + nextSibling: FunctionDefinition #581 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #561 + id: 561 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #573 + vParameters: Array(2) [ VariableDeclaration #558, VariableDeclaration #560 ] + children: Array(2) [ VariableDeclaration #558, VariableDeclaration #560 ] + firstChild: VariableDeclaration #558 + lastChild: VariableDeclaration #560 + previousSibling: undefined + nextSibling: ParameterList #564 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + VariableDeclaration #558 + id: 558 + src: "0:0:0" + type: "VariableDeclaration" + constant: false + indexed: false + name: "a" + scope: 573 + stateVariable: false + storageLocation: "memory" + visibility: "internal" + mutability: "mutable" + typeString: "bytes" + documentation: undefined + nameLocation: "3939:1:0" + vType: ElementaryTypeName #557 + vOverrideSpecifier: undefined + vValue: undefined + context: ASTContext #1000 + parent: ParameterList #561 + children: Array(1) [ ElementaryTypeName #557 ] + vScope: FunctionDefinition #573 + canonicalSignatureType: "bytes" + getterCanonicalSignature: "a()" + getterCanonicalSignatureHash: "0dbe671f" + firstChild: ElementaryTypeName #557 + lastChild: ElementaryTypeName #557 + previousSibling: undefined + nextSibling: VariableDeclaration #560 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ElementaryTypeName #557 + id: 557 + src: "0:0:0" + type: "ElementaryTypeName" + typeString: "bytes" + name: "bytes" + stateMutability: "nonpayable" + context: ASTContext #1000 + parent: VariableDeclaration #558 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + VariableDeclaration #560 + id: 560 + src: "0:0:0" + type: "VariableDeclaration" + constant: false + indexed: false + name: "b" + scope: 573 + stateVariable: false + storageLocation: "memory" + visibility: "internal" + mutability: "mutable" + typeString: "bytes" + documentation: undefined + nameLocation: "3955:1:0" + vType: ElementaryTypeName #559 + vOverrideSpecifier: undefined + vValue: undefined + context: ASTContext #1000 + parent: ParameterList #561 + children: Array(1) [ ElementaryTypeName #559 ] + vScope: FunctionDefinition #573 + canonicalSignatureType: "bytes" + getterCanonicalSignature: "b()" + getterCanonicalSignatureHash: "4df7e3d0" + firstChild: ElementaryTypeName #559 + lastChild: ElementaryTypeName #559 + previousSibling: VariableDeclaration #558 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ElementaryTypeName #559 + id: 559 + src: "0:0:0" + type: "ElementaryTypeName" + typeString: "bytes" + name: "bytes" + stateMutability: "nonpayable" + context: ASTContext #1000 + parent: VariableDeclaration #560 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #564 + id: 564 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #573 + vParameters: Array(1) [ VariableDeclaration #563 ] + children: Array(1) [ VariableDeclaration #563 ] + firstChild: VariableDeclaration #563 + lastChild: VariableDeclaration #563 + previousSibling: ParameterList #561 + nextSibling: Block #572 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + VariableDeclaration #563 + id: 563 + src: "0:0:0" + type: "VariableDeclaration" + constant: false + indexed: false + name: "c" + scope: 573 + stateVariable: false + storageLocation: "memory" + visibility: "internal" + mutability: "mutable" + typeString: "bytes" + documentation: undefined + nameLocation: "3992:1:0" + vType: ElementaryTypeName #562 + vOverrideSpecifier: undefined + vValue: undefined + context: ASTContext #1000 + parent: ParameterList #564 + children: Array(1) [ ElementaryTypeName #562 ] + vScope: FunctionDefinition #573 + canonicalSignatureType: "bytes" + getterCanonicalSignature: "c()" + getterCanonicalSignatureHash: "c3da42b8" + firstChild: ElementaryTypeName #562 + lastChild: ElementaryTypeName #562 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ElementaryTypeName #562 + id: 562 + src: "0:0:0" + type: "ElementaryTypeName" + typeString: "bytes" + name: "bytes" + stateMutability: "nonpayable" + context: ASTContext #1000 + parent: VariableDeclaration #563 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Block #572 + id: 572 + src: "0:0:0" + type: "Block" + documentation: undefined + context: ASTContext #1000 + parent: FunctionDefinition #573 + vStatements: Array(1) [ Return #571 ] + children: Array(1) [ Return #571 ] + firstChild: Return #571 + lastChild: Return #571 + previousSibling: ParameterList #564 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Return #571 + id: 571 + src: "0:0:0" + type: "Return" + documentation: undefined + functionReturnParameters: 253 + vExpression: FunctionCall #570 + context: ASTContext #1000 + parent: Block #572 + children: Array(1) [ FunctionCall #570 ] + vFunctionReturnParameters: ParameterList #253 + firstChild: FunctionCall #570 + lastChild: FunctionCall #570 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + FunctionCall #570 + id: 570 + src: "0:0:0" + type: "FunctionCall" + typeString: "bytes memory" + kind: "functionCall" + fieldNames: undefined + vExpression: MemberAccess #567 + vArguments: Array(2) [ Identifier #568, Identifier #569 ] + context: ASTContext #1000 + parent: Return #571 + children: Array(3) [ MemberAccess #567, Identifier #568, Identifier #569 ] + vIdentifier: undefined + vMemberName: "concat" + vFunctionCallType: "builtin" + vReferencedDeclaration: undefined + vFunctionName: "concat" + vCallee: MemberAccess #567 + firstChild: MemberAccess #567 + lastChild: Identifier #569 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + MemberAccess #567 + id: 567 + src: "0:0:0" + type: "MemberAccess" + typeString: "function () pure returns (bytes memory)" + vExpression: ElementaryTypeNameExpression #566 + memberName: "concat" + referencedDeclaration: undefined + context: ASTContext #1000 + parent: FunctionCall #570 + children: Array(1) [ ElementaryTypeNameExpression #566 ] + vReferencedDeclaration: undefined + firstChild: ElementaryTypeNameExpression #566 + lastChild: ElementaryTypeNameExpression #566 + previousSibling: undefined + nextSibling: Identifier #568 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ElementaryTypeNameExpression #566 + id: 566 + src: "0:0:0" + type: "ElementaryTypeNameExpression" + typeString: "type(bytes storage pointer)" + typeName: ElementaryTypeName #565 + context: ASTContext #1000 + parent: MemberAccess #567 + children: Array(1) [ ElementaryTypeName #565 ] + firstChild: ElementaryTypeName #565 + lastChild: ElementaryTypeName #565 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ElementaryTypeName #565 + id: 565 + src: "0:0:0" + type: "ElementaryTypeName" + typeString: undefined + name: "bytes" + stateMutability: "nonpayable" + context: ASTContext #1000 + parent: ElementaryTypeNameExpression #566 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Identifier #568 + id: 568 + src: "0:0:0" + type: "Identifier" + typeString: "bytes memory" + name: "a" + referencedDeclaration: 558 + context: ASTContext #1000 + parent: FunctionCall #570 + vReferencedDeclaration: VariableDeclaration #558 + vIdentifierType: "userDefined" + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: MemberAccess #567 + nextSibling: Identifier #569 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Identifier #569 + id: 569 + src: "0:0:0" + type: "Identifier" + typeString: "bytes memory" + name: "b" + referencedDeclaration: 560 + context: ASTContext #1000 + parent: FunctionCall #570 + vReferencedDeclaration: VariableDeclaration #560 + vIdentifierType: "userDefined" + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: Identifier #568 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + FunctionDefinition #581 + id: 581 + src: "0:0:0" + type: "FunctionDefinition" + implemented: true + virtual: false + scope: 606 + kind: "function" + name: "testVariableDeclarationStatementDocString" + visibility: "public" + stateMutability: "nonpayable" + isConstructor: false + documentation: undefined + nameLocation: "4052:41:0" + vParameters: ParameterList #574 + vReturnParameters: ParameterList #575 + vModifiers: Array(0) + vOverrideSpecifier: undefined + vBody: Block #580 + context: ASTContext #1000 + parent: ContractDefinition #606 + children: Array(3) [ ParameterList #574, ParameterList #575, Block #580 ] + vScope: ContractDefinition #606 + canonicalSignature: "testVariableDeclarationStatementDocString()" + canonicalSignatureHash: "810605b8" + firstChild: ParameterList #574 + lastChild: Block #580 + previousSibling: FunctionDefinition #573 + nextSibling: FunctionDefinition #590 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #574 + id: 574 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #581 + vParameters: Array(0) + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: ParameterList #575 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #575 + id: 575 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #581 + vParameters: Array(0) + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: ParameterList #574 + nextSibling: Block #580 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Block #580 + id: 580 + src: "0:0:0" + type: "Block" + documentation: undefined + context: ASTContext #1000 + parent: FunctionDefinition #581 + vStatements: Array(1) [ VariableDeclarationStatement #579 ] + children: Array(1) [ VariableDeclarationStatement #579 ] + firstChild: VariableDeclarationStatement #579 + lastChild: VariableDeclarationStatement #579 + previousSibling: ParameterList #575 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + VariableDeclarationStatement #579 + id: 579 + src: "0:0:0" + type: "VariableDeclarationStatement" + documentation: "VariableDeclarationStatement docstring" + assignments: Array(1) [ 577 ] + vDeclarations: Array(1) [ VariableDeclaration #577 ] + vInitialValue: Literal #578 + context: ASTContext #1000 + parent: Block #580 + children: Array(2) [ VariableDeclaration #577, Literal #578 ] + firstChild: VariableDeclaration #577 + lastChild: Literal #578 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + VariableDeclaration #577 + id: 577 + src: "0:0:0" + type: "VariableDeclaration" + constant: false + indexed: false + name: "a" + scope: 580 + stateVariable: false + storageLocation: "default" + visibility: "internal" + mutability: "mutable" + typeString: "uint256" + documentation: undefined + nameLocation: "4169:1:0" + vType: ElementaryTypeName #576 + vOverrideSpecifier: undefined + vValue: undefined + context: ASTContext #1000 + parent: VariableDeclarationStatement #579 + children: Array(1) [ ElementaryTypeName #576 ] + vScope: Block #580 + canonicalSignatureType: "uint256" + getterCanonicalSignature: "a()" + getterCanonicalSignatureHash: "0dbe671f" + firstChild: ElementaryTypeName #576 + lastChild: ElementaryTypeName #576 + previousSibling: undefined + nextSibling: Literal #578 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ElementaryTypeName #576 + id: 576 + src: "0:0:0" + type: "ElementaryTypeName" + typeString: "uint256" + name: "uint" + stateMutability: "nonpayable" + context: ASTContext #1000 + parent: VariableDeclaration #577 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Literal #578 + id: 578 + src: "0:0:0" + type: "Literal" + typeString: "int_const 10" + kind: "number" + hexValue: "3130" + value: "10" + subdenomination: undefined + context: ASTContext #1000 + parent: VariableDeclarationStatement #579 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: VariableDeclaration #577 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + FunctionDefinition #590 + id: 590 + src: "0:0:0" + type: "FunctionDefinition" + implemented: true + virtual: false + scope: 606 + kind: "function" + name: "revertWithLib" + visibility: "public" + stateMutability: "nonpayable" + isConstructor: false + documentation: undefined + nameLocation: "4197:13:0" + vParameters: ParameterList #582 + vReturnParameters: ParameterList #583 + vModifiers: Array(0) + vOverrideSpecifier: undefined + vBody: Block #589 + context: ASTContext #1000 + parent: ContractDefinition #606 + children: Array(3) [ ParameterList #582, ParameterList #583, Block #589 ] + vScope: ContractDefinition #606 + canonicalSignature: "revertWithLib()" + canonicalSignatureHash: "f1b5e6ed" + firstChild: ParameterList #582 + lastChild: Block #589 + previousSibling: FunctionDefinition #581 + nextSibling: FunctionDefinition #597 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #582 + id: 582 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #590 + vParameters: Array(0) + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: ParameterList #583 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #583 + id: 583 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #590 + vParameters: Array(0) + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: ParameterList #582 + nextSibling: Block #589 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Block #589 + id: 589 + src: "0:0:0" + type: "Block" + documentation: undefined + context: ASTContext #1000 + parent: FunctionDefinition #590 + vStatements: Array(1) [ RevertStatement #588 ] + children: Array(1) [ RevertStatement #588 ] + firstChild: RevertStatement #588 + lastChild: RevertStatement #588 + previousSibling: ParameterList #583 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + RevertStatement #588 + id: 588 + src: "0:0:0" + type: "RevertStatement" + documentation: "RevertStatement docstring" + errorCall: FunctionCall #587 + context: ASTContext #1000 + parent: Block #589 + children: Array(1) [ FunctionCall #587 ] + firstChild: FunctionCall #587 + lastChild: FunctionCall #587 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + FunctionCall #587 + id: 587 + src: "0:0:0" + type: "FunctionCall" + typeString: "tuple()" + kind: "functionCall" + fieldNames: undefined + vExpression: MemberAccess #585 + vArguments: Array(1) [ Literal #586 ] + context: ASTContext #1000 + parent: RevertStatement #588 + children: Array(2) [ MemberAccess #585, Literal #586 ] + vIdentifier: "LibErrors084" + vMemberName: "Lib" + vFunctionCallType: "userDefined" + vReferencedDeclaration: ErrorDefinition #547 + vFunctionName: "Lib" + vCallee: MemberAccess #585 + firstChild: MemberAccess #585 + lastChild: Literal #586 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + MemberAccess #585 + id: 585 + src: "0:0:0" + type: "MemberAccess" + typeString: "function (bytes memory) pure" + vExpression: Identifier #584 + memberName: "Lib" + referencedDeclaration: 547 + context: ASTContext #1000 + parent: FunctionCall #587 + children: Array(1) [ Identifier #584 ] + vReferencedDeclaration: ErrorDefinition #547 + firstChild: Identifier #584 + lastChild: Identifier #584 + previousSibling: undefined + nextSibling: Literal #586 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Identifier #584 + id: 584 + src: "0:0:0" + type: "Identifier" + typeString: "type(library LibErrors084)" + name: "LibErrors084" + referencedDeclaration: 548 + context: ASTContext #1000 + parent: MemberAccess #585 + vReferencedDeclaration: ContractDefinition #548 + vIdentifierType: "userDefined" + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Literal #586 + id: 586 + src: "0:0:0" + type: "Literal" + typeString: "literal_string hex\"001122\"" + kind: "hexString" + hexValue: "001122" + value: "\u0000\u0011\"" + subdenomination: undefined + context: ASTContext #1000 + parent: FunctionCall #587 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: MemberAccess #585 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + FunctionDefinition #597 + id: 597 + src: "0:0:0" + type: "FunctionDefinition" + implemented: true + virtual: false + scope: 606 + kind: "function" + name: "revertWithOwn" + visibility: "public" + stateMutability: "nonpayable" + isConstructor: false + documentation: undefined + nameLocation: "4326:13:0" + vParameters: ParameterList #591 + vReturnParameters: ParameterList #592 + vModifiers: Array(0) + vOverrideSpecifier: undefined + vBody: Block #596 + context: ASTContext #1000 + parent: ContractDefinition #606 + children: Array(3) [ ParameterList #591, ParameterList #592, Block #596 ] + vScope: ContractDefinition #606 + canonicalSignature: "revertWithOwn()" + canonicalSignatureHash: "bdc93894" + firstChild: ParameterList #591 + lastChild: Block #596 + previousSibling: FunctionDefinition #590 + nextSibling: FunctionDefinition #605 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #591 + id: 591 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #597 + vParameters: Array(0) + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: ParameterList #592 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #592 + id: 592 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #597 + vParameters: Array(0) + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: ParameterList #591 + nextSibling: Block #596 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Block #596 + id: 596 + src: "0:0:0" + type: "Block" + documentation: undefined + context: ASTContext #1000 + parent: FunctionDefinition #597 + vStatements: Array(1) [ RevertStatement #595 ] + children: Array(1) [ RevertStatement #595 ] + firstChild: RevertStatement #595 + lastChild: RevertStatement #595 + previousSibling: ParameterList #592 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + RevertStatement #595 + id: 595 + src: "0:0:0" + type: "RevertStatement" + documentation: undefined + errorCall: FunctionCall #594 + context: ASTContext #1000 + parent: Block #596 + children: Array(1) [ FunctionCall #594 ] + firstChild: FunctionCall #594 + lastChild: FunctionCall #594 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + FunctionCall #594 + id: 594 + src: "0:0:0" + type: "FunctionCall" + typeString: "tuple()" + kind: "functionCall" + fieldNames: undefined + vExpression: Identifier #593 + vArguments: Array(0) + context: ASTContext #1000 + parent: RevertStatement #595 + children: Array(1) [ Identifier #593 ] + vIdentifier: "Own" + vMemberName: undefined + vFunctionCallType: "userDefined" + vReferencedDeclaration: ErrorDefinition #551 + vFunctionName: "Own" + vCallee: Identifier #593 + firstChild: Identifier #593 + lastChild: Identifier #593 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Identifier #593 + id: 593 + src: "0:0:0" + type: "Identifier" + typeString: "function () pure" + name: "Own" + referencedDeclaration: 551 + context: ASTContext #1000 + parent: FunctionCall #594 + vReferencedDeclaration: ErrorDefinition #551 + vIdentifierType: "userDefined" + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + FunctionDefinition #605 + id: 605 + src: "0:0:0" + type: "FunctionDefinition" + implemented: true + virtual: false + scope: 606 + kind: "function" + name: "revertWithUnitLevelError" + visibility: "public" + stateMutability: "nonpayable" + isConstructor: false + documentation: undefined + nameLocation: "4393:24:0" + vParameters: ParameterList #598 + vReturnParameters: ParameterList #599 + vModifiers: Array(0) + vOverrideSpecifier: undefined + vBody: Block #604 + context: ASTContext #1000 + parent: ContractDefinition #606 + children: Array(3) [ ParameterList #598, ParameterList #599, Block #604 ] + vScope: ContractDefinition #606 + canonicalSignature: "revertWithUnitLevelError()" + canonicalSignatureHash: "316d273c" + firstChild: ParameterList #598 + lastChild: Block #604 + previousSibling: FunctionDefinition #597 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #598 + id: 598 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #605 + vParameters: Array(0) + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: ParameterList #599 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #599 + id: 599 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #605 + vParameters: Array(0) + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: ParameterList #598 + nextSibling: Block #604 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Block #604 + id: 604 + src: "0:0:0" + type: "Block" + documentation: undefined + context: ASTContext #1000 + parent: FunctionDefinition #605 + vStatements: Array(1) [ RevertStatement #603 ] + children: Array(1) [ RevertStatement #603 ] + firstChild: RevertStatement #603 + lastChild: RevertStatement #603 + previousSibling: ParameterList #599 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + RevertStatement #603 + id: 603 + src: "0:0:0" + type: "RevertStatement" + documentation: undefined + errorCall: FunctionCall #602 + context: ASTContext #1000 + parent: Block #604 + children: Array(1) [ FunctionCall #602 ] + firstChild: FunctionCall #602 + lastChild: FunctionCall #602 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + FunctionCall #602 + id: 602 + src: "0:0:0" + type: "FunctionCall" + typeString: "tuple()" + kind: "functionCall" + fieldNames: undefined + vExpression: Identifier #600 + vArguments: Array(1) [ Literal #601 ] + context: ASTContext #1000 + parent: RevertStatement #603 + children: Array(2) [ Identifier #600, Literal #601 ] + vIdentifier: "UnitLevelError084" + vMemberName: undefined + vFunctionCallType: "userDefined" + vReferencedDeclaration: ErrorDefinition #542 + vFunctionName: "UnitLevelError084" + vCallee: Identifier #600 + firstChild: Identifier #600 + lastChild: Literal #601 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Identifier #600 + id: 600 + src: "0:0:0" + type: "Identifier" + typeString: "function (uint256) pure" + name: "UnitLevelError084" + referencedDeclaration: 542 + context: ASTContext #1000 + parent: FunctionCall #602 + vReferencedDeclaration: ErrorDefinition #542 + vIdentifierType: "userDefined" + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: Literal #601 + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + Literal #601 + id: 601 + src: "0:0:0" + type: "Literal" + typeString: "int_const 1" + kind: "number" + hexValue: "31" + value: "1" + subdenomination: undefined + context: ASTContext #1000 + parent: FunctionCall #602 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: Identifier #600 + nextSibling: undefined + root: SourceUnit #607 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + +SourceUnit #623 + id: 623 + src: "0:0:0" + type: "SourceUnit" + sourceEntryKey: "./test/samples/solidity/latest_imports_08.sol" + sourceListIndex: 1 + absolutePath: "./test/samples/solidity/latest_imports_08.sol" + exportedSymbols: Map(2) { "SomeContract" -> 621, "SomeLib" -> 622 } + context: ASTContext #1000 + vPragmaDirectives: Array(2) [ PragmaDirective #608, PragmaDirective #609 ] + vImportDirectives: Array(0) + vContracts: Array(2) [ ContractDefinition #621, ContractDefinition #622 ] + vEnums: Array(0) + vErrors: Array(0) + vStructs: Array(0) + vFunctions: Array(0) + vVariables: Array(0) + vExportedSymbols: Map(2) { "SomeContract" -> ContractDefinition #621, "SomeLib" -> ContractDefinition #622 } + children: Array(4) [ PragmaDirective #608, PragmaDirective #609, ContractDefinition #621, ContractDefinition #622 ] + firstChild: PragmaDirective #608 + lastChild: ContractDefinition #622 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #623 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + PragmaDirective #608 + id: 608 + src: "0:0:0" + type: "PragmaDirective" + literals: Array(4) [ "solidity", "^", "0.8", ".0" ] + context: ASTContext #1000 + parent: SourceUnit #623 + vIdentifier: "solidity" + vValue: "^0.8.0" + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: PragmaDirective #609 + root: SourceUnit #623 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + PragmaDirective #609 + id: 609 + src: "0:0:0" + type: "PragmaDirective" + literals: Array(2) [ "abicoder", "v2" ] + context: ASTContext #1000 + parent: SourceUnit #623 + vIdentifier: "abicoder" + vValue: "v2" + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: PragmaDirective #608 + nextSibling: ContractDefinition #621 + root: SourceUnit #623 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ContractDefinition #621 + id: 621 + src: "0:0:0" + type: "ContractDefinition" + name: "SomeContract" + scope: 623 + kind: "contract" + abstract: false + fullyImplemented: true + linearizedBaseContracts: Array(1) [ 621 ] + usedErrors: Array(0) + docString: undefined + nameLocation: "54:12:1" + context: ASTContext #1000 + parent: SourceUnit #623 + documentation: undefined + vScope: SourceUnit #623 + vLinearizedBaseContracts: Array(1) [ ContractDefinition #621 ] + vUsedErrors: Array(0) + vInheritanceSpecifiers: Array(0) + vStateVariables: Array(0) + vModifiers: Array(0) + vEvents: Array(0) + vErrors: Array(0) + vFunctions: Array(1) [ FunctionDefinition #620 ] + vUsingForDirectives: Array(0) + vStructs: Array(1) [ StructDefinition #612 ] + vEnums: Array(0) + vConstructor: undefined + interfaceId: undefined + children: Array(2) [ StructDefinition #612, FunctionDefinition #620 ] + firstChild: StructDefinition #612 + lastChild: FunctionDefinition #620 + previousSibling: PragmaDirective #609 + nextSibling: ContractDefinition #622 + root: SourceUnit #623 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + StructDefinition #612 + id: 612 + src: "0:0:0" + type: "StructDefinition" + name: "SomeStruct" + canonicalName: "SomeContract.SomeStruct" + scope: 621 + visibility: "public" + nameLocation: "80:10:1" + context: ASTContext #1000 + parent: ContractDefinition #621 + vMembers: Array(1) [ VariableDeclaration #611 ] + vScope: ContractDefinition #621 + children: Array(1) [ VariableDeclaration #611 ] + firstChild: VariableDeclaration #611 + lastChild: VariableDeclaration #611 + previousSibling: undefined + nextSibling: FunctionDefinition #620 + root: SourceUnit #623 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + VariableDeclaration #611 + id: 611 + src: "0:0:0" + type: "VariableDeclaration" + constant: false + indexed: false + name: "n" + scope: 612 + stateVariable: false + storageLocation: "default" + visibility: "internal" + mutability: "mutable" + typeString: "uint256" + documentation: undefined + nameLocation: "106:1:1" + vType: ElementaryTypeName #610 + vOverrideSpecifier: undefined + vValue: undefined + context: ASTContext #1000 + parent: StructDefinition #612 + children: Array(1) [ ElementaryTypeName #610 ] + vScope: StructDefinition #612 + canonicalSignatureType: "uint256" + getterCanonicalSignature: "n()" + getterCanonicalSignatureHash: "2e52d606" + firstChild: ElementaryTypeName #610 + lastChild: ElementaryTypeName #610 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #623 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ElementaryTypeName #610 + id: 610 + src: "0:0:0" + type: "ElementaryTypeName" + typeString: "uint256" + name: "uint" + stateMutability: "nonpayable" + context: ASTContext #1000 + parent: VariableDeclaration #611 + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #623 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + FunctionDefinition #620 + id: 620 + src: "0:0:0" + type: "FunctionDefinition" + implemented: true + virtual: true + scope: 621 + kind: "function" + name: "some" + visibility: "public" + stateMutability: "nonpayable" + isConstructor: false + documentation: undefined + nameLocation: "129:4:1" + vParameters: ParameterList #613 + vReturnParameters: ParameterList #616 + vModifiers: Array(0) + vOverrideSpecifier: undefined + vBody: Block #619 + context: ASTContext #1000 + parent: ContractDefinition #621 + children: Array(3) [ ParameterList #613, ParameterList #616, Block #619 ] + vScope: ContractDefinition #621 + canonicalSignature: "some()" + canonicalSignatureHash: "c03ee3d3" + firstChild: ParameterList #613 + lastChild: Block #619 + previousSibling: StructDefinition #612 + nextSibling: undefined + root: SourceUnit #623 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #613 + id: 613 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #620 + vParameters: Array(0) + children: Array(0) + firstChild: undefined + lastChild: undefined + previousSibling: undefined + nextSibling: ParameterList #616 + root: SourceUnit #623 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ParameterList #616 + id: 616 + src: "0:0:0" + type: "ParameterList" + context: ASTContext #1000 + parent: FunctionDefinition #620 + vParameters: Array(1) [ VariableDeclaration #615 ] + children: Array(1) [ VariableDeclaration #615 ] + firstChild: VariableDeclaration #615 + lastChild: VariableDeclaration #615 + previousSibling: ParameterList #613 + nextSibling: Block #619 + root: SourceUnit #623 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + VariableDeclaration #615 + id: 615 + src: "0:0:0" + type: "VariableDeclaration" + constant: false + indexed: false + name: "" + scope: 620 + stateVariable: false + storageLocation: "default" + visibility: "internal" + mutability: "mutable" + typeString: "uint256" + documentation: undefined + nameLocation: "-1:-1:-1" + vType: ElementaryTypeName #614 + vOverrideSpecifier: undefined + vValue: undefined + context: ASTContext #1000 + parent: ParameterList #616 + children: Array(1) [ ElementaryTypeName #614 ] + vScope: FunctionDefinition #620 + canonicalSignatureType: "uint256" + getterCanonicalSignature: "()" + getterCanonicalSignatureHash: "861731d5" + firstChild: ElementaryTypeName #614 + lastChild: ElementaryTypeName #614 + previousSibling: undefined + nextSibling: undefined + root: SourceUnit #623 + sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } + + ElementaryTypeName #614 + id: 614 src: "0:0:0" type: "ElementaryTypeName" typeString: "uint256" name: "uint" stateMutability: "nonpayable" context: ASTContext #1000 - parent: VariableDeclaration #475 + parent: VariableDeclaration #615 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #483 + root: SourceUnit #623 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Block #479 - id: 479 + Block #619 + id: 619 src: "0:0:0" type: "Block" documentation: undefined context: ASTContext #1000 - parent: FunctionDefinition #480 - vStatements: Array(1) [ Return #478 ] - children: Array(1) [ Return #478 ] - firstChild: Return #478 - lastChild: Return #478 - previousSibling: ParameterList #476 + parent: FunctionDefinition #620 + vStatements: Array(1) [ Return #618 ] + children: Array(1) [ Return #618 ] + firstChild: Return #618 + lastChild: Return #618 + previousSibling: ParameterList #616 nextSibling: undefined - root: SourceUnit #483 + root: SourceUnit #623 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Return #478 - id: 478 + Return #618 + id: 618 src: "0:0:0" type: "Return" documentation: undefined - functionReturnParameters: 236 - vExpression: Literal #477 + functionReturnParameters: 307 + vExpression: Literal #617 context: ASTContext #1000 - parent: Block #479 - children: Array(1) [ Literal #477 ] - vFunctionReturnParameters: ParameterList #236 - firstChild: Literal #477 - lastChild: Literal #477 + parent: Block #619 + children: Array(1) [ Literal #617 ] + vFunctionReturnParameters: ParameterList #307 + firstChild: Literal #617 + lastChild: Literal #617 previousSibling: undefined nextSibling: undefined - root: SourceUnit #483 + root: SourceUnit #623 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - Literal #477 - id: 477 + Literal #617 + id: 617 src: "0:0:0" type: "Literal" typeString: "int_const 1" @@ -4704,36 +6134,39 @@ SourceUnit #483 value: "1" subdenomination: undefined context: ASTContext #1000 - parent: Return #478 + parent: Return #618 children: Array(0) firstChild: undefined lastChild: undefined previousSibling: undefined nextSibling: undefined - root: SourceUnit #483 + root: SourceUnit #623 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } - ContractDefinition #482 - id: 482 + ContractDefinition #622 + id: 622 src: "0:0:0" type: "ContractDefinition" name: "SomeLib" - scope: 483 + scope: 623 kind: "library" abstract: false fullyImplemented: true - linearizedBaseContracts: Array(1) [ 482 ] + linearizedBaseContracts: Array(1) [ 622 ] + usedErrors: Array(0) docString: undefined nameLocation: "202:7:1" context: ASTContext #1000 - parent: SourceUnit #483 + parent: SourceUnit #623 documentation: undefined - vScope: SourceUnit #483 - vLinearizedBaseContracts: Array(1) [ ContractDefinition #482 ] + vScope: SourceUnit #623 + vLinearizedBaseContracts: Array(1) [ ContractDefinition #622 ] + vUsedErrors: Array(0) vInheritanceSpecifiers: Array(0) vStateVariables: Array(0) vModifiers: Array(0) vEvents: Array(0) + vErrors: Array(0) vFunctions: Array(0) vUsingForDirectives: Array(0) vStructs: Array(0) @@ -4743,7 +6176,7 @@ SourceUnit #483 children: Array(0) firstChild: undefined lastChild: undefined - previousSibling: ContractDefinition #481 + previousSibling: ContractDefinition #621 nextSibling: undefined - root: SourceUnit #483 + root: SourceUnit #623 sourceInfo: Object { offset: 0, length: 0, sourceIndex: 0 } diff --git a/test/samples/solidity/latest_08.sol b/test/samples/solidity/latest_08.sol index ace69f92..e783f6a8 100644 --- a/test/samples/solidity/latest_08.sol +++ b/test/samples/solidity/latest_08.sol @@ -151,3 +151,51 @@ contract Features082 { return; } } + +/// UnitLevelError error docstring +error UnitLevelError084(uint code); + +library LibErrors084 { + /// LibErrors084.Lib error docstring + error Lib(bytes b); +} + +contract Features084 { + /// Features084.Own error docstring + error Own(); + + function testAssemblyHexLiterals() public { + assembly { + let a := "test" + let x := hex"112233445566778899aabbccddeeff6677889900" + let y := hex"1234_abcd" + + sstore(0, x) + sstore(1, y) + + pop(hex"2233") + } + } + + function testBytesConcatBuiltin(bytes memory a, bytes memory b) public pure returns (bytes memory c) { + return bytes.concat(a, b); + } + + function testVariableDeclarationStatementDocString() public { + /// VariableDeclarationStatement docstring + uint a = 10; + } + + function revertWithLib() public { + /// RevertStatement docstring + revert LibErrors084.Lib(hex"001122"); + } + + function revertWithOwn() public { + revert Own(); + } + + function revertWithUnitLevelError() public { + revert UnitLevelError084(1); + } +} diff --git a/test/samples/solidity/latest_08.sourced.sol b/test/samples/solidity/latest_08.sourced.sol index c8f15c0e656d97b8dab34e0d1c5dd33363b5207d..e02330aa08525af1b99c0cd9e1f3e0dea0abd6e5 100644 GIT binary patch delta 922 zcmaJ=J#W-N5am)J#i9X;2qcP)mBJRsoqb7x5>b#G3B^fBM1gv}nUIzCc2DauISWPi z2S7qP8VXu!q?8nhj<4T>_yH8`tgX8C|o_YK7=GXNPH(LAMZkHWti34~J z>VdV!GVt$XBXYD-KMSgJla$=uiVCTb33Ckb&c#~m*XkrtGPB&4Y#=i)l{*@H5is{q zoyBm+9hNE)v8v|KC@T?imc={4c@PMr(Q<)oA2=2k{*tEXqz-o;o$3EbJ2Y~dzN?c$ z3zSAPR|)UuISeyZK7{c=B3Q2SC}yJ~Q&QA_K@IYnwh*GQf(bItw(qf!#6qu606hwj zjXicX-0UBnoPBxw?c;9Uze7-rRQGT`u?hk+o#Q;DbKmRW0+-)QROxyPO~O;&GhRQx3uMyD_ilO#=hz0kLHXD;l$vTT7` c$)nWD!91gRP5#wYo!lhSeM;kt-@)tFAIi)hWB>pF delta 17 YcmX@9*dw_?f^l;K<2%mH&irkR06Gc<@Bjb+ diff --git a/test/unit/ast/ast_node_factory/copy.spec.ts b/test/unit/ast/ast_node_factory/copy.spec.ts index 1f398626..a4f0bc95 100644 --- a/test/unit/ast/ast_node_factory/copy.spec.ts +++ b/test/unit/ast/ast_node_factory/copy.spec.ts @@ -149,6 +149,7 @@ describe("ASTNodeFactory.copy()", () => { false, true, [], + [], "doc string" ); @@ -292,6 +293,7 @@ describe("ASTNodeFactory.copy()", () => { false, true, [], + [], "doc string" ); diff --git a/test/unit/ast/ast_node_factory/make.spec.ts b/test/unit/ast/ast_node_factory/make.spec.ts index e15ea1bd..ddc103f5 100644 --- a/test/unit/ast/ast_node_factory/make.spec.ts +++ b/test/unit/ast/ast_node_factory/make.spec.ts @@ -85,6 +85,7 @@ describe("ASTNodeFactory.make*()", () => { false, true, [], + [], "doc string" ); @@ -170,6 +171,7 @@ describe("ASTNodeFactory.make*()", () => { false, true, [], + [], "doc string" ); @@ -291,6 +293,7 @@ describe("ASTNodeFactory.make*()", () => { false, true, [], + [], "doc string" ); diff --git a/test/unit/ast/nodes/contract_definition.spec.ts b/test/unit/ast/nodes/contract_definition.spec.ts index 865335c7..b00df58e 100644 --- a/test/unit/ast/nodes/contract_definition.spec.ts +++ b/test/unit/ast/nodes/contract_definition.spec.ts @@ -40,6 +40,7 @@ describe("ContractDefinition", () => { false, true, [3], + [], undefined, [] ); @@ -77,6 +78,7 @@ describe("ContractDefinition", () => { false, true, [2], + [], undefined, [myEnum1] ); @@ -124,6 +126,7 @@ describe("ContractDefinition", () => { false, true, [3], + [], undefined, [myEnum1, myEnum2] ); @@ -174,6 +177,7 @@ describe("ContractDefinition", () => { false, true, [3], + [], undefined, [myEnum1, myEnum2] ); @@ -233,6 +237,7 @@ describe("ContractDefinition", () => { false, true, [4], + [], undefined, [myEnum1, myEnum2, myEnum3] ); @@ -285,6 +290,7 @@ describe("ContractDefinition", () => { false, true, [3], + [], undefined, [myEnum1] ); @@ -343,6 +349,7 @@ describe("ContractDefinition", () => { false, true, [4], + [], undefined, [myEnum1, myEnum2] ); @@ -395,6 +402,7 @@ describe("ContractDefinition", () => { false, true, [3], + [], undefined, [myEnum1] ); @@ -453,6 +461,7 @@ describe("ContractDefinition", () => { false, true, [4], + [], undefined, [myEnum1, myEnum2] ); @@ -502,6 +511,7 @@ describe("ContractDefinition", () => { false, true, [3], + [], undefined, [myEnum1] ); @@ -567,6 +577,7 @@ describe("ContractDefinition", () => { false, true, [5], + [], undefined, [myEnum1, myEnum2, myEnum3] ); From d018ad2462da3c43112161ada4b4a5c2a4c3bef5 Mon Sep 17 00:00:00 2001 From: blitz-1306 Date: Fri, 30 Apr 2021 09:23:40 +0500 Subject: [PATCH 2/4] Fixed bug in YulLiteralWriter: use JSON.stringify() on raw literal values to avoid edge-cases with special characters and escap sequences. --- src/ast/writing/yul_mapping.ts | 2 +- test/samples/solidity/latest_08.sourced.sol | Bin 4297 -> 4314 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ast/writing/yul_mapping.ts b/src/ast/writing/yul_mapping.ts index f49f0645..6ee45252 100644 --- a/src/ast/writing/yul_mapping.ts +++ b/src/ast/writing/yul_mapping.ts @@ -26,7 +26,7 @@ class YulBlockWriter implements YulNodeWriter { class YulLiteralWriter implements YulNodeWriter { write(node: YulNode): string { - const value = node.kind === "string" ? '"' + node.value + '"' : node.value; + const value = node.kind === "string" ? JSON.stringify(node.value) : node.value; return node.type !== "" ? value + ":" + node.type : value; } diff --git a/test/samples/solidity/latest_08.sourced.sol b/test/samples/solidity/latest_08.sourced.sol index e02330aa08525af1b99c0cd9e1f3e0dea0abd6e5..d309575f79d5213d456853f45332e2d05bd128b8 100644 GIT binary patch delta 80 zcmX@9cuR3Z0gr7=seyr^VT_WoOK4j8iJ7N%pPBn^|1uy8Bw=8n#HD})a#BkaDiy43 V6_mi*j3&?J@nDSE{FLVjGXSkg8+QNz delta 43 zcmcbmcv5jg0gs5FlCeu@TKS2Yr*@y2`)>a-Ad6vgKaT{X(B!o|9-F`MJYfa^qAU{y From 04b57a405cf1aafedf44c93a7fef2e9bcb064287 Mon Sep 17 00:00:00 2001 From: blitz-1306 Date: Fri, 30 Apr 2021 15:09:01 +0500 Subject: [PATCH 3/4] Fix review remarks --- .../implementation/declaration/error_definition.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ast/implementation/declaration/error_definition.ts b/src/ast/implementation/declaration/error_definition.ts index 03d096e9..2f31c712 100644 --- a/src/ast/implementation/declaration/error_definition.ts +++ b/src/ast/implementation/declaration/error_definition.ts @@ -1,4 +1,5 @@ import { ASTNode } from "../../ast_node"; +import { SourceUnit } from "../meta"; import { ParameterList } from "../meta/parameter_list"; import { StructuredDocumentation } from "../meta/structured_documentation"; import { ContractDefinition } from "./contract_definition"; @@ -17,8 +18,8 @@ export class ErrorDefinition extends ASTNode { /** * Optional documentation appearing above the error definition: * - Is `undefined` when not specified. - * - Is type of `string` when specified and compiler version is older than `0.6.3`. - * - Is instance of `StructuredDocumentation` when specified and compiler version is `0.6.3` or newer. + * - Is type of `string` for compatibility reasons (for and instance, during node creation). + * - Is instance of `StructuredDocumentation` by default. */ documentation?: string | StructuredDocumentation; @@ -53,9 +54,10 @@ export class ErrorDefinition extends ASTNode { } /** - * Reference to its scoped contract + * Reference to a scoped `ContractDefinition` if event is declared in contract. + * Reference to a scoped `SourceUnit` if event is declared on file level. */ - get vScope(): ContractDefinition { - return this.parent as ContractDefinition; + get vScope(): ContractDefinition | SourceUnit { + return this.parent as ContractDefinition | SourceUnit; } } From d5e35950cf60f678ddb49c59790c0c0820d2e807 Mon Sep 17 00:00:00 2001 From: blitz-1306 Date: Fri, 30 Apr 2021 15:11:44 +0500 Subject: [PATCH 4/4] Fix wording --- src/ast/implementation/declaration/error_definition.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ast/implementation/declaration/error_definition.ts b/src/ast/implementation/declaration/error_definition.ts index 2f31c712..5dae4b63 100644 --- a/src/ast/implementation/declaration/error_definition.ts +++ b/src/ast/implementation/declaration/error_definition.ts @@ -19,7 +19,7 @@ export class ErrorDefinition extends ASTNode { * Optional documentation appearing above the error definition: * - Is `undefined` when not specified. * - Is type of `string` for compatibility reasons (for and instance, during node creation). - * - Is instance of `StructuredDocumentation` by default. + * - Is instance of `StructuredDocumentation` in other cases. */ documentation?: string | StructuredDocumentation;