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

@@ -10,7 +10,7 @@ namespace CanonSharp.Combinator.Parsers.Primitives;
/// <typeparam name="TToken">输入流类型</typeparam>
internal sealed class TakeParser<TToken>(int count) : PrimitiveParser<TToken, IEnumerable<TToken>>
{
protected override ParseResult<TToken, IEnumerable<TToken>> Run<TState>(TState state)
protected override IParseResult<TToken, IEnumerable<TToken>> Run<TState>(TState state)
{
List<TState> result = state.AsEnumerable<TToken, TState>().Take(count).ToList();