Skip to content

go/printer: unhappy formatting of const declaration #4808

@griesemer

Description

@griesemer
in go/parser/interface.go:

const (
    PackageClauseOnly Mode             = 1 << iota // parsing stops after package clause
    ImportsOnly                                    // parsing stops after import declarations
    ParseComments                                  // parse comments and add them to AST
    Trace                                          // print a trace of parsed productions
    DeclarationErrors                              // report declaration errors
    SpuriousErrors                                 // same as AllErrors, for backward-compatibility
    AllErrors         = SpuriousErrors             // report all (not just the first 10) errors per file
)

One would expect the "=" to line up. The algorithm for that layout has been
tweaked many times, though. Revisit at some point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions