From fb0dadef78a491e2f2c37868a02ab819f4153f45 Mon Sep 17 00:00:00 2001 From: ota-meshi Date: Sun, 17 Mar 2024 11:03:06 +0900 Subject: [PATCH] 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 | 1386 +++++++++++++++-- test/fixtures/visitor/full.json | 30 + 10 files changed, 1454 insertions(+), 190 deletions(-) diff --git a/src/ast.ts b/src/ast.ts index f7c43a0..cf08f0b 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[] } @@ -444,7 +444,16 @@ export interface Backreference extends NodeBase { 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 22e66fa..91b4a88 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -204,7 +204,7 @@ class RegExpParserState { start, end: start, raw: "", - modifiers: null, + modifiers: null as never, // Set in onModifiersEnter. alternatives: [], } parent.elements.push(this._node) @@ -233,7 +233,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 43bcb6f..f44664f 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -1746,44 +1746,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 1069eaf..5cd6505 100644 --- a/test/fixtures/parser/literal/test262/not-categorized.json +++ b/test/fixtures/parser/literal/test262/not-categorized.json @@ -3510,7 +3510,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", @@ -3638,7 +3655,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 3f9dad4..a529a7d 100644 --- a/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json +++ b/test/fixtures/parser/literal/test262/regexp-duplicate-named-groups.json @@ -98,7 +98,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 5bd25a1..c73bbf2 100644 --- a/test/fixtures/parser/literal/test262/regexp-lookbehind.json +++ b/test/fixtures/parser/literal/test262/regexp-lookbehind.json @@ -2831,7 +2831,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", @@ -3113,7 +3130,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", @@ -3257,7 +3291,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 da64626..cf95310 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": "♻️..", @@ -1033,13 +1123,13 @@ "elements": [ { "type": "CharacterSet", + "parent": "♻️../..", "start": 6, "end": 12, "raw": "\\P{Lu}", "kind": "property", - "key": "General_Category", - "parent": "♻️../..", "strings": false, + "key": "General_Category", "value": "Lu", "negate": true } @@ -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": "♻️..", @@ -1297,13 +1414,13 @@ "elements": [ { "type": "CharacterSet", + "parent": "♻️../..", "start": 6, "end": 12, "raw": "\\p{Lu}", "kind": "property", - "key": "General_Category", - "parent": "♻️../..", "strings": false, + "key": "General_Category", "value": "Lu", "negate": false } @@ -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,16 +2648,25 @@ "start": 3, "end": 7, "raw": "-ims", - "add": null, - "remove": { + "add": { "type": "ModifierFlags", "parent": "♻️..", - "start": 4, - "end": 7, - "raw": "ims", - "ignoreCase": true, - "multiline": true, - "dotAll": true + "start": 3, + "end": 3, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + }, + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 4, + "end": 7, + "raw": "ims", + "ignoreCase": true, + "multiline": true, + "dotAll": true } }, "alternatives": [ @@ -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": [ { @@ -7027,7 +7702,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 5, + "end": 5, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -7139,8 +7823,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": [ { @@ -7152,13 +7845,13 @@ "elements": [ { "type": "CharacterSet", + "parent": "♻️../..", "start": 6, "end": 12, "raw": "\\P{Lu}", "kind": "property", - "key": "General_Category", - "parent": "♻️../..", "strings": false, + "key": "General_Category", "value": "Lu", "negate": true } @@ -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": [ { @@ -7503,13 +8232,13 @@ "elements": [ { "type": "CharacterSet", + "parent": "♻️../..", "start": 6, "end": 12, "raw": "\\p{Lu}", "kind": "property", - "key": "General_Category", - "parent": "♻️../..", "strings": false, + "key": "General_Category", "value": "Lu", "negate": false } @@ -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": [ { @@ -9395,13 +10187,13 @@ "elements": [ { "type": "CharacterSet", + "parent": "♻️../..", "start": 5, "end": 11, "raw": "\\P{Lu}", "kind": "property", - "key": "General_Category", - "parent": "♻️../..", "strings": false, + "key": "General_Category", "value": "Lu", "negate": true } @@ -9746,13 +10538,13 @@ "elements": [ { "type": "CharacterSet", + "parent": "♻️../..", "start": 5, "end": 11, "raw": "\\p{Lu}", "kind": "property", - "key": "General_Category", - "parent": "♻️../..", "strings": false, + "key": "General_Category", "value": "Lu", "negate": false } @@ -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": "♻️..", @@ -17811,7 +18882,16 @@ "multiline": false, "dotAll": false }, - "remove": null + "remove": { + "type": "ModifierFlags", + "parent": "♻️..", + "start": 8, + "end": 8, + "raw": "", + "ignoreCase": false, + "multiline": false, + "dotAll": false + } }, "alternatives": [ { @@ -18013,7 +19093,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": "♻️..", @@ -18123,7 +19212,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",