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 Jul 16, 2023
1 parent 0617cef commit fb45c01
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions xpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ var xpath = (typeof exports === 'undefined') ? {} : exports;
};
this.reduceActions[28] = function (rhs) {
rhs[0].locationPath = rhs[2];
rhs[0].locationPath.steps.unshift(new Step(Step.DESCENDANTORSELF, NodeTest.nodeTest, []));
rhs[0].locationPath.steps.push(new Step(Step.DESCENDANTORSELF, NodeTest.nodeTest, []));
rhs[0].locationPath.steps.reverse();
return rhs[0];
};
this.reduceActions[29] = function (rhs) {
Expand Down Expand Up @@ -1272,9 +1273,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 @@ -1942,13 +1944,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 @@ -2033,7 +2036,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 @@ -2043,6 +2046,7 @@ var xpath = (typeof exports === 'undefined') ? {} : exports;
}
}
}
newNodes.reverse();
break;

case Step.PRECEDINGSIBLING:
Expand Down

0 comments on commit fb45c01

Please sign in to comment.