module Anyolite::Macro
Overview
Helper methods which should not be used for trivial cases in the final version
Defined in:
Macro.crimplementations/mruby/FormatString.cr
implementations/mruby/Implementation.cr
implementations/mruby/KeywordArgStruct.cr
macros/ArgConversions.cr
macros/ArgTuples.cr
macros/FunctionCalls.cr
macros/FunctionGenerators.cr
macros/ObjectAllocations.cr
macros/RubyConversions.cr
macros/RubyTypes.cr
macros/UnionCasts.cr
macros/WrapAll.cr
macros/WrapMethodIndex.cr
macros/Wrappers.cr
Macro Summary
- add_copy_constructor(rb_interpreter, crystal_class, context, verbose)
- add_default_constructor(rb_interpreter, crystal_class, verbose)
- add_enum_constructor(rb_interpreter, crystal_class, verbose)
- add_enum_inspect(rb_interpreter, crystal_class, verbose)
- add_enum_to_s(rb_interpreter, crystal_class, verbose)
- add_equality_method(rb_interpreter, crystal_class, context, verbose)
- allocate_constructed_object(rb, crystal_class, obj, new_obj)
- call_and_return(rb, proc, regular_args, converted_args, operator = "", options = {} of Symbol => NoReturn, block_ptr = nil)
- call_and_return_instance_method(rb, proc, converted_obj, converted_args, operator = "", options = {} of Symbol => NoReturn, block_ptr = nil)
- call_and_return_keyword_instance_method(rb, proc, converted_obj, converted_regular_args, keyword_args, kw_args, operator = "", options = {} of Symbol => NoReturn, block_ptr = nil)
- call_and_return_keyword_method(rb, proc, converted_regular_args, keyword_args, kw_args, operator = "", options = {} of Symbol => NoReturn, block_ptr = nil)
- cast_to_union_value(rb, value, types, options = {} of Symbol => NoReturn, debug_information = nil)
- check_and_cast_resolved_union_type(rb, value, type, raw_type, options = {} of Symbol => NoReturn, debug_information = nil)
- check_and_cast_union_type(rb, value, type, raw_type, options = {} of Symbol => NoReturn, debug_information = nil)
- convert_from_ruby_object(rb, obj, crystal_type)
- convert_from_ruby_struct(rb, obj, crystal_type)
- convert_from_ruby_to_crystal(rb, arg, arg_type, options = {} of Symbol => NoReturn, debug_information = nil)
- convert_regex_from_crystal_to_ruby(rb, value)
- convert_regex_from_ruby_to_crystal(rb, arg, arg_type)
-
convert_regular_arg(rb, arg, arg_type, options = {} of Symbol => NoReturn, debug_information = nil)
Converts Ruby values to Crystal values
- convert_regular_args(rb, args, regular_args, options = {} of Symbol => NoReturn, debug_information = nil)
- format_char(arg, options = {} of Symbol => NoReturn)
- format_string(args, options = {} of Symbol => NoReturn)
- generate_arg_tuple(rb, args, options = {} of Symbol => NoReturn)
- generate_keyword_argument_struct(rb_interpreter, keyword_args)
- generate_keyword_names(rb_interpreter, keyword_args)
- get_converted_args(rb, regular_args, options = {} of Symbol => NoReturn)
- get_raw_args(rb, regular_args, context = nil)
- load_args_into_vars(args, format_string, regular_arg_tuple, block_ptr = nil)
- load_kw_args_into_vars(regular_args, keyword_args, format_string, regular_arg_tuple, block_ptr = nil)
- new_rb_data_func(&b)
- new_rb_func(&b)
- pointer_type(type, options = {} of Symbol => NoReturn)
- resolve_format_char(arg, raw_arg, options = {} of Symbol => NoReturn)
- resolve_from_ruby_to_crystal(rb, arg, arg_type, raw_arg_type, options = {} of Symbol => NoReturn, debug_information = nil)
- resolve_pointer_type(type, raw_type, options = {} of Symbol => NoReturn)
- resolve_regular_arg(rb, arg, arg_type, raw_arg_type, options = {} of Symbol => NoReturn, debug_information = nil)
- resolve_type_in_ruby(type, raw_type, options = {} of Symbol => NoReturn)
- type_in_ruby(type, options = {} of Symbol => NoReturn)
- wrap_all_class_methods(rb_interpreter, crystal_class, exclusions, verbose, context = nil)
- wrap_all_constants(rb_interpreter, crystal_class, exclusions, verbose = false, overwrite = false, context = nil)
- wrap_all_instance_methods(rb_interpreter, crystal_class, exclusions, verbose, context = nil, use_enum_methods = false, wrap_equality_method = false, other_source = nil, later_ancestors = nil)
- wrap_class_method_with_args(rb_interpreter, crystal_class, name, proc, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
- wrap_class_method_with_keyword_args(rb_interpreter, crystal_class, name, proc, keyword_args, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
- wrap_constant_or_class(rb_interpreter, under_class_or_module, ruby_name, value, overwrite = false, verbose = false)
- wrap_constructor_function_with_args(rb_interpreter, crystal_class, proc, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
- wrap_constructor_function_with_keyword_args(rb_interpreter, crystal_class, proc, keyword_args, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
- wrap_equality_function(rb_interpreter, crystal_class, name, proc, operator = "", options = {} of Symbol => NoReturn)
- wrap_instance_function_with_args(rb_interpreter, crystal_class, name, proc, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
- wrap_instance_function_with_keyword_args(rb_interpreter, crystal_class, name, proc, keyword_args, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
- wrap_method_index(rb_interpreter, crystal_class, method_index, ruby_name, is_constructor = false, is_class_method = false, operator = "", cut_name = nil, without_keywords = false, added_keyword_args = nil, context = nil, return_nil = false, block_arg_number = nil, block_return_type = nil, store_block_arg = false, other_source = nil)
- wrap_module_function_with_args(rb_interpreter, under_module, name, proc, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
- wrap_module_function_with_keyword_args(rb_interpreter, under_module, name, proc, keyword_args, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
Macro Detail
macro call_and_return(rb, proc, regular_args, converted_args, operator = "", options = {} of Symbol => NoReturn, block_ptr = nil)
#
macro call_and_return_instance_method(rb, proc, converted_obj, converted_args, operator = "", options = {} of Symbol => NoReturn, block_ptr = nil)
#
macro call_and_return_keyword_instance_method(rb, proc, converted_obj, converted_regular_args, keyword_args, kw_args, operator = "", options = {} of Symbol => NoReturn, block_ptr = nil)
#
macro call_and_return_keyword_method(rb, proc, converted_regular_args, keyword_args, kw_args, operator = "", options = {} of Symbol => NoReturn, block_ptr = nil)
#
macro cast_to_union_value(rb, value, types, options = {} of Symbol => NoReturn, debug_information = nil)
#
macro check_and_cast_resolved_union_type(rb, value, type, raw_type, options = {} of Symbol => NoReturn, debug_information = nil)
#
macro check_and_cast_union_type(rb, value, type, raw_type, options = {} of Symbol => NoReturn, debug_information = nil)
#
macro convert_from_ruby_to_crystal(rb, arg, arg_type, options = {} of Symbol => NoReturn, debug_information = nil)
#
macro convert_regular_arg(rb, arg, arg_type, options = {} of Symbol => NoReturn, debug_information = nil)
#
Converts Ruby values to Crystal values
macro convert_regular_args(rb, args, regular_args, options = {} of Symbol => NoReturn, debug_information = nil)
#
macro load_kw_args_into_vars(regular_args, keyword_args, format_string, regular_arg_tuple, block_ptr = nil)
#
macro resolve_from_ruby_to_crystal(rb, arg, arg_type, raw_arg_type, options = {} of Symbol => NoReturn, debug_information = nil)
#
macro resolve_regular_arg(rb, arg, arg_type, raw_arg_type, options = {} of Symbol => NoReturn, debug_information = nil)
#
macro wrap_all_class_methods(rb_interpreter, crystal_class, exclusions, verbose, context = nil)
#
macro wrap_all_constants(rb_interpreter, crystal_class, exclusions, verbose = false, overwrite = false, context = nil)
#
macro wrap_all_instance_methods(rb_interpreter, crystal_class, exclusions, verbose, context = nil, use_enum_methods = false, wrap_equality_method = false, other_source = nil, later_ancestors = nil)
#
macro wrap_class_method_with_args(rb_interpreter, crystal_class, name, proc, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
#
macro wrap_class_method_with_keyword_args(rb_interpreter, crystal_class, name, proc, keyword_args, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
#
macro wrap_constant_or_class(rb_interpreter, under_class_or_module, ruby_name, value, overwrite = false, verbose = false)
#
macro wrap_constructor_function_with_args(rb_interpreter, crystal_class, proc, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
#
macro wrap_constructor_function_with_keyword_args(rb_interpreter, crystal_class, proc, keyword_args, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
#
macro wrap_equality_function(rb_interpreter, crystal_class, name, proc, operator = "", options = {} of Symbol => NoReturn)
#
macro wrap_instance_function_with_args(rb_interpreter, crystal_class, name, proc, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
#
macro wrap_instance_function_with_keyword_args(rb_interpreter, crystal_class, name, proc, keyword_args, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
#
macro wrap_method_index(rb_interpreter, crystal_class, method_index, ruby_name, is_constructor = false, is_class_method = false, operator = "", cut_name = nil, without_keywords = false, added_keyword_args = nil, context = nil, return_nil = false, block_arg_number = nil, block_return_type = nil, store_block_arg = false, other_source = nil)
#
macro wrap_module_function_with_args(rb_interpreter, under_module, name, proc, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
#
macro wrap_module_function_with_keyword_args(rb_interpreter, under_module, name, proc, keyword_args, regular_args = nil, operator = "", options = {} of Symbol => NoReturn)
#