luaur-common 0.1.1

Foundational data structures and flags for the luaur Luau-in-Rust toolchain.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::enums::luau_opcode::LuauOpcode;

#[allow(non_snake_case)]
pub fn isLoopJump(op: LuauOpcode) -> bool {
    match op {
        LuauOpcode::LOP_JUMPBACK | LuauOpcode::LOP_FORGLOOP | LuauOpcode::LOP_FORNLOOP => true,
        _ => false,
    }
}

pub fn is_loop_jump(op: LuauOpcode) -> bool {
    isLoopJump(op)
}