import ast sys for regex runtime build

This commit is contained in:
Youmu Liu
2026-02-04 09:27:56 +08:00
parent fe0e4ad7a4
commit f1688583cf
15 changed files with 1141 additions and 37 deletions
@@ -1,12 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.RegularAnalysis
{
internal class RegularSequenceNode : RegularStateNode
internal sealed class RegularSequenceNode : RegularStateNode
{
private string _sequence;
@@ -17,20 +18,9 @@ namespace StgSharp.RegularAnalysis
RegularStateNode former,
RegularContext context
)
{
return true;
}
public override bool TryTransaction(
ReadOnlySpan<RegularStateNode> nodeSpan,
RegularContext context,
out int label
)
{
int pos = context.Position + 1;
if (true) { }
label = -1;
return false;
return context.CurrentCharSpan[pos.._sequence.Length].SequenceEqual(_sequence);
}
}