Skip to main content

src/yum@yaml@token.erl

-module(yum@yaml@token).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/yum/yaml/token.gleam").
-export_type([block_scalar_style/0, chomp/0, token/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 block_scalar_style() :: literal | folded.

-type chomp() :: clip | strip | keep.

-type token() :: hyphen |
    question_mark |
    colon |
    comma |
    open_sequence |
    close_sequence |
    open_mapping |
    close_mapping |
    hash |
    document_start |
    document_end |
    ampersand |
    asterisk |
    exclamation |
    vertical_bar |
    greater_than |
    single_quote |
    double_quote |
    percent |
    at |
    grave_accent |
    line_break |
    {indentation, integer()} |
    {double_quoted_scalar, binary()} |
    {single_quoted_scalar, binary()} |
    {mapping_key, binary()} |
    {plain_scalar, binary()} |
    {anchor, binary()} |
    {alias, binary()} |
    {tag, binary()} |
    {block_scalar_header, block_scalar_style(), chomp(), integer()} |
    {block_scalar_line, integer(), binary()} |
    {directive, binary(), list(binary())} |
    {escape, binary()} |
    invalid_escape.