Skip to content

Commit

Permalink
update fortran-yaml (#63)
Browse files Browse the repository at this point in the history
* update fortran-yaml

* update fortran-yaml
  • Loading branch information
jornbr authored Apr 15, 2024
1 parent 693c74f commit 665ed01
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/yaml/yaml_settings.F90
Original file line number Diff line number Diff line change
Expand Up @@ -299,17 +299,22 @@ integer function value_get_yaml_style(self, display)
value_get_yaml_style = -1
end function

function get_path(self) result(path)
function get_path(self, include_file) result(path)
class (type_value), target, intent(in) :: self
logical, optional, intent(in) :: include_file
character(len=:), allocatable :: path

logical :: include_file_
class (type_value), pointer :: value
character(len=8) :: strindex

include_file_ = .true.
if (present(include_file)) include_file_ = include_file

path = ''
value => self
do while (associated(value))
if (allocated(value%path)) then
if (allocated(value%path) .and. include_file_) then
if (len(value%path) > 0) then
path = value%path // ':' // path
return
Expand Down

0 comments on commit 665ed01

Please sign in to comment.