@@ -9,24 +9,24 @@ partial class Parser
99 /// <typeparam name="TResult">The type of the value produced by the first parser.</typeparam>
1010 /// <typeparam name="T">The type of the value produced by the second parser, which is ignored.</typeparam>
1111 /// <param name="parser">The initial parser whose result is returned.</param>
12- /// <param name="before ">The subsequent parser.</param>
12+ /// <param name="ignore ">The subsequent parser, applied after the initial parser.</param>
1313 /// <returns>
1414 /// A parser that sequentially applies the current parser and a specified second parser,
1515 /// returning the result of the first parser with ignoring the result of the second.
1616 /// </returns>
17- public static Parser < TResult > ThenIgnore < TResult , T > ( this Parser < TResult > parser , Parser < T > before ) =>
18- new ThenIgnoreParser < TResult > ( parser , before . Void ( ) ) ;
17+ public static Parser < TResult > ThenIgnore < TResult , T > ( this Parser < TResult > parser , Parser < T > ignore ) =>
18+ new ThenIgnoreParser < TResult > ( parser , ignore . Void ( ) ) ;
1919
20- #region Inner type: BeforeParser
20+ #region Inner type: ThenIgnoreParser
2121
2222 /// <summary>
2323 /// Represents a parser that sequentially applies an initial parser and a specified second parser,
2424 /// returning the result of the first parser with ignoring the result of the second.
2525 /// </summary>
2626 /// <typeparam name="T">The type of the value produced by the first parser.</typeparam>
2727 /// <param name="parser">The initial parser whose result is returned.</param>
28- /// <param name="before ">The subsequent parser, applied after the initial parser.</param>
29- private sealed class ThenIgnoreParser < T > ( Parser < T > parser , Parser < Unit > before ) : Parser < T >
28+ /// <param name="ignore ">The subsequent parser, applied after the initial parser.</param>
29+ private sealed class ThenIgnoreParser < T > ( Parser < T > parser , Parser < Unit > ignore ) : Parser < T >
3030 {
3131 /// <inheritdoc />
3232 public override bool TryParse ( ref ParseContext context , [ NotNullWhen ( true ) ] out T ? value )
@@ -37,7 +37,7 @@ public override bool TryParse(ref ParseContext context, [NotNullWhen(true)] out
3737 {
3838 var ( index , length ) = context . MatchedSegment ;
3939
40- if ( before . TryParse ( ref context , out _ ) )
40+ if ( ignore . TryParse ( ref context , out _ ) )
4141 {
4242 context . SetMatched ( index , length ) ;
4343 return true ;
@@ -50,7 +50,7 @@ public override bool TryParse(ref ParseContext context, [NotNullWhen(true)] out
5050
5151 /// <inheritdoc />
5252 protected internal override Parser < Unit > ToVoidParser ( ) =>
53- new ThenIgnoreParser < Unit > ( parser . Void ( ) , before ) ;
53+ new ThenIgnoreParser < Unit > ( parser . Void ( ) , ignore ) ;
5454 }
5555
5656 #endregion
0 commit comments