mkdocstrings / vba

VBA handler for mkdocstrings
ISC License
3 stars 1 forks source link

Some functions not rendered in docs #2

Closed malankriel closed 2 years ago

malankriel commented 2 years ago

Given these two functions in the .bas file: image

Only the Private function is in the documentation: image

malankriel commented 2 years ago

Looks like we try to though: https://github.com/AutoActuary/mkdocstrings-vba/blob/2709106aee2b80371a7bbf5c48f18adc648cf7f8/mkdocstrings_handlers/vba/util.py#L139

malankriel commented 2 years ago

Nothing to do with Private / Public, I'm working on MWE now

malankriel commented 2 years ago

Okay, so this doesn't render:

Function dictget(d As Dictionary, key As Variant, Optional default As Variant = Empty)

End Function

But this does:

Function dictget(d As Dictionary, key As Variant)

End Function

So the optional argument seems to be the problem here

malankriel commented 2 years ago
' Variant tests:
Function Test1(d As Dictionary, key As Variant, Optional default As Variant = Empty)
    ' This doesn't render
End Function

Function Test2(d As Dictionary, key As Variant, Optional default As Variant)
    ' This renders
End Function

Function Test3(d As Dictionary, key As Variant, Optional default)
    ' This renders
End Function

' Integer tests:
Function Test4(d As Dictionary, key As Variant, Optional default As Integer = 0)
    ' This doesn't render
End Function

Function Test5(d As Dictionary, key As Variant, Optional default As Integer)
    ' This renders
End Function

Function Test6(d As Dictionary, key As Variant, Optional default)
    ' This renders
End Function

It looks like any optional argument with a default value doesn't render

malankriel commented 2 years ago

Another one that doesn't render:

Public Function dict(ParamArray Args() As Variant) As Dictionary

End Function
rudolfbyker commented 2 years ago

Sorry, I just made a single commit that closes the issue, rather than a PR, since this module is still so experimental