luaur-analysis 0.1.0

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::functions::subsumes_scope::subsumes;
use crate::records::scope::Scope;

/// `inline Scope* max(Scope* left, Scope* right)` (Scope.h:126-132).
/// Returns the inner (more-specific) of two scopes.
pub fn max(left: *mut Scope, right: *mut Scope) -> *mut Scope {
    if subsumes(left, right) {
        right
    } else {
        left
    }
}