Cerbero.Migration.Parser (cerbero v0.1.0)

Copy Markdown View Source

Static AST analysis of migration source. Never compiles or executes user code: Ecto's DSL macros call the private, repo-bound Ecto.Migration.Runner, so interception would mean replicating private API. Cost: dynamically-generated operations are invisible — they are emitted as %Unknown{}, never silence.

Summary

Functions

parse_dir(dir)

@spec parse_dir(Path.t()) :: {:ok, [Cerbero.Migration.t()]} | {:error, term()}

parse_file(path)

@spec parse_file(Path.t()) :: {:ok, Cerbero.Migration.t()} | {:error, term()}

parse_string(source, file \\ "inline.exs")

@spec parse_string(String.t(), Path.t()) ::
  {:ok, Cerbero.Migration.t()} | {:error, term()}