Astro+Directus(Visual-Editing)+Snipcart Test-Stack
This commit is contained in:
commit
1459e99cb0
10119 files changed
+1499318
No files matched your search
+14
@@ -0,0 +1,14 @@
|
||||
import type { AlternativeContainerNode, Node, ParentNode, QuantifiableNode } from './parse.js';
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
type Props = {
|
||||
[key in KeysOfUnion<Node>]?: any;
|
||||
} & {
|
||||
type?: Node['type'];
|
||||
};
|
||||
declare function hasOnlyChild(node: ParentNode & {
|
||||
body: Array<Node>;
|
||||
}, props?: Props): boolean;
|
||||
declare function isAlternativeContainer(node: Node): node is AlternativeContainerNode;
|
||||
declare function isQuantifiable(node: Node): node is QuantifiableNode;
|
||||
export { hasOnlyChild, isAlternativeContainer, isQuantifiable, };
|
||||
//# sourceMappingURL=node-utils.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"node-utils.d.ts","sourceRoot":"","sources":["../../src/parser/node-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,wBAAwB,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC;AAE7F,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,GAAE,KAAK,CAAC;AACnD,KAAK,KAAK,GAAG;KAAE,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG;CAAC,GAAG;IAAC,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;CAAC,CAAC;AAExE,iBAAS,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG;IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CASpF;AAED,iBAAS,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,wBAAwB,CAQ5E;AASD,iBAAS,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,gBAAgB,CAE5D;AAaD,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,cAAc,GACf,CAAC"}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
"use strict";function o(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const r=e.body[0];return!t||Object.keys(t).every(n=>t[n]===r[n])}function a(e){return!(!i.has(e.type)||e.type==="AbsenceFunction"&&e.kind!=="repeater")}const i=new Set(["AbsenceFunction","CapturingGroup","Group","LookaroundAssertion","Regex"]);function s(e){return y.has(e.type)}const y=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);export{o as hasOnlyChild,a as isAlternativeContainer,s as isQuantifiable};
|
||||
//# sourceMappingURL=node-utils.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../src/parser/node-utils.ts"],
|
||||
"sourcesContent": ["import type {AlternativeContainerNode, Node, ParentNode, QuantifiableNode} from './parse.js';\n\ntype KeysOfUnion<T> = T extends T ? keyof T: never;\ntype Props = {[key in KeysOfUnion<Node>]?: any} & {type?: Node['type']};\n\nfunction hasOnlyChild(node: ParentNode & {body: Array<Node>}, props?: Props): boolean {\n if (!Array.isArray(node.body)) {\n throw new Error('Expected node with body array');\n }\n if (node.body.length !== 1) {\n return false;\n }\n const kid = node.body[0] as Props;\n return !props || Object.keys(props).every(key => props[key as keyof Props] === kid[key as keyof Props]);\n}\n\nfunction isAlternativeContainer(node: Node): node is AlternativeContainerNode {\n if (\n !alternativeContainerTypes.has(node.type) ||\n (node.type === 'AbsenceFunction' && node.kind !== 'repeater')\n ) {\n return false;\n }\n return true;\n}\nconst alternativeContainerTypes = new Set<Node['type']>([\n 'AbsenceFunction',\n 'CapturingGroup',\n 'Group',\n 'LookaroundAssertion',\n 'Regex',\n]);\n\nfunction isQuantifiable(node: Node): node is QuantifiableNode {\n return quantifiableTypes.has(node.type);\n}\nconst quantifiableTypes = new Set<Node['type']>([\n 'AbsenceFunction',\n 'Backreference',\n 'CapturingGroup',\n 'Character',\n 'CharacterClass',\n 'CharacterSet',\n 'Group',\n 'Quantifier',\n 'Subroutine',\n]);\n\nexport {\n hasOnlyChild,\n isAlternativeContainer,\n isQuantifiable,\n};\n"],
|
||||
"mappings": "aAKA,SAASA,EAAaC,EAAwCC,EAAwB,CACpF,GAAI,CAAC,MAAM,QAAQD,EAAK,IAAI,EAC1B,MAAM,IAAI,MAAM,+BAA+B,EAEjD,GAAIA,EAAK,KAAK,SAAW,EACvB,MAAO,GAET,MAAME,EAAMF,EAAK,KAAK,CAAC,EACvB,MAAO,CAACC,GAAS,OAAO,KAAKA,CAAK,EAAE,MAAME,GAAOF,EAAME,CAAkB,IAAMD,EAAIC,CAAkB,CAAC,CACxG,CAEA,SAASC,EAAuBJ,EAA8C,CAC5E,MACE,GAACK,EAA0B,IAAIL,EAAK,IAAI,GACvCA,EAAK,OAAS,mBAAqBA,EAAK,OAAS,WAKtD,CACA,MAAMK,EAA4B,IAAI,IAAkB,CACtD,kBACA,iBACA,QACA,sBACA,OACF,CAAC,EAED,SAASC,EAAeN,EAAsC,CAC5D,OAAOO,EAAkB,IAAIP,EAAK,IAAI,CACxC,CACA,MAAMO,EAAoB,IAAI,IAAkB,CAC9C,kBACA,gBACA,iBACA,YACA,iBACA,eACA,QACA,aACA,YACF,CAAC,EAED,OACER,KAAA,aACAK,KAAA,uBACAE,KAAA",
|
||||
"names": ["hasOnlyChild", "node", "props", "kid", "key", "isAlternativeContainer", "alternativeContainerTypes", "isQuantifiable", "quantifiableTypes"]
|
||||
}
|
||||
+208
@@ -0,0 +1,208 @@
|
||||
import type { FlagGroupModifiers, FlagProperties, TokenCharacterSetKind, TokenDirectiveKind, TokenNamedCalloutKind, TokenQuantifierKind } from '../tokenizer/tokenize.js';
|
||||
import { hasOnlyChild, isAlternativeContainer, isQuantifiable } from './node-utils.js';
|
||||
type Node = AbsenceFunctionNode | AlternativeNode | AssertionNode | BackreferenceNode | CapturingGroupNode | CharacterNode | CharacterClassNode | CharacterClassRangeNode | CharacterSetNode | DirectiveNode | FlagsNode | GroupNode | LookaroundAssertionNode | NamedCalloutNode | QuantifierNode | RegexNode | SubroutineNode;
|
||||
type OnigurumaAst = RegexNode;
|
||||
type ParentNode = AlternativeContainerNode | AlternativeNode | CharacterClassNode | CharacterClassRangeNode | QuantifierNode;
|
||||
type AlternativeContainerNode = AbsenceFunctionNode | // Some sub-kinds aren't alternative containers
|
||||
CapturingGroupNode | GroupNode | LookaroundAssertionNode | RegexNode;
|
||||
type AlternativeElementNode = AbsenceFunctionNode | AssertionNode | BackreferenceNode | CapturingGroupNode | CharacterNode | CharacterClassNode | CharacterSetNode | DirectiveNode | GroupNode | LookaroundAssertionNode | NamedCalloutNode | QuantifierNode | SubroutineNode;
|
||||
type CharacterClassElementNode = CharacterNode | CharacterClassNode | CharacterClassRangeNode | CharacterSetNode;
|
||||
type QuantifiableNode = AbsenceFunctionNode | BackreferenceNode | CapturingGroupNode | CharacterNode | CharacterClassNode | CharacterSetNode | GroupNode | QuantifierNode | SubroutineNode;
|
||||
type NodeAbsenceFunctionKind = 'repeater';
|
||||
type NodeAssertionKind = 'line_end' | 'line_start' | 'search_start' | 'string_end' | 'string_end_newline' | 'string_start' | 'text_segment_boundary' | 'word_boundary';
|
||||
type NodeCharacterClassKind = 'union' | 'intersection';
|
||||
type NodeCharacterSetKind = TokenCharacterSetKind;
|
||||
type NodeDirectiveKind = TokenDirectiveKind;
|
||||
type NodeLookaroundAssertionKind = 'lookahead' | 'lookbehind';
|
||||
type NodeNamedCalloutKind = TokenNamedCalloutKind;
|
||||
type NodeQuantifierKind = TokenQuantifierKind;
|
||||
type UnicodePropertyMap = Map<string, string>;
|
||||
type ParseOptions = {
|
||||
flags?: string;
|
||||
normalizeUnknownPropertyNames?: boolean;
|
||||
rules?: {
|
||||
captureGroup?: boolean;
|
||||
singleline?: boolean;
|
||||
};
|
||||
skipBackrefValidation?: boolean;
|
||||
skipLookbehindValidation?: boolean;
|
||||
skipPropertyNameValidation?: boolean;
|
||||
unicodePropertyMap?: UnicodePropertyMap | null;
|
||||
};
|
||||
declare function parse(pattern: string, options?: ParseOptions): OnigurumaAst;
|
||||
type AbsenceFunctionNode = {
|
||||
type: 'AbsenceFunction';
|
||||
kind: NodeAbsenceFunctionKind;
|
||||
body: Array<AlternativeNode>;
|
||||
};
|
||||
declare function createAbsenceFunction(kind: NodeAbsenceFunctionKind, options?: {
|
||||
body?: Array<AlternativeNode>;
|
||||
}): AbsenceFunctionNode;
|
||||
type AlternativeNode = {
|
||||
type: 'Alternative';
|
||||
body: Array<AlternativeElementNode>;
|
||||
};
|
||||
declare function createAlternative(options?: {
|
||||
body?: Array<AlternativeElementNode>;
|
||||
}): AlternativeNode;
|
||||
type AssertionNode = {
|
||||
type: 'Assertion';
|
||||
kind: NodeAssertionKind;
|
||||
negate?: boolean;
|
||||
};
|
||||
declare function createAssertion(kind: NodeAssertionKind, options?: {
|
||||
negate?: boolean;
|
||||
}): AssertionNode;
|
||||
type BackreferenceNode = {
|
||||
type: 'Backreference';
|
||||
ref: string | number;
|
||||
orphan?: boolean;
|
||||
};
|
||||
declare function createBackreference(ref: string | number, options?: {
|
||||
orphan?: boolean;
|
||||
}): BackreferenceNode;
|
||||
type CapturingGroupNode = {
|
||||
type: 'CapturingGroup';
|
||||
kind?: never;
|
||||
number: number;
|
||||
name?: string;
|
||||
isSubroutined?: boolean;
|
||||
body: Array<AlternativeNode>;
|
||||
};
|
||||
declare function createCapturingGroup(number: number, options?: {
|
||||
name?: string;
|
||||
isSubroutined?: boolean;
|
||||
body?: Array<AlternativeNode>;
|
||||
}): CapturingGroupNode;
|
||||
type CharacterNode = {
|
||||
type: 'Character';
|
||||
value: number;
|
||||
};
|
||||
declare function createCharacter(charCode: number, options?: {
|
||||
useLastValid?: boolean;
|
||||
}): CharacterNode;
|
||||
type CharacterClassNode = {
|
||||
type: 'CharacterClass';
|
||||
kind: NodeCharacterClassKind;
|
||||
negate: boolean;
|
||||
body: Array<CharacterClassElementNode>;
|
||||
};
|
||||
declare function createCharacterClass(options?: {
|
||||
kind?: NodeCharacterClassKind;
|
||||
negate?: boolean;
|
||||
body?: Array<CharacterClassElementNode>;
|
||||
}): CharacterClassNode;
|
||||
type CharacterClassRangeNode = {
|
||||
type: 'CharacterClassRange';
|
||||
min: CharacterNode;
|
||||
max: CharacterNode;
|
||||
};
|
||||
declare function createCharacterClassRange(min: CharacterNode, max: CharacterNode): CharacterClassRangeNode;
|
||||
type NamedCharacterSetNode = {
|
||||
type: 'CharacterSet';
|
||||
kind: 'posix' | 'property';
|
||||
value: string;
|
||||
negate: boolean;
|
||||
variableLength?: never;
|
||||
};
|
||||
type UnnamedCharacterSetNode = {
|
||||
type: 'CharacterSet';
|
||||
kind: Exclude<NodeCharacterSetKind, NamedCharacterSetNode['kind']>;
|
||||
value?: never;
|
||||
negate?: boolean;
|
||||
variableLength?: boolean;
|
||||
};
|
||||
type CharacterSetNode = NamedCharacterSetNode | UnnamedCharacterSetNode;
|
||||
/**
|
||||
Use `createUnicodeProperty` and `createPosixClass` for `kind` values `'property'` and `'posix'`.
|
||||
*/
|
||||
declare function createCharacterSet(kind: UnnamedCharacterSetNode['kind'], options?: {
|
||||
negate?: boolean;
|
||||
}): UnnamedCharacterSetNode;
|
||||
type DirectiveNode = {
|
||||
type: 'Directive';
|
||||
} & ({
|
||||
kind: 'keep';
|
||||
flags?: never;
|
||||
} | {
|
||||
kind: 'flags';
|
||||
flags: FlagGroupModifiers;
|
||||
});
|
||||
declare function createDirective(kind: NodeDirectiveKind, options?: {
|
||||
flags?: FlagGroupModifiers;
|
||||
}): DirectiveNode;
|
||||
type FlagsNode = {
|
||||
type: 'Flags';
|
||||
} & FlagProperties;
|
||||
declare function createFlags(flags: FlagProperties): FlagsNode;
|
||||
type GroupNode = {
|
||||
type: 'Group';
|
||||
kind?: never;
|
||||
atomic?: boolean;
|
||||
flags?: FlagGroupModifiers;
|
||||
body: Array<AlternativeNode>;
|
||||
};
|
||||
declare function createGroup(options?: {
|
||||
atomic?: boolean;
|
||||
flags?: FlagGroupModifiers;
|
||||
body?: Array<AlternativeNode>;
|
||||
}): GroupNode;
|
||||
type LookaroundAssertionNode = {
|
||||
type: 'LookaroundAssertion';
|
||||
kind: NodeLookaroundAssertionKind;
|
||||
negate: boolean;
|
||||
body: Array<AlternativeNode>;
|
||||
};
|
||||
declare function createLookaroundAssertion(options?: {
|
||||
behind?: boolean;
|
||||
negate?: boolean;
|
||||
body?: Array<AlternativeNode>;
|
||||
}): LookaroundAssertionNode;
|
||||
type NamedCalloutNode = {
|
||||
type: 'NamedCallout';
|
||||
kind: NodeNamedCalloutKind;
|
||||
tag: string | null;
|
||||
arguments: Array<string | number> | null;
|
||||
};
|
||||
declare function createNamedCallout(kind: NodeNamedCalloutKind, tag: string | null, args: Array<string | number> | null): NamedCalloutNode;
|
||||
declare function createPosixClass(name: string, options?: {
|
||||
negate?: boolean;
|
||||
}): NamedCharacterSetNode & {
|
||||
kind: 'posix';
|
||||
};
|
||||
type QuantifierNode = {
|
||||
type: 'Quantifier';
|
||||
kind: NodeQuantifierKind;
|
||||
min: number;
|
||||
max: number;
|
||||
body: QuantifiableNode;
|
||||
};
|
||||
declare function createQuantifier(kind: NodeQuantifierKind, min: number, max: number, body: QuantifiableNode): QuantifierNode;
|
||||
type RegexNode = {
|
||||
type: 'Regex';
|
||||
body: Array<AlternativeNode>;
|
||||
flags: FlagsNode;
|
||||
};
|
||||
declare function createRegex(flags: FlagsNode, options?: {
|
||||
body?: Array<AlternativeNode>;
|
||||
}): RegexNode;
|
||||
type SubroutineNode = {
|
||||
type: 'Subroutine';
|
||||
ref: string | number;
|
||||
};
|
||||
declare function createSubroutine(ref: string | number): SubroutineNode;
|
||||
type CreateUnicodePropertyOptions = {
|
||||
negate?: boolean;
|
||||
normalizeUnknownPropertyNames?: boolean;
|
||||
skipPropertyNameValidation?: boolean;
|
||||
unicodePropertyMap?: UnicodePropertyMap | null;
|
||||
};
|
||||
declare function createUnicodeProperty(name: string, options?: CreateUnicodePropertyOptions): NamedCharacterSetNode & {
|
||||
kind: 'property';
|
||||
};
|
||||
/**
|
||||
Generates a Unicode property lookup name: lowercase, without spaces, hyphens, or underscores.
|
||||
*/
|
||||
declare function slug(name: string): string;
|
||||
export { type AbsenceFunctionNode, type AlternativeNode, type AlternativeContainerNode, type AlternativeElementNode, type AssertionNode, type BackreferenceNode, type CapturingGroupNode, type CharacterClassElementNode, type CharacterClassNode, type CharacterClassRangeNode, type CharacterNode, type CharacterSetNode, type DirectiveNode, type FlagsNode, type GroupNode, type LookaroundAssertionNode, type NamedCalloutNode, type Node, type NodeAbsenceFunctionKind, type NodeAssertionKind, type NodeCharacterClassKind, type NodeCharacterSetKind, type NodeDirectiveKind, type NodeLookaroundAssertionKind, type NodeQuantifierKind, type OnigurumaAst, type ParentNode, type ParseOptions, type QuantifiableNode, type QuantifierNode, type RegexNode, type SubroutineNode, type UnicodePropertyMap, createAbsenceFunction, createAlternative, createAssertion, createBackreference, createCapturingGroup, createCharacter, createCharacterClass, createCharacterClassRange, createCharacterSet, createDirective, createFlags, createGroup, createLookaroundAssertion, createNamedCallout, createPosixClass, createQuantifier, createRegex, createSubroutine, createUnicodeProperty, hasOnlyChild, isAlternativeContainer, isQuantifiable, parse, slug, };
|
||||
//# sourceMappingURL=parse.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/parser/parse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4G,kBAAkB,EAAE,cAAc,EAA2D,qBAAqB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAG5U,OAAO,EAAC,YAAY,EAAE,sBAAsB,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAGrF,KAAK,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AO,CAAC;CAClB,GAAG,uBAAuB,CAsB1B;AAED,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,WAAW,CAAC;CACnB,GAAG,CAAC;IACH,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,GAAG;IACF,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,kBAAkB,CAAC;CAC3B,CAAC,CAAC;AACH,iBAAS,eAAe,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,GAAE;IAAC,KAAK,CAAC,EAAE,kBAAkB,CAAA;CAAM,GAAG,aAAa,CAiB3G;AAED,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,cAAc,CAAC;AACnB,iBAAS,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,CAKrD;AAED,KAAK,Line truncated
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
"use strict";import{tokenize as q}from"../tokenizer/tokenize.js";import{cpOf as H,getOrInsert as Z,PosixClassNames as x,r as y,throwIfNullish as g}from"../utils.js";import{hasOnlyChild as Y,isAlternativeContainer as j,isQuantifiable as S}from"./node-utils.js";function J(e,r={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...r,rules:{captureGroup:!1,singleline:!1,...r.rules}},o=q(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(p,N)=>{const u=o.tokens[t.nextIndex];switch(t.parent=p,t.nextIndex++,u.type){case"Alternator":return b();case"Assertion":return W(u);case"Backreference":return X(u,t);case"Character":return m(u.value,{useLastValid:!!N.isCheckingRangeEnd});case"CharacterClassHyphen":return ee(u,t,N);case"CharacterClassOpen":return re(u,t,N);case"CharacterSet":return ne(u,t);case"Directive":return I(u.kind,{flags:u.flags});case"GroupOpen":return te(u,t,N);case"NamedCallout":return U(u.kind,u.tag,u.arguments);case"Quantifier":return oe(u,t);case"Subroutine":return ae(u,t);default:throw new Error(`Unexpected token type "${u.type}"`)}},t={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:o.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},d=B(T(o.flags));let s=d.body[0];for(;t.nextIndex<o.tokens.length;){const p=i(s,{});p.type==="Alternative"?(d.body.push(p),s=p):s.body.push(p)}const{capturingGroups:a,hasNumberedRef:l,namedGroupsByName:c,subroutines:f}=t;if(l&&c.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:p}of f)if(typeof p=="number"){if(p>a.length)throw new Error("Subroutine uses a group number that's not defined");p&&(a[p-1].isSubroutined=!0)}else if(c.has(p)){if(c.get(p).length>1)throw new Error(y`Subroutine uses a duplicate group name "\g<${p}>"`);c.get(p)[0].isSubroutined=!0}else throw new Error(y`Subroutine uses a group name that's not defined "\g<${p}>"`);return d}function W({kind:e}){return F(g({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===y`\B`||e===y`\Y`})}function X({raw:e},r){const n=/^\\k[<']/.test(e),o=n?e.slice(3,-1):e.slice(1),i=(t,d=!1)=>{const s=r.capturingGroups.length;let a=!1;if(t>s)if(r.skipBackrefValidation)a=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return r.hasNumberedRef=!0,k(d?s+1-t:t,{orphan:a})};if(n){const t=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(o);if(t)return i(+t.groups.num,!!t.groups.sign);if(/[-+]/.test(o))throw new Error(`Invalid backref name "${e}"`);if(!r.namedGroupsByName.has(o))throw new Error(`Group name not defined to the left "${e}"`);return k(o)}return i(+o)}function ee(e,r,n){const{tokens:o,walk:i}=r,t=r.parent,d=t.body.at(-1),s=o[r.nextIndex];if(!n.isCheckingRangeEnd&&d&&d.type!=="CharacterClass"&&d.type!=="CharacterClassRange"&&s&&s.type!=="CharacterClassOpen"&&s.type!=="CharacterClassClose"&&s.type!=="CharacterClassIntersector"){const a=i(t,{...n,isCheckingRangeEnd:!0});if(d.type==="Character"&&a.type==="Character")return t.body.pop(),L(d,a);throw new Error("Invalid character class range")}return m(H("-"))}function re({negate:e},r,n){const{tokens:o,walk:i}=r,t=[C()],d=o[r.nextIndex];let s=z(d);for(;s.type!=="CharacterClassClose";){if(s.type==="CharacterClassIntersector")t.push(C()),r.nextIndex++;else{const l=t.at(-1);l.body.push(i(l,n))}s=z(o[r.nextIndex],d)}const a=C({negate:e});return t.length===1?a.body=t[0].body:(a.kind="intersection",a.body=t.map(l=>l.body.length===1?l.body[0]:l)),r.nextIndex++,a}function ne({kind:e,negate:r,value:n},o){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:t,unicodePropertyMap:d}=o;if(e==="property"){const s=w(n);if(x.has(s)&&!d?.has(s))e="posix",n=s;else return Q(n,{negate:r,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:t,unicodePropertyMap:d})}return e==="posix"?R(n,{negate:r}):E(e,{negate:r})}function te(e,r,n){const{tokens:o,capturingGroups:i,namedGroupsByName:t,skipLookbehindValidation:d,walk:s}=r,a=ie(e),l=a.type==="AbsenceFunction",c=$(a),f=c&&a.negate;if(a.type==="CapturingGroup"&&(i.push(a),a.name&&Z(t,a.name,[]).push(a)),l&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let p=D(o[r.nextIndex]);for(;p.type!=="GroupClose";){if(p.type==="Alternator")a.body.push(b()),r.nextIndex++;else{const N=a.body.at(-1),u=s(N,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookLine truncated
|
||||
//# sourceMappingURL=parse.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../src/parser/parse.ts"],
|
||||
"sourcesContent": ["import type {AssertionToken, BackreferenceToken, CharacterClassHyphenToken, CharacterClassOpenToken, CharacterSetToken, FlagGroupModifiers, FlagProperties, GroupOpenToken, QuantifierToken, SubroutineToken, Token, TokenCharacterSetKind, TokenDirectiveKind, TokenNamedCalloutKind, TokenQuantifierKind} from '../tokenizer/tokenize.js';\nimport {tokenize} from '../tokenizer/tokenize.js';\nimport {cpOf, getOrInsert, PosixClassNames, r, throwIfNullish} from '../utils.js';\nimport {hasOnlyChild, isAlternativeContainer, isQuantifiable} from './node-utils.js';\n\n// Watch out for the DOM `Node` interface!\ntype Node =\n AbsenceFunctionNode |\n AlternativeNode |\n AssertionNode |\n BackreferenceNode |\n CapturingGroupNode |\n CharacterNode |\n CharacterClassNode |\n CharacterClassRangeNode |\n CharacterSetNode |\n DirectiveNode |\n FlagsNode |\n GroupNode |\n LookaroundAssertionNode |\n NamedCalloutNode |\n QuantifierNode |\n RegexNode |\n SubroutineNode;\n\ntype OnigurumaAst = RegexNode;\n\ntype ParentNode =\n AlternativeContainerNode |\n AlternativeNode |\n CharacterClassNode |\n CharacterClassRangeNode |\n QuantifierNode;\n\n// See also `isAlternativeContainer`\ntype AlternativeContainerNode =\n AbsenceFunctionNode | // Some sub-kinds aren't alternative containers\n CapturingGroupNode |\n GroupNode |\n LookaroundAssertionNode |\n RegexNode;\n\ntype AlternativeElementNode =\n AbsenceFunctionNode |\n AssertionNode |\n BackreferenceNode |\n CapturingGroupNode |\n CharacterNode |\n CharacterClassNode |\n CharacterSetNode |\n DirectiveNode |\n GroupNode |\n LookaroundAssertionNode |\n NamedCalloutNode |\n QuantifierNode |\n SubroutineNode;\n\ntype CharacterClassElementNode =\n CharacterNode |\n CharacterClassNode |\n CharacterClassRangeNode |\n CharacterSetNode;\n\n// See also `isQuantifiable`\ntype QuantifiableNode =\n AbsenceFunctionNode |\n BackreferenceNode |\n CapturingGroupNode |\n CharacterNode |\n CharacterClassNode |\n CharacterSetNode |\n GroupNode |\n QuantifierNode |\n SubroutineNode;\n\n// TODO: Support remaining kinds; see <github.com/slevithan/oniguruma-to-es/issues/13>\ntype NodeAbsenceFunctionKind =\n 'repeater';\n\ntype NodeAssertionKind =\n 'line_end' |\n 'line_start' |\n 'search_start' |\n 'string_end' |\n 'string_end_newline' |\n 'string_start' |\n 'text_segment_boundary' |\n 'word_boundary';\n\ntype NodeCharacterClassKind =\n 'union' |\n 'intersection';\n\ntype NodeCharacterSetKind = TokenCharacterSetKind;\n\ntype NodeDirectiveKind = TokenDirectiveKind;\n\ntype NodeLookaroundAssertionKind =\n 'lookahead' |\n 'lookbehind';\n\ntype NodeNamedCalloutKind = TokenNamedCalloutKind;\n\ntype NodeQuantifierKind = TokenQuantifierKind;\n\ntype UnicodePropertyMap = Map<string, string>;\n\ntype Context = {\n capturingGroups: Array<CapturingGroupNode>;\n hasNumberedRef: boolean;\n namedGroupsByName: Map<string, Array<CapturingGroupNode>>;\n nextIndex: number;\n normalizeUnknownPropertyNames: boolean;\n parent: ParentNode;\n skipBackrefValidation: boolean;\n skipLookbehindValidation: boolean;\n skipPropertyNameValidation: boolean;\n subroutines: Array<SubroutineNode>;\n tokens: Array<Token>;\n unicodePropertyMap: UnicodePropertyMap | null;\n walk: (parent: ParentNode, state: State) => Node;\n};\n\n// Top-level `walk` calls are given empty state; nested calls can add data specific to their `walk`\ntype State = {\n isCheckingRangeEnd?: boolean;\n isInAbsenceFunction?: boolean;\n isInLookbehind?: boolean;\n isInNegLookbehind?: boolean;\n};\n\ntype ParseOptions = {\n flags?: string;\n normalizeUnknownPropertyNames?: boolean;\n rules?: {\n captureGroup?: boolean;\n singleline?: boolean;\n };\n skipBackrefValidation?: boolean;\n skipLookbehindValidation?: boolean;\n skipPropertyNameValidation?: boolean;\n unicodePropertyMap?: UnicodePropertyMap | null;\n};\n\nfunction parse(pattern: string, options: ParseOptions = {}): OnigurumaAst {\n const opts: Required<ParseOptions> = {\n flags: '',\n normalizeUnknownPropertyNames: false,\n skipBackrefValidation: false,\n skipLookbehindValidation: false,\n skipPropertyNameValidation: false,\n // `toOnigurumaAst` provides `OnigUnicodePropertyMap`, but it can be custom or `null`\n unicodePropertyMap: null,\n ...options,\n rules: {\n captureGroup: false, // `ONIG_OPTION_CAPTURE_GROUP`\n singleline: false, // `ONIG_OPTION_SINGLELINE`\n ...options.rules,\n },\n };\n const tokenized = tokenize(pattern, {\n // Limit to the tokenizer's options\n flags: opts.flags,\n rules: {\n captureGroup: opts.rules.captureGroup,\n singleline: opts.rules.singleline,\n },\n });\n const walk: Context['walk'] = (parent, state) => {\n const token = tokenized.tokens[context.nextIndex];\n context.parent = parent;\n // Advance for the next iteration\n context.nextIndex++;\n switch (token.type) {\n case 'ALine truncated
|
||||
"mappings": "aACA,OAAQ,YAAAA,MAAe,2BACvB,OAAQ,QAAAC,EAAM,eAAAC,EAAa,mBAAAC,EAAiB,KAAAC,EAAG,kBAAAC,MAAqB,cACpE,OAAQ,gBAAAC,EAAc,0BAAAC,EAAwB,kBAAAC,MAAqB,kBA6InE,SAASC,EAAMC,EAAiBC,EAAwB,CAAC,EAAiB,CACxE,MAAMC,EAA+B,CACnC,MAAO,GACP,8BAA+B,GAC/B,sBAAuB,GACvB,yBAA0B,GAC1B,2BAA4B,GAE5B,mBAAoB,KACpB,GAAGD,EACH,MAAO,CACL,aAAc,GACd,WAAY,GACZ,GAAGA,EAAQ,KACb,CACF,EACME,EAAYb,EAASU,EAAS,CAElC,MAAOE,EAAK,MACZ,MAAO,CACL,aAAcA,EAAK,MAAM,aACzB,WAAYA,EAAK,MAAM,UACzB,CACF,CAAC,EACKE,EAAwB,CAACC,EAAQC,IAAU,CAC/C,MAAMC,EAAQJ,EAAU,OAAOK,EAAQ,SAAS,EAIhD,OAH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F,CAAC,CAEL,CACA,OAAI1B,IAAS,QACJ8B,EAAiBP,EAAQ,CAAC,OAAAN,CAAM,CAAC,EAEnCc,EAAmB/B,EAAM,CAAC,OAAAiB,CAAM,CAAC,CAC1C,CAEA,SAAS/B,GAAeV,EAAuBC,EAAkBF,EAA8F,CAC7J,KAAM,CAAC,OAAAqC,EAAQ,gBAAAjB,EAAiB,kBAAAE,EAAmB,yBAAAmC,EAA0B,KAAA3D,CAAI,EAAII,Line truncated
|
||||
"names": ["tokenize", "cpOf", "getOrInsert", "PosixClassNames", "r", "throwIfNullish", "hasOnlyChild", "isAlternativeContainer", "isQuantifiable", "parse", "pattern", "options", "opts", "tokenized", "walk", "parent", "state", "token", "context", "createAlternative", "parseAssertion", "parseBackreference", "createCharacter", "parseCharacterClassHyphen", "parseCharacterClassOpen", "parseCharacterSet", "createDirective", "parseGroupOpen", "createNamedCallout", "parseQuantifier", "parseSubroutine", "ast", "createRegex", "createFlags", "top", "node", "capturingGroups", "hasNumberedRef", "namedGroupsByName", "subroutines", "ref", "kind", "createAssertion", "raw", "hasKWrapper", "fromNum", "num", "isRelative", "numCapturesToLeft", "orphan", "createBackreference", "numberedRef", "_", "tokens", "prevSiblingNode", "nextToken", "nextNode", "createCharacterClassRange", "negate", "intersections", "createCharacterClass", "ccFirstToken", "throwIfUnclosedCharacterClass", "cc", "value", "normalizeUnknownPropertyNames", "skipPropertyNameValidation", "unicodePropertyMap", "normalized", "slug", "createUnicodeProperty", "createPosixClass", "createCharacterSet", "skipLookbehindValidation", "createByGroupKind", "isThisAbsenceFunction", "isThisLookbehind", "isLookbehind", "isThisNegLookbehind", "throwIfUnclosedGroup", "alt", "child", "msg", "isLookahead", "min", "max", "quantifiedNode", "createQuantifier", "createSubroutine", "createAbsenceFunction", "getBodyForAlternativeContainer", "getBodyForElementContainer", "createCapturingGroup", "number", "isValidGroupName", "charCode", "hex", "flags", "createGroup", "atomic", "createLookaroundAssertion", "tag", "args", "name", "body", "normalizeUnicodePropertyName", "m", "first"]
|
||||
}
|
||||
Reference in new issue
Block a user