> There is currently no way to do that...

OK, but is the current behavior desirable? Seems to me it's mistaken. Nim doc 
doesn't ordinarily display non-exported symbols.

> ...but it would easy to improve the docgen.

"Easy" may be a relative term. :-) Here's what I've figured out:

  * `T`'s fields are stored in a node of kind `nkIdentDefs`.
  * This node does not support flags; or, at least, it does not have the `sym` 
field, the way its parent type does.
  * Instead, the node has children, the first of which will be `nkPostfix` when 
the field is exported.



So the "hack" solution is to add the following lines to `renderer.nim`. 
    
    
    ...
        # remove line 616 and insert the following
        if n[i].kind == nkPostfix: gsub(g, n[i][1])
        else: gsub(g, n[i])
    ...
          # insert at the new line 1420, then indent the following three lines
          if n[i][0].kind == nkPostfix: # at line 1420 (first line in the loop 
of case nkRecList of gsub)
    
    
    Run

...and for the second I indent the next three lines.

It would seem better (to me) to check the flags of a `nkRecList`, but it's not 
apparent to me that that kind of node has any. Am I missing something?

If this seems OK, I can create a pull request, but I'd be a little surprised.

Also, I suppose this would be problematic for people who want to keep the 
current behavior.

If I should move this discussion to an issue in GitHub, I can do that, too. (& 
sorry for the noise here if so)

Reply via email to