You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Over the past two years, the style team has settled on a Rust style that uses exclusively four-space indentation
Each level of indentation must be four spaces (that is, all indentation
outside of string literals and comments must be a multiple of four).
and discourages any form of "visual" alignment meaning whitespace within a line to align tokens on vertical column boundaries. Please find the complete formatting guidelines RFC in rust-lang/rfcs#2436.
I find that the heavily visually aligned style in nom's documentation looks very out of place in modern Rust code formatted according to the style team guidelines. Notice the two-space indentation, the one line indented by 11 spaces to achieve visual alignment, and the visual alignment of the hex_primary and >> tokens in the following snippet from the readme.
It would be valuable to redesign how we intend for nom macro invocations to be formatted in modern Rust code, adjusting the input syntax of macros as necessary to arrive at a style that is harmonious with the one being pushed by the style team.
The text was updated successfully, but these errors were encountered:
The documentation should display a well thought-out style regardless of whether that style is implemented in rustfmt.
Yes, I believe any DSL embedded in Rust should follow a style that is harmonious with the Rust style to the extent possible. I believe it is possible to come up with a style for nom parsers that does this better.
Over the past two years, the style team has settled on a Rust style that uses exclusively four-space indentation
and discourages any form of "visual" alignment meaning whitespace within a line to align tokens on vertical column boundaries. Please find the complete formatting guidelines RFC in rust-lang/rfcs#2436.
I find that the heavily visually aligned style in nom's documentation looks very out of place in modern Rust code formatted according to the style team guidelines. Notice the two-space indentation, the one line indented by 11 spaces to achieve visual alignment, and the visual alignment of the
hex_primary
and>>
tokens in the following snippet from the readme.It would be valuable to redesign how we intend for nom macro invocations to be formatted in modern Rust code, adjusting the input syntax of macros as necessary to arrive at a style that is harmonious with the one being pushed by the style team.
The text was updated successfully, but these errors were encountered: