rhys-vdw / lua-doc-extractor

Extracts lua documentation from C-style comments
MIT License
0 stars 0 forks source link

Consider: Support description on custom annotations #3

Open rhys-vdw opened 16 hours ago

rhys-vdw commented 16 hours ago

Example

/** @function Spring.MyFunc
 *
 * A cool function.
 *
 * @param x integer
 */

Worst case

/**
 * What a cool function
 * @param foo number
 * @function Spring.MyCoolFunc So good
 * and extremely cool...
 *
 * ...I love it!
 * @param bar string
 */
---What a cool function
---
---So good
---and extremely cool
---
---...I love it!
---
---@param foo number
---@param bar string
function Spring.MyCoolFunc(foo, bar) end

This seems like it would be good, but worth noting that LLS doesn't actually support this, so maybe it's ill-advised. It just seems likely that people will do it by accident in C source.

image