-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make behavior between curly- and paren-delimited blocks consistent.
Note that the formatter rewrite parens-block sequences as curly-block sequences anyway. Albeit weird looking syntax, they are valid nonetheless.
- Loading branch information
Showing
4 changed files
with
44 additions
and
25 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
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
41 changes: 30 additions & 11 deletions
41
crates/aiken-lang/src/parser/expr/snapshots/expect_let_in_let_parens.snap
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 |
---|---|---|
@@ -1,15 +1,34 @@ | ||
--- | ||
source: crates/aiken-lang/src/parser/expr/assignment.rs | ||
description: "Invalid code (parse error):\n\nlet a = ( let b = 42 )" | ||
description: "Code:\n\nlet a = ( let b = 42 )" | ||
--- | ||
[ | ||
ParseError { | ||
kind: UnfinishedAssignmentRightHandSide, | ||
span: 0..22, | ||
while_parsing: None, | ||
expected: {}, | ||
label: Some( | ||
"invalid assignment right-hand side", | ||
), | ||
Assignment { | ||
location: 0..22, | ||
value: Sequence { | ||
location: 8..22, | ||
expressions: [ | ||
Assignment { | ||
location: 10..20, | ||
value: UInt { | ||
location: 18..20, | ||
value: "42", | ||
base: Decimal { | ||
numeric_underscore: false, | ||
}, | ||
}, | ||
pattern: Var { | ||
location: 14..15, | ||
name: "b", | ||
}, | ||
kind: Let, | ||
annotation: None, | ||
}, | ||
], | ||
}, | ||
] | ||
pattern: Var { | ||
location: 4..5, | ||
name: "a", | ||
}, | ||
kind: Let, | ||
annotation: None, | ||
} |
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