Remove debugger, test focus, and lint fixes.

This commit is contained in:
Ashi Krishnan
2018-07-23 10:36:25 -04:00
parent 926cf73e63
commit 45ab5488ae
3 changed files with 3 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ const {isSubset} = require('underscore-plus')
// Private: Parse a selector into parts.
// If already parsed, returns the selector unmodified.
//
//
// * `selector` a {String|Array<String>} specifying what to match
// Returns selector parts, an {Array<String>}.
function parse (selector) {

View File

@@ -363,14 +363,13 @@ class TreeSitterLanguageMode {
let smallestNode
this._forEachTreeWithRange(range, tree => {
if (typeof selector === 'function') debugger
let node = tree.rootNode.descendantForIndex(startIndex, searchEndIndex)
while (node) {
if (nodeContainsIndices(node, startIndex, endIndex) && where(node)) {
if (nodeIsSmaller(node, smallestNode)) smallestNode = node
break
}
node = node.parent
node = node.parent
}
})