Skip to content

Commit

Permalink
Remove UsingDirectivePath wrapper rule from v0/v1, not used in v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Nov 16, 2023
1 parent 95caaf1 commit 6a05558
Show file tree
Hide file tree
Showing 36 changed files with 23 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
parser:
sequence:
- reference: "UsingKeyword"
- reference: "UsingDirectivePath"
- reference: "IdentifierPath"
- reference: "ForKeyword"
- choice:
- reference: "Asterisk"
Expand All @@ -89,7 +89,7 @@
sequence:
- reference: "UsingKeyword"
- choice:
- reference: "UsingDirectivePath"
- reference: "IdentifierPath"
- reference: "UsingDirectiveDeconstruction"
- reference: "ForKeyword"
- choice:
Expand All @@ -100,11 +100,6 @@
terminator:
reference: "Semicolon"

- name: "UsingDirectivePath"
kind: "Parser"
unversioned:
reference: "IdentifierPath"

- name: "UsingDirectiveDeconstruction"
kind: "Parser"
versioned:
Expand Down
4 changes: 1 addition & 3 deletions crates/solidity/inputs/language/src/dsl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,16 +550,14 @@ slang_grammar! {

parser UserDefinedValueTypeDefinition = { introduced in "0.8.8" ((TypeKeyword Identifier IsKeyword ElementaryType) terminated by Semicolon) } ;

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

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

inline parser UsingDirectiveOperator = {
introduced in "0.8.19" (Ampersand | Asterisk | BangEqual | Bar | Caret | EqualEqual | GreaterThan | GreaterThanEqual | LessThan | LessThanEqual | Minus | Percent | Plus | Slash | Tilde)
} ;

parser UsingDirectivePath = IdentifierPath ;

parser UsingDirectiveSymbol = {
introduced in "0.8.13" (IdentifierPath { introduced in "0.8.19" ((AsKeyword UsingDirectiveOperator) ?) } )
} ;
Expand Down
2 changes: 0 additions & 2 deletions crates/solidity/outputs/cargo/crate/src/generated/kinds.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions crates/solidity/outputs/npm/crate/src/generated/kinds.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions crates/solidity/outputs/npm/crate/src/generated/language.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions crates/solidity/outputs/npm/package/src/generated/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ Tree:
- ContractMembersList (Rule): # 18..35 " using x for *;\n"
- UsingDirective (Rule): # 18..35 " using x for *;\n"
- UsingKeyword (Token): "using" # 20..25
- UsingDirectivePath (Rule): # 25..27 " x"
- IdentifierPath (Rule): # 25..27 " x"
- Identifier (Token): "x" # 26..27
- IdentifierPath (Rule): # 25..27 " x"
- Identifier (Token): "x" # 26..27
- ForKeyword (Token): "for" # 28..31
- Asterisk (Token): "*" # 32..33
- Semicolon (Token): ";" # 33..34
Expand Down
Loading

0 comments on commit 6a05558

Please sign in to comment.