10 writes to _options
System.Text.RegularExpressions (10)
System\Text\RegularExpressions\RegexParser.cs (10)
61
_options
= options;
263
_options
= options;
376
_options
= (RegexOptions)_optionsStack.Pop();
788
_options
&= ~RegexOptions.RightToLeft;
794
_options
&= ~RegexOptions.RightToLeft;
822
_options
|= RegexOptions.RightToLeft;
833
_options
|= RegexOptions.RightToLeft;
1563
_options
&= ~options;
1567
_options
|= options;
1702
_options
= (RegexOptions)_optionsStack.Pop();
73 references to _options
System.Text.RegularExpressions (73)
System\Text\RegularExpressions\RegexParser.cs (73)
277
StartGroup(new RegexNode(RegexNodeKind.Capture, (
_options
& ~RegexOptions.IgnoreCase), 0, -1));
290
if ((
_options
& RegexOptions.IgnorePatternWhitespace) != 0)
332
_unit = RegexNode.CreateOneWithCaseConversion(_pattern[endpos - 1],
_options
, _culture, ref _caseBehavior);
346
string setString = ScanCharClass((
_options
& RegexOptions.IgnoreCase) != 0, scanOnly: false)!.ToStringClass();
347
_unit = new RegexNode(RegexNodeKind.Set,
_options
& ~RegexOptions.IgnoreCase, setString);
352
_optionsStack.Append((int)
_options
);
394
_unit = new RegexNode((
_options
& RegexOptions.Multiline) != 0 ? RegexNodeKind.Bol : RegexNodeKind.Beginning,
_options
);
398
_unit = new RegexNode((
_options
& RegexOptions.Multiline) != 0 ? RegexNodeKind.Eol : RegexNodeKind.EndZ,
_options
);
402
_unit = (
_options
& RegexOptions.Singleline) != 0 ?
403
new RegexNode(RegexNodeKind.Set,
_options
& ~RegexOptions.IgnoreCase, RegexCharClass.AnyClass) :
404
new RegexNode(RegexNodeKind.Notone,
_options
& ~RegexOptions.IgnoreCase, '\n');
521
_concatenation = new RegexNode(RegexNodeKind.Concatenate,
_options
);
564
if ((
_options
& RegexOptions.ECMAScript) != 0 && _pattern[_pos] == ']')
594
charClass!.AddDigit((
_options
& RegexOptions.ECMAScript) != 0, ch == 'D', _pattern, _pos);
606
charClass!.AddSpace((
_options
& RegexOptions.ECMAScript) != 0, ch == 'S');
619
charClass!.AddWord((
_options
& RegexOptions.ECMAScript) != 0, ch == 'W');
756
if ((
_options
& RegexOptions.ExplicitCapture) != 0 || _ignoreNextParen)
759
return new RegexNode(RegexNodeKind.Group,
_options
);
763
return new RegexNode(RegexNodeKind.Capture,
_options
, _autocap++, -1);
937
return new RegexNode(RegexNodeKind.Capture,
_options
, capnum, uncapnum);
959
return new RegexNode(RegexNodeKind.BackreferenceConditional,
_options
, capnum);
973
return new RegexNode(RegexNodeKind.BackreferenceConditional,
_options
, tmpCapnum);
1026
return new RegexNode(nodeType,
_options
);
1041
if ((
_options
& RegexOptions.IgnorePatternWhitespace) != 0)
1049
if ((
_options
& RegexOptions.IgnorePatternWhitespace) != 0 && _pos < _pattern.Length && _pattern[_pos] == '#')
1091
new RegexNode(TypeFromCode(ch),
_options
);
1096
new RegexNode(RegexNodeKind.Set, (
_options
& ~RegexOptions.IgnoreCase), (
_options
& RegexOptions.ECMAScript) != 0 ? RegexCharClass.ECMAWordClass : RegexCharClass.WordClass);
1101
new RegexNode(RegexNodeKind.Set, (
_options
& ~RegexOptions.IgnoreCase), (
_options
& RegexOptions.ECMAScript) != 0 ? RegexCharClass.NotECMAWordClass : RegexCharClass.NotWordClass);
1106
new RegexNode(RegexNodeKind.Set, (
_options
& ~RegexOptions.IgnoreCase), (
_options
& RegexOptions.ECMAScript) != 0 ? RegexCharClass.ECMASpaceClass : RegexCharClass.SpaceClass);
1111
new RegexNode(RegexNodeKind.Set, (
_options
& ~RegexOptions.IgnoreCase), (
_options
& RegexOptions.ECMAScript) != 0 ? RegexCharClass.NotECMASpaceClass : RegexCharClass.NotSpaceClass);
1116
new RegexNode(RegexNodeKind.Set, (
_options
& ~RegexOptions.IgnoreCase), (
_options
& RegexOptions.ECMAScript) != 0 ? RegexCharClass.ECMADigitClass : RegexCharClass.DigitClass);
1121
new RegexNode(RegexNodeKind.Set, (
_options
& ~RegexOptions.IgnoreCase), (
_options
& RegexOptions.ECMAScript) != 0 ? RegexCharClass.NotECMADigitClass : RegexCharClass.NotDigitClass);
1132
cc.AddCategoryFromName(ParseProperty(), ch != 'p', (
_options
& RegexOptions.IgnoreCase) != 0, _pattern, _pos);
1133
if ((
_options
& RegexOptions.IgnoreCase) != 0)
1138
return new RegexNode(RegexNodeKind.Set, (
_options
& ~RegexOptions.IgnoreCase), cc.ToStringClass());
1203
IsCaptureSlot(capnum) ? new RegexNode(RegexNodeKind.Backreference,
_options
, capnum) :
1212
if ((
_options
& RegexOptions.ECMAScript) != 0)
1235
return scanOnly ? null : new RegexNode(RegexNodeKind.Backreference,
_options
, capnum);
1249
return new RegexNode(RegexNodeKind.Backreference,
_options
, capnum);
1269
_capnames?[capname] is int tmpCapnum ? new RegexNode(RegexNodeKind.Backreference,
_options
, tmpCapnum) :
1280
RegexNode.CreateOneWithCaseConversion(ch,
_options
, _culture, ref _caseBehavior) :
1289
return RegexNode.CreateOneWithCaseConversion('$',
_options
, _culture, ref _caseBehavior);
1314
if (!angled && (
_options
& RegexOptions.ECMAScript) != 0)
1345
return new RegexNode(RegexNodeKind.Backreference,
_options
, capnum);
1355
return new RegexNode(RegexNodeKind.Backreference,
_options
, capnum);
1367
return new RegexNode(RegexNodeKind.Backreference,
_options
, tmpCapnum);
1379
return RegexNode.CreateOneWithCaseConversion('$',
_options
, _culture, ref _caseBehavior);
1405
return new RegexNode(RegexNodeKind.Backreference,
_options
, capnum);
1412
return RegexNode.CreateOneWithCaseConversion('$',
_options
, _culture, ref _caseBehavior);
1443
if ((
_options
& RegexOptions.ECMAScript) != 0 && i >= 0x20)
1609
if ((
_options
& RegexOptions.ECMAScript) == 0 && RegexCharClass.IsBoundaryWordChar(ch))
1656
'b' => (
_options
& RegexOptions.ECMAScript) != 0 ? RegexNodeKind.ECMABoundary : RegexNodeKind.Boundary,
1657
'B' => (
_options
& RegexOptions.ECMAScript) != 0 ? RegexNodeKind.NonECMABoundary : RegexNodeKind.NonBoundary,
1688
if ((
_options
& RegexOptions.IgnorePatternWhitespace) != 0)
1715
_optionsStack.Append((int)
_options
);
1746
optionsFoundInPattern |=
_options
;
1773
if ((
_options
& RegexOptions.ExplicitCapture) == 0 && !_ignoreNextParen)
2018
_concatenation!.AddChild(RegexNode.CreateOneWithCaseConversion(_pattern[pos], isReplacement ?
_options
& ~RegexOptions.IgnoreCase :
_options
, _culture, ref _caseBehavior));
2021
case > 1 when (
_options
& RegexOptions.IgnoreCase) == 0 || isReplacement || !RegexCharClass.ParticipatesInCaseConversion(_pattern.AsSpan(pos, cch)):
2022
_concatenation!.AddChild(new RegexNode(RegexNodeKind.Multi,
_options
& ~RegexOptions.IgnoreCase, _pattern.Substring(pos, cch)));
2028
_concatenation!.AddChild(RegexNode.CreateOneWithCaseConversion(c,
_options
, _culture, ref _caseBehavior));
2068
_alternation = new RegexNode(RegexNodeKind.Alternate,
_options
);
2069
_concatenation = new RegexNode(RegexNodeKind.Concatenate,
_options
);
2086
_concatenation = new RegexNode(RegexNodeKind.Concatenate,
_options
);