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

Allow single line blocks for imports and enums #3

Open
Hubro opened this issue Jun 4, 2023 · 0 comments
Open

Allow single line blocks for imports and enums #3

Hubro opened this issue Jun 4, 2023 · 0 comments

Comments

@Hubro
Copy link
Owner

Hubro commented Jun 4, 2023

There are some situations where blocks are (almost) always very short and would be more readable on a single line. For example:

import ietf-inet-types { prefix inet; }
import ietf-routing-types { prefix routing; }

enum "foo" { value 10; }
enum "bar" { value 20; }
enum "baz" { value 30; }

There should be an option (for example -s/--single-line-blocks) that allows certain blocks (just import and enum to begin with) to be drawn on a single line, assuming they only have 1 child statement.

In these cases, post_comments should be rendered behind the entire block rather than right after the opening curly brace.

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