fix(wasm): Fix predicates in alternations, resolves
@@ -785,6 +785,7 @@ class Language {
if (c.name === captureName1) node1 = c.node;
if (c.name === captureName2) node2 = c.node;
}
+ if(node1 === undefined || node2 === undefined) return true;
return (node1.text === node2.text) === isPositive;
});
} else {
@@ -796,7 +797,7 @@ class Language {
return (c.node.text === stringValue) === isPositive;
};
}
- return false;
+ return true;
});
}
break;
@@ -819,7 +820,7 @@ class Language {
for (const c of captures) {
if (c.name === captureName) return regex.test(c.node.text) === isPositive;
}
- return false;
+ return true;
});
break;
