Skip to content

Conversation

@avh4
Copy link
Contributor

@avh4 avh4 commented Nov 15, 2022

After this PR, https://github.com/gren-lang/example-projects can now be safely formatted! (At least the main branch; I'll check 0.2 branch next)

  • retain comments within top-level value declarations...
    • before each argument pattern
    • before =
    • between = and the body
    • after the body (indented, before the next freshline)
  • retain comments within let expressions...
    • between let keyword and first declaration
    • between declarations
    • after declaration bodies (indented)
    • between last declaration and in keyword
    • between in keyword and body
  • retain comments within lambda expressions...
    • between \ and first arg
    • between args
    • between last arg and ->
    • between -> and body

@avh4 avh4 changed the title [WIP] format: retain comments in expression bodies [WIP] format: retain comments in expression bodies (value decls, let, lambda) Nov 16, 2022
@avh4 avh4 changed the title [WIP] format: retain comments in expression bodies (value decls, let, lambda) format: retain comments in expression bodies (value decls, let, lambda) Nov 16, 2022
@avh4 avh4 marked this pull request as ready for review November 16, 2022 05:45
@robinheghan
Copy link
Member

Would you mind merging with main before I review?

@avh4
Copy link
Contributor Author

avh4 commented Nov 27, 2022

Ready!

@robinheghan robinheghan merged commit 5ec14c1 into gren-lang:main Nov 27, 2022
@avh4 avh4 deleted the retain-comments/4-expression-bodies branch November 27, 2022 21:01
@avh4 avh4 mentioned this pull request Nov 28, 2022
31 tasks
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.

2 participants