working + fiddling
This commit is contained in:
parent
d2cb73c2ce
commit
f8523f5b3e
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -213,12 +213,12 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "hbbytecode"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#cfd3eac0a832b61abe57a047aeb14ff8290dd8e6"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#969ea57e3f677ae12b0b5031ad1da8711c71d634"
|
||||
|
||||
[[package]]
|
||||
name = "hblang"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#cfd3eac0a832b61abe57a047aeb14ff8290dd8e6"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#969ea57e3f677ae12b0b5031ad1da8711c71d634"
|
||||
dependencies = [
|
||||
"hashbrown",
|
||||
"hbbytecode",
|
||||
|
@ -229,7 +229,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "hbvm"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#cfd3eac0a832b61abe57a047aeb14ff8290dd8e6"
|
||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#969ea57e3f677ae12b0b5031ad1da8711c71d634"
|
||||
dependencies = [
|
||||
"hbbytecode",
|
||||
]
|
||||
|
|
|
@ -154,7 +154,7 @@ fmt_enum := fn(v: @Any(), str: ^u8, opts: FormatOptions): uint {
|
|||
*@as(^[u8; 2], @bitcast(str + len)) = *@bitcast(".(\0")
|
||||
len += 2
|
||||
len += @inline(fmt_int, @as(usize(T), @bitcast(v)), str + len, 10);
|
||||
*@as(^[u8; 2], @bitcast(str + len)) = *@bitcast(".)\0")
|
||||
*@as(^[u8; 2], @bitcast(str + len)) = *@bitcast(")\0")
|
||||
return len + 2
|
||||
}
|
||||
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
.{log, math} := @use("stn");
|
||||
.{Color} := @use("lib:render")
|
||||
|
||||
Thingy := struct {
|
||||
StructThingy := struct {
|
||||
a: uint,
|
||||
b: int,
|
||||
c: SubThingy,
|
||||
c: SubStructThingy,
|
||||
}
|
||||
|
||||
SubThingy := struct {
|
||||
SubStructThingy := struct {
|
||||
a: f32,
|
||||
b: bool,
|
||||
}
|
||||
|
||||
OtherThingy := enum {
|
||||
EnumThingy := enum {
|
||||
The,
|
||||
TheOther,
|
||||
TheOtherer,
|
||||
}
|
||||
|
||||
test := fn(): uint {
|
||||
log.print("Hello, World!\0", .{log: .Error})
|
||||
log.print(OtherThingy.TheOther, .{})
|
||||
log.print(Thingy.(-100, -100, .(-math.PI, true)), .{log: .Warn})
|
||||
log.print(SubThingy.(-math.E, false), .{})
|
||||
log.print(@nameof(?u8), .{log: .Error})
|
||||
log.print(EnumThingy.The, .{})
|
||||
log.print(StructThingy.(-100, -100, .(-math.PI, true)), .{log: .Warn})
|
||||
log.print(SubStructThingy.(-math.E, false), .{})
|
||||
log.print(Color.{r: 255, g: 254, b: 253, a: 252}, .{radix: 2})
|
||||
log.print(@as(f64, math.LN_2), .{radix: 16, decimal_digits: 1 << 32})
|
||||
log.print([u8].(1, 2, 3), .{})
|
||||
log.print(&SubThingy.(0.0, true), .{})
|
||||
log.print(&SubStructThingy.(0.0, true), .{})
|
||||
log.print(@as(?u32, null), .{})
|
||||
log.print(@as(?u32, 200), .{})
|
||||
|
||||
|
|
Loading…
Reference in a new issue