Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarTawfik committed Aug 12, 2024
1 parent 319c80a commit 7db6464
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 31 deletions.
18 changes: 11 additions & 7 deletions crates/solidity/inputs/language/src/definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ codegen_language_macros::compile!(Language(
Enum(
name = SourceUnitMember,
variants = [
// Variants that can be identified using the first token:
EnumVariant(reference = PragmaDirective),
EnumVariant(reference = ImportDirective),
EnumVariant(reference = ContractDefinition),
Expand All @@ -62,17 +63,18 @@ codegen_language_macros::compile!(Language(
reference = FunctionDefinition,
enabled = From("0.7.1")
),
EnumVariant(
reference = ConstantDefinition,
enabled = From("0.7.4")
),
EnumVariant(reference = ErrorDefinition, enabled = From("0.8.4")),
EnumVariant(
reference = UserDefinedValueTypeDefinition,
enabled = From("0.8.8")
),
EnumVariant(reference = UsingDirective, enabled = From("0.8.13")),
EnumVariant(reference = EventDefinition, enabled = From("0.8.22"))
EnumVariant(reference = EventDefinition, enabled = From("0.8.22")),
// These variants are more complex, and require backtracking:
EnumVariant(
reference = ConstantDefinition,
enabled = From("0.7.4")
)
]
)
]
Expand Down Expand Up @@ -2120,6 +2122,7 @@ codegen_language_macros::compile!(Language(
Enum(
name = ContractMember,
variants = [
// Variants that can be identified using the first token:
EnumVariant(reference = UsingDirective),
EnumVariant(reference = FunctionDefinition),
EnumVariant(
Expand All @@ -2142,12 +2145,13 @@ codegen_language_macros::compile!(Language(
EnumVariant(reference = StructDefinition),
EnumVariant(reference = EnumDefinition),
EnumVariant(reference = EventDefinition),
EnumVariant(reference = StateVariableDefinition),
EnumVariant(reference = ErrorDefinition, enabled = From("0.8.4")),
EnumVariant(
reference = UserDefinedValueTypeDefinition,
enabled = From("0.8.8")
)
),
// These variants are more complex, and require backtracking:
EnumVariant(reference = StateVariableDefinition)
]
)
]
Expand Down

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.

8 changes: 4 additions & 4 deletions crates/solidity/outputs/spec/generated/grammar.ebnf

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.

Loading

0 comments on commit 7db6464

Please sign in to comment.