(node: Node)
| 718 | } |
| 719 | |
| 720 | public mayMatch(node: Node): boolean { |
| 721 | return this.selectors.every((sel, i) => { |
| 722 | if (i === 0) { |
| 723 | return node && sel.mayMatch(node); |
| 724 | } |
| 725 | |
| 726 | if (sel.combinator === Combinator.adjacent) { |
| 727 | node = getNodePreviousDirectSibling(node); |
| 728 | return node && sel.mayMatch(node); |
| 729 | } |
| 730 | |
| 731 | // Sibling combinator |
| 732 | let isMatching: boolean = false; |
| 733 | |
| 734 | eachNodePreviousGeneralSibling(node, (sibling) => { |
| 735 | isMatching = sel.mayMatch(sibling); |
| 736 | return !isMatching; |
| 737 | }); |
| 738 | |
| 739 | return isMatching; |
| 740 | }); |
| 741 | } |
| 742 | |
| 743 | public trackChanges(node: Node, map: ChangeAccumulator): void { |
| 744 | this.selectors.forEach((sel, i) => { |
nothing calls this directly
no test coverage detected