polishing
This commit is contained in:
parent
677e081937
commit
3f221ab5ed
|
@ -11,13 +11,16 @@ module YAML_parse
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief do sanity checks
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine YAML_init
|
subroutine YAML_init
|
||||||
|
|
||||||
call selfTest
|
call selfTest
|
||||||
|
|
||||||
end subroutine YAML_init
|
end subroutine YAML_init
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief reads the flow style string and stores it in the form of dictionaries, lists and scalars.
|
!> @brief reads the flow style string and stores it in the form of dictionaries, lists and scalars.
|
||||||
!> @details A node type pointer can either point to a dictionary, list or scalar type entities.
|
!> @details A node type pointer can either point to a dictionary, list or scalar type entities.
|
||||||
|
@ -188,7 +191,8 @@ logical function isKey(line)
|
||||||
if(len(IO_rmComment(line)) == 0) then
|
if(len(IO_rmComment(line)) == 0) then
|
||||||
isKey = .false.
|
isKey = .false.
|
||||||
else
|
else
|
||||||
isKey = IO_rmComment(line(len(IO_rmComment(line)):len(IO_rmComment(line)))) == ':' .and. .not. isFlow(line)
|
isKey = IO_rmComment(line(len(IO_rmComment(line)):len(IO_rmComment(line)))) == ':' &
|
||||||
|
.and. .not. isFlow(line)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
end function isKey
|
end function isKey
|
||||||
|
@ -535,6 +539,7 @@ function to_flow(blck)
|
||||||
|
|
||||||
end function to_flow
|
end function to_flow
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine selfTest()
|
subroutine selfTest()
|
||||||
|
|
||||||
|
@ -567,7 +572,6 @@ subroutine selfTest()
|
||||||
if( isScalar('- a:')) call IO_error(0,ext_msg='isScalar')
|
if( isScalar('- a:')) call IO_error(0,ext_msg='isScalar')
|
||||||
if(.not. isScalar(' a')) call IO_error(0,ext_msg='isScalar')
|
if(.not. isScalar(' a')) call IO_error(0,ext_msg='isScalar')
|
||||||
|
|
||||||
!ToDo :some more advanced tests?
|
|
||||||
basic_list: block
|
basic_list: block
|
||||||
character(len=*), parameter :: block_list = &
|
character(len=*), parameter :: block_list = &
|
||||||
" - Casablanca"//IO_EOL//&
|
" - Casablanca"//IO_EOL//&
|
||||||
|
|
Loading…
Reference in New Issue