Copy a given path object, this is the implementation of the assignment left = right.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(aot_path_type), | intent(inout) | :: | left |
Object to assign a path to |
||
type(aot_path_type), | intent(in) | :: | right |
Path to be copied |
subroutine aot_path_copy(left, right) !> Object to assign a path to type(aot_path_type), intent(inout) :: left !> Path to be copied type(aot_path_type), intent(in) :: right type(aot_path_node_type), pointer :: curNode call aot_fin_path(left) left%LuaFilename = right%LuaFilename left%roothandle = right%roothandle if (associated(right%globalNode)) then allocate(left%globalNode) left%globalNode%NodeType = right%globalNode%NodeType left%globalNode%ID_kind = right%globalNode%ID_kind left%globalNode%key = right%globalNode%key left%globalNode%pos = right%globalNode%pos left%head => left%globalNode curNode => right%globalNode do while(associated(curNode%child)) allocate(left%head%child) curNode => curNode%child left%head => left%head%child left%head%NodeType = curNode%NodeType left%head%ID_kind = curNode%ID_kind left%head%key = curNode%key left%head%pos = curNode%pos end do end if end subroutine aot_path_copy