forked from NomicFoundation/slang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Adjust generated code for YulBlock fix
- Loading branch information
Showing
6 changed files
with
202 additions
and
41 deletions.
There are no files selected for viewing
15 changes: 10 additions & 5 deletions
15
crates/solidity/outputs/cargo/crate/src/generated/language.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
15 changes: 10 additions & 5 deletions
15
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.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
.../solidity/testing/snapshots/cst_output/YulBlock/function_def/generated/0.4.11-failure.yml
This file was deleted.
Oops, something went wrong.
56 changes: 56 additions & 0 deletions
56
.../solidity/testing/snapshots/cst_output/YulBlock/function_def/generated/0.4.11-success.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
Source: > | ||
1 │ { │ 0..1 | ||
2 │ function mult(a, b) -> result { │ 2..34 | ||
3 │ result := mul(a, b) │ 35..56 | ||
4 │ } │ 57..59 | ||
5 │ } │ 60..61 | ||
Errors: [] | ||
|
||
Tree: | ||
- YulBlock (Rule): # 0..62 "{\n\tfunction mult(a, b) -> result {\n\t\tresult := mul..." | ||
- OpenBrace (Token): "{" # 0..1 | ||
- YulStatements (Rule): # 2..60 "\tfunction mult(a, b) -> result {\n\t\tresult := mul(a..." | ||
- YulStatement (Rule): # 2..60 "\tfunction mult(a, b) -> result {\n\t\tresult := mul(a..." | ||
- YulFunctionDefinition (Rule): # 2..60 "\tfunction mult(a, b) -> result {\n\t\tresult := mul(a..." | ||
- YulFunctionKeyword (Token): "function" # 3..11 | ||
- YulIdentifier (Token): "mult" # 12..16 | ||
- YulParametersDeclaration (Rule): # 16..22 "(a, b)" | ||
- OpenParen (Token): "(" # 16..17 | ||
- YulParameters (Rule): # 17..21 "a, b" | ||
- YulIdentifier (Token): "a" # 17..18 | ||
- Comma (Token): "," # 18..19 | ||
- YulIdentifier (Token): "b" # 20..21 | ||
- CloseParen (Token): ")" # 21..22 | ||
- YulReturnsDeclaration (Rule): # 22..32 " -> result" | ||
- MinusGreaterThan (Token): "->" # 23..25 | ||
- YulReturnVariables (Rule): # 25..32 " result" | ||
- YulIdentifier (Token): "result" # 26..32 | ||
- YulBlock (Rule): # 32..60 " {\n\t\tresult := mul(a, b)\n\t}\n" | ||
- OpenBrace (Token): "{" # 33..34 | ||
- YulStatements (Rule): # 35..57 "\t\tresult := mul(a, b)\n" | ||
- YulStatement (Rule): # 35..57 "\t\tresult := mul(a, b)\n" | ||
- YulAssignmentStatement (Rule): # 35..57 "\t\tresult := mul(a, b)\n" | ||
- YulIdentifierPaths (Rule): # 35..43 "\t\tresult" | ||
- YulIdentifierPath (Rule): # 35..43 "\t\tresult" | ||
- YulIdentifier (Token): "result" # 37..43 | ||
- ColonEqual (Token): ":=" # 44..46 | ||
- YulExpression (Rule): # 46..57 " mul(a, b)\n" | ||
- YulFunctionCallExpression (Rule): # 46..57 " mul(a, b)\n" | ||
- YulExpression (Rule): # 46..50 " mul" | ||
- YulIdentifierPath (Rule): # 46..50 " mul" | ||
- YulIdentifier (Token): "mul" # 47..50 | ||
- OpenParen (Token): "(" # 50..51 | ||
- YulArguments (Rule): # 51..55 "a, b" | ||
- YulExpression (Rule): # 51..52 "a" | ||
- YulIdentifierPath (Rule): # 51..52 "a" | ||
- YulIdentifier (Token): "a" # 51..52 | ||
- Comma (Token): "," # 52..53 | ||
- YulExpression (Rule): # 53..55 " b" | ||
- YulIdentifierPath (Rule): # 53..55 " b" | ||
- YulIdentifier (Token): "b" # 54..55 | ||
- CloseParen (Token): ")" # 55..56 | ||
- CloseBrace (Token): "}" # 58..59 | ||
- CloseBrace (Token): "}" # 60..61 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...ty/testing/snapshots/cst_output/YulBlock/ignore_unknown_delim/generated/0.6.0-failure.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
Source: > | ||
1 │ { │ 0..1 | ||
2 │ function mult(a, b) -> result { │ 2..34 | ||
3 │ result := mul(a, b) │ 35..56 | ||
4 │ result := [mul(a, b) │ 57..79 | ||
5 │ } │ 80..82 | ||
6 │ } │ 83..84 | ||
Errors: # 1 total | ||
- > | ||
Error: Expected AsciiStringLiteral or CloseBrace or HexStringLiteral or OpenBrace or YulBreakKeyword or YulContinueKeyword or YulDecimalLiteral or YulFalseKeyword or YulForKeyword or YulFunctionKeyword or YulHexLiteral or YulIdentifier or YulIfKeyword or YulLeaveKeyword or YulLetKeyword or YulSwitchKeyword or YulTrueKeyword. | ||
╭─[crates/solidity/testing/snapshots/cst_output/YulBlock/ignore_unknown_delim/input.sol:4:10] | ||
│ | ||
4 │ ╭─▶ result := [mul(a, b) | ||
5 │ ├─▶ } | ||
│ │ | ||
│ ╰─────────── Error occurred here. | ||
───╯ | ||
Tree: | ||
- YulBlock (Rule): # 0..85 "{\n\tfunction mult(a, b) -> result {\n\t\tresult := mul..." | ||
- OpenBrace (Token): "{" # 0..1 | ||
- YulStatements (Rule): # 2..83 "\tfunction mult(a, b) -> result {\n\t\tresult := mul(a..." | ||
- YulStatement (Rule): # 2..83 "\tfunction mult(a, b) -> result {\n\t\tresult := mul(a..." | ||
- YulFunctionDefinition (Rule): # 2..83 "\tfunction mult(a, b) -> result {\n\t\tresult := mul(a..." | ||
- YulFunctionKeyword (Token): "function" # 3..11 | ||
- YulIdentifier (Token): "mult" # 12..16 | ||
- YulParametersDeclaration (Rule): # 16..22 "(a, b)" | ||
- OpenParen (Token): "(" # 16..17 | ||
- YulParameters (Rule): # 17..21 "a, b" | ||
- YulIdentifier (Token): "a" # 17..18 | ||
- Comma (Token): "," # 18..19 | ||
- YulIdentifier (Token): "b" # 20..21 | ||
- CloseParen (Token): ")" # 21..22 | ||
- YulReturnsDeclaration (Rule): # 22..32 " -> result" | ||
- MinusGreaterThan (Token): "->" # 23..25 | ||
- YulReturnVariables (Rule): # 25..32 " result" | ||
- YulIdentifier (Token): "result" # 26..32 | ||
- YulBlock (Rule): # 32..83 " {\n\t\tresult := mul(a, b)\n\t\tresult := [mul(a, b)\n\t}..." | ||
- OpenBrace (Token): "{" # 33..34 | ||
- YulStatements (Rule): # 35..65 "\t\tresult := mul(a, b)\n\t\tresult" | ||
- YulStatement (Rule): # 35..57 "\t\tresult := mul(a, b)\n" | ||
- YulAssignmentStatement (Rule): # 35..57 "\t\tresult := mul(a, b)\n" | ||
- YulIdentifierPaths (Rule): # 35..43 "\t\tresult" | ||
- YulIdentifierPath (Rule): # 35..43 "\t\tresult" | ||
- YulIdentifier (Token): "result" # 37..43 | ||
- ColonEqual (Token): ":=" # 44..46 | ||
- YulExpression (Rule): # 46..57 " mul(a, b)\n" | ||
- YulFunctionCallExpression (Rule): # 46..57 " mul(a, b)\n" | ||
- YulExpression (Rule): # 46..50 " mul" | ||
- YulIdentifierPath (Rule): # 46..50 " mul" | ||
- YulIdentifier (Token): "mul" # 47..50 | ||
- OpenParen (Token): "(" # 50..51 | ||
- YulArguments (Rule): # 51..55 "a, b" | ||
- YulExpression (Rule): # 51..52 "a" | ||
- YulIdentifierPath (Rule): # 51..52 "a" | ||
- YulIdentifier (Token): "a" # 51..52 | ||
- Comma (Token): "," # 52..53 | ||
- YulExpression (Rule): # 53..55 " b" | ||
- YulIdentifierPath (Rule): # 53..55 " b" | ||
- YulIdentifier (Token): "b" # 54..55 | ||
- CloseParen (Token): ")" # 55..56 | ||
- YulStatement (Rule): # 57..65 "\t\tresult" | ||
- YulExpression (Rule): # 57..65 "\t\tresult" | ||
- YulIdentifierPath (Rule): # 57..65 "\t\tresult" | ||
- YulIdentifier (Token): "result" # 59..65 | ||
- SKIPPED (Token): ":= [mul(a, b)\n\t" # 66..81 | ||
- CloseBrace (Token): "}" # 81..82 | ||
- CloseBrace (Token): "}" # 83..84 |