Skip to main content

luaur_analysis/functions/
dump_options.rs

1use crate::records::to_string_options::ToStringOptions;
2
3pub fn dump_options() -> &'static mut ToStringOptions {
4    static mut OPTIONS: Option<ToStringOptions> = None;
5
6    unsafe {
7        if OPTIONS.is_none() {
8            let mut opts = ToStringOptions::to_string_options(true);
9            opts.exhaustive = true;
10            opts.function_type_arguments = true;
11            opts.max_table_length = 0;
12            opts.max_type_length = 0;
13            OPTIONS = Some(opts);
14        }
15        OPTIONS.as_mut().unwrap_unchecked()
16    }
17}