function ifNotIn(nodes, source) {
    return (context) => {
        for (let pos = syntaxTree(context.state).resolveInner(context.pos, -1); pos; pos = pos.parent)
            if (nodes.indexOf(pos.name) > -1)
                return null;
        return source(context);
    };
}
/**
Wrap the given completion source so that it will not fire when the
cursor is in a syntax node with one of the given names.
*/
Wrap the given completion source so that it will not fire when the
cursor is in a syntax node with one of the given names.
Wrap the given completion source so that it will not fire when the cursor is in a syntax node with one of the given names .
function ifNotIn(nodes, source) {
    return (context) => {
        for (let pos = syntaxTree(context.state).resolveInner(context.pos, -1); pos; pos = pos.parent)
            if (nodes.indexOf(pos.name) > -1)
                return null;
        return source(context);
    };
}
function ifNotIn ( nodes , source ) { return ( context ) => { for ( let pos = syntaxTree ( context . state ) . resolveInner ( context . pos , - 1 ) ; pos ; pos = pos . parent ) if ( nodes . indexOf ( pos . name ) > - 1 ) return null ; return source ( context ) ; } ; }
Wrap the given completion source so that it will not fire when the
cursor is in a syntax node with one of the given names.
Wrap the given completion source so that it will not fire when the cursor is in a syntax node with one of the given names .