Beamscope.ErlangForms (Beamscope v0.1.1)

Copy Markdown View Source

Shared :epp parsing used by both ErlangChunker and the call-graph extractor: parses a file in-process and filters out forms that originated in an -include'd header rather than the file itself.

:epp inlines the forms of every included file directly into the form list, marking file boundaries with {:attribute, _, :file, {Filename, _}} pseudo-forms. Each source file is processed independently elsewhere in the pipeline, so forms belonging to an included header are dropped here — otherwise a shared header's content would be duplicated (and have its text/line-numbers misattributed) under every file that includes it.

Summary

Types

parse_result()

@type parse_result() :: {:ok, [tuple()], partial? :: boolean()} | {:error, term()}

Functions

deep_max_line(term, acc \\ 0)

@spec deep_max_line(term(), non_neg_integer()) :: non_neg_integer()

parse_owned_forms(path, include_dirs \\ [])

@spec parse_owned_forms(String.t(), [String.t()]) :: parse_result()