Added $converable / $castable. Simplify and corrected if try/catch parsing. Fix bug with { [A] = 1 }

This commit is contained in:
Christoffer Lerno
2022-07-24 15:01:48 +02:00
committed by Christoffer Lerno
parent 7e0a29ef40
commit 812bd8b3d0
22 changed files with 117 additions and 132 deletions

View File

@@ -88,7 +88,7 @@ struct Allocator
AllocatorFunction function;
}
macro malloc($Type)
macro malloc($Type) @builtin
{
return ($Type*)(mem::alloc($Type.sizeof));
}
@@ -147,7 +147,7 @@ fn void*! realloc_checked(void *ptr, usize new_size, usize alignment = 0)
return thread_allocator.realloc(ptr, new_size, alignment);
}
fn void free(void* ptr)
fn void free(void* ptr) @builtin
{
return thread_allocator.free(ptr)!!;
}