A2UICore.Functions.System (A2UICore v0.1.1)

Copy Markdown View Source

Functions the runtime supplies to every catalog: the @ namespace.

v1.0 defines @index, which evaluates to the iteration index of the collection template being rendered (plus an optional offset). Catalogs need not declare these; A2UICore.Catalog.Basic registers them so a catalog can evaluate them.

Summary

Functions

The system functions available to a protocol version (none before v1.0).

Evaluates @index. Outside a collection scope with a context it is a validation error; without any context it is just the offset.

Functions

functions(version)

(since 0.1.0)
@spec functions(String.t()) :: [A2UICore.Catalog.Function.t()]

The system functions available to a protocol version (none before v1.0).

index(args, context)

(since 0.1.0)
@spec index(map(), A2UICore.Resolution.DataContext.t() | nil) ::
  {:ok, integer()} | {:error, A2UICore.Error.t()}

Evaluates @index. Outside a collection scope with a context it is a validation error; without any context it is just the offset.