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

Method docstring_of

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

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

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