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

Function get_argument_index

src/engine/function.cpp:371–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369 */
370
371static int32_t get_argument_index( char const * s )
372{
373 if ( s[ 0 ] != '\0')
374 {
375 if ( s[ 1 ] == '\0' )
376 {
377 switch ( s[ 0 ] )
378 {
379 case '<': return 0;
380 case '>': return 1;
381
382 case '1':
383 case '2':
384 case '3':
385 case '4':
386 case '5':
387 case '6':
388 case '7':
389 case '8':
390 case '9':
391 return s[ 0 ] - '1';
392 }
393 }
394 else if ( s[ 0 ] == '1' && s[ 2 ] == '\0' )
395 {
396 switch( s[ 1 ] )
397 {
398 case '0':
399 case '1':
400 case '2':
401 case '3':
402 case '4':
403 case '5':
404 case '6':
405 case '7':
406 case '8':
407 case '9':
408 return s[ 1 ] - '0' + 10 - 1;
409 }
410 }
411 }
412 return -1;
413}
414
415static LIST * function_get_named_variable( JAM_FUNCTION * function,
416 FRAME * frame, OBJECT * name )

Callers 2

var_parse_var_compileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected