From eaf31b2f166e1f23bd5ff83d9475fdd8241eab6c Mon Sep 17 00:00:00 2001 From: Aire-One Date: Sat, 4 Feb 2023 00:40:43 +0100 Subject: [PATCH] feat(scraper): move "Signals" to AST --- src/awesomewm.d.tl/scraper/module_doc.tl | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/awesomewm.d.tl/scraper/module_doc.tl b/src/awesomewm.d.tl/scraper/module_doc.tl index ea867c4..230e82a 100644 --- a/src/awesomewm.d.tl/scraper/module_doc.tl +++ b/src/awesomewm.d.tl/scraper/module_doc.tl @@ -190,18 +190,18 @@ local function extract_section_variables(dl: string): { Node }, { string } return variables, signals end --- local function extract_section_signal(dl: string): { string } --- local selector = "dt strong" +local function extract_section_signal(dl: string): { string } + local selector = "dt strong" --- return scraper_utils.scrape(dl, selector, extract_node_text) --- end + return scraper_utils.scrape(dl, selector, extract_node_text) +end local enum Section -- "Constructors" -- "Static module functions" "Object properties" -- "Object methods" - -- "Signals" + "Signals" end -- returns @@ -228,9 +228,10 @@ local section_scrapers : { Section : function(html: string): { Node }, { -- end -- ) -- end, - -- ["Signals"] = function(html: string, module_doc: Module_Doc.Module_Doc) - -- module_doc.signals = List(extract_section_signal(html)) - -- end, + ["Signals"] = function(html: string): { Node }, { Node }, { string } + local signals = extract_section_signal(html) + return {}, {}, signals + end, } -- local function extract_node_module_name(node: Node): string