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

Function parse_var_string

v2/engine/function.c:2102–2138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2100}
2101
2102static void parse_var_string( char const * first, char const * last,
2103 struct dynamic_array * out )
2104{
2105 char const * saved = first;
2106 while ( first != last )
2107 {
2108 /* Handle whitespace. */
2109 while ( first != last && isspace( *first ) ) ++first;
2110 if ( saved != first )
2111 {
2112 VAR_PARSE_GROUP * const group = var_parse_group_new();
2113 var_parse_group_maybe_add_constant( group, saved, first );
2114 saved = first;
2115 dynamic_array_push( out, group );
2116 }
2117 if ( first == last ) break;
2118
2119 /* Handle non-whitespace */
2120 {
2121 VAR_PARSE_GROUP * group = var_parse_group_new();
2122 for ( ; ; )
2123 {
2124 if ( first == last || isspace( *first ) )
2125 {
2126 var_parse_group_maybe_add_constant( group, saved, first );
2127 saved = first;
2128 break;
2129 }
2130 if ( try_parse_variable( &first, &saved, group ) )
2131 assert( first <= last );
2132 else
2133 ++first;
2134 }
2135 dynamic_array_push( out, group );
2136 }
2137 }
2138}
2139
2140/*
2141 * start should point to the character immediately following the opening "@(",

Callers 2

parse_actionsFunction · 0.85
parse_at_fileFunction · 0.85

Calls 3

var_parse_group_newFunction · 0.85
try_parse_variableFunction · 0.85

Tested by

no test coverage detected