/// <inheritdoc/> protected internal override void Consume(ReadOnlySpan <Char> source, ref Int32 location, [AllowNull, MaybeNull] out Exception exception, [AllowNull] IAdd <Capture> trace) { Int32 start = location; From.Consume(source, ref location, out exception, trace); if (exception is not null) { return; } To.Consume(source, ref location, out exception, trace); while (exception is not null) { if (++location == source.Length) { break; } if (To.IsConsumeHeader(source, location)) { To.Consume(source, ref location, out exception, trace); } } if (exception is not null) { location = start; exception = AtEnd; } }
/// <inheritdoc/> protected internal override Boolean IsConsumeHeader(ReadOnlySpan <Char> source, Int32 location) => Pattern.IsConsumeHeader(source, location);
/// <inheritdoc/> protected internal sealed override Boolean IsConsumeHeader(ReadOnlySpan <Char> source, Int32 location) => From.IsConsumeHeader(source, location);