piece_t Derived Type

type, private :: piece_t

A piece of an output line: a token, or the blanks before one. Its text is src(first:last) (with the token's letter case applied), or blanks blanks if that is positive; it is not copied, so that measuring a line allocates nothing.


Components

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

if positive, the piece is this many blanks instead

integer, public :: first = 1

first byte of the text in the source

integer, public :: last = 0

last byte of the text in the source

integer, public :: tok = 0

token index, or 0 for blanks


Source Code

type :: piece_t
    !! A piece of an output line: a token, or the blanks before one. Its text is `src(first:last)`
    !! (with the token's letter case applied), or `blanks` blanks if that is positive; it is not
    !! copied, so that measuring a line allocates nothing.
    integer :: tok = 0                          !! token index, or 0 for blanks
    integer :: first = 1                        !! first byte of the text in the source
    integer :: last = 0                         !! last byte of the text in the source
    integer :: blanks = 0                       !! if positive, the piece is this many blanks instead
end type piece_t