stack_snapshot Function

private pure function stack_snapshot(self) result(scopes)

The open constructs, outermost first.

Type Bound

scope_stack_t

Arguments

Type IntentOptional Attributes Name
class(scope_stack_t), intent(in) :: self

the stack

Return Value type(scope_t), allocatable, (:)


Called by

proc~~stack_snapshot~~CalledByGraph proc~stack_snapshot scope_stack_t%stack_snapshot proc~analyze_structure analyze_structure proc~analyze_structure->proc~stack_snapshot proc~format_pass format_pass proc~format_pass->proc~analyze_structure proc~format_text format_text proc~format_text->proc~format_pass proc~relayout relayout proc~format_text->proc~relayout proc~relayout->proc~format_pass proc~process_text process_text proc~process_text->proc~format_text proc~process_file process_file proc~process_file->proc~process_text proc~process_stdin process_stdin proc~process_stdin->proc~process_text proc~run run proc~run->proc~process_file proc~run->proc~process_stdin

Source Code

pure function stack_snapshot(self) result(scopes)
    !! The open constructs, outermost first.
    class(scope_stack_t), intent(in) :: self  !! the stack
    type(scope_t), allocatable :: scopes(:)
    if (allocated(self%s)) then
        scopes = self%s(1:self%top)
    else
        allocate (scopes(0))
    end if
end function stack_snapshot