Is your feature request related to a problem? Please describe.
When documenting with YARD, one can simply add a ? suffix to a type in a @param or @return to indicate that the value may be nil. However, sord generates an error when this syntax is used and does not recognize the type or that it is nilable, but merely results in an error being generated.
For example:
# @param name [String?] The new name, or `nil` to reset the default name.
def rename(name)
...
end
Describe the solution you'd like
That the YARD syntax be permitted and generate correct RBI/RBS.
Describe alternatives you've considered
The use [Type,nil] works well enough and achieves the expected result, though it would be ideal to not have to alter existing YARD documentation and deviate from its conventions in order to make it compliant with sord.
Is your feature request related to a problem? Please describe. When documenting with YARD, one can simply add a
?
suffix to a type in a@param
or@return
to indicate that the value may benil
. However,sord
generates an error when this syntax is used and does not recognize the type or that it is nilable, but merely results in an error being generated.For example:
Describe the solution you'd like That the YARD syntax be permitted and generate correct RBI/RBS.
Describe alternatives you've considered The use
[Type,nil]
works well enough and achieves the expected result, though it would be ideal to not have to alter existing YARD documentation and deviate from its conventions in order to make it compliant withsord
.Additional context N/A