From 326dbe5be6a19ce1645649f5a96ed78c13a03c31 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Thu, 1 Dec 2022 23:28:32 +0900 Subject: [PATCH 1/9] feat: support for modifier --- scripts/update-fixtures.ts | 4 + src/ast.ts | 24 + src/parser.ts | 84 +- src/validator.ts | 372 +- src/visitor.ts | 39 + .../parser/literal/basic-valid-2015-u.json | 2 + .../parser/literal/basic-valid-2015.json | 4 + test/fixtures/parser/literal/basic-valid.json | 4 + ...cate-named-capturing-group-valid-2025.json | 6 + test/fixtures/parser/literal/flags.json | 6 + .../literal/modifiers-invalid-2022.json | 26 + .../literal/modifiers-invalid-2024.json | 44 + .../parser/literal/modifiers-valid-2024.json | 452 + .../named-capturing-group-invalid-2018.json | 4 +- .../named-capturing-group-valid-2018.json | 1 + ...de-property-escapes-and-regexp-v-flag.json | 1 + .../Symbol.matchAll-and-regexp-v-flag.json | 1 + .../literal/test262/not-categorized.json | 2 + .../parser/literal/test262/regexp-dotall.json | 1 + ...named-groups-and-regexp-match-indices.json | 4 + .../regexp-duplicate-named-groups.json | 10 + .../literal/test262/regexp-lookbehind.json | 3 + .../literal/test262/regexp-modifiers.json | 17797 +++++++++++++++- test/fixtures/visitor/full.json | 104 + test/visitor.ts | 4 + tsconfig.json | 2 +- 26 files changed, 18263 insertions(+), 738 deletions(-) create mode 100644 test/fixtures/parser/literal/modifiers-invalid-2022.json create mode 100644 test/fixtures/parser/literal/modifiers-invalid-2024.json create mode 100644 test/fixtures/parser/literal/modifiers-valid-2024.json diff --git a/scripts/update-fixtures.ts b/scripts/update-fixtures.ts index b7ecc12..27715ff 100644 --- a/scripts/update-fixtures.ts +++ b/scripts/update-fixtures.ts @@ -53,6 +53,8 @@ for (const filename of Object.keys(Visitor.fixturesData)) { onExpressionCharacterClassEnter: enter, onFlagsEnter: enter, onGroupEnter: enter, + onModifierFlagsEnter: enter, + onModifiersEnter: enter, onPatternEnter: enter, onQuantifierEnter: enter, onRegExpLiteralEnter: enter, @@ -71,6 +73,8 @@ for (const filename of Object.keys(Visitor.fixturesData)) { onExpressionCharacterClassLeave: leave, onFlagsLeave: leave, onGroupLeave: leave, + onModifierFlagsLeave: leave, + onModifiersLeave: leave, onPatternLeave: leave, onQuantifierLeave: leave, onRegExpLiteralLeave: leave, diff --git a/src/ast.ts b/src/ast.ts index 6628567..f8395c2 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -17,6 +17,7 @@ export type BranchNode = | ExpressionCharacterClass | Group | LookaroundAssertion + | Modifiers | Pattern | Quantifier | RegExpLiteral @@ -31,6 +32,7 @@ export type LeafNode = | Character | CharacterSet | Flags + | ModifierFlags /** * The type which includes all atom nodes. @@ -122,6 +124,7 @@ export interface Alternative extends NodeBase { export interface Group extends NodeBase { type: "Group" parent: Alternative | Quantifier + modifiers: Modifiers | null alternatives: Alternative[] } @@ -446,6 +449,27 @@ export interface UnambiguousBackreference extends BaseBackreference { resolved: CapturingGroup } +/** + * The modifiers. + */ +export interface Modifiers extends NodeBase { + type: "Modifiers" + parent: Group + add: ModifierFlags | null + remove: ModifierFlags | null +} + +/** + * The modifier flags. + */ +export interface ModifierFlags extends NodeBase { + type: "ModifierFlags" + parent: Modifiers + dotAll: boolean + ignoreCase: boolean + multiline: boolean +} + /** * The flags. */ diff --git a/src/parser.ts b/src/parser.ts index 61522af..515c4dd 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -18,6 +18,7 @@ import type { UnicodeSetsCharacterClass, ExpressionCharacterClass, StringAlternative, + Modifiers, } from "./ast" import type { EcmaVersion } from "./ecma-versions" import { latestEcmaVersion } from "./ecma-versions" @@ -31,6 +32,7 @@ type AppendableNode = | ClassStringDisjunction | Group | LookaroundAssertion + | Modifiers | Pattern | StringAlternative @@ -211,6 +213,7 @@ class RegExpParserState { start, end: start, raw: "", + modifiers: null, alternatives: [], } parent.elements.push(this._node) @@ -227,6 +230,85 @@ class RegExpParserState { this._node = node.parent } + public onModifiersEnter(start: number): void { + const parent = this._node + if (parent.type !== "Group") { + throw new Error("UnknownError") + } + + this._node = { + type: "Modifiers", + parent, + start, + end: start, + raw: "", + add: null, + remove: null, + } + parent.modifiers = this._node + } + + public onModifiersLeave(start: number, end: number): void { + const node = this._node + if (node.type !== "Modifiers" || node.parent.type !== "Group") { + throw new Error("UnknownError") + } + + node.end = end + node.raw = this.source.slice(start, end) + this._node = node.parent + } + + public onAddModifiers( + start: number, + end: number, + { + ignoreCase, + multiline, + dotAll, + }: { ignoreCase: boolean; multiline: boolean; dotAll: boolean }, + ): void { + const parent = this._node + if (parent.type !== "Modifiers") { + throw new Error("UnknownError") + } + parent.add = { + type: "ModifierFlags", + parent, + start, + end, + raw: this.source.slice(start, end), + ignoreCase, + multiline, + dotAll, + } + } + + public onRemoveModifiers( + start: number, + end: number, + { + ignoreCase, + multiline, + dotAll, + }: { ignoreCase: boolean; multiline: boolean; dotAll: boolean }, + ): void { + const parent = this._node + if (parent.type !== "Modifiers") { + throw new Error("UnknownError") + } + parent.remove = { + type: "ModifierFlags", + parent, + start, + end, + raw: this.source.slice(start, end), + ignoreCase, + multiline, + dotAll, + } + } + public onCapturingGroupEnter(start: number, name: string | null): void { const parent = this._node if (parent.type !== "Alternative") { @@ -765,7 +847,7 @@ export namespace RegExpParser { * - `2022` added `d` flag. * - `2023` added more valid Unicode Property Escapes. * - `2024` added `v` flag. - * - `2025` added duplicate named capturing groups. + * - `2025` added duplicate named capturing groups, modifiers. */ ecmaVersion?: EcmaVersion } diff --git a/src/validator.ts b/src/validator.ts index 72c5439..6766e8c 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -1,3 +1,4 @@ +import type { Flags } from "./ast" import type { EcmaVersion } from "./ecma-versions" import { latestEcmaVersion } from "./ecma-versions" import type { GroupSpecifiers } from "./group-specifiers" @@ -160,6 +161,24 @@ const CLASS_SET_RESERVED_PUNCTUATOR = new Set([ TILDE, ]) +const FLAG_PROP_TO_CODEPOINT = { + global: LATIN_SMALL_LETTER_G, + ignoreCase: LATIN_SMALL_LETTER_I, + multiline: LATIN_SMALL_LETTER_M, + unicode: LATIN_SMALL_LETTER_U, + sticky: LATIN_SMALL_LETTER_Y, + dotAll: LATIN_SMALL_LETTER_S, + hasIndices: LATIN_SMALL_LETTER_D, + unicodeSets: LATIN_SMALL_LETTER_V, +} as const +const FLAG_CODEPOINT_TO_PROP: Record = + Object.fromEntries( + Object.entries(FLAG_PROP_TO_CODEPOINT).map(([k, v]) => [v, k]), + ) as never +type FlagProp = keyof typeof FLAG_PROP_TO_CODEPOINT +type FlagCodePoint = (typeof FLAG_PROP_TO_CODEPOINT)[FlagProp] +type FlagsRecord = Omit + function isSyntaxCharacter(cp: number): boolean { // ^ $ \ . * + ? ( ) [ ] { } | return SYNTAX_CHARACTER.has(cp) @@ -244,7 +263,7 @@ export namespace RegExpValidator { * - `2022` added `d` flag. * - `2023` added more valid Unicode Property Escapes. * - `2024` added `v` flag. - * - `2025` added duplicate named capturing groups. + * - `2025` added duplicate named capturing groups, modifiers. */ ecmaVersion?: EcmaVersion @@ -368,6 +387,57 @@ export namespace RegExpValidator { */ onGroupLeave?: (start: number, end: number) => void + /** + * A function that is called when the validator entered a modifiers. + * @param start The 0-based index of the first character. + */ + onModifiersEnter?: (start: number) => void + + /** + * A function that is called when the validator left a modifiers. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onModifiersLeave?: (start: number, end: number) => void + + /** + * A function that is called when the validator found an add modifiers. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param flags flags. + * @param flags.ignoreCase `i` flag. + * @param flags.multiline `m` flag. + * @param flags.dotAll `s` flag. + */ + onAddModifiers?: ( + start: number, + end: number, + flags: { + ignoreCase: boolean + multiline: boolean + dotAll: boolean + }, + ) => void + + /** + * A function that is called when the validator found a remove modifiers. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param flags flags. + * @param flags.ignoreCase `i` flag. + * @param flags.multiline `m` flag. + * @param flags.dotAll `s` flag. + */ + onRemoveModifiers?: ( + start: number, + end: number, + flags: { + ignoreCase: boolean + multiline: boolean + dotAll: boolean + }, + ) => void + /** * A function that is called when the validator entered a capturing group. * @param start The 0-based index of the first character. @@ -786,68 +856,8 @@ export class RegExpValidator { start: number, end: number, ): void { - const existingFlags = new Set() - let global = false - let ignoreCase = false - let multiline = false - let sticky = false - let unicode = false - let dotAll = false - let hasIndices = false - let unicodeSets = false - for (let i = start; i < end; ++i) { - const flag = source.charCodeAt(i) - - if (existingFlags.has(flag)) { - this.raise(`Duplicated flag '${source[i]}'`, { index: start }) - } - existingFlags.add(flag) - - if (flag === LATIN_SMALL_LETTER_G) { - global = true - } else if (flag === LATIN_SMALL_LETTER_I) { - ignoreCase = true - } else if (flag === LATIN_SMALL_LETTER_M) { - multiline = true - } else if ( - flag === LATIN_SMALL_LETTER_U && - this.ecmaVersion >= 2015 - ) { - unicode = true - } else if ( - flag === LATIN_SMALL_LETTER_Y && - this.ecmaVersion >= 2015 - ) { - sticky = true - } else if ( - flag === LATIN_SMALL_LETTER_S && - this.ecmaVersion >= 2018 - ) { - dotAll = true - } else if ( - flag === LATIN_SMALL_LETTER_D && - this.ecmaVersion >= 2022 - ) { - hasIndices = true - } else if ( - flag === LATIN_SMALL_LETTER_V && - this.ecmaVersion >= 2024 - ) { - unicodeSets = true - } else { - this.raise(`Invalid flag '${source[i]}'`, { index: start }) - } - } - this.onRegExpFlags(start, end, { - global, - ignoreCase, - multiline, - unicode, - sticky, - dotAll, - hasIndices, - unicodeSets, - }) + const flags = this.parseFlags(source, start, end) + this.onRegExpFlags(start, end, flags) } private _parseFlagsOptionToMode( @@ -1006,6 +1016,38 @@ export class RegExpValidator { } } + private onModifiersEnter(start: number): void { + if (this._options.onModifiersEnter) { + this._options.onModifiersEnter(start) + } + } + + private onModifiersLeave(start: number, end: number): void { + if (this._options.onModifiersLeave) { + this._options.onModifiersLeave(start, end) + } + } + + private onAddModifiers( + start: number, + end: number, + flags: { ignoreCase: boolean; multiline: boolean; dotAll: boolean }, + ): void { + if (this._options.onAddModifiers) { + this._options.onAddModifiers(start, end, flags) + } + } + + private onRemoveModifiers( + start: number, + end: number, + flags: { ignoreCase: boolean; multiline: boolean; dotAll: boolean }, + ): void { + if (this._options.onRemoveModifiers) { + this._options.onRemoveModifiers(start, end, flags) + } + } + private onCapturingGroupEnter(start: number, name: string | null): void { if (this._options.onCapturingGroupEnter) { this._options.onCapturingGroupEnter(start, name) @@ -1625,7 +1667,8 @@ export class RegExpValidator { * `\\` AtomEscape[?UnicodeMode, ?UnicodeSetsMode, ?N] * CharacterClass[?UnicodeMode, ?UnicodeSetsMode] * `(` GroupSpecifier[?UnicodeMode] Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?N] `)` - * `(?:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?N] `)` + * `(?` RegularExpressionFlags `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?N] `)` + * `(?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?N] `)` * ``` * @returns `true` if it consumed the next characters successfully. */ @@ -1635,8 +1678,8 @@ export class RegExpValidator { this.consumeDot() || this.consumeReverseSolidusAtomEscape() || Boolean(this.consumeCharacterClass()) || - this.consumeUncapturingGroup() || - this.consumeCapturingGroup() + this.consumeCapturingGroup() || + this.consumeUncapturingGroup() ) } @@ -1676,14 +1719,26 @@ export class RegExpValidator { /** * Validate the next characters as the following alternatives if possible. * ``` - * `(?:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?N] ) + * `(?` RegularExpressionFlags `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?N] `)` + * `(?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?N] `)` + * RegularExpressionFlags :: + * [empty] + * RegularExpressionFlags IdentifierPartChar * ``` * @returns `true` if it consumed the next characters successfully. */ private consumeUncapturingGroup(): boolean { const start = this.index - if (this.eat3(LEFT_PARENTHESIS, QUESTION_MARK, COLON)) { + if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) { this.onGroupEnter(start) + if (this.ecmaVersion >= 2024) { + this.consumeModifiers() + } + + if (!this.eat(COLON)) { + this.rewind(start + 1) // Throw an error at the question mark position. + this.raise("Invalid group") + } this.consumeDisjunction() if (!this.eat(RIGHT_PARENTHESIS)) { this.raise("Unterminated group") @@ -1694,6 +1749,55 @@ export class RegExpValidator { return false } + /** + * Validate the next characters as the following alternatives if possible. + * ``` + * RegularExpressionFlags + * RegularExpressionFlags `-` RegularExpressionFlags + * ``` + */ + private consumeModifiers(): boolean { + const start = this.index + + if (this.eatModifiers()) { + this.onModifiersEnter(start) + const addModifiers = this.parseModifiers(start, this.index) + this.onAddModifiers(start, this.index, addModifiers) + if (this.eat(HYPHEN_MINUS)) { + const modifiersStart = this.index + if (this.eatModifiers()) { + const modifiers = this.parseModifiers( + modifiersStart, + this.index, + addModifiers, + ) + this.onRemoveModifiers( + modifiersStart, + this.index, + modifiers, + ) + } + } + this.onModifiersLeave(start, this.index) + return true + } else if (this.eat(HYPHEN_MINUS)) { + this.onModifiersEnter(start) + const modifiersStart = this.index + if (this.eatModifiers()) { + const modifiers = this.parseModifiers( + modifiersStart, + this.index, + ) + this.onRemoveModifiers(modifiersStart, this.index, modifiers) + } else { + this.raise("Invalid empty flags") + } + this.onModifiersLeave(start, this.index) + return true + } + return false + } + /** * Validate the next characters as the following alternatives if possible. * ``` @@ -1708,9 +1812,13 @@ export class RegExpValidator { if (this.ecmaVersion >= 2018) { if (this.consumeGroupSpecifier()) { name = this._lastStrValue + } else if (this.currentCodePoint === QUESTION_MARK) { + this.rewind(start) + return false } } else if (this.currentCodePoint === QUESTION_MARK) { - this.raise("Invalid group") + this.rewind(start) + return false } this.onCapturingGroupEnter(start, name) @@ -1734,8 +1842,9 @@ export class RegExpValidator { * `\` AtomEscape[~U, ?N] * `\` [lookahead = c] * CharacterClass[~U] - * `(?:` Disjunction[~U, ?N] `)` * `(` Disjunction[~U, ?N] `)` + * `(?` RegularExpressionFlags `:` Disjunction[?U, ?N] `)` + * `(?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction[?U, ?N] `)` * InvalidBracedQuantifier * ExtendedPatternCharacter * ``` @@ -1747,8 +1856,8 @@ export class RegExpValidator { this.consumeReverseSolidusAtomEscape() || this.consumeReverseSolidusFollowedByC() || Boolean(this.consumeCharacterClass()) || - this.consumeUncapturingGroup() || this.consumeCapturingGroup() || + this.consumeUncapturingGroup() || this.consumeInvalidBracedQuantifier() || this.consumeExtendedPatternCharacter() ) @@ -1857,6 +1966,7 @@ export class RegExpValidator { * @returns `true` if the group name existed. */ private consumeGroupSpecifier(): boolean { + const start = this.index if (this.eat(QUESTION_MARK)) { if (this.eatGroupName()) { if (!this._groupSpecifiers.hasInScope(this._lastStrValue)) { @@ -1865,7 +1975,7 @@ export class RegExpValidator { } this.raise("Duplicate capture group name") } - this.raise("Invalid group") + this.rewind(start) } return false } @@ -3380,4 +3490,122 @@ export class RegExpValidator { } return true } + + /** + * Eat the next characters as the following alternatives. + * ``` + * RegularExpressionFlags :: + * [empty] + * RegularExpressionFlags IdentifierPartChar + * ``` + * @returns `true` if it ate the next characters successfully. + */ + private eatModifiers(): boolean { + let ate = false + while (isIdentifierPartChar(this.currentCodePoint)) { + this.advance() + ate = true + } + return ate + } + + /** + * Parse a regexp modifiers. E.g. "ims" + * @param start The start index in the source code. + * @param end The end index in the source code. + */ + private parseModifiers( + start: number, + end: number, + alreadyUsedFlags?: { + ignoreCase: boolean + multiline: boolean + dotAll: boolean + }, + ) { + const { ignoreCase, multiline, dotAll } = this.parseFlags( + this._reader.source, + start, + end, + { + modifiers: true, + alreadyUsedFlags, + }, + ) + + return { ignoreCase, multiline, dotAll } + } + + /** + * Parse a regexp flags. E.g. "ims" + * @param start The start index in the source code. + * @param end The end index in the source code. + */ + private parseFlags( + source: string, + start: number, + end: number, + options?: { + modifiers?: boolean + alreadyUsedFlags?: Partial + }, + ): FlagsRecord { + const flags = { + global: false, + ignoreCase: false, + multiline: false, + unicode: false, + sticky: false, + dotAll: false, + hasIndices: false, + unicodeSets: false, + } + + const alreadyUsedFlags = new Set() + const validFlags = new Set() + if (options?.modifiers) { + if (options?.alreadyUsedFlags) { + for (const [flagProp] of Object.entries( + options.alreadyUsedFlags, + ).filter(([, enable]) => enable) as [FlagProp, boolean][]) { + alreadyUsedFlags.add(FLAG_PROP_TO_CODEPOINT[flagProp]) + } + } + validFlags.add(LATIN_SMALL_LETTER_I) + validFlags.add(LATIN_SMALL_LETTER_M) + validFlags.add(LATIN_SMALL_LETTER_S) + } else { + validFlags.add(LATIN_SMALL_LETTER_G) + validFlags.add(LATIN_SMALL_LETTER_I) + validFlags.add(LATIN_SMALL_LETTER_M) + if (this.ecmaVersion >= 2015) { + validFlags.add(LATIN_SMALL_LETTER_U) + validFlags.add(LATIN_SMALL_LETTER_Y) + if (this.ecmaVersion >= 2018) { + validFlags.add(LATIN_SMALL_LETTER_S) + if (this.ecmaVersion >= 2021) { + validFlags.add(LATIN_SMALL_LETTER_D) + if (this.ecmaVersion >= 2024) { + validFlags.add(LATIN_SMALL_LETTER_V) + } + } + } + } + } + for (let i = start; i < end; ++i) { + const flag = source.charCodeAt(i) as FlagCodePoint + if (validFlags.has(flag)) { + const prop = FLAG_CODEPOINT_TO_PROP[flag] + if (flags[prop] || alreadyUsedFlags.has(flag)) { + this.raise(`Duplicated flag '${source[i]}'`, { + index: start, + }) + } + flags[prop] = true + } else { + this.raise(`Invalid flag '${source[i]}'`, { index: start }) + } + } + return flags + } } diff --git a/src/visitor.ts b/src/visitor.ts index f7f8c72..a2cb2a0 100644 --- a/src/visitor.ts +++ b/src/visitor.ts @@ -13,6 +13,8 @@ import type { ExpressionCharacterClass, Flags, Group, + ModifierFlags, + Modifiers, Node, Pattern, Quantifier, @@ -83,6 +85,12 @@ export class RegExpVisitor { case "Group": this.visitGroup(node) break + case "Modifiers": + this.visitModifiers(node) + break + case "ModifierFlags": + this.visitModifierFlags(node) + break case "Pattern": this.visitPattern(node) break @@ -239,12 +247,39 @@ export class RegExpVisitor { if (this._handlers.onGroupEnter) { this._handlers.onGroupEnter(node) } + if (node.modifiers) { + this.visit(node.modifiers) + } node.alternatives.forEach(this.visit, this) if (this._handlers.onGroupLeave) { this._handlers.onGroupLeave(node) } } + private visitModifiers(node: Modifiers): void { + if (this._handlers.onModifiersEnter) { + this._handlers.onModifiersEnter(node) + } + if (node.add) { + this.visit(node.add) + } + if (node.remove) { + this.visit(node.remove) + } + if (this._handlers.onModifiersLeave) { + this._handlers.onModifiersLeave(node) + } + } + + private visitModifierFlags(node: ModifierFlags): void { + if (this._handlers.onModifierFlagsEnter) { + this._handlers.onModifierFlagsEnter(node) + } + if (this._handlers.onModifierFlagsLeave) { + this._handlers.onModifierFlagsLeave(node) + } + } + private visitPattern(node: Pattern): void { if (this._handlers.onPatternEnter) { this._handlers.onPatternEnter(node) @@ -321,6 +356,10 @@ export namespace RegExpVisitor { onFlagsLeave?: (node: Flags) => void onGroupEnter?: (node: Group) => void onGroupLeave?: (node: Group) => void + onModifierFlagsEnter?: (node: ModifierFlags) => void + onModifierFlagsLeave?: (node: ModifierFlags) => void + onModifiersEnter?: (node: Modifiers) => void + onModifiersLeave?: (node: Modifiers) => void onPatternEnter?: (node: Pattern) => void onPatternLeave?: (node: Pattern) => void onQuantifierEnter?: (node: Quantifier) => void diff --git a/test/fixtures/parser/literal/basic-valid-2015-u.json b/test/fixtures/parser/literal/basic-valid-2015-u.json index 963494d..7e510e2 100644 --- a/test/fixtures/parser/literal/basic-valid-2015-u.json +++ b/test/fixtures/parser/literal/basic-valid-2015-u.json @@ -2519,6 +2519,7 @@ "start": 1, "end": 6, "raw": "(?:a)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -11277,6 +11278,7 @@ "start": 48, "end": 67, "raw": "(?:\\.[a-zA-Z0-9-]+)", + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/basic-valid-2015.json b/test/fixtures/parser/literal/basic-valid-2015.json index ed988e9..36f3603 100644 --- a/test/fixtures/parser/literal/basic-valid-2015.json +++ b/test/fixtures/parser/literal/basic-valid-2015.json @@ -3933,6 +3933,7 @@ "start": 1, "end": 6, "raw": "(?:a)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -4087,6 +4088,7 @@ "start": 1, "end": 6, "raw": "(?:a)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -5189,6 +5191,7 @@ "start": 1, "end": 6, "raw": "(?:a)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -17010,6 +17013,7 @@ "start": 48, "end": 67, "raw": "(?:\\.[a-zA-Z0-9-]+)", + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/basic-valid.json b/test/fixtures/parser/literal/basic-valid.json index e8b04da..80189ea 100644 --- a/test/fixtures/parser/literal/basic-valid.json +++ b/test/fixtures/parser/literal/basic-valid.json @@ -3933,6 +3933,7 @@ "start": 1, "end": 6, "raw": "(?:a)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -4087,6 +4088,7 @@ "start": 1, "end": 6, "raw": "(?:a)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -5189,6 +5191,7 @@ "start": 1, "end": 6, "raw": "(?:a)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -17010,6 +17013,7 @@ "start": 48, "end": 67, "raw": "(?:\\.[a-zA-Z0-9-]+)", + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/duplicate-named-capturing-group-valid-2025.json b/test/fixtures/parser/literal/duplicate-named-capturing-group-valid-2025.json index de6bca9..56ada83 100644 --- a/test/fixtures/parser/literal/duplicate-named-capturing-group-valid-2025.json +++ b/test/fixtures/parser/literal/duplicate-named-capturing-group-valid-2025.json @@ -314,6 +314,7 @@ "start": 1, "end": 39, "raw": "(?:(?:(?a)\\k|(?b)\\k)|(?:))", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -328,6 +329,7 @@ "start": 4, "end": 33, "raw": "(?:(?a)\\k|(?b)\\k)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -454,6 +456,7 @@ "start": 34, "end": 38, "raw": "(?:)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -530,6 +533,7 @@ "start": 1, "end": 39, "raw": "(?:(?:(?a\\k)|(?b\\k))|(?:))", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -544,6 +548,7 @@ "start": 4, "end": 33, "raw": "(?:(?a\\k)|(?b\\k))", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -670,6 +675,7 @@ "start": 34, "end": 38, "raw": "(?:)", + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/flags.json b/test/fixtures/parser/literal/flags.json index ec87673..52c2834 100644 --- a/test/fixtures/parser/literal/flags.json +++ b/test/fixtures/parser/literal/flags.json @@ -31,6 +31,7 @@ "start": 1, "end": 5, "raw": "(?:)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -90,6 +91,7 @@ "start": 1, "end": 5, "raw": "(?:)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -149,6 +151,7 @@ "start": 1, "end": 5, "raw": "(?:)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -208,6 +211,7 @@ "start": 1, "end": 5, "raw": "(?:)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -267,6 +271,7 @@ "start": 1, "end": 5, "raw": "(?:)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -326,6 +331,7 @@ "start": 1, "end": 5, "raw": "(?:)", + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/modifiers-invalid-2022.json b/test/fixtures/parser/literal/modifiers-invalid-2022.json new file mode 100644 index 0000000..4790e56 --- /dev/null +++ b/test/fixtures/parser/literal/modifiers-invalid-2022.json @@ -0,0 +1,26 @@ +{ + "options": { + "strict": false, + "ecmaVersion": 2022 + }, + "patterns": { + "/(?ims-ims:sub_expression)/": { + "error": { + "message": "Invalid regular expression: /(?ims-ims:sub_expression)/: Invalid group", + "index": 2 + } + }, + "/(?ims:sub_expression)/": { + "error": { + "message": "Invalid regular expression: /(?ims:sub_expression)/: Invalid group", + "index": 2 + } + }, + "/(?-ims:sub_expression)/": { + "error": { + "message": "Invalid regular expression: /(?-ims:sub_expression)/: Invalid group", + "index": 2 + } + } + } +} \ No newline at end of file diff --git a/test/fixtures/parser/literal/modifiers-invalid-2024.json b/test/fixtures/parser/literal/modifiers-invalid-2024.json new file mode 100644 index 0000000..57df5b1 --- /dev/null +++ b/test/fixtures/parser/literal/modifiers-invalid-2024.json @@ -0,0 +1,44 @@ +{ + "options": { + "strict": false, + "ecmaVersion": 2024 + }, + "patterns": { + "/(?-:sub_expression)?/": { + "error": { + "message": "Invalid regular expression: /(?-:sub_expression)?/: Invalid empty flags", + "index": 4 + } + }, + "/(?unknown:sub_expression)?/": { + "error": { + "message": "Invalid regular expression: /(?unknown:sub_expression)?/: Invalid flag 'u'", + "index": 3 + } + }, + "/(?i-unknown:sub_expression)?/": { + "error": { + "message": "Invalid regular expression: /(?i-unknown:sub_expression)?/: Invalid flag 'u'", + "index": 5 + } + }, + "/(?ii:sub_expression)?/": { + "error": { + "message": "Invalid regular expression: /(?ii:sub_expression)?/: Duplicated flag 'i'", + "index": 3 + } + }, + "/(?-ii:sub_expression)?/": { + "error": { + "message": "Invalid regular expression: /(?-ii:sub_expression)?/: Duplicated flag 'i'", + "index": 4 + } + }, + "/(?i-i:sub_expression)?/": { + "error": { + "message": "Invalid regular expression: /(?i-i:sub_expression)?/: Duplicated flag 'i'", + "index": 5 + } + } + } +} \ No newline at end of file diff --git a/test/fixtures/parser/literal/modifiers-valid-2024.json b/test/fixtures/parser/literal/modifiers-valid-2024.json new file mode 100644 index 0000000..4d9ee71 --- /dev/null +++ b/test/fixtures/parser/literal/modifiers-valid-2024.json @@ -0,0 +1,452 @@ +{ + "options": { + "strict": false, + "ecmaVersion": 2024 + }, + "patterns": { + "/(?i-m:p)/": { + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?i-m:p)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i-m:p)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-m:p)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-m:p)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "i-m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 6, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "p", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "p", + "value": 112 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } + } + }, + "/(?ims:p)/u": { + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?ims:p)/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?ims:p)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?ims:p)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?ims:p)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "ims", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "ims", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "p", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "p", + "value": 112 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } + } + }, + "/(?-ims:p)?/": { + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?-ims:p)?/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?-ims:p)?", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-ims:p)?", + "elements": [ + { + "type": "Quantifier", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-ims:p)?", + "min": 0, + "max": 1, + "greedy": true, + "element": { + "type": "Group", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-ims:p)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-ims", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "ims", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "p", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "p", + "value": 112 + } + ] + } + ] + } + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } + } + }, + "/(?:no-modifiers)?/": { + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 19, + "raw": "/(?:no-modifiers)?/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 18, + "raw": "(?:no-modifiers)?", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 18, + "raw": "(?:no-modifiers)?", + "elements": [ + { + "type": "Quantifier", + "parent": "♻️../..", + "start": 1, + "end": 18, + "raw": "(?:no-modifiers)?", + "min": 0, + "max": 1, + "greedy": true, + "element": { + "type": "Group", + "parent": "♻️..", + "start": 1, + "end": 17, + "raw": "(?:no-modifiers)", + "modifiers": null, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 4, + "end": 16, + "raw": "no-modifiers", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 4, + "end": 5, + "raw": "n", + "value": 110 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "o", + "value": 111 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "-", + "value": 45 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "m", + "value": 109 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "o", + "value": 111 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "d", + "value": 100 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 10, + "end": 11, + "raw": "i", + "value": 105 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "f", + "value": 102 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 12, + "end": 13, + "raw": "i", + "value": 105 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 13, + "end": 14, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 14, + "end": 15, + "raw": "r", + "value": 114 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 15, + "end": 16, + "raw": "s", + "value": 115 + } + ] + } + ] + } + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 19, + "end": 19, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } + } + } + } +} \ No newline at end of file diff --git a/test/fixtures/parser/literal/named-capturing-group-invalid-2018.json b/test/fixtures/parser/literal/named-capturing-group-invalid-2018.json index ed4d33d..f4ad8a7 100644 --- a/test/fixtures/parser/literal/named-capturing-group-invalid-2018.json +++ b/test/fixtures/parser/literal/named-capturing-group-invalid-2018.json @@ -7,13 +7,13 @@ "/(?a/": { "error": { "message": "Invalid regular expression: /(?a/: Invalid group", - "index": 3 + "index": 2 } }, "/(?a)/": { "error": { "message": "Invalid regular expression: /(?a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?a)|(?b)|c)\\k)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -55,6 +56,7 @@ "start": 4, "end": 25, "raw": "(?:(?a)|(?b)|c)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -219,6 +221,7 @@ "start": 1, "end": 27, "raw": "(?:(?a)|(?a)(?b))", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -330,6 +333,7 @@ "start": 27, "end": 46, "raw": "(?:(?c)|(?d))", + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json b/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json index 1bafeb6..0b608a4 100644 --- a/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json +++ b/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json @@ -44,6 +44,7 @@ "start": 1, "end": 29, "raw": "(?:(?:(?a)|(?b))\\k)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -58,6 +59,7 @@ "start": 4, "end": 23, "raw": "(?:(?a)|(?b))", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -214,6 +216,7 @@ "start": 1, "end": 31, "raw": "(?:(?:(?a)|(?b)|c)\\k)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -228,6 +231,7 @@ "start": 4, "end": 25, "raw": "(?:(?a)|(?b)|c)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -392,6 +396,7 @@ "start": 1, "end": 20, "raw": "(?:(?a)|(?b))", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -534,6 +539,7 @@ "start": 1, "end": 27, "raw": "(?:(?a)|(?a)(?b))", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -645,6 +651,7 @@ "start": 27, "end": 46, "raw": "(?:(?c)|(?d))", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -809,6 +816,7 @@ "start": 9, "end": 20, "raw": "(?:zy\\k)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -1563,6 +1571,7 @@ "start": 2, "end": 23, "raw": "(?:(?x)|(?y)|z)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -1747,6 +1756,7 @@ "start": 2, "end": 23, "raw": "(?:(?x)|(?y)|z)", + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/regexp-lookbehind.json b/test/fixtures/parser/literal/test262/regexp-lookbehind.json index 0cfaf0d..5b40f2d 100644 --- a/test/fixtures/parser/literal/test262/regexp-lookbehind.json +++ b/test/fixtures/parser/literal/test262/regexp-lookbehind.json @@ -2844,6 +2844,7 @@ "start": 6, "end": 16, "raw": "(?:b\\d{2})", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -3126,6 +3127,7 @@ "start": 5, "end": 12, "raw": "(?:\\1b)", + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -3270,6 +3272,7 @@ "start": 5, "end": 13, "raw": "(?:\\1|b)", + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/regexp-modifiers.json b/test/fixtures/parser/literal/test262/regexp-modifiers.json index 6b57d82..5a5efa8 100644 --- a/test/fixtures/parser/literal/test262/regexp-modifiers.json +++ b/test/fixtures/parser/literal/test262/regexp-modifiers.json @@ -140,1586 +140,18059 @@ "patterns": { "/(?-1:a)/": { "error": { - "message": "Invalid regular expression: /(?-1:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-1:a)/: Invalid flag '1'", + "index": 4 } }, "/(?-:a)/": { "error": { - "message": "Invalid regular expression: /(?-:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-:a)/: Invalid empty flags", + "index": 4 } }, "/(?-I:a)/": { "error": { - "message": "Invalid regular expression: /(?-I:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-I:a)/: Invalid flag 'I'", + "index": 4 } }, "/(?-M:a)/": { "error": { - "message": "Invalid regular expression: /(?-M:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-M:a)/: Invalid flag 'M'", + "index": 4 } }, "/(?-Q:a)/": { "error": { - "message": "Invalid regular expression: /(?-Q:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-Q:a)/: Invalid flag 'Q'", + "index": 4 } }, "/(?-S:a)/": { "error": { - "message": "Invalid regular expression: /(?-S:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-S:a)/: Invalid flag 'S'", + "index": 4 } }, "/(?-d:a)/": { "error": { - "message": "Invalid regular expression: /(?-d:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-d:a)/: Invalid flag 'd'", + "index": 4 } }, "/(?-g:a)/": { "error": { - "message": "Invalid regular expression: /(?-g:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-g:a)/: Invalid flag 'g'", + "index": 4 } }, "/(?-i:(?-i:))/": { - "error": { - "message": "Invalid regular expression: /(?-i:(?-i:))/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(?-i:(?-i:))/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 13, + "raw": "(?-i:(?-i:))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-i:(?-i:))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-i:(?-i:))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "(?-i:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "(?-i:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 8, + "end": 10, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 9, + "end": 10, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 11, + "end": 11, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 14, + "end": 14, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:)/": { - "error": { - "message": "Invalid regular expression: /(?-i:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?-i:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?-i:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-i:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-i:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:)/i": { - "error": { - "message": "Invalid regular expression: /(?-i:)/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?-i:)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?-i:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-i:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-i:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 9, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:.es)/i": { - "error": { - "message": "Invalid regular expression: /(?-i:.es)/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?-i:.es)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-i:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-i:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-i:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:.es)/is": { - "error": { - "message": "Invalid regular expression: /(?-i:.es)/is: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-i:.es)/is", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-i:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-i:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-i:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 13, + "raw": "is", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:Z\\B)/ui": { - "error": { - "message": "Invalid regular expression: /(?-i:Z\\B)/ui: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-i:Z\\B)/ui", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-i:Z\\B)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-i:Z\\B)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-i:Z\\B)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "Z\\B", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "Z", + "value": 90 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 7, + "end": 9, + "raw": "\\B", + "kind": "word", + "negate": true + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 13, + "raw": "ui", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:[^ab])c/i": { - "error": { - "message": "Invalid regular expression: /(?-i:[^ab])c/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 15, + "raw": "/(?-i:[^ab])c/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 13, + "raw": "(?-i:[^ab])c", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-i:[^ab])c", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?-i:[^ab])", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 11, + "raw": "[^ab]", + "elements": [ + { + "type": "CharacterClass", + "parent": "♻️../..", + "start": 6, + "end": 11, + "raw": "[^ab]", + "unicodeSets": false, + "negate": true, + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "a", + "value": 97 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "b", + "value": 98 + } + ] + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 12, + "end": 13, + "raw": "c", + "value": 99 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 14, + "end": 15, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:[ab])c/i": { - "error": { - "message": "Invalid regular expression: /(?-i:[ab])c/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(?-i:[ab])c/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 12, + "raw": "(?-i:[ab])c", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?-i:[ab])c", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-i:[ab])", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "[ab]", + "elements": [ + { + "type": "CharacterClass", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "[ab]", + "unicodeSets": false, + "negate": false, + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "a", + "value": 97 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "b", + "value": 98 + } + ] + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "c", + "value": 99 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 13, + "end": 14, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:\\P{Lu})/ui": { - "error": { - "message": "Invalid regular expression: /(?-i:\\P{Lu})/ui: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 16, + "raw": "/(?-i:\\P{Lu})/ui", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 13, + "raw": "(?-i:\\P{Lu})", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-i:\\P{Lu})", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-i:\\P{Lu})", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\P{Lu}", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\P{Lu}", + "kind": "property", + "strings": false, + "key": "General_Category", + "value": "Lu", + "negate": true + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 14, + "end": 16, + "raw": "ui", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:\\W)/ui": { - "error": { - "message": "Invalid regular expression: /(?-i:\\W)/ui: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?-i:\\W)/ui", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-i:\\W)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-i:\\W)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-i:\\W)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\W", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\W", + "kind": "word", + "negate": true + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 12, + "raw": "ui", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:\\b)/ui": { - "error": { - "message": "Invalid regular expression: /(?-i:\\b)/ui: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?-i:\\b)/ui", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-i:\\b)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-i:\\b)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-i:\\b)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\b", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\b", + "kind": "word", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 12, + "raw": "ui", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:\\p{Lu})/ui": { - "error": { - "message": "Invalid regular expression: /(?-i:\\p{Lu})/ui: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 16, + "raw": "/(?-i:\\p{Lu})/ui", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 13, + "raw": "(?-i:\\p{Lu})", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-i:\\p{Lu})", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-i:\\p{Lu})", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\p{Lu}", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\p{Lu}", + "kind": "property", + "strings": false, + "key": "General_Category", + "value": "Lu", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 14, + "end": 16, + "raw": "ui", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:\\u0061)b/i": { - "error": { - "message": "Invalid regular expression: /(?-i:\\u0061)b/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 16, + "raw": "/(?-i:\\u0061)b/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 14, + "raw": "(?-i:\\u0061)b", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 14, + "raw": "(?-i:\\u0061)b", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-i:\\u0061)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\u0061", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\u0061", + "value": 97 + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 13, + "end": 14, + "raw": "b", + "value": 98 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 15, + "end": 16, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:\\u{0061})b/iu": { - "error": { - "message": "Invalid regular expression: /(?-i:\\u{0061})b/iu: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 19, + "raw": "/(?-i:\\u{0061})b/iu", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 16, + "raw": "(?-i:\\u{0061})b", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 16, + "raw": "(?-i:\\u{0061})b", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 15, + "raw": "(?-i:\\u{0061})", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 14, + "raw": "\\u{0061}", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 14, + "raw": "\\u{0061}", + "value": 97 + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 15, + "end": 16, + "raw": "b", + "value": 98 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 17, + "end": 19, + "raw": "iu", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:\\w)/ui": { - "error": { - "message": "Invalid regular expression: /(?-i:\\w)/ui: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?-i:\\w)/ui", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-i:\\w)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-i:\\w)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-i:\\w)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\w", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\w", + "kind": "word", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 12, + "raw": "ui", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:\\x61)b/i": { - "error": { - "message": "Invalid regular expression: /(?-i:\\x61)b/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(?-i:\\x61)b/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 12, + "raw": "(?-i:\\x61)b", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?-i:\\x61)b", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-i:\\x61)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "\\x61", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "\\x61", + "value": 97 + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "b", + "value": 98 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 13, + "end": 14, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:a(?i:b))c/i": { - "error": { - "message": "Invalid regular expression: /(?-i:a(?i:b))c/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 17, + "raw": "/(?-i:a(?i:b))c/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 15, + "raw": "(?-i:a(?i:b))c", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 15, + "raw": "(?-i:a(?i:b))c", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 14, + "raw": "(?-i:a(?i:b))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 13, + "raw": "a(?i:b)", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "a", + "value": 97 + }, + { + "type": "Group", + "parent": "♻️../..", + "start": 7, + "end": 13, + "raw": "(?i:b)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 9, + "end": 10, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 9, + "end": 10, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "b", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "b", + "value": 98 + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 14, + "end": 15, + "raw": "c", + "value": 99 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 16, + "end": 17, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:aB)/": { - "error": { - "message": "Invalid regular expression: /(?-i:aB)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?-i:aB)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-i:aB)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-i:aB)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-i:aB)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "aB", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "a", + "value": 97 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "B", + "value": 66 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:es$)/i": { - "error": { - "message": "Invalid regular expression: /(?-i:es$)/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?-i:es$)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-i:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-i:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-i:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:es$)/im": { - "error": { - "message": "Invalid regular expression: /(?-i:es$)/im: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-i:es$)/im", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-i:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-i:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-i:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 13, + "raw": "im", + "global": false, + "ignoreCase": true, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-i:fo)o/i": { - "error": { - "message": "Invalid regular expression: /(?-i:fo)o/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?-i:fo)o/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-i:fo)o", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-i:fo)o", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-i:fo)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "fo", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "f", + "value": 102 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "o", + "value": 111 + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "o", + "value": 111 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-ii:a)/": { "error": { - "message": "Invalid regular expression: /(?-ii:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-ii:a)/: Duplicated flag 'i'", + "index": 4 } }, "/(?-im:)/": { - "error": { - "message": "Invalid regular expression: /(?-im:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?-im:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-im:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-im:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-im:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-im", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "im", + "ignoreCase": true, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-im:)/im": { - "error": { - "message": "Invalid regular expression: /(?-im:)/im: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?-im:)/im", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-im:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-im:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-im:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-im", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "im", + "ignoreCase": true, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 11, + "raw": "im", + "global": false, + "ignoreCase": true, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-ims:)/": { - "error": { - "message": "Invalid regular expression: /(?-ims:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?-ims:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-ims:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-ims:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-ims:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-ims", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "ims", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-ims:)/ims": { - "error": { - "message": "Invalid regular expression: /(?-ims:)/ims: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-ims:)/ims", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-ims:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-ims:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-ims:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-ims", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "ims", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 13, + "raw": "ims", + "global": false, + "ignoreCase": true, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-imsi:a)/": { "error": { - "message": "Invalid regular expression: /(?-imsi:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-imsi:a)/: Duplicated flag 'i'", + "index": 4 } }, "/(?-is:)/": { - "error": { - "message": "Invalid regular expression: /(?-is:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?-is:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-is:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-is:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-is:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-is", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "is", + "ignoreCase": true, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-is:)/is": { - "error": { - "message": "Invalid regular expression: /(?-is:)/is: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?-is:)/is", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-is:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-is:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-is:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-is", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "is", + "ignoreCase": true, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 11, + "raw": "is", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-ism:)/": { - "error": { - "message": "Invalid regular expression: /(?-ism:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?-ism:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-ism:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-ism:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-ism:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-ism", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "ism", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-ism:)/ism": { - "error": { - "message": "Invalid regular expression: /(?-ism:)/ism: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-ism:)/ism", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-ism:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-ism:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-ism:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-ism", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "ism", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 13, + "raw": "ism", + "global": false, + "ignoreCase": true, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-iͥ:a)/": { "error": { - "message": "Invalid regular expression: /(?-iͥ:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-iͥ:a)/: Invalid flag 'ͥ'", + "index": 4 } }, "/(?-m:(?-m:))/": { - "error": { - "message": "Invalid regular expression: /(?-m:(?-m:))/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(?-m:(?-m:))/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 13, + "raw": "(?-m:(?-m:))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-m:(?-m:))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-m:(?-m:))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "(?-m:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "(?-m:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 8, + "end": 10, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 9, + "end": 10, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 11, + "end": 11, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 14, + "end": 14, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-m:)/": { - "error": { - "message": "Invalid regular expression: /(?-m:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?-m:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?-m:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-m:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-m:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-m:)/m": { - "error": { - "message": "Invalid regular expression: /(?-m:)/m: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?-m:)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?-m:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-m:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-m:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 9, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-m:es$)/m": { - "error": { - "message": "Invalid regular expression: /(?-m:es$)/m: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?-m:es$)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-m:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-m:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-m:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-m:es$)/mi": { - "error": { - "message": "Invalid regular expression: /(?-m:es$)/mi: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-m:es$)/mi", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-m:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-m:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-m:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 13, + "raw": "mi", + "global": false, + "ignoreCase": true, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-m:es(?m-:$)|js$)/m": { - "error": { - "message": "Invalid regular expression: /(?-m:es(?m-:$)|js$)/m: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 22, + "raw": "/(?-m:es(?m-:$)|js$)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 20, + "raw": "(?-m:es(?m-:$)|js$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 20, + "raw": "(?-m:es(?m-:$)|js$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 20, + "raw": "(?-m:es(?m-:$)|js$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 15, + "raw": "es(?m-:$)", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Group", + "parent": "♻️../..", + "start": 8, + "end": 15, + "raw": "(?m-:$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 10, + "end": 12, + "raw": "m-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 13, + "end": 14, + "raw": "$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 13, + "end": 14, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + }, + { + "type": "Alternative", + "parent": "♻️../..", + "start": 16, + "end": 19, + "raw": "js$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 16, + "end": 17, + "raw": "j", + "value": 106 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 17, + "end": 18, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 18, + "end": 19, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 21, + "end": 22, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-m:es(?m:$)|js$)/m": { - "error": { - "message": "Invalid regular expression: /(?-m:es(?m:$)|js$)/m: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 21, + "raw": "/(?-m:es(?m:$)|js$)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 19, + "raw": "(?-m:es(?m:$)|js$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 19, + "raw": "(?-m:es(?m:$)|js$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 19, + "raw": "(?-m:es(?m:$)|js$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 14, + "raw": "es(?m:$)", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Group", + "parent": "♻️../..", + "start": 8, + "end": 14, + "raw": "(?m:$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 12, + "end": 13, + "raw": "$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 12, + "end": 13, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + }, + { + "type": "Alternative", + "parent": "♻️../..", + "start": 15, + "end": 18, + "raw": "js$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 15, + "end": 16, + "raw": "j", + "value": 106 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 16, + "end": 17, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 17, + "end": 18, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 20, + "end": 21, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-m:es.$)/m": { - "error": { - "message": "Invalid regular expression: /(?-m:es.$)/m: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-m:es.$)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?-m:es.$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-m:es.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-m:es.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "es.$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 13, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-m:es.$)/ms": { - "error": { - "message": "Invalid regular expression: /(?-m:es.$)/ms: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(?-m:es.$)/ms", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?-m:es.$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-m:es.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-m:es.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "es.$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 14, + "raw": "ms", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-mi:)/": { - "error": { - "message": "Invalid regular expression: /(?-mi:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?-mi:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-mi:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-mi:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-mi:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-mi", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "mi", + "ignoreCase": true, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-mi:)/mi": { - "error": { - "message": "Invalid regular expression: /(?-mi:)/mi: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?-mi:)/mi", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-mi:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-mi:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-mi:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-mi", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "mi", + "ignoreCase": true, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 11, + "raw": "mi", + "global": false, + "ignoreCase": true, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-mis:)/": { - "error": { - "message": "Invalid regular expression: /(?-mis:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?-mis:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-mis:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-mis:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-mis:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-mis", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "mis", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-mis:)/mis": { - "error": { - "message": "Invalid regular expression: /(?-mis:)/mis: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-mis:)/mis", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-mis:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-mis:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-mis:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-mis", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "mis", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 13, + "raw": "mis", + "global": false, + "ignoreCase": true, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-ms:)/": { - "error": { - "message": "Invalid regular expression: /(?-ms:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?-ms:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-ms:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-ms:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-ms:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-ms", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "ms", + "ignoreCase": false, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-ms:)/ms": { - "error": { - "message": "Invalid regular expression: /(?-ms:)/ms: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?-ms:)/ms", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-ms:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-ms:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-ms:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-ms", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "ms", + "ignoreCase": false, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 11, + "raw": "ms", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-msi:)/": { - "error": { - "message": "Invalid regular expression: /(?-msi:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?-msi:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-msi:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-msi:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-msi:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-msi", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "msi", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-msi:)/msi": { - "error": { - "message": "Invalid regular expression: /(?-msi:)/msi: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-msi:)/msi", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-msi:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-msi:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-msi:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-msi", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "msi", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 13, + "raw": "msi", + "global": false, + "ignoreCase": true, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-mͫ:a)/": { "error": { - "message": "Invalid regular expression: /(?-mͫ:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-mͫ:a)/: Invalid flag 'ͫ'", + "index": 4 } }, "/(?-s\u0000:a)/": { "error": { "message": "Invalid regular expression: /(?-s\u0000:a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?-s)/": { "error": { "message": "Invalid regular expression: /(?-s)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?-s:(?-s:))/": { - "error": { - "message": "Invalid regular expression: /(?-s:(?-s:))/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(?-s:(?-s:))/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 13, + "raw": "(?-s:(?-s:))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-s:(?-s:))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?-s:(?-s:))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "(?-s:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "(?-s:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 8, + "end": 10, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 9, + "end": 10, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 11, + "end": 11, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 14, + "end": 14, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-s:(?s-:^.$))/s": { - "error": { - "message": "Invalid regular expression: /(?-s:(?s-:^.$))/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 18, + "raw": "/(?-s:(?s-:^.$))/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 16, + "raw": "(?-s:(?s-:^.$))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 16, + "raw": "(?-s:(?s-:^.$))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 16, + "raw": "(?-s:(?s-:^.$))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 15, + "raw": "(?s-:^.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 6, + "end": 15, + "raw": "(?s-:^.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 8, + "end": 10, + "raw": "s-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 8, + "end": 9, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 11, + "end": 14, + "raw": "^.$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "^", + "kind": "start" + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 12, + "end": 13, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 13, + "end": 14, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 17, + "end": 18, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-s:(?s:^.$))/s": { - "error": { - "message": "Invalid regular expression: /(?-s:(?s:^.$))/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 17, + "raw": "/(?-s:(?s:^.$))/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 15, + "raw": "(?-s:(?s:^.$))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 15, + "raw": "(?-s:(?s:^.$))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 15, + "raw": "(?-s:(?s:^.$))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 14, + "raw": "(?s:^.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 6, + "end": 14, + "raw": "(?s:^.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 8, + "end": 9, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 8, + "end": 9, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 10, + "end": 13, + "raw": "^.$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 10, + "end": 11, + "raw": "^", + "kind": "start" + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 12, + "end": 13, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 16, + "end": 17, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-s:)/": { - "error": { - "message": "Invalid regular expression: /(?-s:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?-s:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?-s:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-s:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-s:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-s:)/s": { - "error": { - "message": "Invalid regular expression: /(?-s:)/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?-s:)/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?-s:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-s:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?-s:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 9, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-s:.es$)/s": { - "error": { - "message": "Invalid regular expression: /(?-s:.es$)/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-s:.es$)/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?-s:.es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-s:.es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-s:.es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": ".es$", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 13, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-s:.es$)/sm": { - "error": { - "message": "Invalid regular expression: /(?-s:.es$)/sm: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(?-s:.es$)/sm", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?-s:.es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-s:.es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?-s:.es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": ".es$", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 14, + "raw": "sm", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-s:.es)/s": { - "error": { - "message": "Invalid regular expression: /(?-s:.es)/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?-s:.es)/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-s:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-s:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-s:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-s:.es)/si": { - "error": { - "message": "Invalid regular expression: /(?-s:.es)/si: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-s:.es)/si", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-s:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-s:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-s:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 13, + "raw": "si", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-s:^.$)/": { - "error": { - "message": "Invalid regular expression: /(?-s:^.$)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?-s:^.$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-s:^.$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-s:^.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-s:^.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "^.$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "^", + "kind": "start" + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 11, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-s:^.$)/s": { - "error": { - "message": "Invalid regular expression: /(?-s:^.$)/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?-s:^.$)/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?-s:^.$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-s:^.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?-s:^.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 5, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "^.$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "^", + "kind": "start" + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-si:)/": { - "error": { - "message": "Invalid regular expression: /(?-si:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?-si:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-si:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-si:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-si:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-si", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "si", + "ignoreCase": true, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-si:)/si": { - "error": { - "message": "Invalid regular expression: /(?-si:)/si: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?-si:)/si", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-si:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-si:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-si:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-si", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "si", + "ignoreCase": true, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 11, + "raw": "si", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-sim:)/": { - "error": { - "message": "Invalid regular expression: /(?-sim:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?-sim:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-sim:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-sim:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-sim:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-sim", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "sim", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-sim:)/sim": { - "error": { - "message": "Invalid regular expression: /(?-sim:)/sim: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-sim:)/sim", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-sim:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-sim:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-sim:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-sim", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "sim", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 13, + "raw": "sim", + "global": false, + "ignoreCase": true, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-sm:)/": { - "error": { - "message": "Invalid regular expression: /(?-sm:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?-sm:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-sm:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-sm:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-sm:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-sm", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "sm", + "ignoreCase": false, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-sm:)/sm": { - "error": { - "message": "Invalid regular expression: /(?-sm:)/sm: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?-sm:)/sm", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?-sm:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-sm:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?-sm:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "-sm", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "sm", + "ignoreCase": false, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 11, + "raw": "sm", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-smi:)/": { - "error": { - "message": "Invalid regular expression: /(?-smi:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?-smi:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-smi:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-smi:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-smi:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-smi", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "smi", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-smi:)/smi": { - "error": { - "message": "Invalid regular expression: /(?-smi:)/smi: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?-smi:)/smi", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?-smi:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-smi:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?-smi:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "-smi", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "smi", + "ignoreCase": true, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 13, + "raw": "smi", + "global": false, + "ignoreCase": true, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?-s̀:a)/": { "error": { - "message": "Invalid regular expression: /(?-s̀:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-s̀:a)/: Invalid flag '̀'", + "index": 4 } }, "/(?-s‌:a)/": { "error": { - "message": "Invalid regular expression: /(?-s‌:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-s‌:a)/: Invalid flag '‌'", + "index": 4 } }, "/(?-s‍:a)/": { "error": { - "message": "Invalid regular expression: /(?-s‍:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-s‍:a)/: Invalid flag '‍'", + "index": 4 } }, "/(?-s‎:a)/": { "error": { "message": "Invalid regular expression: /(?-s‎:a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?-s:a)/": { "error": { "message": "Invalid regular expression: /(?-s:a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?-u:a)/": { "error": { - "message": "Invalid regular expression: /(?-u:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-u:a)/: Invalid flag 'u'", + "index": 4 } }, "/(?-y:a)/": { "error": { - "message": "Invalid regular expression: /(?-y:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-y:a)/: Invalid flag 'y'", + "index": 4 } }, "/(?-İ:a)/": { "error": { - "message": "Invalid regular expression: /(?-İ:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-İ:a)/: Invalid flag 'İ'", + "index": 4 } }, "/(?-ſ:a)/": { "error": { - "message": "Invalid regular expression: /(?-ſ:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?-ſ:a)/: Invalid flag 'ſ'", + "index": 4 } }, "/(?1-:a)/": { "error": { - "message": "Invalid regular expression: /(?1-:a)/: Invalid group", + "message": "Invalid regular expression: /(?1-:a)/: Invalid flag '1'", "index": 3 } }, "/(?1:a)/": { "error": { - "message": "Invalid regular expression: /(?1:a)/: Invalid group", + "message": "Invalid regular expression: /(?1:a)/: Invalid flag '1'", "index": 3 } }, "/(?I-:a)/": { "error": { - "message": "Invalid regular expression: /(?I-:a)/: Invalid group", + "message": "Invalid regular expression: /(?I-:a)/: Invalid flag 'I'", "index": 3 } }, "/(?I:a)/": { "error": { - "message": "Invalid regular expression: /(?I:a)/: Invalid group", + "message": "Invalid regular expression: /(?I:a)/: Invalid flag 'I'", "index": 3 } }, "/(?M-:a)/": { "error": { - "message": "Invalid regular expression: /(?M-:a)/: Invalid group", + "message": "Invalid regular expression: /(?M-:a)/: Invalid flag 'M'", "index": 3 } }, "/(?M:a)/": { "error": { - "message": "Invalid regular expression: /(?M:a)/: Invalid group", + "message": "Invalid regular expression: /(?M:a)/: Invalid flag 'M'", "index": 3 } }, "/(?Q-:a)/": { "error": { - "message": "Invalid regular expression: /(?Q-:a)/: Invalid group", + "message": "Invalid regular expression: /(?Q-:a)/: Invalid flag 'Q'", "index": 3 } }, "/(?Q:a)/": { "error": { - "message": "Invalid regular expression: /(?Q:a)/: Invalid group", + "message": "Invalid regular expression: /(?Q:a)/: Invalid flag 'Q'", "index": 3 } }, "/(?S-:a)/": { "error": { - "message": "Invalid regular expression: /(?S-:a)/: Invalid group", + "message": "Invalid regular expression: /(?S-:a)/: Invalid flag 'S'", "index": 3 } }, "/(?S:a)/": { "error": { - "message": "Invalid regular expression: /(?S:a)/: Invalid group", + "message": "Invalid regular expression: /(?S:a)/: Invalid flag 'S'", "index": 3 } }, "/(?\\u0069:a)/u": { "error": { "message": "Invalid regular expression: /(?\\u0069:a)/u: Invalid group", - "index": 3 + "index": 2 } }, "/(?\\u006D:a)/u": { "error": { "message": "Invalid regular expression: /(?\\u006D:a)/u: Invalid group", - "index": 3 + "index": 2 } }, "/(?\\u0073:a)/u": { "error": { "message": "Invalid regular expression: /(?\\u0073:a)/u: Invalid group", - "index": 3 + "index": 2 } }, "/(?\\u{0073}-s:a)/": { "error": { "message": "Invalid regular expression: /(?\\u{0073}-s:a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?d-:a)/": { "error": { - "message": "Invalid regular expression: /(?d-:a)/: Invalid group", + "message": "Invalid regular expression: /(?d-:a)/: Invalid flag 'd'", "index": 3 } }, "/(?d:a)/": { "error": { - "message": "Invalid regular expression: /(?d:a)/: Invalid group", + "message": "Invalid regular expression: /(?d:a)/: Invalid flag 'd'", "index": 3 } }, "/(?g-:a)/": { "error": { - "message": "Invalid regular expression: /(?g-:a)/: Invalid group", + "message": "Invalid regular expression: /(?g-:a)/: Invalid flag 'g'", "index": 3 } }, "/(?g:a)/": { "error": { - "message": "Invalid regular expression: /(?g:a)/: Invalid group", + "message": "Invalid regular expression: /(?g:a)/: Invalid flag 'g'", "index": 3 } }, "/(?i-)/": { "error": { "message": "Invalid regular expression: /(?i-)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?i-:)/": { - "error": { - "message": "Invalid regular expression: /(?i-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?i-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?i-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?i-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?i-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:.es)/": { - "error": { - "message": "Invalid regular expression: /(?i-:.es)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?i-:.es)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?i-:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i-:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i-:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 11, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:.es)/s": { - "error": { - "message": "Invalid regular expression: /(?i-:.es)/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?i-:.es)/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?i-:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i-:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i-:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:Z\\B)/u": { - "error": { - "message": "Invalid regular expression: /(?i-:Z\\B)/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?i-:Z\\B)/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?i-:Z\\B)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i-:Z\\B)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i-:Z\\B)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "Z\\B", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "Z", + "value": 90 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 7, + "end": 9, + "raw": "\\B", + "kind": "word", + "negate": true + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:[^ab])c/": { - "error": { - "message": "Invalid regular expression: /(?i-:[^ab])c/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(?i-:[^ab])c/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 13, + "raw": "(?i-:[^ab])c", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?i-:[^ab])c", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?i-:[^ab])", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 11, + "raw": "[^ab]", + "elements": [ + { + "type": "CharacterClass", + "parent": "♻️../..", + "start": 6, + "end": 11, + "raw": "[^ab]", + "unicodeSets": false, + "negate": true, + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "a", + "value": 97 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "b", + "value": 98 + } + ] + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 12, + "end": 13, + "raw": "c", + "value": 99 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 14, + "end": 14, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:[ab])c/": { - "error": { - "message": "Invalid regular expression: /(?i-:[ab])c/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?i-:[ab])c/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 12, + "raw": "(?i-:[ab])c", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?i-:[ab])c", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?i-:[ab])", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "[ab]", + "elements": [ + { + "type": "CharacterClass", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "[ab]", + "unicodeSets": false, + "negate": false, + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "a", + "value": 97 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "b", + "value": 98 + } + ] + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "c", + "value": 99 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 13, + "end": 13, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:\\P{Lu})/u": { - "error": { - "message": "Invalid regular expression: /(?i-:\\P{Lu})/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 15, + "raw": "/(?i-:\\P{Lu})/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 13, + "raw": "(?i-:\\P{Lu})", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?i-:\\P{Lu})", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?i-:\\P{Lu})", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\P{Lu}", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\P{Lu}", + "kind": "property", + "strings": false, + "key": "General_Category", + "value": "Lu", + "negate": true + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 14, + "end": 15, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:\\W)/u": { - "error": { - "message": "Invalid regular expression: /(?i-:\\W)/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?i-:\\W)/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i-:\\W)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-:\\W)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-:\\W)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\W", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\W", + "kind": "word", + "negate": true + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:\\b)/": { - "error": { - "message": "Invalid regular expression: /(?i-:\\b)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?i-:\\b)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i-:\\b)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-:\\b)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-:\\b)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\b", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\b", + "kind": "word", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:\\b)/u": { - "error": { - "message": "Invalid regular expression: /(?i-:\\b)/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?i-:\\b)/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i-:\\b)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-:\\b)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-:\\b)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\b", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\b", + "kind": "word", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:\\p{Lu})/u": { - "error": { - "message": "Invalid regular expression: /(?i-:\\p{Lu})/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 15, + "raw": "/(?i-:\\p{Lu})/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 13, + "raw": "(?i-:\\p{Lu})", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?i-:\\p{Lu})", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?i-:\\p{Lu})", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\p{Lu}", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\p{Lu}", + "kind": "property", + "strings": false, + "key": "General_Category", + "value": "Lu", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 14, + "end": 15, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:\\u0061)b/": { - "error": { - "message": "Invalid regular expression: /(?i-:\\u0061)b/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 15, + "raw": "/(?i-:\\u0061)b/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 14, + "raw": "(?i-:\\u0061)b", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 14, + "raw": "(?i-:\\u0061)b", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?i-:\\u0061)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\u0061", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 12, + "raw": "\\u0061", + "value": 97 + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 13, + "end": 14, + "raw": "b", + "value": 98 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 15, + "end": 15, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:\\u{0061})b/u": { - "error": { - "message": "Invalid regular expression: /(?i-:\\u{0061})b/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 18, + "raw": "/(?i-:\\u{0061})b/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 16, + "raw": "(?i-:\\u{0061})b", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 16, + "raw": "(?i-:\\u{0061})b", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 15, + "raw": "(?i-:\\u{0061})", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 14, + "raw": "\\u{0061}", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 14, + "raw": "\\u{0061}", + "value": 97 + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 15, + "end": 16, + "raw": "b", + "value": 98 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 17, + "end": 18, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:\\w)/": { - "error": { - "message": "Invalid regular expression: /(?i-:\\w)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?i-:\\w)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i-:\\w)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-:\\w)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-:\\w)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\w", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\w", + "kind": "word", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:\\w)/u": { - "error": { - "message": "Invalid regular expression: /(?i-:\\w)/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?i-:\\w)/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i-:\\w)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-:\\w)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-:\\w)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\w", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\w", + "kind": "word", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:\\x61)b/": { - "error": { - "message": "Invalid regular expression: /(?i-:\\x61)b/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?i-:\\x61)b/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 12, + "raw": "(?i-:\\x61)b", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?i-:\\x61)b", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?i-:\\x61)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "\\x61", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "\\x61", + "value": 97 + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "b", + "value": 98 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 13, + "end": 13, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:es$)/": { - "error": { - "message": "Invalid regular expression: /(?i-:es$)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?i-:es$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?i-:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i-:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i-:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 11, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-:es$)/m": { - "error": { - "message": "Invalid regular expression: /(?i-:es$)/m: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?i-:es$)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?i-:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i-:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i-:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-i:a)/": { "error": { - "message": "Invalid regular expression: /(?i-i:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?i-i:a)/: Duplicated flag 'i'", + "index": 5 } }, "/(?i-m:)/": { - "error": { - "message": "Invalid regular expression: /(?i-m:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?i-m:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?i-m:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i-m:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i-m:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "i-m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 6, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-ms:)/": { - "error": { - "message": "Invalid regular expression: /(?i-ms:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?i-ms:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i-ms:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-ms:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-ms:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "i-ms", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 7, + "raw": "ms", + "ignoreCase": false, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-s:)/": { - "error": { - "message": "Invalid regular expression: /(?i-s:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?i-s:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?i-s:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i-s:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i-s:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "i-s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 6, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i-sm:)/": { - "error": { - "message": "Invalid regular expression: /(?i-sm:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?i-sm:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i-sm:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-sm:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i-sm:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "i-sm", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 7, + "raw": "sm", + "ignoreCase": false, + "multiline": true, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:(?i:))/": { - "error": { - "message": "Invalid regular expression: /(?i:(?i:))/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?i:(?i:))/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?i:(?i:))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?i:(?i:))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?i:(?i:))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 10, + "raw": "(?i:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 5, + "end": 10, + "raw": "(?i:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 7, + "end": 8, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 8, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 9, + "end": 9, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:)/": { - "error": { - "message": "Invalid regular expression: /(?i:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 7, + "raw": "/(?i:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 6, + "raw": "(?i:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?i:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?i:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 5, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:)/i": { - "error": { - "message": "Invalid regular expression: /(?i:)/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?i:)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 6, + "raw": "(?i:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?i:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?i:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 5, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 7, + "end": 8, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:.es)/": { - "error": { - "message": "Invalid regular expression: /(?i:.es)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?i:.es)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:.es)/s": { - "error": { - "message": "Invalid regular expression: /(?i:.es)/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?i:.es)/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:Z\\B)/u": { - "error": { - "message": "Invalid regular expression: /(?i:Z\\B)/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?i:Z\\B)/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i:Z\\B)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i:Z\\B)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i:Z\\B)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": "Z\\B", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "Z", + "value": 90 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 6, + "end": 8, + "raw": "\\B", + "kind": "word", + "negate": true + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:[^ab])c/": { - "error": { - "message": "Invalid regular expression: /(?i:[^ab])c/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?i:[^ab])c/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 12, + "raw": "(?i:[^ab])c", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?i:[^ab])c", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?i:[^ab])", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 10, + "raw": "[^ab]", + "elements": [ + { + "type": "CharacterClass", + "parent": "♻️../..", + "start": 5, + "end": 10, + "raw": "[^ab]", + "unicodeSets": false, + "negate": true, + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "a", + "value": 97 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "b", + "value": 98 + } + ] + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "c", + "value": 99 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 13, + "end": 13, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:[ab])c/": { - "error": { - "message": "Invalid regular expression: /(?i:[ab])c/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?i:[ab])c/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?i:[ab])c", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?i:[ab])c", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i:[ab])", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 9, + "raw": "[ab]", + "elements": [ + { + "type": "CharacterClass", + "parent": "♻️../..", + "start": 5, + "end": 9, + "raw": "[ab]", + "unicodeSets": false, + "negate": false, + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "a", + "value": 97 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "b", + "value": 98 + } + ] + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 10, + "end": 11, + "raw": "c", + "value": 99 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:\\P{Lu})/u": { - "error": { - "message": "Invalid regular expression: /(?i:\\P{Lu})/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(?i:\\P{Lu})/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 12, + "raw": "(?i:\\P{Lu})", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?i:\\P{Lu})", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?i:\\P{Lu})", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 11, + "raw": "\\P{Lu}", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 5, + "end": 11, + "raw": "\\P{Lu}", + "kind": "property", + "strings": false, + "key": "General_Category", + "value": "Lu", + "negate": true + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 13, + "end": 14, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:\\W)/u": { - "error": { - "message": "Invalid regular expression: /(?i:\\W)/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?i:\\W)/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?i:\\W)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:\\W)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:\\W)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 7, + "raw": "\\W", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 5, + "end": 7, + "raw": "\\W", + "kind": "word", + "negate": true + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 10, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:\\b)/": { - "error": { - "message": "Invalid regular expression: /(?i:\\b)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?i:\\b)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?i:\\b)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:\\b)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:\\b)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 7, + "raw": "\\b", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 5, + "end": 7, + "raw": "\\b", + "kind": "word", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:\\b)/u": { - "error": { - "message": "Invalid regular expression: /(?i:\\b)/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?i:\\b)/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?i:\\b)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:\\b)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:\\b)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 7, + "raw": "\\b", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 5, + "end": 7, + "raw": "\\b", + "kind": "word", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 10, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:\\p{Lu})/u": { - "error": { - "message": "Invalid regular expression: /(?i:\\p{Lu})/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(?i:\\p{Lu})/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 12, + "raw": "(?i:\\p{Lu})", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?i:\\p{Lu})", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?i:\\p{Lu})", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 11, + "raw": "\\p{Lu}", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 5, + "end": 11, + "raw": "\\p{Lu}", + "kind": "property", + "strings": false, + "key": "General_Category", + "value": "Lu", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 13, + "end": 14, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:\\u0061)b/": { - "error": { - "message": "Invalid regular expression: /(?i:\\u0061)b/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(?i:\\u0061)b/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 13, + "raw": "(?i:\\u0061)b", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 13, + "raw": "(?i:\\u0061)b", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(?i:\\u0061)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 11, + "raw": "\\u0061", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 11, + "raw": "\\u0061", + "value": 97 + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 12, + "end": 13, + "raw": "b", + "value": 98 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 14, + "end": 14, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:\\u{0061})b/u": { - "error": { - "message": "Invalid regular expression: /(?i:\\u{0061})b/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 17, + "raw": "/(?i:\\u{0061})b/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 15, + "raw": "(?i:\\u{0061})b", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 15, + "raw": "(?i:\\u{0061})b", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 14, + "raw": "(?i:\\u{0061})", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 13, + "raw": "\\u{0061}", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 13, + "raw": "\\u{0061}", + "value": 97 + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 14, + "end": 15, + "raw": "b", + "value": 98 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 16, + "end": 17, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:\\w)/": { - "error": { - "message": "Invalid regular expression: /(?i:\\w)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?i:\\w)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?i:\\w)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:\\w)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:\\w)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 7, + "raw": "\\w", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 5, + "end": 7, + "raw": "\\w", + "kind": "word", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:\\w)/u": { - "error": { - "message": "Invalid regular expression: /(?i:\\w)/u: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?i:\\w)/u", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?i:\\w)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:\\w)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:\\w)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 7, + "raw": "\\w", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 5, + "end": 7, + "raw": "\\w", + "kind": "word", + "negate": false + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 10, + "raw": "u", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": true, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:\\x61)b/": { - "error": { - "message": "Invalid regular expression: /(?i:\\x61)b/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?i:\\x61)b/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?i:\\x61)b", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?i:\\x61)b", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?i:\\x61)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 9, + "raw": "\\x61", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 9, + "raw": "\\x61", + "value": 97 + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 10, + "end": 11, + "raw": "b", + "value": 98 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:a)b/": { - "error": { - "message": "Invalid regular expression: /(?i:a)b/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?i:a)b/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?i:a)b", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:a)b", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?i:a)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "a", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "a", + "value": 97 + } + ] + } + ] + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "b", + "value": 98 + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:aB)/i": { - "error": { - "message": "Invalid regular expression: /(?i:aB)/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?i:aB)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?i:aB)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:aB)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?i:aB)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 7, + "raw": "aB", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "a", + "value": 97 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "B", + "value": 66 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 10, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:es$)/": { - "error": { - "message": "Invalid regular expression: /(?i:es$)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?i:es$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?i:es$)/m": { - "error": { - "message": "Invalid regular expression: /(?i:es$)/m: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?i:es$)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?i:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?i:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?ii-:a)/": { "error": { - "message": "Invalid regular expression: /(?ii-:a)/: Invalid group", + "message": "Invalid regular expression: /(?ii-:a)/: Duplicated flag 'i'", "index": 3 } }, "/(?ii:a)/": { "error": { - "message": "Invalid regular expression: /(?ii:a)/: Invalid group", + "message": "Invalid regular expression: /(?ii:a)/: Duplicated flag 'i'", "index": 3 } }, "/(?im-:)/": { - "error": { - "message": "Invalid regular expression: /(?im-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?im-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?im-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?im-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?im-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "im-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "im", + "ignoreCase": true, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?im-s:)/": { - "error": { - "message": "Invalid regular expression: /(?im-s:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?im-s:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?im-s:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?im-s:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?im-s:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "im-s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "im", + "ignoreCase": true, + "multiline": true, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 7, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?im:)/": { - "error": { - "message": "Invalid regular expression: /(?im:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?im:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?im:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?im:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?im:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "im", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "im", + "ignoreCase": true, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?ims-:)/": { - "error": { - "message": "Invalid regular expression: /(?ims-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?ims-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?ims-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?ims-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?ims-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "ims-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "ims", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?ims-m:a)/": { "error": { - "message": "Invalid regular expression: /(?ims-m:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?ims-m:a)/: Duplicated flag 'm'", + "index": 7 } }, "/(?ims:)/": { - "error": { - "message": "Invalid regular expression: /(?ims:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?ims:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?ims:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?ims:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?ims:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "ims", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "ims", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?ims:)/ims": { - "error": { - "message": "Invalid regular expression: /(?ims:)/ims: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?ims:)/ims", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?ims:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?ims:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?ims:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "ims", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "ims", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 12, + "raw": "ims", + "global": false, + "ignoreCase": true, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?imsi-:a)/": { "error": { - "message": "Invalid regular expression: /(?imsi-:a)/: Invalid group", + "message": "Invalid regular expression: /(?imsi-:a)/: Duplicated flag 'i'", "index": 3 } }, "/(?imsi:a)/": { "error": { - "message": "Invalid regular expression: /(?imsi:a)/: Invalid group", + "message": "Invalid regular expression: /(?imsi:a)/: Duplicated flag 'i'", "index": 3 } }, "/(?is-:)/": { - "error": { - "message": "Invalid regular expression: /(?is-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?is-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?is-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?is-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?is-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "is-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "is", + "ignoreCase": true, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?is-m:)/": { - "error": { - "message": "Invalid regular expression: /(?is-m:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?is-m:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?is-m:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?is-m:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?is-m:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "is-m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "is", + "ignoreCase": true, + "multiline": false, + "dotAll": true + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 7, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?is:)/": { - "error": { - "message": "Invalid regular expression: /(?is:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?is:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?is:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?is:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?is:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "is", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "is", + "ignoreCase": true, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?ism-:)/": { - "error": { - "message": "Invalid regular expression: /(?ism-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?ism-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?ism-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?ism-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?ism-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "ism-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "ism", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?ism:)/": { - "error": { - "message": "Invalid regular expression: /(?ism:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?ism:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?ism:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?ism:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?ism:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "ism", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "ism", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?iͥ-:a)/": { "error": { - "message": "Invalid regular expression: /(?iͥ-:a)/: Invalid group", + "message": "Invalid regular expression: /(?iͥ-:a)/: Invalid flag 'ͥ'", "index": 3 } }, "/(?iͥ:a)/": { "error": { - "message": "Invalid regular expression: /(?iͥ:a)/: Invalid group", + "message": "Invalid regular expression: /(?iͥ:a)/: Invalid flag 'ͥ'", "index": 3 } }, "/(?m-:)/": { - "error": { - "message": "Invalid regular expression: /(?m-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?m-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?m-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?m-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?m-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "m-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m-:es$)/": { - "error": { - "message": "Invalid regular expression: /(?m-:es$)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?m-:es$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?m-:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?m-:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?m-:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "m-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 11, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m-:es$)/i": { - "error": { - "message": "Invalid regular expression: /(?m-:es$)/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?m-:es$)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?m-:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?m-:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?m-:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "m-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m-:es$|(?-m:js$))/": { - "error": { - "message": "Invalid regular expression: /(?m-:es$|(?-m:js$))/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 21, + "raw": "/(?m-:es$|(?-m:js$))/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 20, + "raw": "(?m-:es$|(?-m:js$))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 20, + "raw": "(?m-:es$|(?-m:js$))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 20, + "raw": "(?m-:es$|(?-m:js$))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "m-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + }, + { + "type": "Alternative", + "parent": "♻️../..", + "start": 10, + "end": 19, + "raw": "(?-m:js$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 10, + "end": 19, + "raw": "(?-m:js$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 12, + "end": 14, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 13, + "end": 14, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 15, + "end": 18, + "raw": "js$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 15, + "end": 16, + "raw": "j", + "value": 106 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 16, + "end": 17, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 17, + "end": 18, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 21, + "end": 21, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m-:es.$)/": { - "error": { - "message": "Invalid regular expression: /(?m-:es.$)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?m-:es.$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?m-:es.$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?m-:es.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?m-:es.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "m-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "es.$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m-:es.$)/s": { - "error": { - "message": "Invalid regular expression: /(?m-:es.$)/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?m-:es.$)/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?m-:es.$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?m-:es.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?m-:es.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "m-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": "es.$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 13, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m-i:)/": { - "error": { - "message": "Invalid regular expression: /(?m-i:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?m-i:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?m-i:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?m-i:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?m-i:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "m-i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 6, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m-i:^a$)/i": { - "error": { - "message": "Invalid regular expression: /(?m-i:^a$)/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?m-i:^a$)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?m-i:^a$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?m-i:^a$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?m-i:^a$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "m-i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 6, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 10, + "raw": "^a$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "^", + "kind": "start" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "a", + "value": 97 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 13, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m-ims:a)/": { "error": { - "message": "Invalid regular expression: /(?m-ims:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?m-ims:a)/: Duplicated flag 'm'", + "index": 5 } }, "/(?m-is:)/": { - "error": { - "message": "Invalid regular expression: /(?m-is:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?m-is:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?m-is:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?m-is:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?m-is:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "m-is", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 7, + "raw": "is", + "ignoreCase": true, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m-m:a)/": { "error": { - "message": "Invalid regular expression: /(?m-m:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?m-m:a)/: Duplicated flag 'm'", + "index": 5 } }, "/(?m-s:)/": { - "error": { - "message": "Invalid regular expression: /(?m-s:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?m-s:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?m-s:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?m-s:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?m-s:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "m-s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 6, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m-si:)/": { - "error": { - "message": "Invalid regular expression: /(?m-si:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?m-si:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?m-si:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?m-si:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?m-si:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "m-si", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 7, + "raw": "si", + "ignoreCase": true, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m:(?m:))/": { - "error": { - "message": "Invalid regular expression: /(?m:(?m:))/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?m:(?m:))/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?m:(?m:))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?m:(?m:))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?m:(?m:))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 10, + "raw": "(?m:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 5, + "end": 10, + "raw": "(?m:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 7, + "end": 8, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 8, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 9, + "end": 9, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m:)/": { - "error": { - "message": "Invalid regular expression: /(?m:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 7, + "raw": "/(?m:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 6, + "raw": "(?m:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?m:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?m:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 5, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m:)/m": { - "error": { - "message": "Invalid regular expression: /(?m:)/m: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?m:)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 6, + "raw": "(?m:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?m:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?m:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 5, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 7, + "end": 8, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m:^(?-i:a)$)/i": { - "error": { - "message": "Invalid regular expression: /(?m:^(?-i:a)$)/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 17, + "raw": "/(?m:^(?-i:a)$)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 15, + "raw": "(?m:^(?-i:a)$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 15, + "raw": "(?m:^(?-i:a)$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 15, + "raw": "(?m:^(?-i:a)$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 14, + "raw": "^(?-i:a)$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "^", + "kind": "start" + }, + { + "type": "Group", + "parent": "♻️../..", + "start": 6, + "end": 13, + "raw": "(?-i:a)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 8, + "end": 10, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 9, + "end": 10, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "a", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "a", + "value": 97 + } + ] + } + ] + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 13, + "end": 14, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 16, + "end": 17, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m:es$)/": { - "error": { - "message": "Invalid regular expression: /(?m:es$)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?m:es$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?m:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?m:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?m:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m:es$)/i": { - "error": { - "message": "Invalid regular expression: /(?m:es$)/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?m:es$)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?m:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?m:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?m:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m:es$)/m": { - "error": { - "message": "Invalid regular expression: /(?m:es$)/m: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?m:es$)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?m:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?m:es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?m:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m:es$|(?-m:js$))/": { - "error": { - "message": "Invalid regular expression: /(?m:es$|(?-m:js$))/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 20, + "raw": "/(?m:es$|(?-m:js$))/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 19, + "raw": "(?m:es$|(?-m:js$))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 19, + "raw": "(?m:es$|(?-m:js$))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 19, + "raw": "(?m:es$|(?-m:js$))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "$", + "kind": "end" + } + ] + }, + { + "type": "Alternative", + "parent": "♻️../..", + "start": 9, + "end": 18, + "raw": "(?-m:js$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 9, + "end": 18, + "raw": "(?-m:js$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 11, + "end": 13, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 12, + "end": 13, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 14, + "end": 17, + "raw": "js$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 14, + "end": 15, + "raw": "j", + "value": 106 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 15, + "end": 16, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 16, + "end": 17, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 20, + "end": 20, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m:es.$)/": { - "error": { - "message": "Invalid regular expression: /(?m:es.$)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?m:es.$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?m:es.$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?m:es.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?m:es.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 9, + "raw": "es.$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "s", + "value": 115 + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 11, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?m:es.$)/s": { - "error": { - "message": "Invalid regular expression: /(?m:es.$)/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?m:es.$)/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?m:es.$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?m:es.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?m:es.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 9, + "raw": "es.$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "s", + "value": 115 + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?mi-:)/": { - "error": { - "message": "Invalid regular expression: /(?mi-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?mi-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?mi-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?mi-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?mi-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "mi-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "mi", + "ignoreCase": true, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?mi-s:)/": { - "error": { - "message": "Invalid regular expression: /(?mi-s:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?mi-s:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?mi-s:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?mi-s:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?mi-s:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "mi-s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "mi", + "ignoreCase": true, + "multiline": true, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 7, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?mi:)/": { - "error": { - "message": "Invalid regular expression: /(?mi:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?mi:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?mi:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?mi:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?mi:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "mi", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "mi", + "ignoreCase": true, + "multiline": true, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?mis-:)/": { - "error": { - "message": "Invalid regular expression: /(?mis-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?mis-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?mis-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?mis-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?mis-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "mis-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "mis", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?mis:)/": { - "error": { - "message": "Invalid regular expression: /(?mis:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?mis:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?mis:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?mis:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?mis:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "mis", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "mis", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?ms-:)/": { - "error": { - "message": "Invalid regular expression: /(?ms-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?ms-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?ms-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?ms-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?ms-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "ms-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "ms", + "ignoreCase": false, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?ms-i)/": { "error": { "message": "Invalid regular expression: /(?ms-i)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?ms-i:)/": { - "error": { - "message": "Invalid regular expression: /(?ms-i:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?ms-i:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?ms-i:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?ms-i:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?ms-i:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "ms-i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "ms", + "ignoreCase": false, + "multiline": true, + "dotAll": true + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 7, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?ms:)/": { - "error": { - "message": "Invalid regular expression: /(?ms:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?ms:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?ms:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?ms:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?ms:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "ms", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "ms", + "ignoreCase": false, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?msi-:)/": { - "error": { - "message": "Invalid regular expression: /(?msi-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?msi-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?msi-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?msi-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?msi-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "msi-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "msi", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?msi:)/": { - "error": { - "message": "Invalid regular expression: /(?msi:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?msi:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?msi:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?msi:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?msi:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "msi", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "msi", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?mͫ-:a)/": { "error": { - "message": "Invalid regular expression: /(?mͫ-:a)/: Invalid group", + "message": "Invalid regular expression: /(?mͫ-:a)/: Invalid flag 'ͫ'", "index": 3 } }, "/(?mͫ:a)/": { "error": { - "message": "Invalid regular expression: /(?mͫ:a)/: Invalid group", + "message": "Invalid regular expression: /(?mͫ:a)/: Invalid flag 'ͫ'", "index": 3 } }, "/(?s\u0000-:a)/": { "error": { "message": "Invalid regular expression: /(?s\u0000-:a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?s\u0000:a)/": { "error": { "message": "Invalid regular expression: /(?s\u0000:a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?s-:(?-s:^.$))/": { - "error": { - "message": "Invalid regular expression: /(?s-:(?-s:^.$))/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 17, + "raw": "/(?s-:(?-s:^.$))/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 16, + "raw": "(?s-:(?-s:^.$))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 16, + "raw": "(?s-:(?-s:^.$))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 16, + "raw": "(?s-:(?-s:^.$))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "s-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 15, + "raw": "(?-s:^.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 6, + "end": 15, + "raw": "(?-s:^.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 8, + "end": 10, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 9, + "end": 10, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 11, + "end": 14, + "raw": "^.$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": "^", + "kind": "start" + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 12, + "end": 13, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 13, + "end": 14, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 17, + "end": 17, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s-:)/": { - "error": { - "message": "Invalid regular expression: /(?s-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?s-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?s-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?s-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?s-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "s-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s-:.es$)/": { - "error": { - "message": "Invalid regular expression: /(?s-:.es$)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?s-:.es$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?s-:.es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?s-:.es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?s-:.es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "s-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": ".es$", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s-:.es$)/m": { - "error": { - "message": "Invalid regular expression: /(?s-:.es$)/m: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(?s-:.es$)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?s-:.es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?s-:.es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?s-:.es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "s-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 10, + "raw": ".es$", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 13, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s-:.es)/": { - "error": { - "message": "Invalid regular expression: /(?s-:.es)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?s-:.es)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?s-:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?s-:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?s-:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "s-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 11, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s-:.es)/i": { - "error": { - "message": "Invalid regular expression: /(?s-:.es)/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?s-:.es)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?s-:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?s-:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?s-:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "s-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s-:^.$)/": { - "error": { - "message": "Invalid regular expression: /(?s-:^.$)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?s-:^.$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?s-:^.$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?s-:^.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?s-:^.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "s-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 9, + "raw": "^.$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "^", + "kind": "start" + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 11, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s-\\u{0073}:a)/": { "error": { "message": "Invalid regular expression: /(?s-\\u{0073}:a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?s-i:)/": { - "error": { - "message": "Invalid regular expression: /(?s-i:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?s-i:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?s-i:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?s-i:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?s-i:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "s-i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 6, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s-im:)/": { - "error": { - "message": "Invalid regular expression: /(?s-im:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?s-im:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?s-im:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s-im:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s-im:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "s-im", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 7, + "raw": "im", + "ignoreCase": true, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s-m:)/": { - "error": { - "message": "Invalid regular expression: /(?s-m:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?s-m:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?s-m:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?s-m:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?s-m:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "s-m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 6, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s-mi:)/": { - "error": { - "message": "Invalid regular expression: /(?s-mi:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?s-mi:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?s-mi:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s-mi:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s-mi:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "s-mi", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 7, + "raw": "mi", + "ignoreCase": true, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s-s:a)/": { "error": { - "message": "Invalid regular expression: /(?s-s:a)/: Invalid group", - "index": 3 + "message": "Invalid regular expression: /(?s-s:a)/: Duplicated flag 's'", + "index": 5 } }, "/(?s:(?-s:^.$))/": { - "error": { - "message": "Invalid regular expression: /(?s:(?-s:^.$))/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 16, + "raw": "/(?s:(?-s:^.$))/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 15, + "raw": "(?s:(?-s:^.$))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 15, + "raw": "(?s:(?-s:^.$))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 15, + "raw": "(?s:(?-s:^.$))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 14, + "raw": "(?-s:^.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 5, + "end": 14, + "raw": "(?-s:^.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 7, + "end": 9, + "raw": "-s", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 8, + "end": 9, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 10, + "end": 13, + "raw": "^.$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 10, + "end": 11, + "raw": "^", + "kind": "start" + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 11, + "end": 12, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 12, + "end": 13, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 16, + "end": 16, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s:(?s:))/": { - "error": { - "message": "Invalid regular expression: /(?s:(?s:))/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?s:(?s:))/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(?s:(?s:))", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?s:(?s:))", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(?s:(?s:))", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 10, + "raw": "(?s:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 5, + "end": 10, + "raw": "(?s:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 7, + "end": 8, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 8, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 9, + "end": 9, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s:)/": { - "error": { - "message": "Invalid regular expression: /(?s:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 7, + "raw": "/(?s:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 6, + "raw": "(?s:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?s:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?s:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 5, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s:)/s": { - "error": { - "message": "Invalid regular expression: /(?s:)/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?s:)/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 6, + "raw": "(?s:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?s:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 6, + "raw": "(?s:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 5, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 7, + "end": 8, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s:.es$)/": { - "error": { - "message": "Invalid regular expression: /(?s:.es$)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?s:.es$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?s:.es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?s:.es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?s:.es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 9, + "raw": ".es$", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 11, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s:.es$)/m": { - "error": { - "message": "Invalid regular expression: /(?s:.es$)/m: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(?s:.es$)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 10, + "raw": "(?s:.es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?s:.es$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 10, + "raw": "(?s:.es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 9, + "raw": ".es$", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 11, + "end": 12, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s:.es)/": { - "error": { - "message": "Invalid regular expression: /(?s:.es)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?s:.es)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?s:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s:.es)/i": { - "error": { - "message": "Invalid regular expression: /(?s:.es)/i: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?s:.es)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?s:.es)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s:.es)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s:.es)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": ".es", + "elements": [ + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": ".", + "kind": "any" + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "s", + "value": 115 + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s:^.$)/": { - "error": { - "message": "Invalid regular expression: /(?s:^.$)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?s:^.$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?s:^.$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s:^.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s:^.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": "^.$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "^", + "kind": "start" + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s:^.$)/s": { - "error": { - "message": "Invalid regular expression: /(?s:^.$)/s: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 11, + "raw": "/(?s:^.$)/s", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?s:^.$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s:^.$)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?s:^.$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 4, + "raw": "s", + "ignoreCase": false, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 5, + "end": 8, + "raw": "^.$", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 5, + "end": 6, + "raw": "^", + "kind": "start" + }, + { + "type": "CharacterSet", + "parent": "♻️../..", + "start": 6, + "end": 7, + "raw": ".", + "kind": "any" + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 11, + "raw": "s", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": true, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?si-:)/": { - "error": { - "message": "Invalid regular expression: /(?si-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?si-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?si-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?si-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?si-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "si-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "si", + "ignoreCase": true, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?si-m:)/": { - "error": { - "message": "Invalid regular expression: /(?si-m:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?si-m:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?si-m:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?si-m:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?si-m:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "si-m", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "si", + "ignoreCase": true, + "multiline": false, + "dotAll": true + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 7, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?si:)/": { - "error": { - "message": "Invalid regular expression: /(?si:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?si:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?si:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?si:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?si:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "si", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "si", + "ignoreCase": true, + "multiline": false, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?sim-:)/": { - "error": { - "message": "Invalid regular expression: /(?sim-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?sim-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?sim-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?sim-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?sim-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "sim-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "sim", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?sim:)/": { - "error": { - "message": "Invalid regular expression: /(?sim:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?sim:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?sim:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?sim:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?sim:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "sim", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "sim", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?sm-:)/": { - "error": { - "message": "Invalid regular expression: /(?sm-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?sm-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?sm-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?sm-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?sm-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "sm-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "sm", + "ignoreCase": false, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?sm-i:)/": { - "error": { - "message": "Invalid regular expression: /(?sm-i:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?sm-i:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?sm-i:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?sm-i:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?sm-i:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "sm-i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "sm", + "ignoreCase": false, + "multiline": true, + "dotAll": true + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 7, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?sm:)/": { - "error": { - "message": "Invalid regular expression: /(?sm:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 8, + "raw": "/(?sm:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 7, + "raw": "(?sm:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?sm:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 7, + "raw": "(?sm:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "sm", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 5, + "raw": "sm", + "ignoreCase": false, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 6, + "end": 6, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?smi-:)/": { - "error": { - "message": "Invalid regular expression: /(?smi-:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 10, + "raw": "/(?smi-:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 9, + "raw": "(?smi-:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?smi-:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 9, + "raw": "(?smi-:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 7, + "raw": "smi-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "smi", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 8, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?smi:)/": { - "error": { - "message": "Invalid regular expression: /(?smi:)/: Invalid group", - "index": 3 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 9, + "raw": "/(?smi:)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 8, + "raw": "(?smi:)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?smi:)", + "elements": [ + { + "type": "Group", + "parent": "♻️../..", + "start": 1, + "end": 8, + "raw": "(?smi:)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "smi", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 6, + "raw": "smi", + "ignoreCase": true, + "multiline": true, + "dotAll": true + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 7, + "raw": "", + "elements": [] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 9, + "end": 9, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(?s̀-:a)/": { "error": { - "message": "Invalid regular expression: /(?s̀-:a)/: Invalid group", + "message": "Invalid regular expression: /(?s̀-:a)/: Invalid flag '̀'", "index": 3 } }, "/(?s̀:a)/": { "error": { - "message": "Invalid regular expression: /(?s̀:a)/: Invalid group", + "message": "Invalid regular expression: /(?s̀:a)/: Invalid flag '̀'", "index": 3 } }, "/(?s‌-:a)/": { "error": { - "message": "Invalid regular expression: /(?s‌-:a)/: Invalid group", + "message": "Invalid regular expression: /(?s‌-:a)/: Invalid flag '‌'", "index": 3 } }, "/(?s‌:a)/": { "error": { - "message": "Invalid regular expression: /(?s‌:a)/: Invalid group", + "message": "Invalid regular expression: /(?s‌:a)/: Invalid flag '‌'", "index": 3 } }, "/(?s‍-:a)/": { "error": { - "message": "Invalid regular expression: /(?s‍-:a)/: Invalid group", + "message": "Invalid regular expression: /(?s‍-:a)/: Invalid flag '‍'", "index": 3 } }, "/(?s‍:a)/": { "error": { - "message": "Invalid regular expression: /(?s‍:a)/: Invalid group", + "message": "Invalid regular expression: /(?s‍:a)/: Invalid flag '‍'", "index": 3 } }, "/(?s‎-:a)/": { "error": { "message": "Invalid regular expression: /(?s‎-:a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?s‎:a)/": { "error": { "message": "Invalid regular expression: /(?s‎:a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?s-:a)/": { "error": { "message": "Invalid regular expression: /(?s-:a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?s:a)/": { "error": { "message": "Invalid regular expression: /(?s:a)/: Invalid group", - "index": 3 + "index": 2 } }, "/(?u-:a)/": { "error": { - "message": "Invalid regular expression: /(?u-:a)/: Invalid group", + "message": "Invalid regular expression: /(?u-:a)/: Invalid flag 'u'", "index": 3 } }, "/(?u:a)/": { "error": { - "message": "Invalid regular expression: /(?u:a)/: Invalid group", + "message": "Invalid regular expression: /(?u:a)/: Invalid flag 'u'", "index": 3 } }, "/(?y-:a)/": { "error": { - "message": "Invalid regular expression: /(?y-:a)/: Invalid group", + "message": "Invalid regular expression: /(?y-:a)/: Invalid flag 'y'", "index": 3 } }, "/(?y:a)/": { "error": { - "message": "Invalid regular expression: /(?y:a)/: Invalid group", + "message": "Invalid regular expression: /(?y:a)/: Invalid flag 'y'", "index": 3 } }, "/(?İ-:a)/": { "error": { - "message": "Invalid regular expression: /(?İ-:a)/: Invalid group", + "message": "Invalid regular expression: /(?İ-:a)/: Invalid flag 'İ'", "index": 3 } }, "/(?İ:a)/": { "error": { - "message": "Invalid regular expression: /(?İ:a)/: Invalid group", + "message": "Invalid regular expression: /(?İ:a)/: Invalid flag 'İ'", "index": 3 } }, "/(?ſ-:a)/": { "error": { - "message": "Invalid regular expression: /(?ſ-:a)/: Invalid group", + "message": "Invalid regular expression: /(?ſ-:a)/: Invalid flag 'ſ'", "index": 3 } }, "/(?ſ:a)/": { "error": { - "message": "Invalid regular expression: /(?ſ:a)/: Invalid group", + "message": "Invalid regular expression: /(?ſ:a)/: Invalid flag 'ſ'", "index": 3 } }, "/(a)(?-i:\\1)/i": { - "error": { - "message": "Invalid regular expression: /(a)(?-i:\\1)/i: Invalid group", - "index": 6 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 14, + "raw": "/(a)(?-i:\\1)/i", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 12, + "raw": "(a)(?-i:\\1)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(a)(?-i:\\1)", + "elements": [ + { + "type": "CapturingGroup", + "parent": "♻️../..", + "start": 1, + "end": 4, + "raw": "(a)", + "name": null, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 2, + "end": 3, + "raw": "a", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 2, + "end": 3, + "raw": "a", + "value": 97 + } + ] + } + ], + "references": [ + "♻️../1/alternatives/0/elements/0" + ] + }, + { + "type": "Group", + "parent": "♻️../..", + "start": 4, + "end": 12, + "raw": "(?-i:\\1)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 6, + "end": 8, + "raw": "-i", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 8, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 9, + "end": 11, + "raw": "\\1", + "elements": [ + { + "type": "Backreference", + "parent": "♻️../..", + "start": 9, + "end": 11, + "raw": "\\1", + "ref": 1, + "ambiguous": false, + "resolved": "♻️../../../../../0" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 13, + "end": 14, + "raw": "i", + "global": false, + "ignoreCase": true, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(a)(?i-:\\1)/": { - "error": { - "message": "Invalid regular expression: /(a)(?i-:\\1)/: Invalid group", - "index": 6 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/(a)(?i-:\\1)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 12, + "raw": "(a)(?i-:\\1)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 12, + "raw": "(a)(?i-:\\1)", + "elements": [ + { + "type": "CapturingGroup", + "parent": "♻️../..", + "start": 1, + "end": 4, + "raw": "(a)", + "name": null, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 2, + "end": 3, + "raw": "a", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 2, + "end": 3, + "raw": "a", + "value": 97 + } + ] + } + ], + "references": [ + "♻️../1/alternatives/0/elements/0" + ] + }, + { + "type": "Group", + "parent": "♻️../..", + "start": 4, + "end": 12, + "raw": "(?i-:\\1)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 6, + "end": 8, + "raw": "i-", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 7, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 9, + "end": 11, + "raw": "\\1", + "elements": [ + { + "type": "Backreference", + "parent": "♻️../..", + "start": 9, + "end": 11, + "raw": "\\1", + "ref": 1, + "ambiguous": false, + "resolved": "♻️../../../../../0" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 13, + "end": 13, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/(a)(?i:\\1)/": { - "error": { - "message": "Invalid regular expression: /(a)(?i:\\1)/: Invalid group", - "index": 6 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/(a)(?i:\\1)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "(a)(?i:\\1)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "(a)(?i:\\1)", + "elements": [ + { + "type": "CapturingGroup", + "parent": "♻️../..", + "start": 1, + "end": 4, + "raw": "(a)", + "name": null, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 2, + "end": 3, + "raw": "a", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 2, + "end": 3, + "raw": "a", + "value": 97 + } + ] + } + ], + "references": [ + "♻️../1/alternatives/0/elements/0" + ] + }, + { + "type": "Group", + "parent": "♻️../..", + "start": 4, + "end": 11, + "raw": "(?i:\\1)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 6, + "end": 7, + "raw": "i", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 7, + "raw": "i", + "ignoreCase": true, + "multiline": false, + "dotAll": false + }, + "remove": null + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 8, + "end": 10, + "raw": "\\1", + "elements": [ + { + "type": "Backreference", + "parent": "♻️../..", + "start": 8, + "end": 10, + "raw": "\\1", + "ref": 1, + "ambiguous": false, + "resolved": "♻️../../../../../0" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/^(?-m:es$)/": { - "error": { - "message": "Invalid regular expression: /^(?-m:es$)/: Invalid group", - "index": 4 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 12, + "raw": "/^(?-m:es$)/", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "^(?-m:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "^(?-m:es$)", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 1, + "end": 2, + "raw": "^", + "kind": "start" + }, + { + "type": "Group", + "parent": "♻️../..", + "start": 2, + "end": 11, + "raw": "(?-m:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 6, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 10, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "global": false, + "ignoreCase": false, + "multiline": false, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } }, "/^(?-m:es$)/m": { - "error": { - "message": "Invalid regular expression: /^(?-m:es$)/m: Invalid group", - "index": 4 + "ast": { + "type": "RegExpLiteral", + "parent": null, + "start": 0, + "end": 13, + "raw": "/^(?-m:es$)/m", + "pattern": { + "type": "Pattern", + "parent": "♻️..", + "start": 1, + "end": 11, + "raw": "^(?-m:es$)", + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 1, + "end": 11, + "raw": "^(?-m:es$)", + "elements": [ + { + "type": "Assertion", + "parent": "♻️../..", + "start": 1, + "end": 2, + "raw": "^", + "kind": "start" + }, + { + "type": "Group", + "parent": "♻️../..", + "start": 2, + "end": 11, + "raw": "(?-m:es$)", + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 4, + "end": 6, + "raw": "-m", + "add": null, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 6, + "raw": "m", + "ignoreCase": false, + "multiline": true, + "dotAll": false + } + }, + "alternatives": [ + { + "type": "Alternative", + "parent": "♻️../..", + "start": 7, + "end": 10, + "raw": "es$", + "elements": [ + { + "type": "Character", + "parent": "♻️../..", + "start": 7, + "end": 8, + "raw": "e", + "value": 101 + }, + { + "type": "Character", + "parent": "♻️../..", + "start": 8, + "end": 9, + "raw": "s", + "value": 115 + }, + { + "type": "Assertion", + "parent": "♻️../..", + "start": 9, + "end": 10, + "raw": "$", + "kind": "end" + } + ] + } + ] + } + ] + } + ] + }, + "flags": { + "type": "Flags", + "parent": "♻️..", + "start": 12, + "end": 13, + "raw": "m", + "global": false, + "ignoreCase": false, + "multiline": true, + "unicode": false, + "sticky": false, + "dotAll": false, + "hasIndices": false, + "unicodeSets": false + } } } } diff --git a/test/fixtures/visitor/full.json b/test/fixtures/visitor/full.json index 6c435c0..bad9fad 100644 --- a/test/fixtures/visitor/full.json +++ b/test/fixtures/visitor/full.json @@ -8138,6 +8138,110 @@ "enter:Flags:v", "leave:Flags:v", "leave:RegExpLiteral:/[\\q{a|bc|def}]/v" + ], + "/(?i-m:p)/": [ + "enter:RegExpLiteral:/(?i-m:p)/", + "enter:Pattern:(?i-m:p)", + "enter:Alternative:(?i-m:p)", + "enter:Group:(?i-m:p)", + "enter:Modifiers:i-m", + "enter:ModifierFlags:i", + "leave:ModifierFlags:i", + "enter:ModifierFlags:m", + "leave:ModifierFlags:m", + "leave:Modifiers:i-m", + "enter:Alternative:p", + "enter:Character:p", + "leave:Character:p", + "leave:Alternative:p", + "leave:Group:(?i-m:p)", + "leave:Alternative:(?i-m:p)", + "leave:Pattern:(?i-m:p)", + "enter:Flags:", + "leave:Flags:", + "leave:RegExpLiteral:/(?i-m:p)/" + ], + "/(?ims:p)/u": [ + "enter:RegExpLiteral:/(?ims:p)/u", + "enter:Pattern:(?ims:p)", + "enter:Alternative:(?ims:p)", + "enter:Group:(?ims:p)", + "enter:Modifiers:ims", + "enter:ModifierFlags:ims", + "leave:ModifierFlags:ims", + "leave:Modifiers:ims", + "enter:Alternative:p", + "enter:Character:p", + "leave:Character:p", + "leave:Alternative:p", + "leave:Group:(?ims:p)", + "leave:Alternative:(?ims:p)", + "leave:Pattern:(?ims:p)", + "enter:Flags:u", + "leave:Flags:u", + "leave:RegExpLiteral:/(?ims:p)/u" + ], + "/(?-ims:p)?/": [ + "enter:RegExpLiteral:/(?-ims:p)?/", + "enter:Pattern:(?-ims:p)?", + "enter:Alternative:(?-ims:p)?", + "enter:Quantifier:(?-ims:p)?", + "enter:Group:(?-ims:p)", + "enter:Modifiers:-ims", + "enter:ModifierFlags:ims", + "leave:ModifierFlags:ims", + "leave:Modifiers:-ims", + "enter:Alternative:p", + "enter:Character:p", + "leave:Character:p", + "leave:Alternative:p", + "leave:Group:(?-ims:p)", + "leave:Quantifier:(?-ims:p)?", + "leave:Alternative:(?-ims:p)?", + "leave:Pattern:(?-ims:p)?", + "enter:Flags:", + "leave:Flags:", + "leave:RegExpLiteral:/(?-ims:p)?/" + ], + "/(?:no-modifiers)?/": [ + "enter:RegExpLiteral:/(?:no-modifiers)?/", + "enter:Pattern:(?:no-modifiers)?", + "enter:Alternative:(?:no-modifiers)?", + "enter:Quantifier:(?:no-modifiers)?", + "enter:Group:(?:no-modifiers)", + "enter:Alternative:no-modifiers", + "enter:Character:n", + "leave:Character:n", + "enter:Character:o", + "leave:Character:o", + "enter:Character:-", + "leave:Character:-", + "enter:Character:m", + "leave:Character:m", + "enter:Character:o", + "leave:Character:o", + "enter:Character:d", + "leave:Character:d", + "enter:Character:i", + "leave:Character:i", + "enter:Character:f", + "leave:Character:f", + "enter:Character:i", + "leave:Character:i", + "enter:Character:e", + "leave:Character:e", + "enter:Character:r", + "leave:Character:r", + "enter:Character:s", + "leave:Character:s", + "leave:Alternative:no-modifiers", + "leave:Group:(?:no-modifiers)", + "leave:Quantifier:(?:no-modifiers)?", + "leave:Alternative:(?:no-modifiers)?", + "leave:Pattern:(?:no-modifiers)?", + "enter:Flags:", + "leave:Flags:", + "leave:RegExpLiteral:/(?:no-modifiers)?/" ] } } \ No newline at end of file diff --git a/test/visitor.ts b/test/visitor.ts index c59f7c4..92fa77e 100644 --- a/test/visitor.ts +++ b/test/visitor.ts @@ -41,6 +41,8 @@ describe("visitRegExpAST function:", () => { onExpressionCharacterClassEnter: enter, onFlagsEnter: enter, onGroupEnter: enter, + onModifierFlagsEnter: enter, + onModifiersEnter: enter, onPatternEnter: enter, onQuantifierEnter: enter, onRegExpLiteralEnter: enter, @@ -59,6 +61,8 @@ describe("visitRegExpAST function:", () => { onExpressionCharacterClassLeave: leave, onFlagsLeave: leave, onGroupLeave: leave, + onModifierFlagsLeave: leave, + onModifiersLeave: leave, onPatternLeave: leave, onQuantifierLeave: leave, onRegExpLiteralLeave: leave, diff --git a/tsconfig.json b/tsconfig.json index 70ebc9f..689e10d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,7 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "lib": [ - "es2015" + "es2019" ], "module": "commonjs", "moduleResolution": "node", From a6dc1ddda680787078718a3d5400dd6e87963cce Mon Sep 17 00:00:00 2001 From: ota-meshi Date: Wed, 25 Oct 2023 22:42:49 +0900 Subject: [PATCH 2/9] fix --- ...{modifiers-invalid-2022.json => modifiers-invalid-2023.json} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename test/fixtures/parser/literal/{modifiers-invalid-2022.json => modifiers-invalid-2023.json} (96%) diff --git a/test/fixtures/parser/literal/modifiers-invalid-2022.json b/test/fixtures/parser/literal/modifiers-invalid-2023.json similarity index 96% rename from test/fixtures/parser/literal/modifiers-invalid-2022.json rename to test/fixtures/parser/literal/modifiers-invalid-2023.json index 4790e56..e7f2bce 100644 --- a/test/fixtures/parser/literal/modifiers-invalid-2022.json +++ b/test/fixtures/parser/literal/modifiers-invalid-2023.json @@ -1,7 +1,7 @@ { "options": { "strict": false, - "ecmaVersion": 2022 + "ecmaVersion": 2023 }, "patterns": { "/(?ims-ims:sub_expression)/": { From 5f57a17f54afbee73e5f599d315b8bc39a67d214 Mon Sep 17 00:00:00 2001 From: ota-meshi Date: Sun, 17 Mar 2024 11:03:06 +0900 Subject: [PATCH 3/9] change ast --- src/ast.ts | 13 +- src/parser.ts | 4 +- src/validator.ts | 48 +- .../parser/literal/modifiers-valid-2024.json | 30 +- .../literal/test262/not-categorized.json | 38 +- .../parser/literal/test262/regexp-dotall.json | 19 +- .../regexp-duplicate-named-groups.json | 19 +- .../literal/test262/regexp-lookbehind.json | 57 +- .../literal/test262/regexp-modifiers.json | 1348 +++++++++++++++-- test/fixtures/visitor/full.json | 30 + 10 files changed, 1435 insertions(+), 171 deletions(-) diff --git a/src/ast.ts b/src/ast.ts index f8395c2..798e450 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -124,7 +124,7 @@ export interface Alternative extends NodeBase { export interface Group extends NodeBase { type: "Group" parent: Alternative | Quantifier - modifiers: Modifiers | null + modifiers: Modifiers alternatives: Alternative[] } @@ -455,7 +455,16 @@ export interface UnambiguousBackreference extends BaseBackreference { export interface Modifiers extends NodeBase { type: "Modifiers" parent: Group - add: ModifierFlags | null + /** + * The add modifier flags. + */ + add: ModifierFlags + /** + * The remove modifier flags. + * + * `null` means no remove modifier flags. e.g. `(?ims:x)` + * The reason for `null` is that there is no position where the remove modifier flags appears. Must be behind the minus mark. + */ remove: ModifierFlags | null } diff --git a/src/parser.ts b/src/parser.ts index 515c4dd..943b419 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -213,7 +213,7 @@ class RegExpParserState { start, end: start, raw: "", - modifiers: null, + modifiers: null as never, // Set in onModifiersEnter. alternatives: [], } parent.elements.push(this._node) @@ -242,7 +242,7 @@ class RegExpParserState { start, end: start, raw: "", - add: null, + add: null as never, // Set in onAddModifiers. remove: null, } parent.modifiers = this._node diff --git a/src/validator.ts b/src/validator.ts index 6766e8c..0d10807 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -1758,44 +1758,26 @@ export class RegExpValidator { */ private consumeModifiers(): boolean { const start = this.index + this.onModifiersEnter(start) + const hasAddModifiers = this.eatModifiers() + const addModifiers = this.parseModifiers(start, this.index) + this.onAddModifiers(start, this.index, addModifiers) - if (this.eatModifiers()) { - this.onModifiersEnter(start) - const addModifiers = this.parseModifiers(start, this.index) - this.onAddModifiers(start, this.index, addModifiers) - if (this.eat(HYPHEN_MINUS)) { - const modifiersStart = this.index - if (this.eatModifiers()) { - const modifiers = this.parseModifiers( - modifiersStart, - this.index, - addModifiers, - ) - this.onRemoveModifiers( - modifiersStart, - this.index, - modifiers, - ) - } - } - this.onModifiersLeave(start, this.index) - return true - } else if (this.eat(HYPHEN_MINUS)) { - this.onModifiersEnter(start) + if (this.eat(HYPHEN_MINUS)) { const modifiersStart = this.index - if (this.eatModifiers()) { - const modifiers = this.parseModifiers( - modifiersStart, - this.index, - ) - this.onRemoveModifiers(modifiersStart, this.index, modifiers) - } else { + if (!this.eatModifiers() && !hasAddModifiers) { this.raise("Invalid empty flags") } - this.onModifiersLeave(start, this.index) - return true + const modifiers = this.parseModifiers( + modifiersStart, + this.index, + addModifiers, + ) + this.onRemoveModifiers(modifiersStart, this.index, modifiers) } - return false + + this.onModifiersLeave(start, this.index) + return true } /** diff --git a/test/fixtures/parser/literal/modifiers-valid-2024.json b/test/fixtures/parser/literal/modifiers-valid-2024.json index 4d9ee71..84eec81 100644 --- a/test/fixtures/parser/literal/modifiers-valid-2024.json +++ b/test/fixtures/parser/literal/modifiers-valid-2024.json @@ -227,7 +227,16 @@ "start": 3, "end": 7, "raw": "-ims", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -317,7 +326,24 @@ "start": 1, "end": 17, "raw": "(?:no-modifiers)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/not-categorized.json b/test/fixtures/parser/literal/test262/not-categorized.json index dc72c2b..4f0b1be 100644 --- a/test/fixtures/parser/literal/test262/not-categorized.json +++ b/test/fixtures/parser/literal/test262/not-categorized.json @@ -3540,7 +3540,24 @@ "start": 1, "end": 10, "raw": "(?:ab|cd)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -3668,7 +3685,24 @@ "start": 1, "end": 10, "raw": "(?:ab|cd)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/regexp-dotall.json b/test/fixtures/parser/literal/test262/regexp-dotall.json index 7abea02..0c95d55 100644 --- a/test/fixtures/parser/literal/test262/regexp-dotall.json +++ b/test/fixtures/parser/literal/test262/regexp-dotall.json @@ -32,7 +32,24 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json b/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json index 0b608a4..ef891c6 100644 --- a/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json +++ b/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json @@ -816,7 +816,24 @@ "start": 9, "end": 20, "raw": "(?:zy\\k)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 11, + "end": 11, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 11, + "end": 11, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/regexp-lookbehind.json b/test/fixtures/parser/literal/test262/regexp-lookbehind.json index 5b40f2d..b65a6b3 100644 --- a/test/fixtures/parser/literal/test262/regexp-lookbehind.json +++ b/test/fixtures/parser/literal/test262/regexp-lookbehind.json @@ -2844,7 +2844,24 @@ "start": 6, "end": 16, "raw": "(?:b\\d{2})", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -3127,7 +3144,24 @@ "start": 5, "end": 12, "raw": "(?:\\1b)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -3272,7 +3306,24 @@ "start": 5, "end": 13, "raw": "(?:\\1|b)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/regexp-modifiers.json b/test/fixtures/parser/literal/test262/regexp-modifiers.json index 5a5efa8..b71bce6 100644 --- a/test/fixtures/parser/literal/test262/regexp-modifiers.json +++ b/test/fixtures/parser/literal/test262/regexp-modifiers.json @@ -219,7 +219,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -251,7 +260,16 @@ "start": 8, "end": 10, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -332,7 +350,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -409,7 +436,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -486,7 +522,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -588,7 +633,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -690,7 +744,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -785,7 +848,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -898,7 +970,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -1011,7 +1092,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -1101,7 +1191,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -1188,7 +1287,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -1275,7 +1383,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -1365,7 +1482,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -1459,7 +1585,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -1553,7 +1688,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -1640,7 +1784,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -1734,7 +1887,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -1872,7 +2034,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -1966,7 +2137,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2068,7 +2248,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2170,7 +2359,16 @@ "start": 3, "end": 5, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2278,7 +2476,16 @@ "start": 3, "end": 6, "raw": "-im", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2355,7 +2562,16 @@ "start": 3, "end": 6, "raw": "-im", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2432,7 +2648,16 @@ "start": 3, "end": 7, "raw": "-ims", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2509,7 +2734,16 @@ "start": 3, "end": 7, "raw": "-ims", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2592,7 +2826,16 @@ "start": 3, "end": 6, "raw": "-is", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2669,7 +2912,16 @@ "start": 3, "end": 6, "raw": "-is", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2746,7 +2998,16 @@ "start": 3, "end": 7, "raw": "-ism", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2823,7 +3084,16 @@ "start": 3, "end": 7, "raw": "-ism", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2906,7 +3176,16 @@ "start": 3, "end": 5, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -2938,7 +3217,16 @@ "start": 8, "end": 10, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -3019,7 +3307,16 @@ "start": 3, "end": 5, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -3096,7 +3393,16 @@ "start": 3, "end": 5, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -3173,7 +3479,16 @@ "start": 3, "end": 5, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -3275,7 +3590,16 @@ "start": 3, "end": 5, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -3377,7 +3701,16 @@ "start": 3, "end": 5, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -3435,7 +3768,16 @@ "multiline": true, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -3548,7 +3890,16 @@ "start": 3, "end": 5, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -3719,7 +4070,16 @@ "start": 3, "end": 5, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -3829,7 +4189,16 @@ "start": 3, "end": 5, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -3939,7 +4308,16 @@ "start": 3, "end": 6, "raw": "-mi", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4016,7 +4394,16 @@ "start": 3, "end": 6, "raw": "-mi", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4093,7 +4480,16 @@ "start": 3, "end": 7, "raw": "-mis", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4170,7 +4566,16 @@ "start": 3, "end": 7, "raw": "-mis", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4247,7 +4652,16 @@ "start": 3, "end": 6, "raw": "-ms", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4324,7 +4738,16 @@ "start": 3, "end": 6, "raw": "-ms", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4401,7 +4824,16 @@ "start": 3, "end": 7, "raw": "-msi", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4478,7 +4910,16 @@ "start": 3, "end": 7, "raw": "-msi", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4573,7 +5014,16 @@ "start": 3, "end": 5, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4605,7 +5055,16 @@ "start": 8, "end": 10, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4686,7 +5145,16 @@ "start": 3, "end": 5, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4728,7 +5196,16 @@ "multiline": false, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 10, + "end": 10, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -4824,7 +5301,16 @@ "start": 3, "end": 5, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -4962,7 +5448,16 @@ "start": 3, "end": 5, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -5039,7 +5534,16 @@ "start": 3, "end": 5, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -5116,7 +5620,16 @@ "start": 3, "end": 5, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -5226,7 +5739,16 @@ "start": 3, "end": 5, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -5336,7 +5858,16 @@ "start": 3, "end": 5, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -5438,7 +5969,16 @@ "start": 3, "end": 5, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -5540,7 +6080,16 @@ "start": 3, "end": 5, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -5642,7 +6191,16 @@ "start": 3, "end": 5, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -5744,7 +6302,16 @@ "start": 3, "end": 6, "raw": "-si", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -5821,7 +6388,16 @@ "start": 3, "end": 6, "raw": "-si", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -5898,7 +6474,16 @@ "start": 3, "end": 7, "raw": "-sim", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -5975,7 +6560,16 @@ "start": 3, "end": 7, "raw": "-sim", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -6052,7 +6646,16 @@ "start": 3, "end": 6, "raw": "-sm", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -6129,7 +6732,16 @@ "start": 3, "end": 6, "raw": "-sm", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -6206,7 +6818,16 @@ "start": 3, "end": 7, "raw": "-smi", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -6283,7 +6904,16 @@ "start": 3, "end": 7, "raw": "-smi", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -6538,7 +7168,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -6615,7 +7254,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -6717,7 +7365,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -6819,7 +7476,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -6914,7 +7580,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7026,8 +7701,17 @@ "ignoreCase": true, "multiline": false, "dotAll": false - }, - "remove": null + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7140,7 +7824,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7230,7 +7923,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7317,7 +8019,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7404,7 +8115,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7491,7 +8211,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7581,7 +8310,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7675,7 +8413,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7769,7 +8516,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7856,7 +8612,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7943,7 +8708,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -8037,7 +8811,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -8139,7 +8922,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -10684,7 +11476,16 @@ "multiline": true, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 6, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -10924,7 +11725,16 @@ "multiline": true, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -11173,7 +11983,16 @@ "multiline": false, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 6, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -11413,7 +12232,16 @@ "multiline": true, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -11579,7 +12407,16 @@ "multiline": true, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -11656,7 +12493,16 @@ "multiline": true, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -11758,7 +12604,16 @@ "multiline": true, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -11860,7 +12715,16 @@ "multiline": true, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -11915,7 +12779,16 @@ "start": 12, "end": 14, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 12, + "end": 12, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -12031,7 +12904,16 @@ "multiline": true, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -12138,10 +13020,19 @@ "end": 4, "raw": "m", "ignoreCase": false, - "multiline": true, + "multiline": true, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, "dotAll": false - }, - "remove": null + } }, "alternatives": [ { @@ -13015,7 +13906,16 @@ "start": 8, "end": 10, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -13484,7 +14384,16 @@ "start": 11, "end": 13, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 11, + "end": 11, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -13820,7 +14729,16 @@ "multiline": true, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 6, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -14060,7 +14978,16 @@ "multiline": true, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -14214,7 +15141,16 @@ "multiline": true, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 6, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -14460,7 +15396,16 @@ "multiline": true, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -14638,7 +15583,16 @@ "multiline": false, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -14660,7 +15614,16 @@ "start": 8, "end": 10, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -14776,7 +15739,16 @@ "multiline": false, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -14853,7 +15825,16 @@ "multiline": false, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -14963,7 +15944,16 @@ "multiline": false, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -15073,7 +16063,16 @@ "multiline": false, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -15175,7 +16174,16 @@ "multiline": false, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -15277,7 +16285,16 @@ "multiline": false, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -15757,7 +16774,16 @@ "start": 7, "end": 9, "raw": "-s", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -16768,7 +17794,16 @@ "multiline": false, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 6, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -17008,7 +18043,16 @@ "multiline": true, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -17162,7 +18206,16 @@ "multiline": true, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 6, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -17402,7 +18455,16 @@ "multiline": true, "dotAll": true }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 7, + "end": 7, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -17684,7 +18746,16 @@ "start": 6, "end": 8, "raw": "-i", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 6, + "end": 6, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -17812,7 +18883,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -18016,7 +19096,16 @@ "start": 4, "end": 6, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 4, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", @@ -18126,7 +19215,16 @@ "start": 4, "end": 6, "raw": "-m", - "add": null, + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 4, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, "remove": { "type": "ModifierFlags", "parent": "♻️..", diff --git a/test/fixtures/visitor/full.json b/test/fixtures/visitor/full.json index bad9fad..4e17fac 100644 --- a/test/fixtures/visitor/full.json +++ b/test/fixtures/visitor/full.json @@ -924,6 +924,10 @@ "enter:Pattern:(?:a)\\1", "enter:Alternative:(?:a)\\1", "enter:Group:(?:a)", + "enter:Modifiers:", + "enter:ModifierFlags:", + "leave:ModifierFlags:", + "leave:Modifiers:", "enter:Alternative:a", "enter:Character:a", "leave:Character:a", @@ -960,6 +964,10 @@ "enter:Pattern:(?:a)\\2", "enter:Alternative:(?:a)\\2", "enter:Group:(?:a)", + "enter:Modifiers:", + "enter:ModifierFlags:", + "leave:ModifierFlags:", + "leave:Modifiers:", "enter:Alternative:a", "enter:Character:a", "leave:Character:a", @@ -1200,6 +1208,10 @@ "enter:Pattern:(?:a)", "enter:Alternative:(?:a)", "enter:Group:(?:a)", + "enter:Modifiers:", + "enter:ModifierFlags:", + "leave:ModifierFlags:", + "leave:Modifiers:", "enter:Alternative:a", "enter:Character:a", "leave:Character:a", @@ -3981,6 +3993,10 @@ "leave:Quantifier:[a-zA-Z0-9-]+", "enter:Quantifier:(?:\\.[a-zA-Z0-9-]+)*", "enter:Group:(?:\\.[a-zA-Z0-9-]+)", + "enter:Modifiers:", + "enter:ModifierFlags:", + "leave:ModifierFlags:", + "leave:Modifiers:", "enter:Alternative:\\.[a-zA-Z0-9-]+", "enter:Character:\\.", "leave:Character:\\.", @@ -4798,6 +4814,10 @@ "enter:Pattern:(?:a)", "enter:Alternative:(?:a)", "enter:Group:(?:a)", + "enter:Modifiers:", + "enter:ModifierFlags:", + "leave:ModifierFlags:", + "leave:Modifiers:", "enter:Alternative:a", "enter:Character:a", "leave:Character:a", @@ -6859,6 +6879,10 @@ "leave:Quantifier:[a-zA-Z0-9-]+", "enter:Quantifier:(?:\\.[a-zA-Z0-9-]+)*", "enter:Group:(?:\\.[a-zA-Z0-9-]+)", + "enter:Modifiers:", + "enter:ModifierFlags:", + "leave:ModifierFlags:", + "leave:Modifiers:", "enter:Alternative:\\.[a-zA-Z0-9-]+", "enter:Character:\\.", "leave:Character:\\.", @@ -8188,6 +8212,8 @@ "enter:Quantifier:(?-ims:p)?", "enter:Group:(?-ims:p)", "enter:Modifiers:-ims", + "enter:ModifierFlags:", + "leave:ModifierFlags:", "enter:ModifierFlags:ims", "leave:ModifierFlags:ims", "leave:Modifiers:-ims", @@ -8209,6 +8235,10 @@ "enter:Alternative:(?:no-modifiers)?", "enter:Quantifier:(?:no-modifiers)?", "enter:Group:(?:no-modifiers)", + "enter:Modifiers:", + "enter:ModifierFlags:", + "leave:ModifierFlags:", + "leave:Modifiers:", "enter:Alternative:no-modifiers", "enter:Character:n", "leave:Character:n", From a2477a10c40abeda2dc3f07d01e0930308fd2eeb Mon Sep 17 00:00:00 2001 From: ota-meshi Date: Sun, 17 Mar 2024 11:33:47 +0900 Subject: [PATCH 4/9] fix for es<2024 --- src/parser.ts | 33 ++++- src/validator.ts | 2 +- .../parser/literal/basic-valid-2015-u.json | 38 +++++- .../parser/literal/basic-valid-2015.json | 76 +++++++++++- test/fixtures/parser/literal/basic-valid.json | 76 +++++++++++- test/fixtures/parser/literal/flags.json | 114 +++++++++++++++++- ...-2024.json => modifiers-invalid-2025.json} | 2 +- ...id-2024.json => modifiers-valid-2025.json} | 2 +- .../named-capturing-group-valid-2018.json | 19 ++- 9 files changed, 339 insertions(+), 23 deletions(-) rename test/fixtures/parser/literal/{modifiers-invalid-2024.json => modifiers-invalid-2025.json} (97%) rename test/fixtures/parser/literal/{modifiers-valid-2024.json => modifiers-valid-2025.json} (99%) diff --git a/src/parser.ts b/src/parser.ts index 943b419..2849480 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -19,6 +19,7 @@ import type { ExpressionCharacterClass, StringAlternative, Modifiers, + ModifierFlags, } from "./ast" import type { EcmaVersion } from "./ecma-versions" import { latestEcmaVersion } from "./ecma-versions" @@ -207,15 +208,41 @@ class RegExpParserState { throw new Error("UnknownError") } - this._node = { + const modifiersStart = start + 2 /* offset `(?` */ + const addModifiers: ModifierFlags = { + type: "ModifierFlags", + parent: null as never, + start: modifiersStart, + end: modifiersStart, + raw: "", + ignoreCase: false, + multiline: false, + dotAll: false, + } + + const modifiers: Modifiers = { + type: "Modifiers", + parent: null as never, + start: modifiersStart, + end: modifiersStart, + raw: "", + add: addModifiers, + remove: null, + } + addModifiers.parent = modifiers + + const group: Group = { type: "Group", parent, start, end: start, raw: "", - modifiers: null as never, // Set in onModifiersEnter. + modifiers, alternatives: [], } + modifiers.parent = group + + this._node = group parent.elements.push(this._node) } @@ -242,7 +269,7 @@ class RegExpParserState { start, end: start, raw: "", - add: null as never, // Set in onAddModifiers. + add: parent.modifiers.add, remove: null, } parent.modifiers = this._node diff --git a/src/validator.ts b/src/validator.ts index 0d10807..bb26074 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -1731,7 +1731,7 @@ export class RegExpValidator { const start = this.index if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) { this.onGroupEnter(start) - if (this.ecmaVersion >= 2024) { + if (this.ecmaVersion >= 2025) { this.consumeModifiers() } diff --git a/test/fixtures/parser/literal/basic-valid-2015-u.json b/test/fixtures/parser/literal/basic-valid-2015-u.json index 7e510e2..9788b8c 100644 --- a/test/fixtures/parser/literal/basic-valid-2015-u.json +++ b/test/fixtures/parser/literal/basic-valid-2015-u.json @@ -2519,7 +2519,24 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -11278,7 +11295,24 @@ "start": 48, "end": 67, "raw": "(?:\\.[a-zA-Z0-9-]+)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 50, + "end": 50, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 50, + "end": 50, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/basic-valid-2015.json b/test/fixtures/parser/literal/basic-valid-2015.json index 36f3603..d2970f6 100644 --- a/test/fixtures/parser/literal/basic-valid-2015.json +++ b/test/fixtures/parser/literal/basic-valid-2015.json @@ -3933,7 +3933,24 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -4088,7 +4105,24 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -5191,7 +5225,24 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -17013,7 +17064,24 @@ "start": 48, "end": 67, "raw": "(?:\\.[a-zA-Z0-9-]+)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 50, + "end": 50, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 50, + "end": 50, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/basic-valid.json b/test/fixtures/parser/literal/basic-valid.json index 80189ea..f06c6fa 100644 --- a/test/fixtures/parser/literal/basic-valid.json +++ b/test/fixtures/parser/literal/basic-valid.json @@ -3933,7 +3933,24 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -4088,7 +4105,24 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -5191,7 +5225,24 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -17013,7 +17064,24 @@ "start": 48, "end": 67, "raw": "(?:\\.[a-zA-Z0-9-]+)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 50, + "end": 50, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 50, + "end": 50, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/flags.json b/test/fixtures/parser/literal/flags.json index 52c2834..dcf331e 100644 --- a/test/fixtures/parser/literal/flags.json +++ b/test/fixtures/parser/literal/flags.json @@ -31,7 +31,24 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -91,7 +108,24 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -151,7 +185,24 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -211,7 +262,24 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -271,7 +339,24 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", @@ -331,7 +416,24 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/modifiers-invalid-2024.json b/test/fixtures/parser/literal/modifiers-invalid-2025.json similarity index 97% rename from test/fixtures/parser/literal/modifiers-invalid-2024.json rename to test/fixtures/parser/literal/modifiers-invalid-2025.json index 57df5b1..29adfa2 100644 --- a/test/fixtures/parser/literal/modifiers-invalid-2024.json +++ b/test/fixtures/parser/literal/modifiers-invalid-2025.json @@ -1,7 +1,7 @@ { "options": { "strict": false, - "ecmaVersion": 2024 + "ecmaVersion": 2025 }, "patterns": { "/(?-:sub_expression)?/": { diff --git a/test/fixtures/parser/literal/modifiers-valid-2024.json b/test/fixtures/parser/literal/modifiers-valid-2025.json similarity index 99% rename from test/fixtures/parser/literal/modifiers-valid-2024.json rename to test/fixtures/parser/literal/modifiers-valid-2025.json index 84eec81..bf2821a 100644 --- a/test/fixtures/parser/literal/modifiers-valid-2024.json +++ b/test/fixtures/parser/literal/modifiers-valid-2025.json @@ -1,7 +1,7 @@ { "options": { "strict": false, - "ecmaVersion": 2024 + "ecmaVersion": 2025 }, "patterns": { "/(?i-m:p)/": { diff --git a/test/fixtures/parser/literal/named-capturing-group-valid-2018.json b/test/fixtures/parser/literal/named-capturing-group-valid-2018.json index 12b1e31..99038ac 100644 --- a/test/fixtures/parser/literal/named-capturing-group-valid-2018.json +++ b/test/fixtures/parser/literal/named-capturing-group-valid-2018.json @@ -101,7 +101,24 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": null, + "modifiers": { + "type": "Modifiers", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "add": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": null + }, "alternatives": [ { "type": "Alternative", From 67a366d8ba8383b0addaaf8033a140b97b99390f Mon Sep 17 00:00:00 2001 From: ota-meshi Date: Sun, 17 Mar 2024 17:07:52 +0900 Subject: [PATCH 5/9] fix: set `Group#modifiers` to null if group has no modifiers, for backward compatibility --- src/ast.ts | 2 +- src/parser.ts | 29 +---- src/validator.ts | 13 +- .../parser/literal/basic-valid-2015-u.json | 38 +----- .../parser/literal/basic-valid-2015.json | 76 +----------- test/fixtures/parser/literal/basic-valid.json | 76 +----------- test/fixtures/parser/literal/flags.json | 114 +----------------- .../parser/literal/modifiers-valid-2025.json | 19 +-- .../named-capturing-group-valid-2018.json | 19 +-- .../literal/test262/not-categorized.json | 38 +----- .../parser/literal/test262/regexp-dotall.json | 19 +-- .../regexp-duplicate-named-groups.json | 19 +-- .../literal/test262/regexp-lookbehind.json | 57 +-------- test/fixtures/visitor/full.json | 28 ----- 14 files changed, 37 insertions(+), 510 deletions(-) diff --git a/src/ast.ts b/src/ast.ts index 798e450..75fed3e 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -124,7 +124,7 @@ export interface Alternative extends NodeBase { export interface Group extends NodeBase { type: "Group" parent: Alternative | Quantifier - modifiers: Modifiers + modifiers: Modifiers | null alternatives: Alternative[] } diff --git a/src/parser.ts b/src/parser.ts index 2849480..9f25b59 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -19,7 +19,6 @@ import type { ExpressionCharacterClass, StringAlternative, Modifiers, - ModifierFlags, } from "./ast" import type { EcmaVersion } from "./ecma-versions" import { latestEcmaVersion } from "./ecma-versions" @@ -208,39 +207,15 @@ class RegExpParserState { throw new Error("UnknownError") } - const modifiersStart = start + 2 /* offset `(?` */ - const addModifiers: ModifierFlags = { - type: "ModifierFlags", - parent: null as never, - start: modifiersStart, - end: modifiersStart, - raw: "", - ignoreCase: false, - multiline: false, - dotAll: false, - } - - const modifiers: Modifiers = { - type: "Modifiers", - parent: null as never, - start: modifiersStart, - end: modifiersStart, - raw: "", - add: addModifiers, - remove: null, - } - addModifiers.parent = modifiers - const group: Group = { type: "Group", parent, start, end: start, raw: "", - modifiers, + modifiers: null, alternatives: [], } - modifiers.parent = group this._node = group parent.elements.push(this._node) @@ -269,7 +244,7 @@ class RegExpParserState { start, end: start, raw: "", - add: parent.modifiers.add, + add: null as never, // Set in onAddModifiers. remove: null, } parent.modifiers = this._node diff --git a/src/validator.ts b/src/validator.ts index bb26074..4952dd9 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -1758,12 +1758,17 @@ export class RegExpValidator { */ private consumeModifiers(): boolean { const start = this.index - this.onModifiersEnter(start) const hasAddModifiers = this.eatModifiers() - const addModifiers = this.parseModifiers(start, this.index) - this.onAddModifiers(start, this.index, addModifiers) + const addModifiersEnd = this.index + const hasHyphen = this.eat(HYPHEN_MINUS) + if (!hasAddModifiers && !hasHyphen) { + return false + } + this.onModifiersEnter(start) + const addModifiers = this.parseModifiers(start, addModifiersEnd) + this.onAddModifiers(start, addModifiersEnd, addModifiers) - if (this.eat(HYPHEN_MINUS)) { + if (hasHyphen) { const modifiersStart = this.index if (!this.eatModifiers() && !hasAddModifiers) { this.raise("Invalid empty flags") diff --git a/test/fixtures/parser/literal/basic-valid-2015-u.json b/test/fixtures/parser/literal/basic-valid-2015-u.json index 9788b8c..7e510e2 100644 --- a/test/fixtures/parser/literal/basic-valid-2015-u.json +++ b/test/fixtures/parser/literal/basic-valid-2015-u.json @@ -2519,24 +2519,7 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -11295,24 +11278,7 @@ "start": 48, "end": 67, "raw": "(?:\\.[a-zA-Z0-9-]+)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 50, - "end": 50, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 50, - "end": 50, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/basic-valid-2015.json b/test/fixtures/parser/literal/basic-valid-2015.json index d2970f6..36f3603 100644 --- a/test/fixtures/parser/literal/basic-valid-2015.json +++ b/test/fixtures/parser/literal/basic-valid-2015.json @@ -3933,24 +3933,7 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -4105,24 +4088,7 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -5225,24 +5191,7 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -17064,24 +17013,7 @@ "start": 48, "end": 67, "raw": "(?:\\.[a-zA-Z0-9-]+)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 50, - "end": 50, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 50, - "end": 50, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/basic-valid.json b/test/fixtures/parser/literal/basic-valid.json index f06c6fa..80189ea 100644 --- a/test/fixtures/parser/literal/basic-valid.json +++ b/test/fixtures/parser/literal/basic-valid.json @@ -3933,24 +3933,7 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -4105,24 +4088,7 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -5225,24 +5191,7 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -17064,24 +17013,7 @@ "start": 48, "end": 67, "raw": "(?:\\.[a-zA-Z0-9-]+)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 50, - "end": 50, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 50, - "end": 50, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/flags.json b/test/fixtures/parser/literal/flags.json index dcf331e..52c2834 100644 --- a/test/fixtures/parser/literal/flags.json +++ b/test/fixtures/parser/literal/flags.json @@ -31,24 +31,7 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -108,24 +91,7 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -185,24 +151,7 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -262,24 +211,7 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -339,24 +271,7 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -416,24 +331,7 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/modifiers-valid-2025.json b/test/fixtures/parser/literal/modifiers-valid-2025.json index bf2821a..ef709c0 100644 --- a/test/fixtures/parser/literal/modifiers-valid-2025.json +++ b/test/fixtures/parser/literal/modifiers-valid-2025.json @@ -326,24 +326,7 @@ "start": 1, "end": 17, "raw": "(?:no-modifiers)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/named-capturing-group-valid-2018.json b/test/fixtures/parser/literal/named-capturing-group-valid-2018.json index 99038ac..12b1e31 100644 --- a/test/fixtures/parser/literal/named-capturing-group-valid-2018.json +++ b/test/fixtures/parser/literal/named-capturing-group-valid-2018.json @@ -101,24 +101,7 @@ "start": 1, "end": 6, "raw": "(?:a)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/not-categorized.json b/test/fixtures/parser/literal/test262/not-categorized.json index 4f0b1be..dc72c2b 100644 --- a/test/fixtures/parser/literal/test262/not-categorized.json +++ b/test/fixtures/parser/literal/test262/not-categorized.json @@ -3540,24 +3540,7 @@ "start": 1, "end": 10, "raw": "(?:ab|cd)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -3685,24 +3668,7 @@ "start": 1, "end": 10, "raw": "(?:ab|cd)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/regexp-dotall.json b/test/fixtures/parser/literal/test262/regexp-dotall.json index 0c95d55..7abea02 100644 --- a/test/fixtures/parser/literal/test262/regexp-dotall.json +++ b/test/fixtures/parser/literal/test262/regexp-dotall.json @@ -32,24 +32,7 @@ "start": 1, "end": 5, "raw": "(?:)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 3, - "end": 3, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json b/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json index ef891c6..0b608a4 100644 --- a/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json +++ b/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json @@ -816,24 +816,7 @@ "start": 9, "end": 20, "raw": "(?:zy\\k)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 11, - "end": 11, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 11, - "end": 11, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/parser/literal/test262/regexp-lookbehind.json b/test/fixtures/parser/literal/test262/regexp-lookbehind.json index b65a6b3..5b40f2d 100644 --- a/test/fixtures/parser/literal/test262/regexp-lookbehind.json +++ b/test/fixtures/parser/literal/test262/regexp-lookbehind.json @@ -2844,24 +2844,7 @@ "start": 6, "end": 16, "raw": "(?:b\\d{2})", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 8, - "end": 8, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 8, - "end": 8, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -3144,24 +3127,7 @@ "start": 5, "end": 12, "raw": "(?:\\1b)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 7, - "end": 7, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 7, - "end": 7, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", @@ -3306,24 +3272,7 @@ "start": 5, "end": 13, "raw": "(?:\\1|b)", - "modifiers": { - "type": "Modifiers", - "parent": "♻️..", - "start": 7, - "end": 7, - "raw": "", - "add": { - "type": "ModifierFlags", - "parent": "♻️..", - "start": 7, - "end": 7, - "raw": "", - "ignoreCase": false, - "multiline": false, - "dotAll": false - }, - "remove": null - }, + "modifiers": null, "alternatives": [ { "type": "Alternative", diff --git a/test/fixtures/visitor/full.json b/test/fixtures/visitor/full.json index 4e17fac..02fb207 100644 --- a/test/fixtures/visitor/full.json +++ b/test/fixtures/visitor/full.json @@ -924,10 +924,6 @@ "enter:Pattern:(?:a)\\1", "enter:Alternative:(?:a)\\1", "enter:Group:(?:a)", - "enter:Modifiers:", - "enter:ModifierFlags:", - "leave:ModifierFlags:", - "leave:Modifiers:", "enter:Alternative:a", "enter:Character:a", "leave:Character:a", @@ -964,10 +960,6 @@ "enter:Pattern:(?:a)\\2", "enter:Alternative:(?:a)\\2", "enter:Group:(?:a)", - "enter:Modifiers:", - "enter:ModifierFlags:", - "leave:ModifierFlags:", - "leave:Modifiers:", "enter:Alternative:a", "enter:Character:a", "leave:Character:a", @@ -1208,10 +1200,6 @@ "enter:Pattern:(?:a)", "enter:Alternative:(?:a)", "enter:Group:(?:a)", - "enter:Modifiers:", - "enter:ModifierFlags:", - "leave:ModifierFlags:", - "leave:Modifiers:", "enter:Alternative:a", "enter:Character:a", "leave:Character:a", @@ -3993,10 +3981,6 @@ "leave:Quantifier:[a-zA-Z0-9-]+", "enter:Quantifier:(?:\\.[a-zA-Z0-9-]+)*", "enter:Group:(?:\\.[a-zA-Z0-9-]+)", - "enter:Modifiers:", - "enter:ModifierFlags:", - "leave:ModifierFlags:", - "leave:Modifiers:", "enter:Alternative:\\.[a-zA-Z0-9-]+", "enter:Character:\\.", "leave:Character:\\.", @@ -4814,10 +4798,6 @@ "enter:Pattern:(?:a)", "enter:Alternative:(?:a)", "enter:Group:(?:a)", - "enter:Modifiers:", - "enter:ModifierFlags:", - "leave:ModifierFlags:", - "leave:Modifiers:", "enter:Alternative:a", "enter:Character:a", "leave:Character:a", @@ -6879,10 +6859,6 @@ "leave:Quantifier:[a-zA-Z0-9-]+", "enter:Quantifier:(?:\\.[a-zA-Z0-9-]+)*", "enter:Group:(?:\\.[a-zA-Z0-9-]+)", - "enter:Modifiers:", - "enter:ModifierFlags:", - "leave:ModifierFlags:", - "leave:Modifiers:", "enter:Alternative:\\.[a-zA-Z0-9-]+", "enter:Character:\\.", "leave:Character:\\.", @@ -8235,10 +8211,6 @@ "enter:Alternative:(?:no-modifiers)?", "enter:Quantifier:(?:no-modifiers)?", "enter:Group:(?:no-modifiers)", - "enter:Modifiers:", - "enter:ModifierFlags:", - "leave:ModifierFlags:", - "leave:Modifiers:", "enter:Alternative:no-modifiers", "enter:Character:n", "leave:Character:n", From deaa9b27f35de71c1243ace8e5be1d255cb76f71 Mon Sep 17 00:00:00 2001 From: ota-meshi Date: Sun, 17 Mar 2024 17:11:32 +0900 Subject: [PATCH 6/9] update test fixture --- ...{modifiers-invalid-2023.json => modifiers-invalid-2024.json} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename test/fixtures/parser/literal/{modifiers-invalid-2023.json => modifiers-invalid-2024.json} (96%) diff --git a/test/fixtures/parser/literal/modifiers-invalid-2023.json b/test/fixtures/parser/literal/modifiers-invalid-2024.json similarity index 96% rename from test/fixtures/parser/literal/modifiers-invalid-2023.json rename to test/fixtures/parser/literal/modifiers-invalid-2024.json index e7f2bce..762b609 100644 --- a/test/fixtures/parser/literal/modifiers-invalid-2023.json +++ b/test/fixtures/parser/literal/modifiers-invalid-2024.json @@ -1,7 +1,7 @@ { "options": { "strict": false, - "ecmaVersion": 2023 + "ecmaVersion": 2024 }, "patterns": { "/(?ims-ims:sub_expression)/": { From 95501aa617cbd65888b1553e21da2a7356703e79 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Fri, 11 Oct 2024 10:19:56 +0900 Subject: [PATCH 7/9] add comment --- src/validator.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/validator.ts b/src/validator.ts index 4952dd9..90075c9 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -1800,10 +1800,12 @@ export class RegExpValidator { if (this.consumeGroupSpecifier()) { name = this._lastStrValue } else if (this.currentCodePoint === QUESTION_MARK) { + // Maybe Group with modifiers this.rewind(start) return false } } else if (this.currentCodePoint === QUESTION_MARK) { + // Maybe Group with modifiers this.rewind(start) return false } @@ -1962,6 +1964,7 @@ export class RegExpValidator { } this.raise("Duplicate capture group name") } + // Maybe Group with modifiers this.rewind(start) } return false From 79daf51e7af345ae6ed2699a8c7a1b3224706164 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sat, 26 Oct 2024 21:48:31 +0900 Subject: [PATCH 8/9] fix: change logic to match the latest specs --- src/validator.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/validator.ts b/src/validator.ts index 90075c9..d45cdc5 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -237,6 +237,20 @@ function isUnicodePropertyValueCharacter(cp: number): boolean { return isUnicodePropertyNameCharacter(cp) || isDecimalDigit(cp) } +/** + * ``` + * RegularExpressionModifier :: one of + * `i` `m` `s` + * ``` + */ +function isRegularExpressionModifier(ch: number): boolean { + return ( + ch === LATIN_SMALL_LETTER_I || + ch === LATIN_SMALL_LETTER_M || + ch === LATIN_SMALL_LETTER_S + ) +} + export type RegExpValidatorSourceContext = { readonly source: string readonly start: number @@ -3486,13 +3500,13 @@ export class RegExpValidator { * ``` * RegularExpressionFlags :: * [empty] - * RegularExpressionFlags IdentifierPartChar + * RegularExpressionFlags RegularExpressionModifier * ``` * @returns `true` if it ate the next characters successfully. */ private eatModifiers(): boolean { let ate = false - while (isIdentifierPartChar(this.currentCodePoint)) { + while (isRegularExpressionModifier(this.currentCodePoint)) { this.advance() ate = true } From 864c936482d1b742c56b5a701ddb4a3cb56dd1c9 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sat, 26 Oct 2024 22:20:19 +0900 Subject: [PATCH 9/9] test: refactor and update test --- src/validator.ts | 82 +++---- .../literal/modifiers-invalid-2025.json | 22 +- .../literal/test262/regexp-modifiers.json | 202 +++++++++--------- 3 files changed, 150 insertions(+), 156 deletions(-) diff --git a/src/validator.ts b/src/validator.ts index d45cdc5..6417ab5 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -1784,14 +1784,25 @@ export class RegExpValidator { if (hasHyphen) { const modifiersStart = this.index - if (!this.eatModifiers() && !hasAddModifiers) { + if ( + !this.eatModifiers() && + !hasAddModifiers && + this.currentCodePoint === COLON + ) { this.raise("Invalid empty flags") } - const modifiers = this.parseModifiers( - modifiersStart, - this.index, - addModifiers, - ) + const modifiers = this.parseModifiers(modifiersStart, this.index) + for (const [flagName] of Object.entries(modifiers).filter( + ([, enable]) => enable, + ) as [keyof typeof modifiers, boolean][]) { + if (addModifiers[flagName]) { + this.raise( + `Duplicated flag '${String.fromCodePoint( + FLAG_PROP_TO_CODEPOINT[flagName], + )}'`, + ) + } + } this.onRemoveModifiers(modifiersStart, this.index, modifiers) } @@ -3518,23 +3529,11 @@ export class RegExpValidator { * @param start The start index in the source code. * @param end The end index in the source code. */ - private parseModifiers( - start: number, - end: number, - alreadyUsedFlags?: { - ignoreCase: boolean - multiline: boolean - dotAll: boolean - }, - ) { + private parseModifiers(start: number, end: number) { const { ignoreCase, multiline, dotAll } = this.parseFlags( this._reader.source, start, end, - { - modifiers: true, - alreadyUsedFlags, - }, ) return { ignoreCase, multiline, dotAll } @@ -3549,10 +3548,6 @@ export class RegExpValidator { source: string, start: number, end: number, - options?: { - modifiers?: boolean - alreadyUsedFlags?: Partial - }, ): FlagsRecord { const flags = { global: false, @@ -3565,42 +3560,29 @@ export class RegExpValidator { unicodeSets: false, } - const alreadyUsedFlags = new Set() const validFlags = new Set() - if (options?.modifiers) { - if (options?.alreadyUsedFlags) { - for (const [flagProp] of Object.entries( - options.alreadyUsedFlags, - ).filter(([, enable]) => enable) as [FlagProp, boolean][]) { - alreadyUsedFlags.add(FLAG_PROP_TO_CODEPOINT[flagProp]) - } - } - validFlags.add(LATIN_SMALL_LETTER_I) - validFlags.add(LATIN_SMALL_LETTER_M) - validFlags.add(LATIN_SMALL_LETTER_S) - } else { - validFlags.add(LATIN_SMALL_LETTER_G) - validFlags.add(LATIN_SMALL_LETTER_I) - validFlags.add(LATIN_SMALL_LETTER_M) - if (this.ecmaVersion >= 2015) { - validFlags.add(LATIN_SMALL_LETTER_U) - validFlags.add(LATIN_SMALL_LETTER_Y) - if (this.ecmaVersion >= 2018) { - validFlags.add(LATIN_SMALL_LETTER_S) - if (this.ecmaVersion >= 2021) { - validFlags.add(LATIN_SMALL_LETTER_D) - if (this.ecmaVersion >= 2024) { - validFlags.add(LATIN_SMALL_LETTER_V) - } + validFlags.add(LATIN_SMALL_LETTER_G) + validFlags.add(LATIN_SMALL_LETTER_I) + validFlags.add(LATIN_SMALL_LETTER_M) + if (this.ecmaVersion >= 2015) { + validFlags.add(LATIN_SMALL_LETTER_U) + validFlags.add(LATIN_SMALL_LETTER_Y) + if (this.ecmaVersion >= 2018) { + validFlags.add(LATIN_SMALL_LETTER_S) + if (this.ecmaVersion >= 2021) { + validFlags.add(LATIN_SMALL_LETTER_D) + if (this.ecmaVersion >= 2024) { + validFlags.add(LATIN_SMALL_LETTER_V) } } } } + for (let i = start; i < end; ++i) { const flag = source.charCodeAt(i) as FlagCodePoint if (validFlags.has(flag)) { const prop = FLAG_CODEPOINT_TO_PROP[flag] - if (flags[prop] || alreadyUsedFlags.has(flag)) { + if (flags[prop]) { this.raise(`Duplicated flag '${source[i]}'`, { index: start, }) diff --git a/test/fixtures/parser/literal/modifiers-invalid-2025.json b/test/fixtures/parser/literal/modifiers-invalid-2025.json index 29adfa2..946ef80 100644 --- a/test/fixtures/parser/literal/modifiers-invalid-2025.json +++ b/test/fixtures/parser/literal/modifiers-invalid-2025.json @@ -12,14 +12,14 @@ }, "/(?unknown:sub_expression)?/": { "error": { - "message": "Invalid regular expression: /(?unknown:sub_expression)?/: Invalid flag 'u'", - "index": 3 + "message": "Invalid regular expression: /(?unknown:sub_expression)?/: Invalid group", + "index": 2 } }, "/(?i-unknown:sub_expression)?/": { "error": { - "message": "Invalid regular expression: /(?i-unknown:sub_expression)?/: Invalid flag 'u'", - "index": 5 + "message": "Invalid regular expression: /(?i-unknown:sub_expression)?/: Invalid group", + "index": 2 } }, "/(?ii:sub_expression)?/": { @@ -37,7 +37,19 @@ "/(?i-i:sub_expression)?/": { "error": { "message": "Invalid regular expression: /(?i-i:sub_expression)?/: Duplicated flag 'i'", - "index": 5 + "index": 6 + } + }, + "/(?iu:sub_expression)?/": { + "error": { + "message": "Invalid regular expression: /(?iu:sub_expression)?/: Invalid group", + "index": 2 + } + }, + "/(?-iu:sub_expression)?/": { + "error": { + "message": "Invalid regular expression: /(?-iu:sub_expression)?/: Invalid group", + "index": 2 } } } diff --git a/test/fixtures/parser/literal/test262/regexp-modifiers.json b/test/fixtures/parser/literal/test262/regexp-modifiers.json index b71bce6..f5f786e 100644 --- a/test/fixtures/parser/literal/test262/regexp-modifiers.json +++ b/test/fixtures/parser/literal/test262/regexp-modifiers.json @@ -140,8 +140,8 @@ "patterns": { "/(?-1:a)/": { "error": { - "message": "Invalid regular expression: /(?-1:a)/: Invalid flag '1'", - "index": 4 + "message": "Invalid regular expression: /(?-1:a)/: Invalid group", + "index": 2 } }, "/(?-:a)/": { @@ -152,38 +152,38 @@ }, "/(?-I:a)/": { "error": { - "message": "Invalid regular expression: /(?-I:a)/: Invalid flag 'I'", - "index": 4 + "message": "Invalid regular expression: /(?-I:a)/: Invalid group", + "index": 2 } }, "/(?-M:a)/": { "error": { - "message": "Invalid regular expression: /(?-M:a)/: Invalid flag 'M'", - "index": 4 + "message": "Invalid regular expression: /(?-M:a)/: Invalid group", + "index": 2 } }, "/(?-Q:a)/": { "error": { - "message": "Invalid regular expression: /(?-Q:a)/: Invalid flag 'Q'", - "index": 4 + "message": "Invalid regular expression: /(?-Q:a)/: Invalid group", + "index": 2 } }, "/(?-S:a)/": { "error": { - "message": "Invalid regular expression: /(?-S:a)/: Invalid flag 'S'", - "index": 4 + "message": "Invalid regular expression: /(?-S:a)/: Invalid group", + "index": 2 } }, "/(?-d:a)/": { "error": { - "message": "Invalid regular expression: /(?-d:a)/: Invalid flag 'd'", - "index": 4 + "message": "Invalid regular expression: /(?-d:a)/: Invalid group", + "index": 2 } }, "/(?-g:a)/": { "error": { - "message": "Invalid regular expression: /(?-g:a)/: Invalid flag 'g'", - "index": 4 + "message": "Invalid regular expression: /(?-g:a)/: Invalid group", + "index": 2 } }, "/(?-i:(?-i:))/": { @@ -3139,8 +3139,8 @@ }, "/(?-iͥ:a)/": { "error": { - "message": "Invalid regular expression: /(?-iͥ:a)/: Invalid flag 'ͥ'", - "index": 4 + "message": "Invalid regular expression: /(?-iͥ:a)/: Invalid group", + "index": 2 } }, "/(?-m:(?-m:))/": { @@ -4965,8 +4965,8 @@ }, "/(?-mͫ:a)/": { "error": { - "message": "Invalid regular expression: /(?-mͫ:a)/: Invalid flag 'ͫ'", - "index": 4 + "message": "Invalid regular expression: /(?-mͫ:a)/: Invalid group", + "index": 2 } }, "/(?-s\u0000:a)/": { @@ -6959,20 +6959,20 @@ }, "/(?-s̀:a)/": { "error": { - "message": "Invalid regular expression: /(?-s̀:a)/: Invalid flag '̀'", - "index": 4 + "message": "Invalid regular expression: /(?-s̀:a)/: Invalid group", + "index": 2 } }, "/(?-s‌:a)/": { "error": { - "message": "Invalid regular expression: /(?-s‌:a)/: Invalid flag '‌'", - "index": 4 + "message": "Invalid regular expression: /(?-s‌:a)/: Invalid group", + "index": 2 } }, "/(?-s‍:a)/": { "error": { - "message": "Invalid regular expression: /(?-s‍:a)/: Invalid flag '‍'", - "index": 4 + "message": "Invalid regular expression: /(?-s‍:a)/: Invalid group", + "index": 2 } }, "/(?-s‎:a)/": { @@ -6989,86 +6989,86 @@ }, "/(?-u:a)/": { "error": { - "message": "Invalid regular expression: /(?-u:a)/: Invalid flag 'u'", - "index": 4 + "message": "Invalid regular expression: /(?-u:a)/: Invalid group", + "index": 2 } }, "/(?-y:a)/": { "error": { - "message": "Invalid regular expression: /(?-y:a)/: Invalid flag 'y'", - "index": 4 + "message": "Invalid regular expression: /(?-y:a)/: Invalid group", + "index": 2 } }, "/(?-İ:a)/": { "error": { - "message": "Invalid regular expression: /(?-İ:a)/: Invalid flag 'İ'", - "index": 4 + "message": "Invalid regular expression: /(?-İ:a)/: Invalid group", + "index": 2 } }, "/(?-ſ:a)/": { "error": { - "message": "Invalid regular expression: /(?-ſ:a)/: Invalid flag 'ſ'", - "index": 4 + "message": "Invalid regular expression: /(?-ſ:a)/: Invalid group", + "index": 2 } }, "/(?1-:a)/": { "error": { - "message": "Invalid regular expression: /(?1-:a)/: Invalid flag '1'", - "index": 3 + "message": "Invalid regular expression: /(?1-:a)/: Invalid group", + "index": 2 } }, "/(?1:a)/": { "error": { - "message": "Invalid regular expression: /(?1:a)/: Invalid flag '1'", - "index": 3 + "message": "Invalid regular expression: /(?1:a)/: Invalid group", + "index": 2 } }, "/(?I-:a)/": { "error": { - "message": "Invalid regular expression: /(?I-:a)/: Invalid flag 'I'", - "index": 3 + "message": "Invalid regular expression: /(?I-:a)/: Invalid group", + "index": 2 } }, "/(?I:a)/": { "error": { - "message": "Invalid regular expression: /(?I:a)/: Invalid flag 'I'", - "index": 3 + "message": "Invalid regular expression: /(?I:a)/: Invalid group", + "index": 2 } }, "/(?M-:a)/": { "error": { - "message": "Invalid regular expression: /(?M-:a)/: Invalid flag 'M'", - "index": 3 + "message": "Invalid regular expression: /(?M-:a)/: Invalid group", + "index": 2 } }, "/(?M:a)/": { "error": { - "message": "Invalid regular expression: /(?M:a)/: Invalid flag 'M'", - "index": 3 + "message": "Invalid regular expression: /(?M:a)/: Invalid group", + "index": 2 } }, "/(?Q-:a)/": { "error": { - "message": "Invalid regular expression: /(?Q-:a)/: Invalid flag 'Q'", - "index": 3 + "message": "Invalid regular expression: /(?Q-:a)/: Invalid group", + "index": 2 } }, "/(?Q:a)/": { "error": { - "message": "Invalid regular expression: /(?Q:a)/: Invalid flag 'Q'", - "index": 3 + "message": "Invalid regular expression: /(?Q:a)/: Invalid group", + "index": 2 } }, "/(?S-:a)/": { "error": { - "message": "Invalid regular expression: /(?S-:a)/: Invalid flag 'S'", - "index": 3 + "message": "Invalid regular expression: /(?S-:a)/: Invalid group", + "index": 2 } }, "/(?S:a)/": { "error": { - "message": "Invalid regular expression: /(?S:a)/: Invalid flag 'S'", - "index": 3 + "message": "Invalid regular expression: /(?S:a)/: Invalid group", + "index": 2 } }, "/(?\\u0069:a)/u": { @@ -7097,26 +7097,26 @@ }, "/(?d-:a)/": { "error": { - "message": "Invalid regular expression: /(?d-:a)/: Invalid flag 'd'", - "index": 3 + "message": "Invalid regular expression: /(?d-:a)/: Invalid group", + "index": 2 } }, "/(?d:a)/": { "error": { - "message": "Invalid regular expression: /(?d:a)/: Invalid flag 'd'", - "index": 3 + "message": "Invalid regular expression: /(?d:a)/: Invalid group", + "index": 2 } }, "/(?g-:a)/": { "error": { - "message": "Invalid regular expression: /(?g-:a)/: Invalid flag 'g'", - "index": 3 + "message": "Invalid regular expression: /(?g-:a)/: Invalid group", + "index": 2 } }, "/(?g:a)/": { "error": { - "message": "Invalid regular expression: /(?g:a)/: Invalid flag 'g'", - "index": 3 + "message": "Invalid regular expression: /(?g:a)/: Invalid group", + "index": 2 } }, "/(?i-)/": { @@ -8993,7 +8993,7 @@ "/(?i-i:a)/": { "error": { "message": "Invalid regular expression: /(?i-i:a)/: Duplicated flag 'i'", - "index": 5 + "index": 6 } }, "/(?i-m:)/": { @@ -11771,7 +11771,7 @@ "/(?ims-m:a)/": { "error": { "message": "Invalid regular expression: /(?ims-m:a)/: Duplicated flag 'm'", - "index": 7 + "index": 8 } }, "/(?ims:)/": { @@ -12354,14 +12354,14 @@ }, "/(?iͥ-:a)/": { "error": { - "message": "Invalid regular expression: /(?iͥ-:a)/: Invalid flag 'ͥ'", - "index": 3 + "message": "Invalid regular expression: /(?iͥ-:a)/: Invalid group", + "index": 2 } }, "/(?iͥ:a)/": { "error": { - "message": "Invalid regular expression: /(?iͥ:a)/: Invalid flag 'ͥ'", - "index": 3 + "message": "Invalid regular expression: /(?iͥ:a)/: Invalid group", + "index": 2 } }, "/(?m-:)/": { @@ -13299,7 +13299,7 @@ "/(?m-ims:a)/": { "error": { "message": "Invalid regular expression: /(?m-ims:a)/: Duplicated flag 'm'", - "index": 5 + "index": 8 } }, "/(?m-is:)/": { @@ -13391,7 +13391,7 @@ "/(?m-m:a)/": { "error": { "message": "Invalid regular expression: /(?m-m:a)/: Duplicated flag 'm'", - "index": 5 + "index": 6 } }, "/(?m-s:)/": { @@ -15518,14 +15518,14 @@ }, "/(?mͫ-:a)/": { "error": { - "message": "Invalid regular expression: /(?mͫ-:a)/: Invalid flag 'ͫ'", - "index": 3 + "message": "Invalid regular expression: /(?mͫ-:a)/: Invalid group", + "index": 2 } }, "/(?mͫ:a)/": { "error": { - "message": "Invalid regular expression: /(?mͫ:a)/: Invalid flag 'ͫ'", - "index": 3 + "message": "Invalid regular expression: /(?mͫ:a)/: Invalid group", + "index": 2 } }, "/(?s\u0000-:a)/": { @@ -16706,7 +16706,7 @@ "/(?s-s:a)/": { "error": { "message": "Invalid regular expression: /(?s-s:a)/: Duplicated flag 's'", - "index": 5 + "index": 6 } }, "/(?s:(?-s:^.$))/": { @@ -18577,38 +18577,38 @@ }, "/(?s̀-:a)/": { "error": { - "message": "Invalid regular expression: /(?s̀-:a)/: Invalid flag '̀'", - "index": 3 + "message": "Invalid regular expression: /(?s̀-:a)/: Invalid group", + "index": 2 } }, "/(?s̀:a)/": { "error": { - "message": "Invalid regular expression: /(?s̀:a)/: Invalid flag '̀'", - "index": 3 + "message": "Invalid regular expression: /(?s̀:a)/: Invalid group", + "index": 2 } }, "/(?s‌-:a)/": { "error": { - "message": "Invalid regular expression: /(?s‌-:a)/: Invalid flag '‌'", - "index": 3 + "message": "Invalid regular expression: /(?s‌-:a)/: Invalid group", + "index": 2 } }, "/(?s‌:a)/": { "error": { - "message": "Invalid regular expression: /(?s‌:a)/: Invalid flag '‌'", - "index": 3 + "message": "Invalid regular expression: /(?s‌:a)/: Invalid group", + "index": 2 } }, "/(?s‍-:a)/": { "error": { - "message": "Invalid regular expression: /(?s‍-:a)/: Invalid flag '‍'", - "index": 3 + "message": "Invalid regular expression: /(?s‍-:a)/: Invalid group", + "index": 2 } }, "/(?s‍:a)/": { "error": { - "message": "Invalid regular expression: /(?s‍:a)/: Invalid flag '‍'", - "index": 3 + "message": "Invalid regular expression: /(?s‍:a)/: Invalid group", + "index": 2 } }, "/(?s‎-:a)/": { @@ -18637,50 +18637,50 @@ }, "/(?u-:a)/": { "error": { - "message": "Invalid regular expression: /(?u-:a)/: Invalid flag 'u'", - "index": 3 + "message": "Invalid regular expression: /(?u-:a)/: Invalid group", + "index": 2 } }, "/(?u:a)/": { "error": { - "message": "Invalid regular expression: /(?u:a)/: Invalid flag 'u'", - "index": 3 + "message": "Invalid regular expression: /(?u:a)/: Invalid group", + "index": 2 } }, "/(?y-:a)/": { "error": { - "message": "Invalid regular expression: /(?y-:a)/: Invalid flag 'y'", - "index": 3 + "message": "Invalid regular expression: /(?y-:a)/: Invalid group", + "index": 2 } }, "/(?y:a)/": { "error": { - "message": "Invalid regular expression: /(?y:a)/: Invalid flag 'y'", - "index": 3 + "message": "Invalid regular expression: /(?y:a)/: Invalid group", + "index": 2 } }, "/(?İ-:a)/": { "error": { - "message": "Invalid regular expression: /(?İ-:a)/: Invalid flag 'İ'", - "index": 3 + "message": "Invalid regular expression: /(?İ-:a)/: Invalid group", + "index": 2 } }, "/(?İ:a)/": { "error": { - "message": "Invalid regular expression: /(?İ:a)/: Invalid flag 'İ'", - "index": 3 + "message": "Invalid regular expression: /(?İ:a)/: Invalid group", + "index": 2 } }, "/(?ſ-:a)/": { "error": { - "message": "Invalid regular expression: /(?ſ-:a)/: Invalid flag 'ſ'", - "index": 3 + "message": "Invalid regular expression: /(?ſ-:a)/: Invalid group", + "index": 2 } }, "/(?ſ:a)/": { "error": { - "message": "Invalid regular expression: /(?ſ:a)/: Invalid flag 'ſ'", - "index": 3 + "message": "Invalid regular expression: /(?ſ:a)/: Invalid group", + "index": 2 } }, "/(a)(?-i:\\1)/i": {