Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
API help via REPL (#1292)
* help poc * syntax proposition * spacing * spacer
- Loading branch information
Showing
with
85 additions
and 0 deletions.
- +30 −0 lua/core/clock.lua
- +39 −0 lua/core/grid.lua
- +15 −0 lua/core/help.lua
- +1 −0 lua/core/startup.lua
| @@ -0,0 +1,15 @@ | ||
| local help_topics = [[ | ||
| -------------------------------------------------------------------------------- | ||
| help(topic): grid, clock | ||
| -------------------------------------------------------------------------------- | ||
| ]] | ||
|
|
||
| function help(topic) | ||
| if topic == nil then | ||
| print(help_topics) | ||
| elseif type(topic)=="table" then | ||
| if topic.help then | ||
| print(topic.help) | ||
| end | ||
| end | ||
| end |