mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
parent
7af408f58d
commit
394495d307
9 changed files with 14 additions and 52 deletions
|
@ -21,22 +21,14 @@ use crate::{Ast, Buf};
|
|||
/// The number of spaces to indent.
|
||||
pub const INDENT: u16 = 4;
|
||||
|
||||
pub fn fmt_default_spaces(
|
||||
buf: &mut Buf<'_>,
|
||||
spaces: &[CommentOrNewline<'_>],
|
||||
indent: u16,
|
||||
) {
|
||||
pub fn fmt_default_spaces(buf: &mut Buf<'_>, spaces: &[CommentOrNewline<'_>], indent: u16) {
|
||||
if spaces.is_empty() {
|
||||
buf.spaces(1);
|
||||
} else {
|
||||
fmt_spaces(buf, spaces.iter(), indent);
|
||||
}
|
||||
}
|
||||
pub fn fmt_default_newline(
|
||||
buf: &mut Buf<'_>,
|
||||
spaces: &[CommentOrNewline<'_>],
|
||||
indent: u16,
|
||||
) {
|
||||
pub fn fmt_default_newline(buf: &mut Buf<'_>, spaces: &[CommentOrNewline<'_>], indent: u16) {
|
||||
if spaces.is_empty() {
|
||||
buf.newline();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue