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

Function arg_list_compile_builtin

src/engine/function.cpp:3617–3656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3615}
3616
3617static struct arg_list * arg_list_compile_builtin( char const * * args,
3618 int32_t * num_arguments )
3619{
3620 if ( args )
3621 {
3622 struct argument_list_compiler c[ 1 ];
3623 struct arg_list * result;
3624 argument_list_compiler_init( c );
3625 while ( *args )
3626 {
3627 struct argument_compiler arg_comp[ 1 ];
3628 struct arg_list arg;
3629 argument_compiler_init( arg_comp );
3630 for ( ; *args; ++args )
3631 {
3632 OBJECT * token;
3633 if ( strcmp( *args, ":" ) == 0 )
3634 {
3635 ++args;
3636 break;
3637 }
3638 token = object_new( *args );
3639 argument_compiler_add( arg_comp, token, constant_builtin, -1 );
3640 object_free( token );
3641 }
3642 arg = arg_compile_impl( arg_comp, constant_builtin, -1 );
3643 dynamic_array_push( c->args, arg );
3644 argument_compiler_free( arg_comp );
3645 }
3646 *num_arguments = c->args->size;
3647 result = (struct arg_list *)BJAM_MALLOC( c->args->size * sizeof( struct arg_list ) );
3648 if ( c->args->size != 0 )
3649 memcpy( result, c->args->data,
3650 c->args->size * sizeof( struct arg_list ) );
3651 argument_list_compiler_free( c );
3652 return result;
3653 }
3654 *num_arguments = 0;
3655 return 0;
3656}
3657
3658static void argument_list_print( struct arg_list * args, int32_t num_args )
3659{

Callers 1

function_builtinFunction · 0.85

Calls 8

argument_compiler_initFunction · 0.85
object_newFunction · 0.85
argument_compiler_addFunction · 0.85
object_freeFunction · 0.85
arg_compile_implFunction · 0.85
argument_compiler_freeFunction · 0.85

Tested by

no test coverage detected