mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
works with both tsl and tsl-pack
This commit is contained in:
parent
e3d5eaf388
commit
2a56d892d7
1 changed files with 23 additions and 17 deletions
|
@ -285,8 +285,14 @@ class RepoMap:
|
||||||
captures = query.captures(tree.root_node)
|
captures = query.captures(tree.root_node)
|
||||||
|
|
||||||
saw = set()
|
saw = set()
|
||||||
|
if USING_TSL_PACK:
|
||||||
|
all_nodes = []
|
||||||
for tag, nodes in captures.items():
|
for tag, nodes in captures.items():
|
||||||
for node in nodes:
|
all_nodes += [(node, tag) for node in nodes]
|
||||||
|
else:
|
||||||
|
all_nodes = list(captures)
|
||||||
|
|
||||||
|
for node, tag in all_nodes:
|
||||||
if tag.startswith("name.definition."):
|
if tag.startswith("name.definition."):
|
||||||
kind = "def"
|
kind = "def"
|
||||||
elif tag.startswith("name.reference."):
|
elif tag.startswith("name.reference."):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue