Skip to main content

luaur_code_gen/functions/
is_jump_d.rs

1use luaur_common::enums::luau_opcode::LuauOpcode;
2
3pub fn is_jump_d(op: LuauOpcode) -> bool {
4    matches!(
5        op,
6        LuauOpcode::LOP_JUMP
7            | LuauOpcode::LOP_JUMPIF
8            | LuauOpcode::LOP_JUMPIFNOT
9            | LuauOpcode::LOP_JUMPIFEQ
10            | LuauOpcode::LOP_JUMPIFLE
11            | LuauOpcode::LOP_JUMPIFLT
12            | LuauOpcode::LOP_JUMPIFNOTEQ
13            | LuauOpcode::LOP_JUMPIFNOTLE
14            | LuauOpcode::LOP_JUMPIFNOTLT
15            | LuauOpcode::LOP_FORNPREP
16            | LuauOpcode::LOP_FORNLOOP
17            | LuauOpcode::LOP_FORGPREP
18            | LuauOpcode::LOP_FORGLOOP
19            | LuauOpcode::LOP_FORGPREP_INEXT
20            | LuauOpcode::LOP_FORGPREP_NEXT
21            | LuauOpcode::LOP_JUMPBACK
22            | LuauOpcode::LOP_JUMPXEQKNIL
23            | LuauOpcode::LOP_JUMPXEQKB
24            | LuauOpcode::LOP_JUMPXEQKN
25            | LuauOpcode::LOP_JUMPXEQKS
26            | LuauOpcode::LOP_CMPPROTO
27    )
28}