add parser for concat

This commit is contained in:
Youmu Liu
2026-02-04 16:30:47 +08:00
parent 6292157fc0
commit f22e90af55
2 changed files with 11 additions and 0 deletions
@@ -44,7 +44,11 @@ namespace StgSharp.RegularAnalysis.TextRegex
{
RegexTokenReader reader = new RegexTokenReader(regex);
TokenParser<RegexElementLabel, RegexElementLabel> lexer = reader.Pipe(() => new RegexTokenParser());
while (lexer.TryReadToken(out Token<RegexElementLabel> token)) { }
}
private static void
}
}
@@ -45,6 +45,13 @@ namespace StgSharp.RegularAnalysis.TextRegex
public RegexTokenReader() { }
public RegexTokenReader(
string source
)
{
_source = source;
}
public bool IsEmpty => string.IsNullOrEmpty(_source) || position >= _source.Length;
public Token<RegexElementLabel> ReadToken()