fix: Using covariant interface for IParser and IParseResult.
Rename CanonSharp.Common to CanonSharp.Pascal.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user