Skip to content

Commit

Permalink
Fix next yield a (#219)
Browse files Browse the repository at this point in the history
Fixes #197
  • Loading branch information
fables-tales authored Jul 8, 2020
1 parent ed23d03 commit 1014a28
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions fixtures/small/next_yield_actual.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
next yield a
1 change: 1 addition & 0 deletions fixtures/small/next_yield_expected.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
next yield a
3 changes: 2 additions & 1 deletion librubyfmt/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,8 @@ pub fn format_next(ps: &mut ParserState, next: Next) {
match next.1 {
ArgsAddBlockOrExpressionList::ExpressionList(e) => {
if !e.is_empty() {
panic!("got non empty next expression list, should be impossible");
ps.emit_space();
format_list_like_thing_items(ps, e, true);
}
}
ArgsAddBlockOrExpressionList::ArgsAddBlock(aab) => match aab.2 {
Expand Down

1 comment on commit 1014a28

@lpil
Copy link

@lpil lpil commented on 1014a28 Jul 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Really cool to see precompiled binaries. Excited to use this soon!

Please sign in to comment.