mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Capture import params location for better errors
This commit is contained in:
parent
f0fe0a3ea6
commit
90c7745989
6 changed files with 24 additions and 16 deletions
|
@ -252,14 +252,14 @@ impl<'a> Formattable for ModuleImportParams<'a> {
|
|||
fn is_multiline(&self) -> bool {
|
||||
let ModuleImportParams { before, params } = self;
|
||||
|
||||
!before.is_empty() || is_collection_multiline(params)
|
||||
!before.is_empty() || is_collection_multiline(¶ms.value)
|
||||
}
|
||||
|
||||
fn format_with_options(&self, buf: &mut Buf, _parens: Parens, newlines: Newlines, indent: u16) {
|
||||
let ModuleImportParams { before, params } = self;
|
||||
|
||||
fmt_default_spaces(buf, before, indent);
|
||||
fmt_collection(buf, indent, Braces::Curly, *params, newlines);
|
||||
fmt_collection(buf, indent, Braces::Curly, params.value, newlines);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue