luaur-compiler 0.1.3

Luau source-to-bytecode compiler (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::enums::type_constant_folding::Type;
use crate::records::constant::Constant;
use crate::type_aliases::compile_constant::CompileConstant;

pub fn set_compile_constant_boolean(constant: CompileConstant, b: bool) {
    let target = constant as *mut Constant;

    unsafe {
        (*target).r#type = Type::Type_Boolean;
        (*target).data.value_boolean = b;
    }
}