luaur-common 0.1.3

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
14
15
16
use crate::enums::luau_opcode::LuauOpcode;

#[allow(non_snake_case)]
pub fn isFallthrough(op: LuauOpcode) -> bool {
    match op {
        LuauOpcode::LOP_RETURN
        | LuauOpcode::LOP_JUMP
        | LuauOpcode::LOP_JUMPBACK
        | LuauOpcode::LOP_JUMPX => false,
        _ => true,
    }
}

pub fn is_fallthrough(op: LuauOpcode) -> bool {
    isFallthrough(op)
}