From e68db21421bb917299d701ea7fe87b3e459d1742 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Sat, 23 Jul 2022 16:15:42 -0700 Subject: docbook: Add file comments to wsluarm. Add a comment to each class and function noting which C file it is defined in. --- docbook/make-wsluarm.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'docbook') diff --git a/docbook/make-wsluarm.py b/docbook/make-wsluarm.py index bdd1a0948c..5233075657 100755 --- a/docbook/make-wsluarm.py +++ b/docbook/make-wsluarm.py @@ -196,8 +196,8 @@ class LuaFunction: section_name = re.sub('[^A-Za-z0-9]', '_', f'{self.name}_{"__".join(mangled_names)}_') opt_names = [f'[{a}]' if optional else a for a, _, optional in self.arguments] adoc_buf = f''' +// {self.c_file} [#lua_fn_{section_name}] - ===== {self.name}({', '.join(opt_names)}) {self.description} @@ -403,15 +403,15 @@ def main(): with open(os.path.join(args.output_directory, adoc_file), 'w', encoding='utf-8') as adoc_f: adoc_f.write(f'''\ +// {c_file} [#lua_module_{module_name}] - === {modules[module_name]["description"]} ''') for class_name in sorted(classes.keys()): lua_class = classes[class_name] adoc_f.write(f''' +// {c_file} [#lua_class_{class_name}] - ==== {class_name} ''') @@ -430,7 +430,6 @@ def main(): attribute_id = re.sub('[^A-Za-z0-9]', '_', f'{attribute["name"]}') adoc_f.write(f''' [#lua_class_attrib_{attribute_id}] - ===== {attribute["name"]} {attribute["description"]} @@ -444,7 +443,6 @@ def main(): if len(functions.keys()) > 0: adoc_f.write(f'''\ [#global_functions_{module_name}] - ==== Global Functions ''') -- cgit v1.2.3