feat(js) Add missing annotations
This commit is contained in:
@@ -17,14 +17,20 @@ local function_tree = {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
parent = {
|
parent = {
|
||||||
func = { "function_declaration", "expression_statement", "variable_declaration", "lexical_declaration" },
|
func = {
|
||||||
|
"function_declaration",
|
||||||
|
"expression_statement",
|
||||||
|
"variable_declaration",
|
||||||
|
"lexical_declaration",
|
||||||
|
"method_definition",
|
||||||
|
},
|
||||||
class = { "function_declaration", "expression_statement", "variable_declaration", "class_declaration" },
|
class = { "function_declaration", "expression_statement", "variable_declaration", "class_declaration" },
|
||||||
file = { "program" },
|
file = { "program" },
|
||||||
},
|
},
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
func = {
|
func = {
|
||||||
["function_declaration"] = {
|
["method_definition|function_declaration"] = {
|
||||||
["0"] = {
|
["0"] = {
|
||||||
|
|
||||||
extract = function(node)
|
extract = function(node)
|
||||||
@@ -40,7 +46,7 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
["expression_statement|variable_declaration"] = {
|
["expression_statement|variable_declaration"] = {
|
||||||
["1"] = {
|
["0"] = {
|
||||||
extract = function(node)
|
extract = function(node)
|
||||||
local results = {}
|
local results = {}
|
||||||
local tree = { { retrieve = "all", node_type = "function", subtree = function_tree } }
|
local tree = { { retrieve = "all", node_type = "function", subtree = function_tree } }
|
||||||
|
|||||||
Reference in New Issue
Block a user