Skip to content

Commit

Permalink
allow parsing ColonEqual as two separate tokens before 0.5.5 (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarTawfik committed Feb 29, 2024
1 parent 4b8970b commit ca79eca
Show file tree
Hide file tree
Showing 41 changed files with 367 additions and 79 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-rocks-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nomicfoundation/slang": patch
---

allow parsing `ColonEqual` as two separate tokens before `0.5.5`
16 changes: 14 additions & 2 deletions crates/solidity/inputs/language/src/definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4062,18 +4062,30 @@ codegen_language_macros::compile!(Language(
Struct(
name = YulVariableDeclarationValue,
fields = (
colon_equal = Required(ColonEqual),
assignment = Required(YulAssignmentOperator),
expression = Required(YulExpression)
)
),
Struct(
name = YulAssignmentStatement,
fields = (
names = Required(YulIdentifierPaths),
colon_equal = Required(ColonEqual),
assignment = Required(YulAssignmentOperator),
expression = Required(YulExpression)
)
),
Enum(
name = YulAssignmentOperator,
variants = [
EnumVariant(reference = YulColonAndEqual, enabled = Till("0.5.5")),
EnumVariant(reference = ColonEqual)
]
),
Struct(
name = YulColonAndEqual,
enabled = Till("0.5.5"),
fields = (colon = Required(Colon), equal = Required(Equal))
),
Struct(
name = YulIfStatement,
fields = (
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.

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.

Loading

0 comments on commit ca79eca

Please sign in to comment.