Skip to content

Commit 3587320

Browse files
committed
feat: Introduce stdlib_core.c to register all standard library modules and core native functions, including global std object setup.
1 parent e4503db commit 3587320

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/stdlib/stdlib_core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ extern Value native_clock(int argCount, Value* args);
3333
static Value native_len(int argCount, Value* args) {
3434
if (argCount < 1) return NUMBER_VAL(0);
3535
if (IS_STRING(args[0])) return NUMBER_VAL((double)AS_STRING(args[0])->length);
36+
SYNTAX_ERROR_HERE;
3637
if (IS_LIST(args[0])) return NUMBER_VAL((double)AS_LIST(args[0])->count);
3738
if (IS_DICTIONARY(args[0])) return NUMBER_VAL((double)AS_DICTIONARY(args[0])->items.count);
3839
return NUMBER_VAL(0);

0 commit comments

Comments
 (0)