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

Implement binding rules for control statements #1076

Merged
merged 9 commits into from
Aug 16, 2024

Conversation

ggiraldez
Copy link
Collaborator

@ggiraldez ggiraldez commented Aug 15, 2024

This PR adds support in the binding rules for:

  • if/else statements
  • for loops
  • while and do-while loops
  • emit statements and basic event definitions
  • try-catch statements
  • revert and basic error definitions
  • unchecked blocks

It also includes a reorganization of the rules file to improve readability and maintainability. Previously we were attempting to maintain compatibility with strict evaluation mode which meant that nodes and edges needed to be defined in previous rules. But since to build the stack graph the lazy evaluation mode is used anyway, this restriction can be dropped.

The file is now organized more or less hierarchically, with all the rules affecting a node and its descendants grouped together.

@ggiraldez ggiraldez requested a review from a team as a code owner August 15, 2024 21:58
Copy link

changeset-bot bot commented Aug 15, 2024

⚠️ No Changeset found

Latest commit: 635facd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ggiraldez ggiraldez mentioned this pull request Aug 15, 2024
34 tasks
Copy link
Collaborator

@OmarTawfik OmarTawfik left a comment

Choose a reason for hiding this comment

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

Left a few questions. Thanks!

We're abandoning strict evaluation (which we were not using anyway) in favor of
approachability and readability.
Also, count the number of skipped assertions (due to not fulfilling the version
requirements)
@OmarTawfik OmarTawfik added this pull request to the merge queue Aug 16, 2024
Merged via the queue into NomicFoundation:main with commit 7870dc9 Aug 16, 2024
1 check passed
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