MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / docstring_of

Method docstring_of

codegraph-kernel/src/go.rs:407–409  ·  view source on GitHub ↗

docstringFor (tree-sitter.ts) — the preceding comment run, looked up from the declaration wrapper when there is one, without the comments that trail the code above it (docstringSkipsTrailingComments) or that don't end on the line right above it, past a blank line (docstringSkipsDetachedComments), and without directives like `//go:embed` in its text (docstringSkipsDirectives).

(&self, node: Node<'t>)

Source from the content-addressed store, hash-verified

405 /// (docstringSkipsDetachedComments), and without directives like
406 /// `//go:embed` in its text (docstringSkipsDirectives).
407 fn docstring_of(&self, node: Node<'t>) -> Option<String> {
408 preceding_go_doc_comment(self.declaration_wrapper(node).unwrap_or(node), self.src)
409 }
410
411 // --- visitNode ------------------------------------------------------------
412

Callers 4

extract_functionMethod · 0.45
extract_methodMethod · 0.45
extract_type_aliasMethod · 0.45
extract_variableMethod · 0.45

Calls 2

preceding_go_doc_commentFunction · 0.85
declaration_wrapperMethod · 0.45

Tested by

no test coverage detected