python-solidity-parser
python-solidity-parser copied to clipboard
Various fixes/missing fields
Just an informal collection of problems I encountered and fixed locally. Sorry for not presenting it in a more organized way. Feel free to modify/integrate it however you like.
- Added
namefield toTypeDefinitionnodes - Added
isVirtualandisOverridefields toModifierDefinitionnodes - Added support for parsing for
FunctionCallOptions(of the formfn{key=value}(args)) - Added support for parsing
IndexRangeAccesses (of the formarray[from:to]) - Added proper nodes for the
ReturnStatement,BreakStatement, andContinueStatement(which were previously rendered as the return expression or just';'for expression-less statements) - Fixed parser discarding all variable declarations in a variable declaration list if one is
None - Fixed parser failing if an assembly member's identifier is a list (not quite sure where that was a problem TBH)
- Fixed parser failing an assembly assignment to a member
I added some more fixes with commit eb548d1 on 2022-05-12:
- Added
isDeclaredImmutableto variable declaration, similar toisDeclaredConst - Rendered omitted loop expressions in for loops as
Noneinstead of anExpressionStatementwithNoneas its expression - Added
storageLocationfield to variable declarations inside a variable declaration list
Would that be okay to review and merge this PR @tintinweb ?