feat(scraper): only use property_summary_type
This commit is contained in:
parent
0c94593b85
commit
c21eda0a3f
|
@ -55,18 +55,18 @@ local function extract_function_return_types(function_return_types_node: scan.HT
|
|||
return scraper_utils.scrape(html, selector, extract_node_text)
|
||||
end
|
||||
|
||||
local function extract_property_types(property_summary_type: scan.HTMLNode, property_constraint_node: scan.HTMLNode): { string }
|
||||
local constraint_types = scraper_utils.scrape(
|
||||
property_constraint_node:outer_html(),
|
||||
"tr.see_also_sublist",
|
||||
extract_node_text
|
||||
)
|
||||
local function extract_property_types(property_summary_type: scan.HTMLNode, property_constraint_node: scan.HTMLNode): List<string>
|
||||
-- local constraint_types = scraper_utils.scrape(
|
||||
-- property_constraint_node:outer_html(),
|
||||
-- "tr.see_also_sublist",
|
||||
-- extract_node_text
|
||||
-- )
|
||||
|
||||
if #constraint_types == 0 then
|
||||
return { extract_node_text(property_summary_type) }
|
||||
end
|
||||
-- if #constraint_types == 0 then
|
||||
return parse_parameter_types(extract_node_text(property_summary_type))
|
||||
-- end
|
||||
|
||||
return constraint_types
|
||||
-- return constraint_types
|
||||
end
|
||||
|
||||
local function extract_section_functions(dl: string): { Function_Info.Function_Info }
|
||||
|
@ -111,10 +111,9 @@ local function extract_section_variables(dl: string): { Variable_Info.Variable_I
|
|||
local variable_info = Variable_Info()
|
||||
|
||||
variable_info.name = extract_item_name(nodes[query_selectors.variable_name])
|
||||
variable_info.types = List(extract_property_types(
|
||||
variable_info.types = extract_property_types(
|
||||
nodes[query_selectors.variable_summary_type],
|
||||
nodes[query_selectors.variable_property_constraint])
|
||||
)
|
||||
|
||||
return variable_info
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue