tomlf_diagnostic Module

Diagnostic message support for TOML Fortran



Variables

Type Visibility Attributes Name Initial
type(level_enum), public, parameter :: toml_level = level_enum()

Actual enumerator values


Interfaces

public interface render

  • private pure recursive function render_diagnostic(diag, input, color) result(string)

    Arguments

    Type IntentOptional Attributes Name
    type(toml_diagnostic), intent(in) :: diag
    character(len=*), intent(in) :: input
    type(toml_terminal), intent(in) :: color

    Return Value character(len=:), allocatable

  • private function render_text(input, color, source) result(string)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: input
    type(toml_terminal), intent(in) :: color
    character(len=*), intent(in), optional :: source

    Return Value character(len=:), allocatable

  • private function render_text_with_label(input, label, color, source) result(string)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: input
    type(toml_label), intent(in) :: label
    type(toml_terminal), intent(in) :: color
    character(len=*), intent(in), optional :: source

    Return Value character(len=:), allocatable

  • private pure function render_text_with_labels(input, label, color, source) result(string)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: input
    type(toml_label), intent(in) :: label(:)
    type(toml_terminal), intent(in) :: color
    character(len=*), intent(in), optional :: source

    Return Value character(len=:), allocatable

public interface toml_diagnostic

  • private pure function new_diagnostic(level, message, source, label) result(new)

    Create new diagnostic message

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: level

    Level of message

    character(len=*), intent(in), optional :: message

    Primary message

    character(len=*), intent(in), optional :: source

    Context of the diagnostic source

    type(toml_label), intent(in), optional :: label(:)

    Messages associated with this diagnostic

    Return Value type(toml_diagnostic)

public interface toml_label

  • private pure function new_label(level, first, last, text, primary) result(new)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: level
    integer, intent(in) :: first
    integer, intent(in) :: last
    character(len=*), intent(in), optional :: text
    logical, intent(in), optional :: primary

    Return Value type(toml_label)


Derived Types

type, public ::  toml_diagnostic

Definition of diagnostic message

Components

Type Visibility Attributes Name Initial
type(toml_label), public, allocatable :: label(:)

Messages associated with this diagnostic

integer, public :: level

Level of message

character(len=:), public, allocatable :: message

Primary message

character(len=:), public, allocatable :: source

Context of the diagnostic source

Constructor

private pure function new_diagnostic (level, message, source, label)

Create new diagnostic message

type, public ::  toml_label

Components

Type Visibility Attributes Name Initial
integer, public :: first

First and last character of message

integer, public :: last

First and last character of message

integer, public :: level

Level of message

logical, public :: primary

Primary message

character(len=:), public, allocatable :: source

Identifier of context

character(len=:), public, allocatable :: text

Message text

Constructor

private pure function new_label (level, first, last, text, primary)