Sha256: fbe134706e6c381fcd46b9c71be6021189519b0de84f05edc2e13ecaea5177ec

Contents?: true

Size: 535 Bytes

Versions: 3

Compression:

Stored size: 535 Bytes

Contents

module YARD::MRuby::Handlers::C::Header
  class DefineHandler < Base
    MATCH = /
      \#\s*define\s*(\w+)
    /mx

    handles MATCH
    statement_class YARD::MRuby::Parser::C::DirectiveStatement

    process do
      header = self.header(statement.file)

      statement.declaration.scan(MATCH) do |match|
        register DefineObject.new(header, match.first) do |obj|
          if statement.comments
            register_docstring(obj, statement.comments.source, statement)
          end
        end
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yard-mruby-0.2.2 lib/yard/mruby/handlers/c/header/define_handler.rb
yard-mruby-0.2.1 lib/yard/mruby/handlers/c/header/define_handler.rb
yard-mruby-0.2.0 lib/yard/mruby/handlers/c/header/define_handler.rb