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

[DX] standard formatter #20

Open
xieyuheng opened this issue Sep 6, 2022 · 1 comment
Open

[DX] standard formatter #20

xieyuheng opened this issue Sep 6, 2022 · 1 comment

Comments

@xieyuheng
Copy link
Member

Problem:

We need a standard formatter.

To help users avoid arguing about code formating.

Solution 1:

Implement formatExp and formatStmt(s).

These functions should take formatting context as argument,
and recurse down the Exp and Stmt.

Solution 2:

Learn from prettier API, and write prettier plugin.

https://prettier.io/docs/en/plugins.html

@xieyuheng
Copy link
Member Author

Will be useful in online playground: https://cicada-lang.org/playground/

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

No branches or pull requests

1 participant