![]() | Fun 0.41.5 The programming language that makes You have fun |
VM opcode snippet for writing a Fun Value as JSON to a file. More...
Go to the source code of this file.
Functions | |
| free_value (vpretty) | |
| free_value (any) | |
| free_value (vpath) | |
| push_value (vm, make_int(0)) | |
Variables | |
| case | OP_JSON_TO_FILE |
| Value | any = pop_value(vm) |
| Value | vpath = pop_value(vm) |
| break | |
VM opcode snippet for writing a Fun Value as JSON to a file.
Implements the OP_JSON_TO_FILE instruction. Expects a pretty-print flag, a Value to serialize, and a path. Serializes the Value via json-c and writes it to the specified file path.
Build gating: compiled only when FUN_WITH_JSON is enabled. Otherwise the opcode consumes three arguments and pushes 0 (failure).
Stack effect (with FUN_WITH_JSON):
Errors and edge cases:
Definition in file to_file.c.
| free_value | ( | any | ) |
| free_value | ( | vpath | ) |
| free_value | ( | vpretty | ) |
| push_value | ( | vm | , |
| make_int(0) | ) |