Fixed the code style in *.c files to two spaces indentation and add a linter named funstx to Fun. (0.39.0)
This commit is contained in:
parent
33001a7ad2
commit
03b2532474
237 changed files with 17550 additions and 13911 deletions
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @file enumerate.c
|
||||
* @file enumerate.c
|
||||
* @brief Implements the OP_ENUMERATE opcode for enumerating arrays in the VM.
|
||||
*
|
||||
* This file handles the OP_ENUMERATE instruction, which creates an array of [index, value] pairs
|
||||
|
|
@ -32,13 +32,13 @@
|
|||
*/
|
||||
|
||||
case OP_ENUMERATE: {
|
||||
Value arr = pop_value(vm);
|
||||
if (arr.type != VAL_ARRAY) {
|
||||
fprintf(stderr, "Runtime type error: ENUMERATE expects array\n");
|
||||
exit(1);
|
||||
}
|
||||
Value out = bi_enumerate(&arr);
|
||||
free_value(arr);
|
||||
push_value(vm, out);
|
||||
break;
|
||||
Value arr = pop_value(vm);
|
||||
if (arr.type != VAL_ARRAY) {
|
||||
fprintf(stderr, "Runtime type error: ENUMERATE expects array\n");
|
||||
exit(1);
|
||||
}
|
||||
Value out = bi_enumerate(&arr);
|
||||
free_value(arr);
|
||||
push_value(vm, out);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue