statement_list_t Derived Type

type, public :: statement_list_t

The items of a source text, in order.


Inherits

type~~statement_list_t~~InheritsGraph type~statement_list_t statement_list_t type~statement_t statement_t type~statement_list_t->type~statement_t s

Inherited by

type~~statement_list_t~~InheritedByGraph type~statement_list_t statement_list_t type~source_t source_t type~source_t->type~statement_list_t stmts

Components

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

number of items

type(statement_t), public, allocatable :: s(:)

storage; only s(1:n) is in use


Type-Bound Procedures

procedure, public :: push

append an item

  • private subroutine push(self, s)

    Append item s, growing the storage as needed.

    Arguments

    Type IntentOptional Attributes Name
    class(statement_list_t), intent(inout) :: self

    the item list

    type(statement_t), intent(in) :: s

    item to append

Source Code

type, public :: statement_list_t
    !! The items of a source text, in order.
    type(statement_t), allocatable :: s(:)   !! storage; only `s(1:n)` is in use
    integer :: n = 0                         !! number of items
contains
    procedure :: push                        !! append an item
end type statement_list_t