Skip to content

Pretty-printing binops should have lower affinity somehow #421

@graydon

Description

@graydon

When printing a binop expression containing fn calls, we wind up wrapping rather late:

foo(a, b, c) + bar(d, e, f)

will sometimes print as

foo(a, b, c) + bar(d, e,
                   f)

rather than

foo(a, b, c)
+ bar(d, e, f)

or similar (+ could be on the previous line, whatever). It seems like maybe extra boxes or higher-precedence boxes or something should enclose the fn calls?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-prettyArea: Pretty printing (including `-Z unpretty`)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions