Generates a JSON file containing doc information from C files using JavaDoc-like syntax.
|
|
||
|---|---|---|
| main.c | Initial commit | |
| nob.c | Initial commit | |
| nob.h | Initial commit | |
| README.md | Initial commit | |
| suboptimal.h | Initial commit | |
See? (C? yezzir)
Generates a JSON file containing doc information from C files using JavaDoc-like syntax.
C Code
// api.h
/**
* @file
* @license MIT
* @author @movva
* @desc """
Some
Multiline
Desc.
"""
*/
/**
* @func read_entire_file_buf
* @arg buf Pointer to a preallocated string buffer of size @arg(size)
* @arg size Size of buffer @arg(buf)
* @returns @true when sucessful and @false when something failed.
Logs the error with @entry(api_log) when failed,
should exit with 1 when @false is returned.
*/
bool read_entire_file_buf (uint8_t buf[], size_t size);
/**
* @func exit
* @noreturn
* @arg code Exit code
*/
[[noreturn]]
void exit (int code);
JSON
{
"file": "include/api.h",
"license": "MIT",
"author": "@movva",
"desc": "Some\nMultiline\nDesc.",
"entries": {
"read_entire_file_buf": {
"desc": "",
"args": {
"buf": "Pointer to a preallocated string buffer of size @arg(size)",
"size": "Size of buffer @arg(buf)"
},
"returns": "@true when sucessful and @false when something failed. Logs the error with @entry(api_log) when failed, should exit with 1 when @false is returned."
},
"exit": {
"desc": "Exits with code @arg(code)",
"args": {
"code": "Exit code."
},
}
}
}