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
16
17
use crate::records::to_string_options::ToStringOptions;

pub fn dump_options() -> &'static mut ToStringOptions {
    static mut OPTIONS: Option<ToStringOptions> = None;

    unsafe {
        if OPTIONS.is_none() {
            let mut opts = ToStringOptions::to_string_options(true);
            opts.exhaustive = true;
            opts.function_type_arguments = true;
            opts.max_table_length = 0;
            opts.max_type_length = 0;
            OPTIONS = Some(opts);
        }
        OPTIONS.as_mut().unwrap_unchecked()
    }
}