Closed lonelyenvoy closed 3 years ago
Yes, sorry about that, this project has 0 docs at the moment.
When a function node doesn't have an override
modifier, the value of the override
property for that node is null
.
If it does have an override
but it doesn't passes any contract name, then the override
property is []
.
Finally, if there are explicit overrides, the override
property has a list of the UserDefinedTypeName
nodes that are used.
Does that help?
Oh, I understand. Thanks for your explanation.
I want to find out function overriding and function modifier overriding in the AST. However, it seems not possible in some situation.
The
override
array of theFunctionDefinition
node ofB.f
is empty, which means I cannot know whether a function is overriding another function in the parent contract. However, the code below works:When the name is explicitly given in
override(...)
, theoverride
array contains one element. How can I detect unnamed overriding? The same situation happens on function modifier overriding: