fix: Enable destructuring in UsingFor statement since 0.8.13#649
fix: Enable destructuring in UsingFor statement since 0.8.13#649Xanewok merged 3 commits intoNomicFoundation:mainfrom
Conversation
This brings the definition in DSL v1 in line with DSL v2. See argotorg/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.
do we need to version the callsite in UsingDirective as well?
There was a problem hiding this comment.
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) }; |
There was a problem hiding this comment.
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.
Changed in 0691d8a, could you double-check if it's correct? 🙏
There was a problem hiding this comment.
left one nit. otherwise, looks great!
| - choice: | ||
| - reference: "UsingDirectivePath" | ||
| - reference: "UsingDirectiveDeconstruction" | ||
| - reference: "UsingDirectivePath" |
There was a problem hiding this comment.
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 argotorg/solidity@672951c.