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

Function parse_var_string

src/engine/function.cpp:2337–2373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2335}
2336
2337static void parse_var_string( char const * first, char const * last,
2338 struct dynamic_array * out )
2339{
2340 char const * saved = first;
2341 while ( first != last )
2342 {
2343 /* Handle whitespace. */
2344 while ( first != last && isspace( *first ) ) ++first;
2345 if ( saved != first )
2346 {
2347 VAR_PARSE_GROUP * const group = var_parse_group_new();
2348 var_parse_group_maybe_add_constant( group, saved, first );
2349 saved = first;
2350 dynamic_array_push( out, group );
2351 }
2352 if ( first == last ) break;
2353
2354 /* Handle non-whitespace */
2355 {
2356 VAR_PARSE_GROUP * group = var_parse_group_new();
2357 for ( ; ; )
2358 {
2359 if ( first == last || isspace( *first ) )
2360 {
2361 var_parse_group_maybe_add_constant( group, saved, first );
2362 saved = first;
2363 break;
2364 }
2365 if ( try_parse_variable( &first, &saved, group ) )
2366 assert( first <= last );
2367 else
2368 ++first;
2369 }
2370 dynamic_array_push( out, group );
2371 }
2372 }
2373}
2374
2375/*
2376 * Given that *s_ points to the character after a "(", parses up to the matching

Callers 2

var_parse_file_compileFunction · 0.85
parse_actionsFunction · 0.85

Calls 3

var_parse_group_newFunction · 0.85
try_parse_variableFunction · 0.85

Tested by

no test coverage detected