1
0
Fork 0
forked from fun/fun

Some code style fixes in the parser and bug fixes. (0.37.61)

This commit is contained in:
Johannes Findeisen 2026-01-24 20:15:25 +01:00
commit 6648fa1e27
3 changed files with 17 additions and 17 deletions

View file

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.10)
project(fun VERSION 0.37.60 LANGUAGES C) project(fun VERSION 0.37.61 LANGUAGES C)
set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_STANDARD_REQUIRED ON)

View file

@ -71,7 +71,7 @@ class Person(number age, string name)
// typeof(instance) will call this and return it // typeof(instance) will call this and return it
return "Class" return "Class"
Class p = Person(33, "Jo") p = Person(33, "Jo")
print(typeof(p)) // -> "Class" print(typeof(p)) // -> "Class"
// p = "nope" // Uncomment to see TypeError: expected Class // p = "nope" // Uncomment to see TypeError: expected Class

View file

@ -3099,7 +3099,7 @@ static void parse_simple_statement(Bytecode *bc, const char *src, size_t len, si
ci = bytecode_add_constant(bc, make_string("")); ci = bytecode_add_constant(bc, make_string(""));
} else if (is_nil) { } else if (is_nil) {
ci = bytecode_add_constant(bc, make_nil()); ci = bytecode_add_constant(bc, make_nil());
} else if (is_class_tkn) { } else if (is_class) {
/* Class-typed variable defaults to Nil until assigned an instance */ /* Class-typed variable defaults to Nil until assigned an instance */
ci = bytecode_add_constant(bc, make_nil()); ci = bytecode_add_constant(bc, make_nil());
} else if (is_boolean) { } else if (is_boolean) {