You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Acornima/Ast/INode.cs
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,5 +10,8 @@ public interface INode
10
10
ref readonly RangeRangeRef{get;}
11
11
SourceLocationLocation{get;}
12
12
ref readonly SourceLocationLocationRef{get;}
13
+
/// <remarks>
14
+
/// The operation is not guaranteed to be thread-safe. In case concurrent access or update is possible, the necessary synchronization is caller's responsibility.
Copy file name to clipboardExpand all lines: src/Acornima/RegExpParseMode.cs
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,9 @@ public enum RegExpParseMode
36
36
/// In case an invalid regular expression is encountered, <see cref="SyntaxErrorException"/> is thrown.<br/>
37
37
/// In the case of a valid regular expression for which an equivalent <see cref="Regex"/> cannot be constructed, either <see cref="RegExpConversionErrorException"/> is thrown
38
38
/// or a <see cref="Token"/> is created with the <see cref="Token.Value"/> property set to <see langword="null"/>, depending on the <see cref="TokenizerOptions.Tolerant"/> option.
39
+
/// <para>
40
+
/// Please note that adapted patterns containing negative lookaround assertions won't be compiled on .NET 7+ because of a <seealso href="https://github.com/dotnet/runtime/issues/97455">regression of .NET's regex compiler</seealso>.
elseif(!s_canCompileNegativeLookaroundAssertions&&groupTypeisRegExpGroupType.NegativeLookaheadAssertion or RegExpGroupType.NegativeLookbehindAssertion)
524
+
{
525
+
context.CanCompile=false;
526
+
}
517
527
518
528
sb?.Append(_pattern,i,1+((int)groupType>>2));
519
529
i+=(int)groupType>>2;
@@ -1166,6 +1176,7 @@ public ParsePatternContext(StringBuilder? sb, ReadOnlySpan<RegExpCapturingGroup>
1166
1176
1167
1177
CapturingGroups=capturingGroups;
1168
1178
CapturingGroupNames=capturingGroupNames;
1179
+
CanCompile=true;
1169
1180
}
1170
1181
1171
1182
publicintIndex;
@@ -1225,6 +1236,8 @@ public void SetFollowingQuantifierError(string message, [CallerArgumentExpressio
1225
1236
// * Lone surrogates need special care too.
1226
1237
// We use the following list to build the adjusted character set.
0 commit comments