From 3a60c88a3b3dbd334e4769a6283fb90c0495c25b Mon Sep 17 00:00:00 2001 From: Seba Gamboa Date: Fri, 25 Sep 2015 18:01:14 -0300 Subject: Sorting tons of stuff around --- lib/yard/mruby/handlers/c/source/method_handler.rb | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/yard/mruby/handlers/c/source/method_handler.rb (limited to 'lib/yard/mruby/handlers/c/source/method_handler.rb') diff --git a/lib/yard/mruby/handlers/c/source/method_handler.rb b/lib/yard/mruby/handlers/c/source/method_handler.rb new file mode 100644 index 0000000..b744f54 --- /dev/null +++ b/lib/yard/mruby/handlers/c/source/method_handler.rb @@ -0,0 +1,25 @@ +module YARD::MRuby::Handlers::C::Source + class MethodHandler < Base + MATCH1 = /mrb_define_( + method | + singleton_method | + module_function + ) + \s*\( + \s*\w+\s*, + \s*(\w+)\s*, + \s*"(\w+)"\s*, + \s*(\w+)\s*, + /mx + + handles MATCH1 + statement_class BodyStatement + + process do + statement.source.scan(MATCH1) do |type,var_name, name, func_name| + handle_method(type, var_name, name, func_name) + end + end + + end +end -- cgit v1.2.3