aot_path_copy Subroutine

private subroutine aot_path_copy(left, right)

Copy a given path object, this is the implementation of the assignment left = right.


Type IntentOptional AttributesName
type(aot_path_type), intent(inout) :: left

Object to assign a path to

type(aot_path_type), intent(in) :: right

Path to be copied


proc~~aot_path_copy~~CallsGraph proc~aot_path_copy aot_path_copy proc~aot_fin_path aot_fin_path proc~aot_path_copy->proc~aot_fin_path proc~aot_path_delnode aot_path_delNode proc~aot_fin_path->proc~aot_path_delnode

Called by

proc~~aot_path_copy~~CalledByGraph proc~aot_path_copy aot_path_copy interface~assignment(=) assignment(=) interface~assignment(=)->proc~aot_path_copy


Source Code

Source Code

  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
      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))
        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