Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract codegen into macro-rules macros (#185)
* extract a `setup_class` macro The procedural macro now generates a call to `setup_class!` which generates the actual code. * copious comments * move constructor definition to a macro-rules macro * introduce setup_constructor macro * add a devcontainer * wip * extract `setup_op_method` * extract `setup_obj_method` * extract `setup_static_method` into a macro * extract `setup_inherent_object_method` * extract setup_static_field_getter * pass in "token tree" description of java type We used to process types in many ways and pass in a number of various. We now generate most of those in declarative macro-rules logic in `java_types.rs` so that we can just pass in token tree description of the java type and let the rest of the code work. * move jni field function to macro-rules * extract `jni_call_fn` into macro-rules * extract `jni_static_call_fn` to macro-rules * extract `prepare_inputs` into macro-rules This lets us avoid the grodiness of having to pass in the self identifier. * break out java-types macros into their own files makes it easier to find them. also, improve comments. * document macro-if and move to separate file --------- Co-authored-by: Niko Matsakis <[email protected]>
- Loading branch information