# `Feel.Dialect`
[🔗](https://github.com/FeeJai/BDM/blob/feel-v0.1.0/apps/feel/lib/feel/dialect.ex#L1)

The dialects of FEEL that an expression can be prepared in (D-49).

  * `:feel` - FEEL as clause 10 of DMN 1.6 defines it. The default.
  * `:s_feel` - S-FEEL, the subset of clause 9. It is a restriction of the **syntax**: what it
    accepts, FEEL runs with its own semantics, so it changes how an expression is read
    (`Feel.Syntax.SFeel`) and nothing about how it runs.
  * `:b_feel` - B-FEEL, clause 11. It has the grammar of FEEL and different **semantics**: an
    error does not make a result `null` but gives a value of the type the operation returns. It
    is not written yet, and runs as FEEL.

The dialect is chosen when an expression is prepared, as a model chooses it with the language of
an expression, and it goes with the prepared expression (`Feel.Expression.dialect/1`) into every run
of it. A run cannot choose another.

    iex> Feel.Dialect.all()
    [:feel, :s_feel, :b_feel]

# `t`

```elixir
@type t() :: :feel | :s_feel | :b_feel
```

A dialect of FEEL.

# `all`

```elixir
@spec all() :: [t(), ...]
```

Returns every dialect.

# `valid?`

```elixir
@spec valid?(term()) :: boolean()
```

Returns `true` for a dialect.

    iex> Feel.Dialect.valid?(:s_feel)
    true
    iex> Feel.Dialect.valid?(:feel_2)
    false

# `validate!`

```elixir
@spec validate!(term()) :: t()
```

Returns the dialect, or raises `ArgumentError` when it is not one.

    iex> Feel.Dialect.validate!(:b_feel)
    :b_feel
    iex> Feel.Dialect.validate!(:bogus)
    ** (ArgumentError) expected :dialect to be :feel, :s_feel, or :b_feel, got: :bogus

---

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