Page 1 of 1

Docstrings

Posted: Mon Jan 23, 2023 9:01 am
by Magus
Docstrings are JSdoc-like. A docstring is a block comment, which starts with /** instead of just /*.
It is always at least 3 lines long and must directly precede the function it describes. No blank lines inbetween.

fallout-docsring.png
fallout-docsring.png (40.28 KiB) Viewed 30003 times
weidu-docstring.png
weidu-docstring.png (40.49 KiB) Viewed 30003 times

It supports generic function description, as well as the following tags:
- @arg (or @param). Arg may include type and default. Types are normal Fallout and WeiDU types, with addition of "list" and "map" types, which mean simple and associative arrays, correspondingly, and "uint" - unsigned int.
- @ret (@return, returns). May include type.
- @deprecated. Should include short description why and what to use instead.

Docstring information will be added to intellisense.
weidu-docstring-hover.png
weidu-docstring-hover.png (38.18 KiB) Viewed 30003 times
weidu-docstring-completion.png
weidu-docstring-completion.png (96.39 KiB) Viewed 30003 times
fallout-docstring-hover.png
fallout-docstring-hover.png (69.53 KiB) Viewed 30003 times