# `ExAST.Comments`
[🔗](https://github.com/elixir-vibe/ex_ast/blob/v0.16.0/lib/ex_ast/comments.ex#L1)

Extracts comments from Elixir source while preserving source positions.

# `associated`

```elixir
@spec associated(String.t(), Sourceror.Range.t(), atom()) :: [ExAST.Comment.t()]
```

Returns comments associated with a source range.

Relations are `:comment`, `:before`, `:after`, `:inside`, and `:inline`.
`:comment` includes before, inside, and inline comments.

# `extract`

```elixir
@spec extract(String.t()) :: [ExAST.Comment.t()]
```

# `text`

```elixir
@spec text(String.t()) :: String.t()
```

---

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