is_literal_tree_node Function

private pure function is_literal_tree_node(node) result(res)

Arguments

Type IntentOptional Attributes Name
type(tree_node_t), intent(in) :: node

Return Value logical


Source Code

   pure function is_literal_tree_node(node) result(res)
      implicit none
      type(tree_node_t), intent(in) :: node
      logical :: res

      res = .false.

      if (.not. allocated(node%c)) return

      if (node%op == op_char .and. size(node%c) == 1) then
         if (node%c(1)%min == node%c(1)%max) then
            res = .true.
         end if
      end if
   end function is_literal_tree_node