diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-08-21 00:30:45 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-08-21 00:30:45 +0200 |
| commit | b479b28b5d35220f7d21bd40e8dca21f1930db19 (patch) | |
| tree | 90c1a564158f0419b1f43d070e593fda6b5e1af4 /tools/odinfmt/tests | |
| parent | f5fe104fd6662156c2cb219f24f17769af2d30e6 (diff) | |
fix odinfmt bugs
Diffstat (limited to 'tools/odinfmt/tests')
| -rw-r--r-- | tools/odinfmt/tests/.snapshots/returns.odin | 16 | ||||
| -rw-r--r-- | tools/odinfmt/tests/returns.odin | 15 |
2 files changed, 30 insertions, 1 deletions
diff --git a/tools/odinfmt/tests/.snapshots/returns.odin b/tools/odinfmt/tests/.snapshots/returns.odin index 0b6dd10..ddd8fef 100644 --- a/tools/odinfmt/tests/.snapshots/returns.odin +++ b/tools/odinfmt/tests/.snapshots/returns.odin @@ -26,3 +26,19 @@ returns_with_call_expression :: proc() { cast(^ast.Comp_Lit)field_value.value, ) } + + +return_with_multiple_identifiers :: proc() { + return aaaaaaaaaaaaaaaaaa, + bbbbbbbbbbbbbbbbbbbb, + cccccccccccccccccccc, + dddddddddddddddddddddddddd +} + + +return_with_call_expression_in_the_end :: proc() { + return newlines_before_comment, cons_with_nopl( + document, + cons(text(p.indentation), line_suffix(comment.text)), + ) +} diff --git a/tools/odinfmt/tests/returns.odin b/tools/odinfmt/tests/returns.odin index 2359308..fea7c2d 100644 --- a/tools/odinfmt/tests/returns.odin +++ b/tools/odinfmt/tests/returns.odin @@ -22,4 +22,17 @@ returns_with_call_expression :: proc() { symbol, cast(^ast.Comp_Lit)field_value.value, ) -}
\ No newline at end of file +} + + +return_with_multiple_identifiers :: proc() { + return aaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbb, cccccccccccccccccccc, dddddddddddddddddddddddddd +} + + +return_with_call_expression_in_the_end :: proc() { + return newlines_before_comment, cons_with_nopl(document, cons(text(p.indentation), line_suffix(comment.text))) +} + + + |