mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-19 23:17:16 +03:00
Remove debugger, test focus, and lint fixes.
This commit is contained in:
parent
926cf73e63
commit
45ab5488ae
@ -1313,7 +1313,7 @@ describe('TreeSitterLanguageMode', () => {
|
||||
})
|
||||
|
||||
describe('.getSyntaxNodeAtPosition(position, where?)', () => {
|
||||
fit('returns the range of the smallest matching node at position', async () => {
|
||||
it('returns the range of the smallest matching node at position', async () => {
|
||||
const grammar = new TreeSitterGrammar(atom.grammars, jsGrammarPath, {
|
||||
id: 'javascript',
|
||||
parser: 'tree-sitter-javascript'
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user