From a8bd420adfa2b384ab0fdd4bb002a2d89ebf9fb3 Mon Sep 17 00:00:00 2001 From: Tobias Hienzsch Date: Fri, 20 Oct 2023 15:33:05 +0200 Subject: [PATCH] [docgen] Cleanup folder structure --- tool/jml-docgen/Makefile | 2 +- tool/jml-docgen/{ => src}/doxygen.lua | 9 ++------- tool/jml-docgen/{ => src}/json.lua | 0 tool/jml-docgen/{ => src}/ldoc.lua | 0 tool/jml-docgen/{ => src}/main.lua | 4 ++-- tool/jml-docgen/{ => src}/markdown.lua | 0 tool/jml-docgen/{ => src}/sol2.lua | 2 +- tool/jml-docgen/{ => src}/strings.lua | 0 tool/jml-docgen/{ => src}/tables.lua | 0 tool/jml-docgen/{ => src}/testing.lua | 0 10 files changed, 6 insertions(+), 11 deletions(-) rename tool/jml-docgen/{ => src}/doxygen.lua (96%) rename tool/jml-docgen/{ => src}/json.lua (100%) rename tool/jml-docgen/{ => src}/ldoc.lua (100%) rename tool/jml-docgen/{ => src}/main.lua (96%) rename tool/jml-docgen/{ => src}/markdown.lua (100%) rename tool/jml-docgen/{ => src}/sol2.lua (98%) rename tool/jml-docgen/{ => src}/strings.lua (100%) rename tool/jml-docgen/{ => src}/tables.lua (100%) rename tool/jml-docgen/{ => src}/testing.lua (100%) diff --git a/tool/jml-docgen/Makefile b/tool/jml-docgen/Makefile index 27d5ca3..28e1d77 100644 --- a/tool/jml-docgen/Makefile +++ b/tool/jml-docgen/Makefile @@ -9,7 +9,7 @@ generate: out .PHONY: stubs stubs: out - @${JML_VIEWER} test -s main.lua + @${JML_VIEWER} test -s src/main.lua out: @mkdir -p out diff --git a/tool/jml-docgen/doxygen.lua b/tool/jml-docgen/src/doxygen.lua similarity index 96% rename from tool/jml-docgen/doxygen.lua rename to tool/jml-docgen/src/doxygen.lua index 8f6a542..6aa0234 100644 --- a/tool/jml-docgen/doxygen.lua +++ b/tool/jml-docgen/src/doxygen.lua @@ -74,12 +74,7 @@ local function parse_return_type(e) template_arg = captured end) - if not template_arg then - print(ret_type) - assert(false) - end - - print(template_arg, ret_type) + assert(template_arg) return strings.trim(template_arg) end end @@ -172,7 +167,7 @@ function doxygen.parse_xml(type_name) end end - local f = io.open(string.format("out/json/%s.json", type_name), "w") + local f = io.open(string.format("../out/json/%s.json", type_name), "w") f:write(json.encode(results)) f:close() diff --git a/tool/jml-docgen/json.lua b/tool/jml-docgen/src/json.lua similarity index 100% rename from tool/jml-docgen/json.lua rename to tool/jml-docgen/src/json.lua diff --git a/tool/jml-docgen/ldoc.lua b/tool/jml-docgen/src/ldoc.lua similarity index 100% rename from tool/jml-docgen/ldoc.lua rename to tool/jml-docgen/src/ldoc.lua diff --git a/tool/jml-docgen/main.lua b/tool/jml-docgen/src/main.lua similarity index 96% rename from tool/jml-docgen/main.lua rename to tool/jml-docgen/src/main.lua index c024142..a614d7c 100644 --- a/tool/jml-docgen/main.lua +++ b/tool/jml-docgen/src/main.lua @@ -77,8 +77,8 @@ local classes = { } -local readme = io.open("README.md", "w") +local readme = io.open("../README.md", "w") markdown.write_usertype(readme, classes) readme:close() -ldoc.write_usertype_stubs("out/lua", classes) +ldoc.write_usertype_stubs("../out/lua", classes) diff --git a/tool/jml-docgen/markdown.lua b/tool/jml-docgen/src/markdown.lua similarity index 100% rename from tool/jml-docgen/markdown.lua rename to tool/jml-docgen/src/markdown.lua diff --git a/tool/jml-docgen/sol2.lua b/tool/jml-docgen/src/sol2.lua similarity index 98% rename from tool/jml-docgen/sol2.lua rename to tool/jml-docgen/src/sol2.lua index e7bb3fe..83f2df4 100644 --- a/tool/jml-docgen/sol2.lua +++ b/tool/jml-docgen/src/sol2.lua @@ -101,6 +101,6 @@ local function write_all_juce_types(file_path) end test() -write_all_juce_types("out/types.txt") +write_all_juce_types("../out/types.txt") return sol2 diff --git a/tool/jml-docgen/strings.lua b/tool/jml-docgen/src/strings.lua similarity index 100% rename from tool/jml-docgen/strings.lua rename to tool/jml-docgen/src/strings.lua diff --git a/tool/jml-docgen/tables.lua b/tool/jml-docgen/src/tables.lua similarity index 100% rename from tool/jml-docgen/tables.lua rename to tool/jml-docgen/src/tables.lua diff --git a/tool/jml-docgen/testing.lua b/tool/jml-docgen/src/testing.lua similarity index 100% rename from tool/jml-docgen/testing.lua rename to tool/jml-docgen/src/testing.lua