Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aeon formatter #33

Open
2 tasks
alcides opened this issue Mar 2, 2024 · 0 comments
Open
2 tasks

Aeon formatter #33

alcides opened this issue Mar 2, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@alcides
Copy link
Owner

alcides commented Mar 2, 2024

Just like go has gofmt, and other languages have the equivalent, we want an option in the aeon compiler that automatically formats sugar files.

To implement:

  • The sugar parser/AST should be more of a concrete syntax tree (consider blank lines and comments)
  • A pretty printer should take the sugar AST and return a properly formatted file (ideally parameterized by whether we want terminal colors for highlighting errors on the terminal, and by the line length.

A pretty good resource for this is Phillip Wadler's Prettier Pretty Printer and its several implementations on Github.

@alcides alcides added good first issue Good for newcomers enhancement New feature or request help wanted Extra attention is needed labels Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant