feat(rust) Add support for struct as class type
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
parent = {
|
parent = {
|
||||||
func = { "function_item" },
|
func = { "function_item" },
|
||||||
|
class = { "struct_item" },
|
||||||
file = { "source_file" },
|
file = { "source_file" },
|
||||||
},
|
},
|
||||||
data = {
|
data = {
|
||||||
@@ -22,6 +23,15 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
class = {
|
||||||
|
["struct_item"] = {
|
||||||
|
["0"] = {
|
||||||
|
extract = function()
|
||||||
|
return {}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
template = {
|
template = {
|
||||||
@@ -30,7 +40,7 @@ return {
|
|||||||
{ nil, "! $1", { no_results = true, type = { "file" } } },
|
{ nil, "! $1", { no_results = true, type = { "file" } } },
|
||||||
{ nil, "", { no_results = true, type = { "file" } } },
|
{ nil, "", { no_results = true, type = { "file" } } },
|
||||||
|
|
||||||
{ nil, "/ $1", { no_results = true, type = { "func" } } },
|
{ nil, "/ $1", { no_results = true, type = { "func", "class" } } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user