feat(python): Add support for throw statements

Closes #106

Support currently reST annotations
This commit is contained in:
danymat
2022-10-17 12:33:34 +02:00
parent 3ea6a2a638
commit 8624a73c86
3 changed files with 19 additions and 2 deletions

View File

@@ -71,6 +71,19 @@ return {
recursive = true,
extract = true,
},
{
retrieve = "all",
node_type = "raise_statement",
recursive = true,
subtree = {
{
retrieve = "first",
node_type = "identifier",
extract = true,
as = i.Throw,
},
},
},
},
},
{
@@ -133,6 +146,7 @@ return {
or nil
results[i.ArbitraryArgs] = res[i.ArbitraryArgs]
results[i.Kwargs] = res[i.Kwargs]
results[i.Throw] = res[i.Throw]
return results
end,
},