aboutsummaryrefslogtreecommitdiff
path: root/src/tomo.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-23 15:57:44 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-11-23 15:57:44 -0500
commit83a2bff4bb04b0189d17419baf8ca520992d5033 (patch)
tree63c24b6419e0896d985cb0c9f30b742274e95833 /src/tomo.c
parent2a24b0a3fc3c4986572ae2c4ea0e8e387497a7f6 (diff)
Added Metadata section for files instead of _HELP and _USAGE
Diffstat (limited to 'src/tomo.c')
-rw-r--r--src/tomo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tomo.c b/src/tomo.c
index fab725db..a04ccf59 100644
--- a/src/tomo.c
+++ b/src/tomo.c
@@ -841,7 +841,7 @@ void transpile_code(env_t *base_env, Path_t path) {
namespace_name(module_env, module_env->namespace, Text("$initialize")),
"();\n"
"\n",
- compile_cli_arg_call(module_env, main_binding->code, main_binding->type, version),
+ compile_cli_arg_call(module_env, ast, main_binding->code, main_binding->type, version),
"return 0;\n"
"}\n"));
}
@@ -877,7 +877,9 @@ Path_t compile_executable(env_t *base_env, Path_t path, Path_t exe_path, List_t
Path_t manpage_file = build_file(Path$with_extension(path, Text(".1"), true), "");
if (clean_build || !Path$is_file(manpage_file, true) || is_stale(manpage_file, path, true)) {
- Text_t manpage = compile_manpage(Path$base_name(exe_path), NONE_TEXT, NONE_TEXT,
+ OptionalText_t synopsys = ast_metadata(ast, "MANPAGE_SYNOPSYS");
+ OptionalText_t description = ast_metadata(ast, "MANPAGE_DESCRIPTION");
+ Text_t manpage = compile_manpage(Path$base_name(exe_path), synopsys, description,
Match(main_binding->type, FunctionType)->args);
if (!quiet) print("Wrote manpage:\t", Path$relative_to(manpage_file, Path$current_dir()));
Path$write(manpage_file, manpage, 0644);