Current section

Files

Jump to
jsonlogic src jsonlogic@internal@rule.erl
Raw

src/jsonlogic@internal@rule.erl

-module(jsonlogic@internal@rule).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/jsonlogic/internal/rule.gleam").
-export_type([rule/0, json_literal/0]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
?MODULEDOC(false).
-type rule() :: {literal, json_literal()} |
{operation, jsonlogic@internal@operator:operator(), list(rule())}.
-type json_literal() :: {bool_literal, boolean()} |
{string_literal, binary()} |
{int_literal, integer()} |
{float_literal, float()} |
{array_literal, list(rule())} |
nil_literal.