Vibe.Code.AST (vibe v0.2.0)

Copy Markdown View Source

Single ExAST gateway for structural Elixir search, replace, and diff.

The agent should use this instead of grep for Elixir syntax. rg remains appropriate for plain text, docs, config keys, and non-Elixir assets.

Summary

Functions

Searches for multiple named ExAST patterns in one traversal.

Types

action()

@type action() :: :search | :search_many | :replace | :diff

Functions

run(params)

@spec run(map() | keyword()) :: {:ok, term()} | {:error, String.t()}

search_many(path, patterns, opts \\ [])

@spec search_many(Path.t() | [Path.t()], map() | keyword(), keyword()) :: [map()]

Searches for multiple named ExAST patterns in one traversal.

This is a compact public helper for checks/analyzers that need to scan the same files for several structural patterns without repeatedly reparsing and walking the tree.