valkyrie-ast 0.0.11

Strong typed abstract syntax tree of valkyrie language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::*;

impl PrettyPrint for ClassDeclaration {
    // fn indent_fmt(&self, f: &mut IndentFormatter) -> core::fmt::Result {
    //     f.write_str("class")?;
    //
    //     f.write_char('}')
    // }

    fn build<'a>(&self, allocator: &'a PrettyProvider<'a>) -> PrettyTree<'a> {
        let head = allocator.keyword("class");
        let name = self.namepath.build(allocator);
        head.append(name)
    }
}