luaur-compile-cli 0.1.3

Command-line Luau source-to-bytecode compiler (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::enums::compile_format::CompileFormat;

pub fn get_compile_format(name: &str) -> Option<CompileFormat> {
    match name {
        "text" => Some(CompileFormat::Text),
        "binary" => Some(CompileFormat::Binary),
        "remarks" => Some(CompileFormat::Remarks),
        "codegen" => Some(CompileFormat::Codegen),
        "codegenasm" => Some(CompileFormat::CodegenAsm),
        "codegenir" => Some(CompileFormat::CodegenIr),
        "codegenverbose" => Some(CompileFormat::CodegenVerbose),
        "codegennull" => Some(CompileFormat::CodegenNull),
        "null" => Some(CompileFormat::Null),
        _ => None,
    }
}