stage2 ai重构
This commit is contained in:
1 parent
4c0317fcb5
commit
2c531f23de
26 files changed
+1251
-1578
No files matched your search
+3
-11
@@ -7,7 +7,7 @@ type .{ .Error } = @import("utils/error.spl");
|
||||
type .{ .Vec } = @import("utils/vec.spl");
|
||||
type .{ .ByteView } = @import("utils/byte_view.spl");
|
||||
type .{ .ByteBuffer } = @import("utils/byte_buffer.spl");
|
||||
type .{ .append_usize, .append_i64 } = @import("utils/fmt.spl");
|
||||
type .{ .append_usize, .append_i64, .append_bytes_ok, .append_usize_ok } = @import("utils/fmt.spl");
|
||||
|
||||
type AttrStage = enum {
|
||||
Sema,
|
||||
@@ -203,19 +203,11 @@ fn register_builtins(self: *Attr) {
|
||||
|
||||
|
||||
fn push_out(buf: *ByteBuffer, bytes: []u8): bool {
|
||||
match ByteBuffer.append(buf, bytes) {
|
||||
.Ok => { ret true; },
|
||||
.Err(error) => { ret false; },
|
||||
}
|
||||
ret false;
|
||||
ret append_bytes_ok(buf, bytes);
|
||||
}
|
||||
|
||||
fn push_usize(buf: *ByteBuffer, value: usize): bool {
|
||||
match append_usize(buf, value, 10, false) {
|
||||
.Ok => { ret true; },
|
||||
.Err(error) => { ret false; },
|
||||
}
|
||||
ret false;
|
||||
ret append_usize_ok(buf, value);
|
||||
}
|
||||
|
||||
fn push_hex(buf: *ByteBuffer, value: u32): bool {
|
||||
|
||||
Reference in new issue
Block a user