-
-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fromutf-roc
- Loading branch information
Showing
15 changed files
with
273 additions
and
70 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
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
5 changes: 5 additions & 0 deletions
5
...piler/test_syntax/tests/snapshots/pass/if_bang_then_bang_indented_else.expr.formatted.roc
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,5 @@ | ||
if !a! then | ||
t | ||
else | ||
l | ||
5 |
72 changes: 72 additions & 0 deletions
72
...compiler/test_syntax/tests/snapshots/pass/if_bang_then_bang_indented_else.expr.result-ast
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,72 @@ | ||
@1-24 SpaceAfter( | ||
Defs( | ||
Defs { | ||
tags: [ | ||
EitherIndex(2147483648), | ||
], | ||
regions: [ | ||
@1-22, | ||
], | ||
space_before: [ | ||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 }, | ||
], | ||
space_after: [ | ||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 }, | ||
], | ||
spaces: [], | ||
type_defs: [], | ||
value_defs: [ | ||
Stmt( | ||
@1-22 If { | ||
if_thens: [ | ||
( | ||
@3-6 UnaryOp( | ||
@4-6 Var { | ||
module_name: "", | ||
ident: "a!", | ||
}, | ||
@3-4 Not, | ||
), | ||
@11-12 SpaceBefore( | ||
SpaceAfter( | ||
Var { | ||
module_name: "", | ||
ident: "t", | ||
}, | ||
[ | ||
Newline, | ||
], | ||
), | ||
[ | ||
Newline, | ||
], | ||
), | ||
), | ||
], | ||
final_else: @21-22 SpaceBefore( | ||
Var { | ||
module_name: "", | ||
ident: "l", | ||
}, | ||
[ | ||
Newline, | ||
], | ||
), | ||
indented_else: true, | ||
}, | ||
), | ||
], | ||
}, | ||
@23-24 SpaceBefore( | ||
Num( | ||
"5", | ||
), | ||
[ | ||
Newline, | ||
], | ||
), | ||
), | ||
[ | ||
Newline, | ||
], | ||
) |
5 changes: 5 additions & 0 deletions
5
crates/compiler/test_syntax/tests/snapshots/pass/if_bang_then_bang_indented_else.expr.roc
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,5 @@ | ||
if!a!then | ||
t | ||
else | ||
l | ||
5 |
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ if | |
k | ||
then | ||
A | ||
else | ||
|
||
e | ||
r | ||
else | ||
e | ||
r |
3 changes: 3 additions & 0 deletions
3
crates/compiler/test_syntax/tests/snapshots/pass/sep_annotation.expr.formatted.roc
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,3 @@ | ||
E : i | ||
E = h | ||
0 |
60 changes: 60 additions & 0 deletions
60
crates/compiler/test_syntax/tests/snapshots/pass/sep_annotation.expr.result-ast
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,60 @@ | ||
@0-11 SpaceAfter( | ||
Defs( | ||
Defs { | ||
tags: [ | ||
EitherIndex(2147483648), | ||
], | ||
regions: [ | ||
@0-9, | ||
], | ||
space_before: [ | ||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 }, | ||
], | ||
space_after: [ | ||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 }, | ||
], | ||
spaces: [], | ||
type_defs: [], | ||
value_defs: [ | ||
AnnotatedBody { | ||
ann_pattern: Apply( | ||
@0-1 Tag( | ||
"E", | ||
), | ||
[], | ||
), | ||
ann_type: @2-3 BoundVariable( | ||
"i", | ||
), | ||
lines_between: [ | ||
Newline, | ||
Newline, | ||
], | ||
body_pattern: @5-6 SpaceAfter( | ||
Tag( | ||
"E", | ||
), | ||
[ | ||
Newline, | ||
], | ||
), | ||
body_expr: @8-9 Var { | ||
module_name: "", | ||
ident: "h", | ||
}, | ||
}, | ||
], | ||
}, | ||
@10-11 SpaceBefore( | ||
Num( | ||
"0", | ||
), | ||
[ | ||
Newline, | ||
], | ||
), | ||
), | ||
[ | ||
Newline, | ||
], | ||
) |
5 changes: 5 additions & 0 deletions
5
crates/compiler/test_syntax/tests/snapshots/pass/sep_annotation.expr.roc
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,5 @@ | ||
E:i | ||
|
||
E | ||
=h | ||
0 |
3 changes: 3 additions & 0 deletions
3
crates/compiler/test_syntax/tests/snapshots/pass/sneaky_and_expr.expr.formatted.roc
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,3 @@ | ||
a | ||
ands | ||
d |
55 changes: 55 additions & 0 deletions
55
crates/compiler/test_syntax/tests/snapshots/pass/sneaky_and_expr.expr.result-ast
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,55 @@ | ||
@0-11 SpaceAfter( | ||
Defs( | ||
Defs { | ||
tags: [ | ||
EitherIndex(2147483648), | ||
EitherIndex(2147483649), | ||
], | ||
regions: [ | ||
@0-1, | ||
@2-9, | ||
], | ||
space_before: [ | ||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 }, | ||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 1 }, | ||
], | ||
space_after: [ | ||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 }, | ||
Slice<roc_parse::ast::CommentOrNewline> { start: 1, length: 0 }, | ||
], | ||
spaces: [ | ||
Newline, | ||
], | ||
type_defs: [], | ||
value_defs: [ | ||
Stmt( | ||
@0-1 Var { | ||
module_name: "", | ||
ident: "a", | ||
}, | ||
), | ||
Body( | ||
@2-4 RecordDestructure( | ||
[], | ||
), | ||
@5-9 Var { | ||
module_name: "", | ||
ident: "ands", | ||
}, | ||
), | ||
], | ||
}, | ||
@10-11 SpaceBefore( | ||
Var { | ||
module_name: "", | ||
ident: "d", | ||
}, | ||
[ | ||
Newline, | ||
], | ||
), | ||
), | ||
[ | ||
Newline, | ||
], | ||
) |
Oops, something went wrong.