[gemma4] refactor using treesitter
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user