# `ExAST.Diff`
[🔗](https://github.com/elixir-vibe/ex_ast/blob/v0.11.0/lib/ex_ast/diff.ex#L1)

Syntax-aware diffing for Elixir source code.

Parses two source strings with Sourceror, maps structurally similar AST nodes,
and produces a diff result with insert, delete, update, and move edits.

# `option`

```elixir
@type option() :: {:include_moves, boolean()}
```

# `apply`

```elixir
@spec apply(ExAST.Diff.Result.t()) :: String.t()
```

Applies a diff result to the left source, producing the patched output.

Updates and deletes are applied via range replacement. Inserts are placed
at the resolved insertion point based on sibling/parent context.
Move edits are skipped (content unchanged, only order differs).

# `diff`

```elixir
@spec diff(String.t(), String.t(), [option()]) :: ExAST.Diff.Result.t()
```

# `diff_files`

```elixir
@spec diff_files(String.t(), String.t(), [option()]) :: ExAST.Diff.Result.t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
