fdoc

typescan_tprivate

Reading an expression.

Components

NameTypeAttributesDefaultDescription
kindintegerT_END

the kind of the current token

numberinteger0

the value of an integer token

posinteger1

where the next token starts

textcharacter(len=:)allocatable

the expression

wordcharacter(len=:)allocatable

the current token

Source

Show the code
type :: scan_t
    !! Reading an expression.
    character(len=:), allocatable :: text   !! the expression
    integer :: pos = 1                      !! where the next token starts
    integer :: kind = T_END                 !! the kind of the current token
    character(len=:), allocatable :: word   !! the current token
    integer :: number = 0                   !! the value of an integer token
end type scan_t