ffmt_directives Module

Formatter directives in comments, which protect code from formatting:

  • !& at the end of a statement keeps the statement exactly as it is.
  • !&< on a line of its own starts a region that is kept exactly as it is, and !&> ends it.

Uses

  • module~~ffmt_directives~~UsesGraph module~ffmt_directives ffmt_directives module~ffmt_statements ffmt_statements module~ffmt_directives->module~ffmt_statements module~ffmt_tokens ffmt_tokens module~ffmt_directives->module~ffmt_tokens module~ffmt_statements->module~ffmt_tokens module~ffmt_strings ffmt_strings module~ffmt_statements->module~ffmt_strings module~ffmt_tokens->module~ffmt_strings

Used by

  • module~~ffmt_directives~~UsedByGraph module~ffmt_directives ffmt_directives module~ffmt_source ffmt_source module~ffmt_source->module~ffmt_directives module~ffmt_case ffmt_case module~ffmt_case->module~ffmt_source module~ffmt_format ffmt_format module~ffmt_format->module~ffmt_source module~ffmt_format->module~ffmt_case module~ffmt_layout ffmt_layout module~ffmt_format->module~ffmt_layout module~ffmt_linebreak ffmt_linebreak module~ffmt_format->module~ffmt_linebreak module~ffmt_relational ffmt_relational module~ffmt_format->module~ffmt_relational module~ffmt_structure ffmt_structure module~ffmt_format->module~ffmt_structure module~ffmt_use_sort ffmt_use_sort module~ffmt_format->module~ffmt_use_sort module~ffmt_whitespace ffmt_whitespace module~ffmt_format->module~ffmt_whitespace module~ffmt_layout->module~ffmt_source module~ffmt_layout->module~ffmt_case module~ffmt_layout->module~ffmt_structure module~ffmt_layout->module~ffmt_whitespace module~ffmt_linebreak->module~ffmt_source module~ffmt_relational->module~ffmt_source module~ffmt_structure->module~ffmt_source module~ffmt_use_sort->module~ffmt_source module~ffmt_whitespace->module~ffmt_source module~ffmt_cli ffmt_cli module~ffmt_cli->module~ffmt_format

Variables

Type Visibility Attributes Name Initial
integer, private, parameter :: DIR_KEEP = 1

none, !&, !&<, !&>

integer, private, parameter :: DIR_NONE = 0

none, !&, !&<, !&>

integer, private, parameter :: DIR_OFF = 2

none, !&, !&<, !&>

integer, private, parameter :: DIR_ON = 3

none, !&, !&<, !&>


Functions

private function directive(src, t)

Formatter directive (one of the DIR_* constants) of a comment token.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: src

source text

type(token_t), intent(in) :: t

a comment token of src

Return Value integer

public function protected_items(src, tokens, stmts) result(keep)

True for each item that must be written exactly as it is: statements with a !& comment, and everything from a !&< line to the next !&> line, both included.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: src

source text

type(token_list_t), intent(in) :: tokens

tokens of src

type(statement_list_t), intent(in) :: stmts

items of tokens

Return Value logical, allocatable, (:)