luaur_compiler/methods/table_mutation_tracker_visit_constant_folding_alt_f.rs
1use crate::records::table_mutation_tracker::TableMutationTracker;
2use luaur_ast::records::ast_stat_function::AstStatFunction;
3
4impl<'a> TableMutationTracker<'a> {
5 pub fn visit_ast_stat_function(&mut self, node: *mut AstStatFunction) -> bool {
6 if node.is_null() {
7 return true;
8 }
9
10 unsafe {
11 let node_ref = &*node;
12
13 // Adding a method on a table mutates it
14 self.mark_escaped_table_index(node_ref.name, true);
15 }
16
17 true
18 }
19}