spl 编写编译器基础框架 ai修复出现的stage2和stage3问题并提供新语法
This commit is contained in:
1 parent
126b979f72
commit
50ee126d44
87 files changed
+3168
-394
No files matched your search
@@ -119,6 +119,10 @@ fn clone_ref(b: *Bld.HirNodeContainer, s: *CloneState, r: Ref): Ref {
|
||||
.ShapeUse(x) => {
|
||||
k = .ShapeUse(.{ .adapter = x.adapter, .shapes = clone_refs(b, s, x.shapes) });
|
||||
},
|
||||
.ShapeCall(x) => {
|
||||
k = .ShapeCall(.{ .adapter = x.adapter, .shapes = clone_refs(b, s, x.shapes),
|
||||
.args = clone_refs(b, s, x.args) });
|
||||
},
|
||||
.AssocBind(x) => { k = .AssocBind(.{ .name = x.name, .ty = clone_ref(b, s, x.ty) }); },
|
||||
.ArrayType(x) => { k = .ArrayType(.{ .len = clone_ref(b, s, x.len), .elem = clone_ref(b, s, x.elem) }); },
|
||||
.SliceType(x) => { k = .SliceType(clone_ref(b, s, x)); },
|
||||
@@ -145,6 +149,8 @@ fn clone_ref(b: *Bld.HirNodeContainer, s: *CloneState, r: Ref): Ref {
|
||||
_ => {},
|
||||
}
|
||||
var out = Bld.construct(b, .{ .kind = k, .tags = clone_refs(b, s, n.tags) });
|
||||
var on = Bld.node_ptr(b, out);
|
||||
if on != null { on.loc = n.loc; }
|
||||
record(s, r, out);
|
||||
ret out;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user