Sha256: 9675bba142b70205aa5a1434fe1a50a8c6dfeee74a19d9255decff35d018328c

Contents?: true

Size: 565 Bytes

Versions: 3

Compression:

Stored size: 565 Bytes

Contents

# Handles the Init_Libname() method
class YARD::Handlers::C::InitHandler < YARD::Handlers::C::Base
  MATCH = %r{\A\s*(?:static\s+)?void\s+(?:[Ii]nit_)?(\w+)\s*}
  handles MATCH
  statement_class ToplevelStatement

  process do
    parse_block
    if decl = statement.declaration[MATCH, 1]
      ns = namespace_for_variable(decl)
      if ns.is_a?(YARD::CodeObjects::NamespaceObject) && ns.docstring.blank?
        if statement.comments
          register_docstring(ns, statement.comments.source, statement)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
deg-yard-0.8.7.4 lib/yard/handlers/c/init_handler.rb
deg-yard-0.8.7.3 lib/yard/handlers/c/init_handler.rb
deg-yard-0.8.7.1 lib/yard/handlers/c/init_handler.rb