-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add `Hash` derive for `SourceLocation`, fix schema for `TryCatchClause` and add test for it. I am currently working on foundry-rs/foundry#4034 and it requires usage of native solc AST, so I might be opening some other PRs around it as it seems that we are not using current models anywhere and they might be a bit outdated
- Loading branch information
Showing
4 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"absolutePath":"src/X.sol","id":40896,"exportedSymbols":{"SomeContract":[40895]},"nodeType":"SourceUnit","src":"0:243:17","nodes":[{"id":40895,"nodeType":"ContractDefinition","src":"0:243:17","nodes":[{"id":40894,"nodeType":"FunctionDefinition","src":"28:213:17","nodes":[],"body":{"id":40893,"nodeType":"Block","src":"50:191:17","nodes":[],"statements":[{"clauses":[{"block":{"id":40880,"nodeType":"Block","src":"75:30:17","statements":[]},"errorName":"","id":40881,"nodeType":"TryCatchClause","src":"75:30:17"},{"block":{"id":40885,"nodeType":"Block","src":"140:30:17","statements":[]},"errorName":"Error","id":40886,"nodeType":"TryCatchClause","parameters":{"id":40884,"nodeType":"ParameterList","parameters":[{"constant":false,"id":40883,"mutability":"mutable","name":"reason","nameLocation":"132:6:17","nodeType":"VariableDeclaration","scope":40886,"src":"118:20:17","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":40882,"name":"string","nodeType":"ElementaryTypeName","src":"118:6:17","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"visibility":"internal"}],"src":"117:22:17"},"src":"106:64:17"},{"block":{"id":40890,"nodeType":"Block","src":"205:30:17","statements":[]},"errorName":"","id":40891,"nodeType":"TryCatchClause","parameters":{"id":40889,"nodeType":"ParameterList","parameters":[{"constant":false,"id":40888,"mutability":"mutable","name":"lowLevelData","nameLocation":"191:12:17","nodeType":"VariableDeclaration","scope":40891,"src":"178:25:17","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":40887,"name":"bytes","nodeType":"ElementaryTypeName","src":"178:5:17","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"visibility":"internal"}],"src":"177:27:17"},"src":"171:64:17"}],"externalCall":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":40877,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"64:4:17","typeDescriptions":{"typeIdentifier":"t_contract$_SomeContract_$40895","typeString":"contract SomeContract"}},"id":40878,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"69:3:17","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":40894,"src":"64:8:17","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$__$returns$__$","typeString":"function () external"}},"id":40879,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"64:10:17","tryCall":true,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":40892,"nodeType":"TryStatement","src":"60:175:17"}]},"functionSelector":"c2985578","implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"37:3:17","parameters":{"id":40875,"nodeType":"ParameterList","parameters":[],"src":"40:2:17"},"returnParameters":{"id":40876,"nodeType":"ParameterList","parameters":[],"src":"50:0:17"},"scope":40895,"stateMutability":"nonpayable","virtual":false,"visibility":"public"}],"abstract":false,"baseContracts":[],"canonicalName":"SomeContract","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"linearizedBaseContracts":[40895],"name":"SomeContract","nameLocation":"9:12:17","scope":40896,"usedErrors":[],"usedEvents":[]}]} |