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
13
14
15
use crate::records::path::Path;

pub fn matches_prefix(prefix: &Path, full: &Path) -> bool {
    if prefix.components.len() > full.components.len() {
        return false;
    }

    for i in 0..prefix.components.len() {
        if prefix.components[i] != full.components[i] {
            return false;
        }
    }

    true
}