Skip to main content

luaur_analysis/methods/
expr_printer_visit_dump_cfg_alt_c.rs

1use crate::records::expr_printer::ExprPrinter;
2use luaur_ast::records::ast_expr_constant_string::AstExprConstantString;
3
4impl ExprPrinter {
5    pub fn visit_ast_expr_constant_string(&mut self, node: *mut AstExprConstantString) -> bool {
6        unsafe {
7            let n = &*node;
8            self.result.push('"');
9            let s = core::slice::from_raw_parts(n.value.data as *const u8, n.value.size as usize);
10            self.result
11                .push_str(&alloc::string::String::from_utf8_lossy(s));
12            self.result.push('"');
13        }
14        false
15    }
16}