fix: Using covariant interface for IParser and IParseResult.

Rename CanonSharp.Common to CanonSharp.Pascal.
This commit is contained in:
2024-08-14 19:41:10 +08:00
parent 65d4d0e6e8
commit 65d6b9794c
51 changed files with 399 additions and 393 deletions

View File

@@ -11,7 +11,7 @@ namespace CanonSharp.Combinator.Text;
/// <param name="comparison">字符串比较模式</param>
public class StringParser(string except, StringComparison comparison) : PrimitiveParser<char, string>
{
protected override ParseResult<char, string> Run<TState>(TState state)
protected override IParseResult<char, string> Run<TState>(TState state)
{
TState[] states = state.AsEnumerable<char, TState>().Take(except.Length).ToArray();
string actual = new(states.Select(x => x.Current).ToArray());