Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self documenting function #433

Open
sucrecacao opened this issue Jan 6, 2021 · 1 comment
Open

self documenting function #433

sucrecacao opened this issue Jan 6, 2021 · 1 comment

Comments

@sucrecacao
Copy link

Hello

I'm just discovering moonscript and it's a beautiful language ! big big kuddos !

I'm looking at a way to self document my function in moonscript so I can have something similar to python:

f = (x) ->  x + 5
f.doc = 'add five to a number'
help(f) -- print 'add five to a number'
@daelvn
Copy link

daelvn commented Jan 7, 2021

The language doesn't manage this itself (Lua doesn't either), but you can use a tool like LDoc to generate a documentation page for you: https://github.com/lunarmodules/LDoc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants