[gemma4] refactor using treesitter

This commit is contained in:
2026-06-20 10:56:52 +02:00
parent 49f0f23a54
commit d600c0a8ca
10 changed files with 141 additions and 434 deletions
+2 -1
View File
@@ -34,7 +34,7 @@ class SkillParser:
# Tree-sitter parsing
tree = self.parser.parse(bytes(content, "utf8"))
diagnostics: list[Diagnostic] = []
diagnostics: list[Diagnostic] = []
symbols: list[DocumentSymbol] = []
# Traverse the root node to collect errors and symbols
@@ -75,6 +75,7 @@ class SkillParser:
if self._is_symbol_node(node):
symbol = self._create_document_symbol(node, content)
if symbol:
symbols.append(symbol)
# 3. Continue traversal - push children in reverse order to maintain original DFS order