Skip to content

Commit

Permalink
resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
nosvalds authored and JLRishe committed Dec 16, 2023
1 parent 4c181e8 commit 4e5429a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions xpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -1312,9 +1312,10 @@ var xpath = (typeof exports === 'undefined') ? {} : exports;
var rhs = [];
for (var i = 0; i < num; i++) {
tokenType.pop();
rhs.unshift(tokenValue.pop());
rhs.push(tokenValue.pop());
state.pop();
}
rhs.reverse();
var s_ = state[state.length - 1];
tokenType.push(XPathParser.productions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32][0]);
if (this.reduceActions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32] == undefined) {
Expand Down Expand Up @@ -2011,13 +2012,14 @@ var xpath = (typeof exports === 'undefined') ? {} : exports;
}
var st = [];
if (xpc.contextNode.firstChild != null) {
st.unshift(xpc.contextNode.firstChild);
st.push(xpc.contextNode.firstChild);
} else {
st.unshift(xpc.contextNode.nextSibling);
st.push(xpc.contextNode.nextSibling);
}
for (var m = xpc.contextNode.parentNode; m != null && m.nodeType != NodeTypes.DOCUMENT_NODE && m !== xpc.virtualRoot; m = m.parentNode) {
st.unshift(m.nextSibling);
st.push(m.nextSibling);
}
st.reverse();
do {
for (var m = st.pop(); m != null;) {
if (step.nodeTest.matches(m, xpc)) {
Expand Down Expand Up @@ -2102,7 +2104,7 @@ var xpath = (typeof exports === 'undefined') ? {} : exports;
break outer;
}
if (step.nodeTest.matches(m, xpc)) {
newNodes.unshift(m);
newNodes.push(m);
}
if (m.firstChild != null) {
st.push(m.nextSibling);
Expand All @@ -2112,6 +2114,7 @@ var xpath = (typeof exports === 'undefined') ? {} : exports;
}
}
}
newNodes.reverse();
break;

case Step.PRECEDINGSIBLING:
Expand Down

0 comments on commit 4e5429a

Please sign in to comment.