The value of an @"..." literal, decoded when the expression is prepared.
The text is read as DMN 1.6 writes a date, a time, a date and time or a duration (Feel.Value.Temporal). If it is
none of them, and the extensions that are on spell it another way (Feel.Extension.temporal_text/1, D-81), it is
read as the DMN 1.6 string it stands for, and that is an :info with the code :temporal_spelling, at the literal. If
nothing reads it, it is an error of the expression (the specification does not say whether it is that or null),
and where the text is one of the spellings that are known, the hint says how DMN 1.6 writes it.
iex> {:ok, value, []} = Feel.Analysis.AtLiterals.value("13:30:00", %{span: {0, 11}}, Feel.Extensions.none())
iex> value.hour
13
iex> {:error, [error]} = Feel.Analysis.AtLiterals.value("13:30", %{span: {0, 8}}, Feel.Extensions.none())
iex> {error.code, error.hint}
{:argument_out_of_domain, ~s(DMN 1.6 writes it @"13:30:00")}
iex> {:ok, value, [info]} = Feel.Analysis.AtLiterals.value("13:30", %{span: {0, 8}}, Feel.Extensions.new([:camunda]))
iex> {value.hour, info.code, info.severity, info.span}
{13, :temporal_spelling, :info, {0, 8}}
Summary
Functions
Returns the value of the literal with the infos that reading it gave, or the error. meta is the metadata of the
literal, with its :span.
Functions
@spec value(String.t(), %{span: Feel.Diagnostic.span()}, Feel.Extensions.t()) :: {:ok, Feel.Value.t(), [Feel.Diagnostic.t()]} | {:error, [Feel.Diagnostic.t(), ...]}
Returns the value of the literal with the infos that reading it gave, or the error. meta is the metadata of the
literal, with its :span.