Skip to main content

luaur_compiler/methods/
table_mutation_tracker_visit_constant_folding_alt_b.rs

1use crate::records::table_mutation_tracker::TableMutationTracker;
2use luaur_ast::records::ast_expr_table::AstExprTable;
3
4impl<'a> TableMutationTracker<'a> {
5    pub fn visit_ast_expr_table(&mut self, node: *mut AstExprTable) -> bool {
6        unsafe {
7            if node.is_null() {
8                return false;
9            }
10
11            let table_node = &*node;
12
13            for item in table_node.items.as_slice() {
14                if !item.key.is_null() {
15                    self.mark_escaped_impl(item.key);
16                }
17
18                self.mark_escaped_impl(item.value);
19            }
20        }
21
22        true
23    }
24}