Skip to content

fix: Enable destructuring in UsingFor statement since 0.8.13#649

Merged
Xanewok merged 3 commits intoNomicFoundation:mainfrom
Xanewok:fix-dslv1-using-destructuring
Nov 10, 2023
Merged

fix: Enable destructuring in UsingFor statement since 0.8.13#649
Xanewok merged 3 commits intoNomicFoundation:mainfrom
Xanewok:fix-dslv1-using-destructuring

Conversation

@Xanewok
Copy link
Copy Markdown
Contributor

@Xanewok Xanewok commented Nov 10, 2023

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

See argotorg/solidity@672951c.

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

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

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
Copy Markdown
Contributor

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
Copy Markdown
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

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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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 enabled auto-merge November 10, 2023 17:30
@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
@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