fn transform_function_name(ident: &Ident) -> TransformedFunctionName {
    //  Get namespace e.g. `os`
    let fname = ident.to_string();
    let namespace = get_namespace(&fname);
    //  !("namespace: {:#?}", namespace);
    //  Get namespace prefix e.g. `os_`
    let namespace_prefix = 
        if namespace.len() > 0 { 
            format!("{}_", namespace).to_string()  //  e.g. `os_`
        } else {
            "".to_string()
        };
    // Transform the function name based on namespace.
    assert!(fname.starts_with(&namespace_prefix));
    let fname_without_namespace = &fname[namespace_prefix.len()..];
    let fname_token = Ident::new(&fname, ident.span());
    let fname_without_namespace_token = Ident::new(&fname_without_namespace, ident.span());
    //  Return the transformed function name.
    TransformedFunctionName {
        ident:                      Box::new(fname.clone()),
        namespace:                  Box::new(namespace.to_string()),
        without_namespace:          Box::new(fname_without_namespace.to_string()),
        token:                      Box::new(fname_token),
        without_namespace_token:    Box::new(fname_without_namespace_token),
        ident_span:                 Box::new(ident.span()),
    }
}
/// Transform the extern function name e.g. `os_task_init`
Transform the extern function name e.g.
Transform the extern function name e . g .
fn transform_function_name(ident: &Ident) -> TransformedFunctionName {
    //  Get namespace e.g. `os`
    let fname = ident.to_string();
    let namespace = get_namespace(&fname);
    //  !("namespace: {:#?}", namespace);
    //  Get namespace prefix e.g. `os_`
    let namespace_prefix = 
        if namespace.len() > 0 { 
            format!("{}_", namespace).to_string()  //  e.g. `os_`
        } else {
            "".to_string()
        };
    // Transform the function name based on namespace.
    assert!(fname.starts_with(&namespace_prefix));
    let fname_without_namespace = &fname[namespace_prefix.len()..];
    let fname_token = Ident::new(&fname, ident.span());
    let fname_without_namespace_token = Ident::new(&fname_without_namespace, ident.span());
    //  Return the transformed function name.
    TransformedFunctionName {
        ident:                      Box::new(fname.clone()),
        namespace:                  Box::new(namespace.to_string()),
        without_namespace:          Box::new(fname_without_namespace.to_string()),
        token:                      Box::new(fname_token),
        without_namespace_token:    Box::new(fname_without_namespace_token),
        ident_span:                 Box::new(ident.span()),
    }
}
fn transform_function_name ( ident : & Ident ) -> TransformedFunctionName { //  Get namespace e.g. `os` let fname = ident . to_string ( ) ; let namespace = get_namespace ( & fname ) ; //  !("namespace: {:#?}", namespace); //  Get namespace prefix e.g. `os_` let namespace_prefix = if namespace . len ( ) > 0 { format ! ( " " namespace ) . to_string ( ) //  e.g. `os_` } else { " " . to_string ( ) } ; // Transform the function name based on namespace. assert ! ( fname starts_with ( namespace_prefix ) ) ; let fname_without_namespace = & fname [ namespace_prefix . len ( ) .. ] ; let fname_token = Ident :: new ( & fname , ident . span ( ) ) ; let fname_without_namespace_token = Ident :: new ( & fname_without_namespace , ident . span ( ) ) ; //  Return the transformed function name. TransformedFunctionName { ident : Box :: new ( fname . clone ( ) ) , namespace : Box :: new ( namespace . to_string ( ) ) , without_namespace : Box :: new ( fname_without_namespace . to_string ( ) ) , token : Box :: new ( fname_token ) , without_namespace_token : Box :: new ( fname_without_namespace_token ) , ident_span : Box :: new ( ident . span ( ) ) , } }
Transform the extern function name e.g.
Transform the extern function name e . g .
ident
&Ident
ident
&Ident