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: Enable destructuring in UsingFor statement since 0.8.13 #649

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

Xanewok
Copy link
Contributor

@Xanewok Xanewok commented Nov 10, 2023

This brings the definition in DSL v1 in line with DSL v2.

See ethereum/solidity@672951c.

This brings the definition in DSL v1 in line with DSL v2.

See ethereum/solidity@672951c.
@Xanewok Xanewok requested a review from a team as a code owner November 10, 2023 14:05
Copy link

changeset-bot bot commented Nov 10, 2023

⚠️ No Changeset found

Latest commit: b5c4c2c

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

@@ -546,7 +546,7 @@ slang_grammar! {

parser UsingDirective = ((UsingKeyword (UsingDirectivePath | UsingDirectiveDeconstruction) ForKeyword (Asterisk | TypeName) ({ introduced in "0.8.13" GlobalKeyword } ?)) terminated by Semicolon) ;
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to version the callsite in UsingDirective as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not needed and I think it's clearer this way, since it has only one use site

@@ -546,7 +546,7 @@ slang_grammar! {

parser UsingDirective = ((UsingKeyword (UsingDirectivePath | UsingDirectiveDeconstruction) ForKeyword (Asterisk | TypeName) ({ introduced in "0.8.13" GlobalKeyword } ?)) terminated by Semicolon) ;

parser UsingDirectiveDeconstruction = (UsingDirectiveSymbolsList delimited by OpenBrace and CloseBrace) ;
parser UsingDirectiveDeconstruction = { introduced in "0.8.13" (UsingDirectiveSymbolsList delimited by OpenBrace and CloseBrace) };
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we should also update crates/solidity/inputs/language/definition/01-file-structure/04-imports/productions.yml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed in 0691d8a, could you double-check if it's correct? 🙏

Copy link
Collaborator

Choose a reason for hiding this comment

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

left one nit. otherwise, looks great!

- choice:
- reference: "UsingDirectivePath"
- reference: "UsingDirectiveDeconstruction"
- reference: "UsingDirectivePath"
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: updating the comment here:

# Added an optional `global` keyword, and `UsingDirectiveDeconstruction`

@Xanewok Xanewok added this pull request to the merge queue Nov 10, 2023
Merged via the queue into NomicFoundation:main with commit 35dff1e Nov 10, 2023
1 check passed
@Xanewok Xanewok deleted the fix-dslv1-using-destructuring branch November 10, 2023 18:04
@Xanewok Xanewok mentioned this pull request Nov 13, 2023
9 tasks
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