Aktueller Stand

This commit is contained in:
2026-01-23 01:33:35 +01:00
parent 082dc5e110
commit 2766dd12c5
10109 changed files with 1578841 additions and 77685 deletions

43
backend/node_modules/zeptomatch/dist/parse/utils.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
/* IMPORT */
/* MAIN */
const regex = (source) => {
const regex = new RegExp(source, 's');
return { partial: false, regex, children: [] };
};
const alternation = (children) => {
return { children };
};
const sequence = (() => {
const pushToLeaves = (parent, child, handled) => {
if (handled.has(parent))
return;
handled.add(parent);
const { children } = parent;
if (!children.length) { // Leaf node
children.push(child);
}
else { // Internal node
for (let i = 0, l = children.length; i < l; i++) {
pushToLeaves(children[i], child, handled);
}
}
};
return (nodes) => {
if (!nodes.length) { // no-op
return alternation([]);
}
for (let i = nodes.length - 1; i >= 1; i--) {
const handled = new Set();
const parent = nodes[i - 1];
const child = nodes[i];
pushToLeaves(parent, child, handled);
}
return nodes[0];
};
})();
const slash = () => {
const regex = new RegExp('[\\\\/]', 's');
return { regex, children: [] };
};
/* EXPORT */
export { regex, alternation, sequence, slash };