feat(ts): treesitter supports variables in python (#227)

This commit is contained in:
Steven Arcangeli 2023-03-15 22:03:57 -07:00
parent 5b788392ec
commit 1e0c546c2c
3 changed files with 16 additions and 0 deletions

View file

@ -7,3 +7,8 @@
name: (identifier) @name
(#set! "kind" "Class")
) @type
(assignment
left: (_) @name
(#set! "kind" "Variable")
) @type

View file

@ -32,6 +32,15 @@ describe("treesitter python", function()
},
},
},
{
kind = "Variable",
name = "var",
level = 0,
lnum = 9,
col = 0,
end_lnum = 9,
end_col = 10,
},
})
end)
end)

View file

@ -5,3 +5,5 @@ def fn_1():
class cl_1:
def meth_1(self):
pass
var = 'hi'