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
use crate::records::scope::Scope;
use alloc::string::String;

impl Scope {
    pub fn should_warn_global(&self, name: String) -> bool {
        let mut current = Some(self);
        while let Some(scope) = current {
            if scope.globals_to_warn.contains(&name) {
                return true;
            }
            current = scope.parent.as_deref();
        }
        false
    }
}