1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::algorithm::Printer;
use syn::File;

impl Printer {
    pub fn file(&mut self, file: &File) {
        self.cbox(0);
        if let Some(shebang) = &file.shebang {
            self.word(shebang.clone());
            self.hardbreak();
        }
        self.inner_attrs(&file.attrs);
        for item in &file.items {
            self.item(item);
        }
        self.end();
    }
}