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
use crate::records::recursion_counter::RecursionCounter;
use luaur_common::macros::luau_assert::LUAU_ASSERT;

impl RecursionCounter {
    pub fn drop_recursion_counter(&mut self) {
        unsafe {
            LUAU_ASSERT!(*self.count > 0);
            *self.count -= 1;
        }
    }
}

impl Drop for RecursionCounter {
    fn drop(&mut self) {
        self.drop_recursion_counter();
    }
}