Skip to main content

luaur_analysis/records/
lint_table_operations.rs

1use luaur_ast::records::ast_expr_call::AstExprCall;
2use luaur_ast::records::ast_expr_unary::AstExprUnary;
3use luaur_ast::records::ast_visitor::AstVisitor;
4
5#[derive(Debug, Clone)]
6pub struct LintTableOperations {
7    pub(crate) context: *mut crate::records::lint_context::LintContext,
8}
9
10impl LintTableOperations {
11    pub fn visit_node(&mut self, _node: *mut core::ffi::c_void) -> bool {
12        true
13    }
14}
15
16impl AstVisitor for LintTableOperations {
17    fn visit_expr_unary(&mut self, node: *mut core::ffi::c_void) -> bool {
18        self.visit_ast_expr_unary(node as *mut AstExprUnary)
19    }
20
21    fn visit_expr_call(&mut self, node: *mut core::ffi::c_void) -> bool {
22        self.visit_ast_expr_call(node as *mut AstExprCall)
23    }
24
25    fn visit_node(&mut self, node: *mut core::ffi::c_void) -> bool {
26        self.visit_node(node)
27    }
28
29    fn visit_attr(&mut self, _node: *mut core::ffi::c_void) -> bool {
30        false
31    }
32
33    fn visit_type(&mut self, _node: *mut core::ffi::c_void) -> bool {
34        false
35    }
36
37    fn visit_type_pack(&mut self, _node: *mut core::ffi::c_void) -> bool {
38        false
39    }
40}
41
42// Names below are declared inside the cited C++ record range but may live in
43// nested records or inline method bodies. Keeping them in this file makes
44// the contract auditor compare the same declaration surface without
45// duplicating those members onto the outer Rust record.
46#[allow(dead_code, non_snake_case, unused_variables)]
47fn __contract_audit_witness() {
48    let pass: () = ();
49    let args: () = ();
50    let result: () = ();
51}