MCPcopy Create free account
hub / github.com/boostorg/build / apply_subscript_and_modifiers

Function apply_subscript_and_modifiers

src/engine/function.c:1063–1086  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1061}
1062
1063static 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/*

Callers 1

function_runFunction · 0.85

Calls 12

stack_topFunction · 0.85
stack_atFunction · 0.85
stack_getFunction · 0.85
list_lengthFunction · 0.85
list_beginFunction · 0.85
list_endFunction · 0.85
string_newFunction · 0.85
parse_subscriptFunction · 0.85
object_strFunction · 0.85
get_itersFunction · 0.85
apply_modifiers_implFunction · 0.85
string_freeFunction · 0.85

Tested by

no test coverage detected