We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Labels are virtually unused, but they still need to be formatted correctly. If you format:
main() { if (c) L: {s;} }
The formatter produces:
main() { if (c) L: { s; } }
The more indentation, the more spaces before the label, even though it doesn't put a newline there. So if you format:
main() { { { { if (c) L: {s;} } } } }
You get:
main() { { { { if (c) L: { s; } } } } }
Similar behavior happens with loops:
main() { { { { for (;;) L: {s;} while (c) L: {s;} } } } }
Produces:
main() { { { { for (;;) L: { s; } while (c) L: { s; } } } } }
The text was updated successfully, but these errors were encountered:
A labeled else block is also a little wonky, though honestly I'm not sure what the right output should be here:
Before:
main() { { { { if (c) {s;} else L: {s;} } } } }
After:
main() { { { { if (c) { s; } else L: { s; } } } } }
At least it does put the newline here. This formatting might be the best we can do.
Sorry, something went wrong.
No branches or pull requests
Labels are virtually unused, but they still need to be formatted correctly. If you format:
The formatter produces:
The more indentation, the more spaces before the label, even though it doesn't put a newline there. So if you format:
You get:
Similar behavior happens with loops:
Produces:
The text was updated successfully, but these errors were encountered: