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
name
field toTypeDefinition
nodes - Added
isVirtual
andisOverride
fields toModifierDefinition
nodes - Added support for parsing for
FunctionCallOptions
(of the formfn{key=value}(args)
) - Added support for parsing
IndexRangeAccess
es (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
isDeclaredImmutable
to variable declaration, similar toisDeclaredConst
- Rendered omitted loop expressions in for loops as
None
instead of anExpressionStatement
withNone
as its expression - Added
storageLocation
field to variable declarations inside a variable declaration list
Would that be okay to review and merge this PR @tintinweb ?