2024-11-23 12:06:48 -06:00
|
|
|
$any := fn($Expr: type): Expr {
|
2024-10-25 10:37:38 -05:00
|
|
|
return *@eca(3, 4, &@as(Expr, idk), @sizeof(Expr))
|
2024-09-13 16:41:31 -05:00
|
|
|
}
|
2024-08-29 15:37:49 -05:00
|
|
|
|
2024-11-23 12:06:48 -06:00
|
|
|
$range := fn($Expr: type, min: Expr, max: Expr): Expr {
|
2024-11-12 14:14:37 -06:00
|
|
|
return *@eca(3, 4, &@as(Expr, idk), @sizeof(Expr)) % (max - min) + *@bitcast(&1) + min
|
2024-11-23 12:06:48 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
$fill := fn($Expr: type, ptr: ^Expr): void {
|
|
|
|
return @eca(3, 4, ptr, @sizeof(Expr))
|
|
|
|
}
|
|
|
|
|
|
|
|
$fill_buffer := fn(buf: ^u8, len: uint): void {
|
|
|
|
return @eca(3, 4, buf, len)
|
2024-08-29 15:37:49 -05:00
|
|
|
}
|