# `ExAST.Selector.Predicate`
[🔗](https://github.com/elixir-vibe/ex_ast/blob/v0.11.0/lib/ex_ast/selector.ex#L12)

Predicate used by `ExAST.Selector.where/2`.

Build predicates with `ExAST.Selector.parent/1`, `ancestor/1`,
`has_child/1`, `has_descendant/1`, or `has/1`. Negate them with
`ExAST.Selector.not/1`.

# `relation`

```elixir
@type relation() ::
  :parent
  | :ancestor
  | :has_child
  | :has_descendant
  | :any
  | :all
  | :follows
  | :precedes
  | :immediately_follows
  | :immediately_precedes
  | :first
  | :last
  | :nth
  | :captures
  | :comment
  | :comment_before
  | :comment_after
  | :comment_inside
  | :comment_inline
```

# `t`

```elixir
@type t() :: %ExAST.Selector.Predicate{
  negated?: boolean(),
  pattern: ExAST.Pattern.pattern() | [t()] | pos_integer() | nil,
  relation: relation()
}
```

---

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