Skip to main content

luaur_common/functions/
is_fallthrough.rs

1use crate::enums::luau_opcode::LuauOpcode;
2
3#[allow(non_snake_case)]
4pub fn isFallthrough(op: LuauOpcode) -> bool {
5    match op {
6        LuauOpcode::LOP_RETURN
7        | LuauOpcode::LOP_JUMP
8        | LuauOpcode::LOP_JUMPBACK
9        | LuauOpcode::LOP_JUMPX => false,
10        _ => true,
11    }
12}
13
14pub fn is_fallthrough(op: LuauOpcode) -> bool {
15    isFallthrough(op)
16}