Allow a node matching function in bufferRangeForScopeAtPosition

This commit is contained in:
Ashi Krishnan
2018-07-20 20:56:53 -04:00
parent be0565f3f4
commit 7cbd209811
2 changed files with 9 additions and 3 deletions

View File

@@ -22,6 +22,7 @@ const always = scope => true
// true iff the scope matches the selector.
function matcherForSelector (selector) {
const parts = parse(selector)
if (typeof parts === 'function') return parts
return selector
? scope => isSubset(parts, parse(scope))
: always