| 1102 | } |
| 1103 | |
| 1104 | static LIST * apply_subscript_and_modifiers( STACK * s, int n ) |
| 1105 | { |
| 1106 | LIST * const value = stack_top( s ); |
| 1107 | LIST * const indices = stack_at( s, 1 ); |
| 1108 | LIST * result = L0; |
| 1109 | VAR_EDITS * const edits = (VAR_EDITS *)((LIST * *)stack_get( s ) + 2); |
| 1110 | int const length = list_length( value ); |
| 1111 | string buf[ 1 ]; |
| 1112 | LISTITER indices_iter = list_begin( indices ); |
| 1113 | LISTITER const indices_end = list_end( indices ); |
| 1114 | string_new( buf ); |
| 1115 | for ( ; indices_iter != indices_end; indices_iter = list_next( indices_iter |
| 1116 | ) ) |
| 1117 | { |
| 1118 | LISTITER iter = list_begin( value ); |
| 1119 | LISTITER end = list_end( value ); |
| 1120 | subscript_t const sub = parse_subscript( object_str( list_item( |
| 1121 | indices_iter ) ) ); |
| 1122 | get_iters( sub, &iter, &end, length ); |
| 1123 | result = apply_modifiers_impl( result, buf, edits, n, iter, end ); |
| 1124 | } |
| 1125 | string_free( buf ); |
| 1126 | return result; |
| 1127 | } |
| 1128 | |
| 1129 | |
| 1130 | /* |
no test coverage detected