1 | use crate::algorithm::Printer; |
---|---|
2 | use syn::File; |
3 | |
4 | impl Printer { |
5 | pub fn file(&mut self, file: &File) { |
6 | self.cbox(indent:0); |
7 | if let Some(shebang: &String) = &file.shebang { |
8 | self.word(wrd:shebang.clone()); |
9 | self.hardbreak(); |
10 | } |
11 | self.inner_attrs(&file.attrs); |
12 | for item: &Item in &file.items { |
13 | self.item(item); |
14 | } |
15 | self.end(); |
16 | } |
17 | } |
18 |