luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! C++ `LintTableOperations::visit(AstExprUnary*)` (`Analysis/src/Linter.cpp:2610`).

use crate::records::lint_table_operations::LintTableOperations;
use luaur_ast::records::ast_expr::AstExpr;
use luaur_ast::records::ast_expr_unary::{AstExprUnary, AstExprUnaryOp};

impl LintTableOperations {
    pub fn visit_ast_expr_unary(&mut self, node: *mut AstExprUnary) -> bool {
        unsafe {
            if (*node).op == AstExprUnaryOp::Len {
                self.check_indexer(node as *mut AstExpr, (*node).expr, "#");
            }
        }

        true
    }
}