diff options
| author | Seba Gamboa <[email protected]> | 2015-09-29 12:00:50 -0300 |
|---|---|---|
| committer | Seba Gamboa <[email protected]> | 2015-09-29 12:00:50 -0300 |
| commit | 5aaad840a7c59a4c5f2abaead892018c7059b11e (patch) | |
| tree | 8e6fe7557110e7bf701db363a87ac33cb78eea8e /lib/yard/mruby/handlers/c/header/function_handler.rb | |
| parent | d034793bd327d78aba0d99d719336d597e2413b0 (diff) | |
| download | yard-mruby-5aaad840a7c59a4c5f2abaead892018c7059b11e.tar.gz yard-mruby-5aaad840a7c59a4c5f2abaead892018c7059b11e.zip | |
Refactor return types
Diffstat (limited to 'lib/yard/mruby/handlers/c/header/function_handler.rb')
| -rw-r--r-- | lib/yard/mruby/handlers/c/header/function_handler.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/yard/mruby/handlers/c/header/function_handler.rb b/lib/yard/mruby/handlers/c/header/function_handler.rb index 11f8efc..079f114 100644 --- a/lib/yard/mruby/handlers/c/header/function_handler.rb +++ b/lib/yard/mruby/handlers/c/header/function_handler.rb @@ -3,9 +3,9 @@ module YARD::MRuby::Handlers::C::Header MATCH = / MRB_(API|INLINE)\s+ ((struct\s+)?\w+(\s*\*)?)\s* - ((\w+\s+)+)?(\w+)\s*\( + ((\w+\s+)+)?(\w+)\s* + \(([\w\s\*,])*\) /mx - #\(([\w\*,]*)\) handles MATCH statement_class ToplevelStatement @@ -25,10 +25,7 @@ module YARD::MRuby::Handlers::C::Header register_docstring(obj, statement.comments.source, statement) end - if retype != 'void' - obj.add_tag(YARD::Tags::Tag.new(:return,"", "")) unless obj.has_tag?(:return) - obj.tag(:return).types = [retype] - end + obj.return_type = retype end end |
