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

Function apply_subscript_and_modifiers

v2/engine/function.c:1104–1127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1102}
1103
1104static 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/*

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