| 1061 | } |
| 1062 | |
| 1063 | static LIST * apply_subscript_and_modifiers( STACK * s, int n ) |
| 1064 | { |
| 1065 | LIST * const value = stack_top( s ); |
| 1066 | LIST * const indices = stack_at( s, 1 ); |
| 1067 | LIST * result = L0; |
| 1068 | VAR_EDITS * const edits = (VAR_EDITS *)((LIST * *)stack_get( s ) + 2); |
| 1069 | int const length = list_length( value ); |
| 1070 | string buf[ 1 ]; |
| 1071 | LISTITER indices_iter = list_begin( indices ); |
| 1072 | LISTITER const indices_end = list_end( indices ); |
| 1073 | string_new( buf ); |
| 1074 | for ( ; indices_iter != indices_end; indices_iter = list_next( indices_iter |
| 1075 | ) ) |
| 1076 | { |
| 1077 | LISTITER iter = list_begin( value ); |
| 1078 | LISTITER end = list_end( value ); |
| 1079 | subscript_t const sub = parse_subscript( object_str( list_item( |
| 1080 | indices_iter ) ) ); |
| 1081 | get_iters( sub, &iter, &end, length ); |
| 1082 | result = apply_modifiers_impl( result, buf, edits, n, iter, end ); |
| 1083 | } |
| 1084 | string_free( buf ); |
| 1085 | return result; |
| 1086 | } |
| 1087 | |
| 1088 | |
| 1089 | /* |
no test coverage detected