mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Fix some bugs found via fuzzing
* Keywords need to still be recognized if they're followed by ',' as well as a bunch of other operator characters. Notably missing from this list is '-', since that would mess up expect-fx currently. * Smattering of niche cases of formatting bugs (either non-idempotency, leading to different code, or leading to unparsable code) * One missing indent call in fmt_collection leading to a panic
This commit is contained in:
parent
8fd83a483b
commit
550113df67
11 changed files with 152 additions and 6 deletions
|
@ -2094,7 +2094,7 @@ pub fn merge_spaces<'a>(
|
|||
fn expr_to_pattern_help<'a>(arena: &'a Bump, expr: &Expr<'a>) -> Result<Pattern<'a>, ()> {
|
||||
let mut expr = expr.extract_spaces();
|
||||
|
||||
if let Expr::ParensAround(loc_expr) = &expr.item {
|
||||
while let Expr::ParensAround(loc_expr) = &expr.item {
|
||||
let expr_inner = loc_expr.extract_spaces();
|
||||
|
||||
expr.before = merge_spaces(arena, expr.before, expr_inner.before);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue