Sha256: 33d16a39f99da019abde2ccb857dd9716708ae3d2d8667e77b7ba0ae6172ab75
Contents?: true
Size: 817 Bytes
Versions: 2
Compression:
Stored size: 817 Bytes
Contents
module YARD::MRuby::Handlers::C::Header class FunctionHandler < Base MATCH = / MRB_(API|INLINE)\s+ ((struct\s+)?\w+(\s*\*)?)\s* ((\w+\s+)+)?(\w+)\s* \(([\w\s\*,\.]*)\) /mx handles MATCH statement_class ToplevelStatement process do handle_function(statement) end def handle_function(statement) header = self.header(statement.file) statement.source.scan(MATCH) do |type, retype, _,_,_,_, name, parameters| register FunctionObject.new(header, name) do |obj| if statement.comments register_docstring(obj, statement.comments.source, statement) end obj.return_type = retype obj.parse_parameter_types(parameters) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yard-mruby-0.3.0 | lib/yard/mruby/handlers/c/header/function_handler.rb |
yard-mruby-0.2.3 | lib/yard/mruby/handlers/c/header/function_handler.rb |