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.
fix: After 0.5.0 we can't consume the dot if not followed by digit
See ethereum/solidity#4172. This unblocks parsing member access expressions where the primary expression can't consume the dot in order to parse the `.member` postfix expression.
- Loading branch information
Showing
15 changed files
with
154 additions
and
73 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
crates/solidity/outputs/cargo/slang_solidity/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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
crates/solidity/outputs/spec/generated/public/05-expressions/04-numbers.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
19 changes: 19 additions & 0 deletions
19
...apshots/cst_output/DecimalNumberExpression/float_no_fraction/generated/0.6.11-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,19 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
Source: > | ||
1 │ 1. │ 0..2 | ||
Errors: # 1 total | ||
- > | ||
Error: Expected DaysKeyword or EtherKeyword or FinneyKeyword or GweiKeyword or HoursKeyword or MinutesKeyword or SecondsKeyword or SzaboKeyword or WeeksKeyword or WeiKeyword. | ||
╭─[crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_fraction/input.sol:1:2] | ||
│ | ||
1 │ 1. | ||
│ ┬ | ||
│ ╰── Error occurred here. | ||
───╯ | ||
Tree: | ||
- (DecimalNumberExpression): # "1." (0..2) | ||
- (literal꞉ DecimalLiteral): "1" # (0..1) | ||
- (SKIPPED): "." # (1..2) |
19 changes: 19 additions & 0 deletions
19
...napshots/cst_output/DecimalNumberExpression/float_no_fraction/generated/0.7.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,19 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
Source: > | ||
1 │ 1. │ 0..2 | ||
Errors: # 1 total | ||
- > | ||
Error: Expected DaysKeyword or EtherKeyword or GweiKeyword or HoursKeyword or MinutesKeyword or SecondsKeyword or WeeksKeyword or WeiKeyword. | ||
╭─[crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/float_no_fraction/input.sol:1:2] | ||
│ | ||
1 │ 1. | ||
│ ┬ | ||
│ ╰── Error occurred here. | ||
───╯ | ||
Tree: | ||
- (DecimalNumberExpression): # "1." (0..2) | ||
- (literal꞉ DecimalLiteral): "1" # (0..1) | ||
- (SKIPPED): "." # (1..2) |
19 changes: 19 additions & 0 deletions
19
...cst_output/DecimalNumberExpression/integer_ident_after_period/generated/0.5.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,19 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
Source: > | ||
1 │ 1.a │ 0..3 | ||
Errors: # 1 total | ||
- > | ||
Error: Expected DaysKeyword or EtherKeyword or FinneyKeyword or HoursKeyword or MinutesKeyword or SecondsKeyword or SzaboKeyword or WeeksKeyword or WeiKeyword. | ||
╭─[crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_ident_after_period/input.sol:1:2] | ||
│ | ||
1 │ 1.a | ||
│ ─┬─ | ||
│ ╰─── Error occurred here. | ||
───╯ | ||
Tree: | ||
- (DecimalNumberExpression): # "1.a\n" (0..4) | ||
- (literal꞉ DecimalLiteral): "1" # (0..1) | ||
- (SKIPPED): ".a\n" # (1..4) |
19 changes: 19 additions & 0 deletions
19
...st_output/DecimalNumberExpression/integer_ident_after_period/generated/0.6.11-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,19 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
Source: > | ||
1 │ 1.a │ 0..3 | ||
Errors: # 1 total | ||
- > | ||
Error: Expected DaysKeyword or EtherKeyword or FinneyKeyword or GweiKeyword or HoursKeyword or MinutesKeyword or SecondsKeyword or SzaboKeyword or WeeksKeyword or WeiKeyword. | ||
╭─[crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_ident_after_period/input.sol:1:2] | ||
│ | ||
1 │ 1.a | ||
│ ─┬─ | ||
│ ╰─── Error occurred here. | ||
───╯ | ||
Tree: | ||
- (DecimalNumberExpression): # "1.a\n" (0..4) | ||
- (literal꞉ DecimalLiteral): "1" # (0..1) | ||
- (SKIPPED): ".a\n" # (1..4) |
19 changes: 19 additions & 0 deletions
19
...cst_output/DecimalNumberExpression/integer_ident_after_period/generated/0.7.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,19 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
Source: > | ||
1 │ 1.a │ 0..3 | ||
Errors: # 1 total | ||
- > | ||
Error: Expected DaysKeyword or EtherKeyword or GweiKeyword or HoursKeyword or MinutesKeyword or SecondsKeyword or WeeksKeyword or WeiKeyword. | ||
╭─[crates/solidity/testing/snapshots/cst_output/DecimalNumberExpression/integer_ident_after_period/input.sol:1:2] | ||
│ | ||
1 │ 1.a | ||
│ ─┬─ | ||
│ ╰─── Error occurred here. | ||
───╯ | ||
Tree: | ||
- (DecimalNumberExpression): # "1.a\n" (0..4) | ||
- (literal꞉ DecimalLiteral): "1" # (0..1) | ||
- (SKIPPED): ".a\n" # (1..4) |
18 changes: 18 additions & 0 deletions
18
...testing/snapshots/cst_output/Expression/member_access_integer/generated/0.5.0-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,18 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
Source: > | ||
1 │ 5.fromUint() │ 0..12 | ||
Errors: [] | ||
|
||
Tree: | ||
- (Expression) ► (variant꞉ FunctionCallExpression): # "5.fromUint()\n" (0..13) | ||
- (operand꞉ Expression) ► (variant꞉ MemberAccessExpression): # "5.fromUint" (0..10) | ||
- (operand꞉ Expression) ► (variant꞉ DecimalNumberExpression) ► (literal꞉ DecimalLiteral): "5" # (0..1) | ||
- (period꞉ Period): "." # (1..2) | ||
- (member꞉ MemberAccess) ► (variant꞉ Identifier): "fromUint" # (2..10) | ||
- (arguments꞉ ArgumentsDeclaration) ► (variant꞉ PositionalArgumentsDeclaration): # "()\n" (10..13) | ||
- (open_paren꞉ OpenParen): "(" # (10..11) | ||
- (arguments꞉ PositionalArguments): [] # (11..11) | ||
- (close_paren꞉ CloseParen): ")" # (11..12) | ||
- (trailing_trivia꞉ EndOfLine): "\n" # (12..13) |
17 changes: 0 additions & 17 deletions
17
...testing/snapshots/cst_output/Expression/member_access_integer/generated/0.5.3-failure.yml
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
...testing/snapshots/cst_output/Expression/member_access_integer/generated/0.6.0-failure.yml
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
...testing/snapshots/cst_output/Expression/member_access_integer/generated/0.7.0-failure.yml
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
...testing/snapshots/cst_output/Expression/member_access_integer/generated/0.8.0-failure.yml
This file was deleted.
Oops, something went wrong.