WIP: awesomerc.tl should work #85

Draft
Aire-One wants to merge 40 commits from feat/#58 into master
4 changed files with 22 additions and 9 deletions
Showing only changes of commit 28ae4fb42a - Show all commits

2
.vscode/launch.json vendored
View File

@ -20,7 +20,7 @@
}, },
"args": [ "args": [
"test", "test",
"_spec" // Adapt to the spec to debug "\"--pattern _spec --tags debug\""
], ],
"scriptFiles": ["${workspaceFolder}/**/*.tl"] "scriptFiles": ["${workspaceFolder}/**/*.tl"]
} }

View File

@ -64,12 +64,12 @@ validate:
check \ check \
awesomerc.tl awesomerc.tl
test PATTERN="_spec": test PARAMETERS="--pattern=_spec":
luarocks \ luarocks \
--lua-version {{ lua_version }} \ --lua-version {{ lua_version }} \
test \ test \
{{ rockspec_file }} \ {{ rockspec_file }} \
-- --pattern={{ PATTERN }} -- {{ PARAMETERS }}
local-test PATTERN="_spec": local-test PATTERN="_spec":
luarocks \ luarocks \

View File

@ -27,6 +27,7 @@ describe("Scrap documentation", function()
name = "Empty", name = "Empty",
module_path = "empty", module_path = "empty",
dependencies = {}, dependencies = {},
global = false,
token = "module", token = "module",
})) }))
@ -89,6 +90,7 @@ describe("Scrap documentation", function()
name = "Property_signal", name = "Property_signal",
module_path = "property_signal", module_path = "property_signal",
dependencies = {}, dependencies = {},
global = false,
token = "module", token = "module",
})) }))
@ -202,6 +204,7 @@ describe("Scrap documentation", function()
name = "Property_enum", name = "Property_enum",
module_path = "property_enum", module_path = "property_enum",
dependencies = {}, dependencies = {},
global = false,
token = "module", token = "module",
})) }))
@ -244,6 +247,7 @@ describe("Scrap documentation", function()
name = "Property_string", name = "Property_string",
module_path = "property_string", module_path = "property_string",
dependencies = {}, dependencies = {},
global = false,
token = "module", token = "module",
})) }))
@ -311,6 +315,7 @@ describe("Scrap documentation", function()
name = "Tag", name = "Tag",
module_path = "awful.tag", module_path = "awful.tag",
dependencies = {}, dependencies = {},
global = false,
token = "module", token = "module",
})) }))
@ -363,6 +368,7 @@ describe("Scrap documentation", function()
name = "Signal", name = "Signal",
module_path = "signal", module_path = "signal",
dependencies = {}, dependencies = {},
global = false,
token = "module", token = "module",
})) }))
@ -450,7 +456,7 @@ describe("Scrap documentation", function()
token = "variable", token = "variable",
}, },
}, },
return_types = { "boolean" }, return_types = { { "boolean" }},
name = "kill", name = "kill",
token = "function", token = "function",
} }
@ -458,10 +464,11 @@ describe("Scrap documentation", function()
name = "Awesome", name = "Awesome",
module_path = "awesome", module_path = "awesome",
dependencies = {}, dependencies = {},
global = false,
token = "module", token = "module",
})) }))
it("should produce a Record node when a function parameter is a named-parameter-table", test( it("should produce a Record node when a function parameter is a named-parameter-table #debug", test(
[[ [[
<h2 class="section-header"> <h2 class="section-header">
<a name="Static_module_functions"></a>Static module functions <a name="Static_module_functions"></a>Static module functions
@ -566,6 +573,7 @@ describe("Scrap documentation", function()
} }
}, },
name = "Focused_Args", name = "Focused_Args",
global = false,
token = "record", token = "record",
}, },
{ {
@ -576,7 +584,7 @@ describe("Scrap documentation", function()
token = "variable", token = "variable",
}, },
}, },
return_types = { "screen" }, return_types = { { "screen" }},
name = "focused", name = "focused",
token = "function", token = "function",
}, },
@ -584,6 +592,7 @@ describe("Scrap documentation", function()
name = "Screen", name = "Screen",
module_path = "awful.screen", module_path = "awful.screen",
dependencies = {}, dependencies = {},
global = false,
token = "module", token = "module",
})) }))
@ -667,7 +676,7 @@ describe("Scrap documentation", function()
token = "variable", token = "variable",
} }
}, },
return_types = { "table" }, return_types = { { "table" }},
name = "crush", name = "crush",
token = "function", token = "function",
} }
@ -675,6 +684,7 @@ describe("Scrap documentation", function()
name = "Table", name = "Table",
module_path = "gears.table", module_path = "gears.table",
dependencies = {}, dependencies = {},
global = false,
token = "module", token = "module",
})) }))
@ -759,7 +769,7 @@ describe("Scrap documentation", function()
token = "variable", token = "variable",
}, },
}, },
return_types = { "table" }, return_types = { { "table" } },
name = "tags", name = "tags",
token = "function", token = "function",
}, },
@ -767,6 +777,7 @@ describe("Scrap documentation", function()
name = "Client", name = "Client",
module_path = "awful.client", module_path = "awful.client",
dependencies = {}, dependencies = {},
global = false,
token = "module", token = "module",
})) }))
@ -810,12 +821,13 @@ describe("Scrap documentation", function()
name = "Client", name = "Client",
module_path = "awful.client", module_path = "awful.client",
dependencies = {}, dependencies = {},
global = false,
token = "module", token = "module",
}, },
{ {
{ {
parameters = {}, parameters = {},
return_types = { "integer" }, return_types = { { "integer" } },
name = "client.instances", name = "client.instances",
token = "function", token = "function",
} }

View File

@ -119,6 +119,7 @@ local function extract_function_return_types(ol_html: string): { { string } }
end):iter() do end):iter() do
table.insert(ts, t) table.insert(ts, t)
end end
table.insert(types, ts)
end end
return types return types
end end