diff options
| author | Loris Cro <kappaloris@gmail.com> | 2022-01-21 18:52:42 +0100 |
|---|---|---|
| committer | Loris Cro <kappaloris@gmail.com> | 2022-01-21 22:00:57 +0100 |
| commit | ba55e32ef2d8ed5875bff8524fbbb05c6d8afd40 (patch) | |
| tree | 69ebd7c14a837c3d3d2e148df4a6037429140054 /src/AstGen.zig | |
| parent | 1f56ff8343ef07d2d04d4a596b3f03f61230a753 (diff) | |
| download | zig-ba55e32ef2d8ed5875bff8524fbbb05c6d8afd40.tar.gz zig-ba55e32ef2d8ed5875bff8524fbbb05c6d8afd40.zip | |
add function param doc comment info in zir
Diffstat (limited to 'src/AstGen.zig')
| -rw-r--r-- | src/AstGen.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index c6b4e6e866..5a05209f4c 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -9721,8 +9721,12 @@ const GenZir = struct { try gz.astgen.extra.ensureUnusedCapacity(gpa, @typeInfo(Zir.Inst.Param).Struct.fields.len + param_body.len); + const doc_comment_index = try gz.astgen.docCommentAsString(abs_tok_index - + @boolToInt(tag == .param_comptime)); + const payload_index = gz.astgen.addExtraAssumeCapacity(Zir.Inst.Param{ .name = name, + .doc_comment = doc_comment_index, .body_len = @intCast(u32, param_body.len), }); gz.astgen.extra.appendSliceAssumeCapacity(param_body); |
