Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Ast Node Bindings #199

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Conversation

TilakMaddy
Copy link
Contributor

@TilakMaddy TilakMaddy commented Sep 15, 2024

Fix for 2 ast node bindings

  • BinaryOperation can qualify as an expr_node!
  • Return AST Node's function_return_parameters should be made optional because when return is used inside modifiers, the AST generated by solc doesn't include the function_return_parameters field

More context:
I tried using these changes on Aderyn for a while and haven't come across an unrecognized node since :) So I thought I'll share it with ya!

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@DaniPopes DaniPopes merged commit 3a9139a into foundry-rs:main Sep 16, 2024
15 checks passed
klkvr pushed a commit that referenced this pull request Sep 16, 2024
Fix for 2 ast node bindings

* BinaryOperation can qualify as an `expr_node!`
* Return AST Node's `function_return_parameters` should be made optional
because when return is used inside modifiers, the AST generated by solc
doesn't include the `function_return_parameters` field

More context:
I tried using these changes on
[Aderyn](https://github.com/Cyfrin/aderyn/blob/5c483fdbf1f454ca42c1fd9b85353b0b9241c43a/aderyn_core/src/ast/ast_nodes.rs#L639C1-L645C3)
for a while and haven't come across an unrecognized node since :) So I
thought I'll share it with ya!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants