Skip to content

Commit

Permalink
correct versioning for SourceUnitMember and ContractMember rules (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarTawfik authored Jul 29, 2023
1 parent 7c2602f commit 95bbc50
Show file tree
Hide file tree
Showing 82 changed files with 3,361 additions and 428 deletions.
5 changes: 5 additions & 0 deletions .changeset/ten-doors-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"changelog": patch
---

Correct versioning for `SourceUnitMember` and `ContractMember` children.
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,83 @@
versioned:
0.4.11:
choice:
- reference: "PragmaDirective"
- reference: "ImportDirective"
- reference: "ContractDefinition"
- reference: "InterfaceDefinition"
- reference: "LibraryDefinition"
0.6.0:
choice:
- reference: "PragmaDirective"
- reference: "ImportDirective"
- reference: "ContractDefinition"
- reference: "InterfaceDefinition"
- reference: "LibraryDefinition"
# added"
- reference: "StructDefinition"
- reference: "EnumDefinition"
- reference: "ConstantDefinition"
0.7.1:
choice:
- reference: "PragmaDirective"
- reference: "ImportDirective"
- reference: "ContractDefinition"
- reference: "InterfaceDefinition"
- reference: "LibraryDefinition"
- reference: "StructDefinition"
- reference: "EnumDefinition"
# added
- reference: "FunctionDefinition"
- reference: "ErrorDefinition"
0.7.4:
choice:
- reference: "PragmaDirective"
- reference: "ImportDirective"
- reference: "ContractDefinition"
- reference: "InterfaceDefinition"
- reference: "LibraryDefinition"
- reference: "StructDefinition"
- reference: "EnumDefinition"
- reference: "FunctionDefinition"
# added
- reference: "ConstantDefinition"
0.8.4:
choice:
- reference: "PragmaDirective"
- reference: "UsingDirective"
- reference: "ImportDirective"
- reference: "ContractDefinition"
- reference: "InterfaceDefinition"
- reference: "LibraryDefinition"
- reference: "StructDefinition"
- reference: "EnumDefinition"
- reference: "FunctionDefinition"
- reference: "ConstantDefinition"
# added:
- reference: "ErrorDefinition"
0.8.8:
choice:
- reference: "PragmaDirective"
- reference: "ImportDirective"
- reference: "ContractDefinition"
- reference: "LibraryDefinition"
- reference: "InterfaceDefinition"
- reference: "LibraryDefinition"
- reference: "StructDefinition"
- reference: "EnumDefinition"
- reference: "ConstantDefinition"
- reference: "FunctionDefinition"
- reference: "ConstantDefinition"
- reference: "ErrorDefinition"
- reference: "ImportDirective"
- reference: "PragmaDirective"
- reference: "UsingDirective"
# added:
- reference: "UserDefinedValueTypeDefinition"
0.8.13:
choice:
- reference: "PragmaDirective"
- reference: "ImportDirective"
- reference: "ContractDefinition"
- reference: "InterfaceDefinition"
- reference: "LibraryDefinition"
- reference: "StructDefinition"
- reference: "EnumDefinition"
- reference: "FunctionDefinition"
- reference: "ConstantDefinition"
- reference: "ErrorDefinition"
- reference: "UserDefinedValueTypeDefinition"
# added:
- reference: "UsingDirective"
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,13 @@

- name: "ErrorKeyword"
kind: "Scanner"
unversioned:
trailingContext:
scanner:
terminal: "error"
notFollowedBy:
reference: "IdentifierPart"
versioned:
0.8.4:
trailingContext:
scanner:
terminal: "error"
notFollowedBy:
reference: "IdentifierPart"

- name: "EtherKeyword"
kind: "Scanner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
- reference: "StructDefinition"
- reference: "EnumDefinition"
- reference: "EventDefinition"
- reference: "ErrorDefinition"
- reference: "StateVariableDefinition"
0.4.22:
# added: "ConstructorDefinition"
Expand All @@ -91,12 +90,24 @@
- reference: "StructDefinition"
- reference: "EnumDefinition"
- reference: "EventDefinition"
- reference: "ErrorDefinition"
- reference: "StateVariableDefinition"
0.6.0:
# added: "ReceiveFunctionDefinition"
# added: "FallbackFunctionDefinition"
# removed: "UnnamedFunctionDefinition"
choice:
- reference: "UsingDirective"
- reference: "ConstructorDefinition"
- reference: "FunctionDefinition"
- reference: "FallbackFunctionDefinition"
- reference: "ReceiveFunctionDefinition"
- reference: "ModifierDefinition"
- reference: "StructDefinition"
- reference: "EnumDefinition"
- reference: "EventDefinition"
- reference: "StateVariableDefinition"
0.8.4:
# added: "ErrorDefinition"
choice:
- reference: "UsingDirective"
- reference: "ConstructorDefinition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

- name: "ConstantDefinition"
kind: "Parser"
unversioned:
terminatedBy:
parser:
sequence:
- reference: "TypeName"
- reference: "ConstantKeyword"
- reference: "Identifier"
- reference: "Equal"
- reference: "Expression"
terminator:
reference: "Semicolon"
versioned:
0.7.4:
terminatedBy:
parser:
sequence:
- reference: "TypeName"
- reference: "ConstantKeyword"
- reference: "Identifier"
- reference: "Equal"
- reference: "Expression"
terminator:
reference: "Semicolon"
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,39 @@

- name: "ErrorDefinition"
kind: "Parser"
unversioned:
terminatedBy:
parser:
sequence:
- reference: "ErrorKeyword"
- reference: "Identifier"
- delimitedBy:
open:
reference: "OpenParen"
parser:
optional:
reference: "ErrorParametersList"
close:
reference: "CloseParen"
terminator:
reference: "Semicolon"
versioned:
0.8.4:
terminatedBy:
parser:
sequence:
- reference: "ErrorKeyword"
- reference: "Identifier"
- delimitedBy:
open:
reference: "OpenParen"
parser:
optional:
reference: "ErrorParametersList"
close:
reference: "CloseParen"
terminator:
reference: "Semicolon"

- name: "ErrorParametersList"
kind: "Parser"
unversioned:
separatedBy:
separator:
reference: "Comma"
parser:
reference: "ErrorParameter"
versioned:
0.8.4:
separatedBy:
separator:
reference: "Comma"
parser:
reference: "ErrorParameter"

- name: "ErrorParameter"
kind: "Parser"
unversioned:
sequence:
- reference: "TypeName"
- optional:
reference: "Identifier"
versioned:
0.8.4:
sequence:
- reference: "TypeName"
- optional:
reference: "Identifier"

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

Loading

0 comments on commit 95bbc50

Please sign in to comment.