luaur-ast 0.1.1

Lexer, parser, and AST for Luau (faithful Rust port).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::records::printer::Printer;
use crate::records::writer::Writer;
use crate::type_aliases::cst_node_map::CstNodeMap;

impl<'a> Printer<'a> {
    pub fn new(writer: &'a mut dyn Writer, cst_node_map: CstNodeMap) -> Self {
        Self {
            write_types: false,
            writer,
            cst_node_map,
        }
    }
}

#[allow(non_snake_case)]
pub fn printer_printer<'a>(writer: &'a mut dyn Writer, cst_node_map: CstNodeMap) -> Printer<'a> {
    Printer::new(writer, cst_node_map)
}