Some code style fixes in the parser and bug fixes. (0.37.61)
This commit is contained in:
parent
29db3bc63e
commit
6648fa1e27
3 changed files with 17 additions and 17 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue