55 references to RightToLeft
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (2)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests_ReferenceTests.cs (2)
5110""", RegexOptions.RightToLeft); 5179""", RegexOptions.RightToLeft);
Microsoft.CodeAnalysis.Features (5)
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (1)
116var result = Regex.Replace(numericText, $"(.{{{interval}}})", "_$1", RegexOptions.RightToLeft);
EmbeddedLanguages\RegularExpressions\RegexParser.cs (4)
952ParseGroupingEmbeddedExpression(_options | RegexOptions.RightToLeft), ParseGroupingCloseParen()); 957ParseGroupingEmbeddedExpression(_options | RegexOptions.RightToLeft), ParseGroupingCloseParen()); 1130ParseGroupingEmbeddedExpression(_options & ~RegexOptions.RightToLeft), ParseGroupingCloseParen()); 1135ParseGroupingEmbeddedExpression(_options & ~RegexOptions.RightToLeft), ParseGroupingCloseParen());
System.Text.RegularExpressions (48)
System\Text\RegularExpressions\Regex.cs (3)
152((options & RegexOptions.NonBacktracking) != 0 && (options & (RegexOptions.ECMAScript | RegexOptions.RightToLeft)) != 0)) 306public bool RightToLeft => (roptions & RegexOptions.RightToLeft) != 0; 657/// <summary>True if the <see cref="RegexOptions.RightToLeft"/> option was set.</summary>
System\Text\RegularExpressions\Regex.EnumerateSplits.cs (6)
19/// And if <see cref="RegexOptions.RightToLeft"/> is specified, <see cref="Split(string, string)"/> will reverse the order of the resulting splits to be left-to-right, whereas 44/// And if <see cref="RegexOptions.RightToLeft"/> is specified, <see cref="Split(string, string, RegexOptions)"/> will reverse the order of the resulting splits to be left-to-right, whereas 71/// And if <see cref="RegexOptions.RightToLeft"/> is specified, <see cref="Split(string, string, RegexOptions, TimeSpan)"/> will reverse the order of the resulting splits to be left-to-right, whereas 99/// And if <see cref="RegexOptions.RightToLeft"/> is specified, <see cref="Split(string)"/> will reverse the order of the resulting splits to be left-to-right, whereas 121/// And if <see cref="RegexOptions.RightToLeft"/> is specified, <see cref="Split(string, int)"/> will reverse the order of the resulting splits to be left-to-right, whereas 144/// And if <see cref="RegexOptions.RightToLeft"/> is specified, <see cref="Split(string, int, int)"/> will reverse the order of the resulting splits to be left-to-right, whereas
System\Text\RegularExpressions\RegexCompiler.cs (1)
397bool rtl = (_options & RegexOptions.RightToLeft) != 0;
System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
20_rightToLeft = (options & RegexOptions.RightToLeft) != 0;
System\Text\RegularExpressions\RegexInterpreterCode.cs (1)
127sb.AppendLine($"Direction: {((Options & RegexOptions.RightToLeft) != 0 ? "right-to-left" : "left-to-right")}");
System\Text\RegularExpressions\RegexNode.cs (18)
137if ((Options & RegexOptions.RightToLeft) != 0 && 339if ((Options & (RegexOptions.RightToLeft | RegexOptions.NonBacktracking)) == 0) 414(Options & (RegexOptions.RightToLeft | RegexOptions.NonBacktracking)) != 0) 644if ((Options & RegexOptions.RightToLeft) == 0) 1000optionsAt = at.Options & (RegexOptions.RightToLeft | RegexOptions.IgnoreCase); 1082if ((alternation.Options & RegexOptions.RightToLeft) != 0) 1225if ((alternation.Options & RegexOptions.RightToLeft) != 0) 1386Debug.Assert((Options & RegexOptions.RightToLeft) == 0); 1396if (node is not null && (node.Options & RegexOptions.RightToLeft) == 0) 1560((at.Options & RegexOptions.RightToLeft) == (Options & RegexOptions.RightToLeft))) 1581RegexOptions optionsAt = at.Options & (RegexOptions.RightToLeft | RegexOptions.IgnoreCase); 1598prev.Str = (optionsAt & RegexOptions.RightToLeft) == 0 ? 1707(nextNode.Options & RegexOptions.RightToLeft) == 0 && // RTL multi nodes don't have their text reversed, and it's not worth the code to optimize further 1806if ((Options & RegexOptions.RightToLeft) != 0) 2033if (condition.Kind == RegexNodeKind.PositiveLookaround && (condition.Options & RegexOptions.RightToLeft) == 0) 2075case RegexNodeKind.PositiveLookaround when (subsequent.Options & RegexOptions.RightToLeft) == 0: // only lookaheads, not lookbehinds (represented as RTL PositiveLookaround nodes) 2882if ((Options & RegexOptions.RightToLeft) != 0) sb.Append("-L");
System\Text\RegularExpressions\RegexNodeKind.cs (4)
156/// A positive lookaround assertion: lookahead if <see cref="RegexOptions.RightToLeft"/> is not set and lookbehind if 157/// <see cref="RegexOptions.RightToLeft"/> is set, e.g. `(?=abc)` or `(?&lt;=abc)`.</summary> 161/// A negative lookaround assertion: lookahead if <see cref="RegexOptions.RightToLeft"/> is not set and lookbehind if 162/// <see cref="RegexOptions.RightToLeft"/> is set, e.g. `(?!abc)` or `(?&lt;!abc)`.</summary>
System\Text\RegularExpressions\RegexParser.cs (4)
788_options &= ~RegexOptions.RightToLeft; 794_options &= ~RegexOptions.RightToLeft; 822_options |= RegexOptions.RightToLeft; 833_options |= RegexOptions.RightToLeft;
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (5)
65(node.Options & RegexOptions.RightToLeft) != 0 || 358bool rtl = (node.Options & RegexOptions.RightToLeft) != 0; 593if ((node.Options & RegexOptions.RightToLeft) != 0) 995cc.AddChar(node.Str![(node.Options & RegexOptions.RightToLeft) != 0 ? node.Str.Length - 1 : 0]); 1105if ((node.Options & RegexOptions.RightToLeft) != 0)
System\Text\RegularExpressions\RegexTreeAnalyzer.cs (3)
28results._hasRightToLeft |= (node.Options & RegexOptions.RightToLeft) != 0; 167/// <summary>Whether any node has <see cref="RegexOptions.RightToLeft"/> set.</summary> 234/// <summary>Gets whether a node might have <see cref="RegexOptions.RightToLeft"/> set.</summary>
System\Text\RegularExpressions\RegexWriter.cs (1)
204if ((node.Options & RegexOptions.RightToLeft) != 0)
System\Text\RegularExpressions\Symbolic\SymbolicRegexRunnerFactory.cs (1)
17Debug.Assert((options & (RegexOptions.RightToLeft | RegexOptions.ECMAScript)) == 0);