full site update

This commit is contained in:
2025-07-24 18:46:24 +02:00
parent bfe2b90d8d
commit 37a6e0ab31
6912 changed files with 540482 additions and 361712 deletions

View File

@@ -1,20 +1,30 @@
export type RegexAst = {
type: "Regex";
parent: null;
pattern: any;
flags: any;
options: any;
export type RegexPlusAst = OnigurumaAst & {
options: {
disable: {
[key: string]: boolean;
};
force: {
[key: string]: boolean;
};
};
_originMap: Map<CapturingGroupNode, CapturingGroupNode>;
_strategy: string | null;
};
/**
@typedef {{
type: 'Regex';
parent: null;
pattern: Object;
flags: Object;
options: Object;
_strategy: string | null;
}} RegexAst
@import {CapturingGroupNode, OnigurumaAst, Node} from 'oniguruma-parser/parser';
@import {Visitor} from 'oniguruma-parser/traverser';
*/
/**
@typedef {
OnigurumaAst & {
options: {
disable: {[key: string]: boolean};
force: {[key: string]: boolean};
};
_originMap: Map<CapturingGroupNode, CapturingGroupNode>;
_strategy: string | null;
}
} RegexPlusAst
*/
/**
Transforms an Oniguruma AST in-place to a [Regex+](https://github.com/slevithan/regex) AST.
@@ -25,18 +35,18 @@ to representing native ES2025 `RegExp` but with some added features (atomic grou
quantifiers, recursion). The AST doesn't use some of Regex+'s extended features like flag x or
subroutines because they follow PCRE behavior and work somewhat differently than in Oniguruma. The
AST represents what's needed to precisely reproduce Oniguruma behavior using Regex+.
@param {import('./parse.js').OnigurumaAst} ast
@param {OnigurumaAst} ast
@param {{
accuracy?: keyof Accuracy;
asciiWordBoundaries?: boolean;
avoidSubclass?: boolean;
bestEffortTarget?: keyof Target;
}} [options]
@returns {RegexAst}
@returns {RegexPlusAst}
*/
export function transform(ast: import("./parse.js").OnigurumaAst, options?: {
export function transform(ast: createAlternative, options?: {
accuracy?: "default" | "strict";
asciiWordBoundaries?: boolean;
avoidSubclass?: boolean;
bestEffortTarget?: "auto" | "ES2025" | "ES2024" | "ES2018";
}): RegexAst;
}): RegexPlusAst;