tomlf_de_token Module

Provides a definition for a token


Variables

Type Visibility Attributes Name Initial
type(enum_token), public, parameter :: token_kind = enum_token()

Actual enumerator for token kinds


Interfaces

public interface resize

Reallocate a list of tokens

  • private pure subroutine resize_token(var, n)

    Reallocate list of tokens

    Arguments

    Type IntentOptional Attributes Name
    type(toml_token), intent(inout), allocatable :: var(:)

    Instance of the array to be resized

    integer, intent(in), optional :: n

    Dimension of the final array size


Derived Types

type, public ::  toml_token

Token containing

Components

Type Visibility Attributes Name Initial
integer, public :: chunk = 0

Identifier for the chunk index in case of buffered reading

integer, public :: first = 0

Starting position of the token in character stream

integer, public :: kind = token_kind%newline

Kind of token

integer, public :: last = 0

Last position of the token in character stream


Functions

public pure function stringify(token) result(str)

Represent a token as string

Arguments

Type IntentOptional Attributes Name
type(toml_token), intent(in) :: token

Token to represent as string

Return Value character(len=:), allocatable

String representation of token