The open constructs, outermost first.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(scope_t), | public, | allocatable | :: | s(:) |
storage; only |
||
| integer, | public | :: | top | = | 0 |
number of open constructs |
open a construct
Open construct sc, growing the storage as needed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(scope_stack_t), | intent(inout) | :: | self |
the stack |
||
| type(scope_t), | intent(in) | :: | sc |
the construct to open |
replace the open constructs by saved ones
Replace the open constructs by scopes (outermost first).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(scope_stack_t), | intent(inout) | :: | self |
the stack |
||
| type(scope_t), | intent(in) | :: | scopes(:) |
a saved stack (see stack_snapshot) |
the open constructs, to save
The open constructs, outermost first.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(scope_stack_t), | intent(in) | :: | self |
the stack |
type :: scope_stack_t !! The open constructs, outermost first. type(scope_t), allocatable :: s(:) !! storage; only `s(1:top)` is in use integer :: top = 0 !! number of open constructs contains procedure :: push => stack_push !! open a construct procedure :: restore => stack_restore !! replace the open constructs by saved ones procedure :: snapshot => stack_snapshot !! the open constructs, to save end type scope_stack_t