Skip to main content

luaur_analysis/methods/
lint_unreachable_code_visit.rs

1use crate::records::lint_unreachable_code::LintUnreachableCode;
2use luaur_ast::records::ast_expr_function::AstExprFunction;
3use luaur_ast::records::ast_stat::AstStat;
4
5impl LintUnreachableCode {
6    pub fn visit(&mut self, node: *mut AstExprFunction) -> bool {
7        let node_ref = unsafe { &*node };
8        if !node_ref.body.is_null() {
9            self.analyze(node_ref.body as *mut AstStat);
10        }
11        true
12    }
13}