Summary
Functions
I return {start_line, end_line} for a function definition in a module's source.
Delegates to GtBridge.Analysis.all_functions/1 to avoid duplicating AST logic.
I return the source file path for an object, or nil if unavailable.
I read mod's source file once and pass the contents to fun,
returning whatever fun returns. When the module has no source
file or the file can't be read I return default -- macro-only
modules, BEAM-only deps, etc. fall through cleanly without
raising.
Functions
@spec function_lines(GtBridge.Documentation.t()) :: {pos_integer(), pos_integer()} | nil
I return {start_line, end_line} for a function definition in a module's source.
Delegates to GtBridge.Analysis.all_functions/1 to avoid duplicating AST logic.
@spec function_lines(module(), atom(), non_neg_integer()) :: {pos_integer(), pos_integer()} | nil
I return the source file path for an object, or nil if unavailable.
@spec with_source(module(), default, (String.t() -> default | result)) :: default | result when default: any(), result: any()
I read mod's source file once and pass the contents to fun,
returning whatever fun returns. When the module has no source
file or the file can't be read I return default -- macro-only
modules, BEAM-only deps, etc. fall through cleanly without
raising.
Every analysis pass that walks a module's text (function extraction, alias map, eval preamble, editor session) routes through me so the source-resolution + read + fallback shape lives in one place.