Skip to content

Commit

Permalink
delete redundant Analyser.
Browse files Browse the repository at this point in the history
  • Loading branch information
Techatrix committed Apr 27, 2024
1 parent 45095c5 commit e866cb4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/analysis.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3658,14 +3658,13 @@ pub const DeclWithHandle = struct {
pub fn docComments(self: DeclWithHandle, allocator: std.mem.Allocator) error{OutOfMemory}!?[]const u8 {
const tree = self.handle.tree;
return switch (self.decl) {
// TODO: delete redundant `Analyser.`
.ast_node => |node| try Analyser.getDocComments(allocator, tree, node),
.ast_node => |node| try getDocComments(allocator, tree, node),
.function_parameter => |pay| {
const param = pay.get(tree).?;
const doc_comments = param.first_doc_comment orelse return null;
return try Analyser.collectDocComments(allocator, tree, doc_comments, false);
return try collectDocComments(allocator, tree, doc_comments, false);
},
.error_token => |token| try Analyser.getDocCommentsBeforeToken(allocator, tree, token),
.error_token => |token| try getDocCommentsBeforeToken(allocator, tree, token),
else => null,
};
}
Expand Down

0 comments on commit e866cb4

Please sign in to comment.