luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::records::expr_printer::ExprPrinter;
use luaur_ast::records::ast_expr_constant_string::AstExprConstantString;

impl ExprPrinter {
    pub fn visit_ast_expr_constant_string(&mut self, node: *mut AstExprConstantString) -> bool {
        unsafe {
            let n = &*node;
            self.result.push('"');
            let s = core::slice::from_raw_parts(n.value.data as *const u8, n.value.size as usize);
            self.result
                .push_str(&alloc::string::String::from_utf8_lossy(s));
            self.result.push('"');
        }
        false
    }
}