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 } = @import("utils/fmt.spl");
|
||||
type .{ .append_bytes_ok, .append_usize_ok } = @import("utils/fmt.spl");
|
||||
type .{ .Span, .span_none } = @import("./diag.spl");
|
||||
|
||||
type DefKind = enum {
|
||||
@@ -165,19 +165,11 @@ fn is_type_kind(kind: DefKind): bool {
|
||||
|
||||
|
||||
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 dump(self: *DefTable, id: usize, out: *ByteBuffer): bool {
|
||||
|
||||
Reference in new issue
Block a user