summaryrefslogtreecommitdiffhomepage
path: root/lib/yard/mruby/handlers/c/source/init_handler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yard/mruby/handlers/c/source/init_handler.rb')
-rw-r--r--lib/yard/mruby/handlers/c/source/init_handler.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/yard/mruby/handlers/c/source/init_handler.rb b/lib/yard/mruby/handlers/c/source/init_handler.rb
new file mode 100644
index 0000000..43115a0
--- /dev/null
+++ b/lib/yard/mruby/handlers/c/source/init_handler.rb
@@ -0,0 +1,16 @@
+module YARD::MRuby::Handlers::C::Source
+ class InitHandler < Base
+ MATCH1 = /mrb_\w+_gem_init\s*\(/mx
+ MATCH2 = /mrb_init_\w\s*\(/mx
+
+ handles MATCH1
+ handles MATCH2
+ statement_class ToplevelStatement
+
+ process do
+ parse_block
+ end
+
+ end
+end
+