![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_HAS_KEY opcode for map key checking in the VM. More...
Go to the source code of this file.
Functions | |
| if (m.type !=VAL_MAP||key.type !=VAL_STRING) | |
| free_value (m) | |
| free_value (key) | |
| push_value (vm, make_int(ok ? 1 :0)) | |
Variables | |
| case | OP_HAS_KEY |
| Value | m = pop_value(vm) |
| int | ok = map_has(&m, key.s ? key.s : "") |
| break | |
Implements the OP_HAS_KEY opcode for map key checking in the VM.
This file handles the OP_HAS_KEY instruction, which checks if a map contains a specific key.
Behavior:
Error Handling:
Definition in file has_key.c.
| free_value | ( | key | ) |
| free_value | ( | m | ) |
| if | ( | m.type ! | = VAL_MAP || key.type != VAL_STRING | ) |