-
Notifications
You must be signed in to change notification settings - Fork 19
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
fix: Enable destructuring in UsingFor statement since 0.8.13 #649
Conversation
This brings the definition in DSL v1 in line with DSL v2. See ethereum/solidity@672951c.
|
@@ -546,7 +546,7 @@ slang_grammar! { | |||
|
|||
parser UsingDirective = ((UsingKeyword (UsingDirectivePath | UsingDirectiveDeconstruction) ForKeyword (Asterisk | TypeName) ({ introduced in "0.8.13" GlobalKeyword } ?)) terminated by Semicolon) ; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) }; |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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? 🙏
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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`
This brings the definition in DSL v1 in line with DSL v2.
See ethereum/solidity@672951c.