fn generate_property_code(&self, args: &FunctionArgMetadata) -> TokenStream {


        if args.is_method() {
            return quote! {};
        }

        let ident_n_api_fn = self.napi_fn_id();

        let register_fn_name = format!("register_{}", ident_n_api_fn);
        let property_name = default_function_property_name(&self.name().to_string());
        let ident_register_fn = Ident::new(&register_fn_name, Span::call_site());
        let property_name_literal = LitStr::new(&property_name, Span::call_site());

        quote! {
            #[node_bindgen::core::ctor]
            fn #ident_register_fn() {

                let property = node_bindgen::core::Property::new(#property_name_literal).method(#ident_n_api_fn);
                node_bindgen::core::submit_property(property);
            }

        }
    }
/// generate code to register this function property to global property
generate code to register this function property to global property
generate code to register this function property to global property
fn generate_property_code(&self, args: &FunctionArgMetadata) -> TokenStream {
        if args.is_method() {
            return quote! {};
        }
        let ident_n_api_fn = self.napi_fn_id();
        let register_fn_name = format!("register_{}", ident_n_api_fn);
        let property_name = default_function_property_name(&self.name().to_string());
        let ident_register_fn = Ident::new(&register_fn_name, Span::call_site());
        let property_name_literal = LitStr::new(&property_name, Span::call_site());
        quote! {
            #[node_bindgen::core::ctor]
            fn #ident_register_fn() {
                let property = node_bindgen::core::Property::new(#property_name_literal).method(#ident_n_api_fn);
                node_bindgen::core::submit_property(property);
            }
        }
    }
fn generate_property_code ( & self , args : & FunctionArgMetadata ) -> TokenStream { if args . is_method ( ) { return quote ! { } ; } let ident_n_api_fn = self . napi_fn_id ( ) ; let register_fn_name = format ! ( " " ident_n_api_fn ) ; let property_name = default_function_property_name ( & self . name ( ) . to_string ( ) ) ; let ident_register_fn = Ident :: new ( & register_fn_name , Span :: call_site ( ) ) ; let property_name_literal = LitStr :: new ( & property_name , Span :: call_site ( ) ) ; quote ! { [ node_bindgen core ctor ] fn ident_register_fn ( ) { let property node_bindgen core Property new ( property_name_literal ) method ( ident_n_api_fn ) node_bindgen core submit_property ( property ) } } }
generate code to register this function property to global property
generate code to register this function property to global property
&self
args
&FunctionArgMetadata