fix(editor/treesiter): inline TSQueryCursor.safeExecQueryCursor API

This commit is contained in:
Akash Yadav
2023-11-16 10:26:02 +05:30
parent f67daf1a0e
commit ed24faaae3
5 changed files with 22 additions and 28 deletions
@@ -118,8 +118,6 @@ class LineSpansGenerator(
query = languageSpec.tsQuery,
tree = tree,
recycleNodeAfterUse = true,
matchCondition = null,
onClosedOrEdited = null,
debugLogging = false,
debugName = "LineSpansGenerator.captureRegion()"
) { match ->
@@ -223,8 +223,6 @@ internal class TsAnalyzeWorker(
query = languageSpec.blocksQuery,
tree = tree,
recycleNodeAfterUse = true,
matchCondition = null,
whileTrue = null,
onClosedOrEdited = { blocks.clear() },
debugName = "TsAnalyzeManager.updateCodeBlocks()"
) { match ->
@@ -63,9 +63,7 @@ class TsBracketPairs(private val tree: TSTree, private val languageSpec: TsLangu
query = languageSpec.bracketsQuery,
tree = tree,
recycleNodeAfterUse = true,
matchCondition = null,
whileTrue = { !matched },
onClosedOrEdited = null,
debugName = "TsBracketPairs.getPairedBracketAt()"
) { match ->
if (!languageSpec.bracketsPredicator.doPredicate(languageSpec.predicates, text, match)) {
@@ -77,7 +77,6 @@ class TsScopedVariables(tree: TSTree, text: UTF16String, val spec: TsLanguageSpe
query = spec.tsQuery,
tree = tree,
recycleNodeAfterUse = true,
matchCondition = null,
onClosedOrEdited = { captures.clear() },
debugName = "TsScopedVariables.init()"
) { match ->