"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/onyx",
- "args": ["-verbose", "tests/i32map.onyx"],
+ "args": ["-verbose", "tests/hello_world.onyx"],
"stopAtEntry": true,
"cwd": "~/dev/c/onyx",
"environment": [],
Removals:
Changes:
+* struct literals can now have arbitrary package prefixes on them, i.e.
+ some.deeply.nested.packages.Struct.{ ... };
Bug fixes:
+* globals that were #foreign caused several bugs, which have been squashed.
of technical laziness. Cleaning up these areas will help the language feel
more cohesive and put together.
- [ ] Struct literals can only have 1 level of package before the struct
+ [X] Struct literals can only have 1 level of package before the struct
name. This is because packages were not able to be nested, so having
arbitrary package levels before a struct literal was not necessary.
The following should work when this is patched:
use package core
+TestFoo :: struct { a: i32; }
+
print_foo :: proc () do println("Foo!");
use package core
use package test { foo as foo_pkg }
+use package test as test
Foo :: struct {
data1 : i32;
Bar :: struct {
use foo : Foo;
- bar_data : string;
+ bar_data : str;
// bar_data2 : cstring;
}
return bar;
}
-main :: proc (args: [] cstring) {
+main :: proc (args: [] cstr) {
foo_pkg.print_foo();
+ foo := test.foo.TestFoo.{ a = 1234 };
+ printf("foo.a: %i\n", foo.a);
bar := make_bar();
int main(int argc, char *argv[]) {
- bh_scratch_init(&global_scratch, bh_heap_allocator(), 16 * 1024); // NOTE: 16 KB
+ bh_scratch_init(&global_scratch, bh_heap_allocator(), 128 * 1024); // NOTE: 128 KB
global_scratch_allocator = bh_scratch_allocator(&global_scratch);
bh_managed_heap_init(&global_heap);