Format call expressions (without call chaining) (#5341)

## Summary

This formats call expressions with magic trailing comma and parentheses
behaviour but without call chaining

## Test Plan

Lots of new test fixtures, including some that don't work yet
This commit is contained in:
konstin 2023-06-27 11:29:40 +02:00 committed by GitHub
parent 50a7769d69
commit 7f6cb9dfb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 1662 additions and 1853 deletions

View file

@ -13,10 +13,11 @@ impl FormatNodeRule<Keyword> for FormatKeyword {
arg,
value,
} = item;
if let Some(argument) = arg {
write!(f, [argument.format(), text("=")])?;
if let Some(arg) = arg {
write!(f, [arg.format(), text("="), value.format()])
} else {
// Comments after the stars are reassigned as trailing value comments
write!(f, [text("**"), value.format()])
}
value.format().fmt(f)
}
}