| ... | ... | @@ -797,6 +797,7 @@ const DocData = struct { |
| 797 | 797 | binOp: BinOp, |
| 798 | 798 | binOpIndex: usize, |
| 799 | 799 | load: usize, // index in `exprs` |
| 800 | ref: usize, // index in `exprs` |
| 800 | 801 | const BinOp = struct { |
| 801 | 802 | lhs: usize, // index in `exprs` |
| 802 | 803 | rhs: usize, // index in `exprs` |
| ... | ... | @@ -1521,6 +1522,23 @@ fn walkInstruction( |
| 1521 | 1522 | .expr = .{ .load = load_idx }, |
| 1522 | 1523 | }; |
| 1523 | 1524 | }, |
| 1525 | .ref => { |
| 1526 | const un_tok = data[inst_index].un_tok; |
| 1527 | const operand = try self.walkRef( |
| 1528 | file, |
| 1529 | parent_scope, |
| 1530 | parent_src, |
| 1531 | un_tok.operand, |
| 1532 | need_type, |
| 1533 | call_ctx, |
| 1534 | ); |
| 1535 | const ref_idx = self.exprs.items.len; |
| 1536 | try self.exprs.append(self.arena, operand.expr); |
| 1537 | |
| 1538 | return DocData.WalkResult{ |
| 1539 | .expr = .{ .ref = ref_idx }, |
| 1540 | }; |
| 1541 | }, |
| 1524 | 1542 | |
| 1525 | 1543 | // @check array_cat and array_mul |
| 1526 | 1544 | .add, |