Kreuzberg.CodeStructureItem (kreuzberg v4.9.5)

Copy Markdown View Source

Structural code element (function, class, method, etc.).

Fields

  • :kind - Item kind (e.g. "function", "class", "method")
  • :name - Item name
  • :visibility - Visibility modifier (e.g. "public", "private")
  • :span - Source span
  • :children - Nested structure items
  • :decorators - Decorators/annotations
  • :doc_comment - Associated doc comment
  • :signature - Function/method signature
  • :body_span - Span of the body block

Summary

Types

t()

@type t() :: %Kreuzberg.CodeStructureItem{
  body_span: Kreuzberg.CodeSpan.t() | nil,
  children: [t()],
  decorators: [String.t()],
  doc_comment: String.t() | nil,
  kind: String.t(),
  name: String.t() | nil,
  signature: String.t() | nil,
  span: Kreuzberg.CodeSpan.t(),
  visibility: String.t() | nil
}

Functions

from_map(data)

@spec from_map(map()) :: t()

to_map(item)

@spec to_map(t()) :: map()