Skip to content

C parsing, class parent/superclass resolution #1079

@MSP-Greg

Description

@MSP-Greg

When viewing docs for the pg repo or the pg gem, many of the superclasses are not being resolved correctly. Class List shows many of these.

In the c source, many of the rb_define_class_under calls have a space between the final paren and the 'parent' parameter.

I believe that stripping this space will allow correct lookup. It could be done in the several places, in the handler regex, the handler process call, or YARD:: Handlers::C::HandlerMethods#handle_class. The regex in the handler has a comment about 'SWIG', which I'm not familiar with.

Hence, given the options for where to do so, I haven't done a PR...

I don't think that root classes are affected by this, as the regex doesn't pick up spaces in the final parent param.

Steps to reproduce

NA

Actual Output

NA

Expected Output

NA

Environment details:

  • OS: Win7
  • Ruby version: ruby 2.5.0dev (2017-03-19 trunk 58021) [x64-mingw32]
  • YARD version: 0.9.8

I have read the Contributing Guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions