@@ -1276,7 +1276,7 @@ contains |
| 1276 | 1276 | end function |
| 1277 | 1277 | |
| 1278 | 1278 | subroutine expand_variables(token, expanded, shell, was_quoted_in) |
| 1279 | | - use expansion, only: expand_braces, arithmetic_expansion_shell, process_param_expansion |
| 1279 | + use expansion, only: expand_braces, arithmetic_expansion_shell |
| 1280 | 1280 | character(len=*), intent(in) :: token |
| 1281 | 1281 | character(len=:), allocatable, intent(out) :: expanded |
| 1282 | 1282 | type(shell_state_t), intent(inout) :: shell |
@@ -1644,7 +1644,7 @@ contains |
| 1644 | 1644 | var_name = working_token(var_start:i-2) |
| 1645 | 1645 | |
| 1646 | 1646 | ! Process parameter expansion |
| 1647 | | - call process_param_expansion(var_name, var_value, shell) |
| 1647 | + call process_parameter_expansion(var_name, var_value, shell) |
| 1648 | 1648 | if (allocated(var_value) .and. len(var_value) > 0) then |
| 1649 | 1649 | call ensure_result_cap(j + len_trim(var_value)) |
| 1650 | 1650 | result(j:j+len_trim(var_value)-1) = trim(var_value) |
@@ -2541,18 +2541,9 @@ contains |
| 2541 | 2541 | end do |
| 2542 | 2542 | end function |
| 2543 | 2543 | |
| 2544 | | - ! Delegate to expansion module's canonical implementation (issue #12 consolidation) |
| 2544 | + ! Canonical implementation — expansion module's process_param_expansion is being |
| 2545 | + ! brought to feature parity (issue #12). Delegation deferred until all edge cases pass. |
| 2545 | 2546 | recursive subroutine process_parameter_expansion(param_expr, result_value, shell) |
| 2546 | | - use expansion, only: process_param_expansion |
| 2547 | | - character(len=*), intent(in) :: param_expr |
| 2548 | | - character(len=:), allocatable, intent(out) :: result_value |
| 2549 | | - type(shell_state_t), intent(inout) :: shell |
| 2550 | | - call process_param_expansion(param_expr, result_value, shell) |
| 2551 | | - end subroutine |
| 2552 | | - |
| 2553 | | - ! Original implementation preserved below for reference during validation. |
| 2554 | | - ! TODO: Remove after confirming all tests pass with delegation. |
| 2555 | | - subroutine process_parameter_expansion_old(param_expr, result_value, shell) |
| 2556 | 2547 | use variables, only: get_array_element, get_array_all_elements, get_array_size, & |
| 2557 | 2548 | is_associative_array, get_assoc_array_value, get_assoc_array_keys, & |
| 2558 | 2549 | set_shell_variable, is_shell_variable_set, check_nounset, & |
@@ -3613,7 +3604,7 @@ contains |
| 3613 | 3604 | end if |
| 3614 | 3605 | end if |
| 3615 | 3606 | end if |
| 3616 | | - end subroutine process_parameter_expansion_old |
| 3607 | + end subroutine |
| 3617 | 3608 | |
| 3618 | 3609 | subroutine process_tilde_expansion(token, pos, result, result_pos, shell) |
| 3619 | 3610 | character(len=*), intent(in) :: token |