extract_literal Subroutine

public pure subroutine extract_literal(tree, all, prefix, suffix, factor)

This is the public procedure of this module to obtain each literal from AST.

Arguments

Type IntentOptional Attributes Name
type(tree_t), intent(in) :: tree
character(len=:), intent(inout), allocatable :: all
character(len=:), intent(inout), allocatable :: prefix
character(len=:), intent(inout), allocatable :: suffix
character(len=:), intent(inout), allocatable :: factor

Source Code

   pure subroutine extract_literal(tree, all, prefix, suffix, factor)
      implicit none
      type(tree_t), intent(in) :: tree
      character(:), allocatable, intent(inout) :: all, prefix, suffix, factor

      type(literal_t) :: literal

      literal = get_literal(tree)

      all = literal%all%c
      prefix = literal%pref%c
      suffix = literal%suff%c
      factor = literal%fact%c
   end subroutine extract_literal