Skip to content

Pretty-printing support for words that aren't broken relative to their neighbour #422

@graydon

Description

@graydon

Given the way the pretty printer is structured, generating a token at a time, it'd probably be useful to have token types that the pretty printer considered effectively "indivisible" with the word before (or after, or both) them. Otherwise we have to mix stringifying with adjacent tokens.

Examples are "::", "." and ";", as well as possibly the opening and closing parens mentioned in #419. We should never really be breaking after foo in "foo::bar" or "foo.bar" or "foo;" but we do sometimes.

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