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

Method docstring_of

codegraph-kernel/src/go.rs:409–411  ·  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

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

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