luaur_analysis/methods/lint_table_operations_visit_linter.rs
1//! C++ `LintTableOperations::visit(AstExprUnary*)` (`Analysis/src/Linter.cpp:2610`).
2
3use crate::records::lint_table_operations::LintTableOperations;
4use luaur_ast::records::ast_expr::AstExpr;
5use luaur_ast::records::ast_expr_unary::{AstExprUnary, AstExprUnaryOp};
6
7impl LintTableOperations {
8 pub fn visit_ast_expr_unary(&mut self, node: *mut AstExprUnary) -> bool {
9 unsafe {
10 if (*node).op == AstExprUnaryOp::Len {
11 self.check_indexer(node as *mut AstExpr, (*node).expr, "#");
12 }
13 }
14
15 true
16 }
17}