Skip to content

Preserve column-sensitive block layouts - #1302

Open
dearlordylord wants to merge 9 commits into
bendlang:mainfrom
dearlordylord:fix/formatter-inline-layout
Open

dearlordylord wants to merge 9 commits into
bendlang:mainfrom
dearlordylord:fix/formatter-inline-layout

Conversation

@dearlordylord

Copy link
Copy Markdown

Preserve declarations containing inline case rows or unsupported do layouts while formatting neighbours. Only single-line do NAME<NAME>: headers with the first statement on the next line are formatted.

Old formatter output (fails to parse):

import Base
def main() -> IO(Unit):
  do IO<Unit>: IO.print("a")
    IO.print("b")

def other() -> U32:
  0

Fixed formatter output:

import Base
def main() -> IO(Unit):
  do IO<Unit>: IO.print("a")
               IO.print("b")

def other() -> U32:
  0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant