File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -681,14 +681,15 @@ public bool IsLookAHead(string value, int offset = 0)
681
681
} // func LookAHead
682
682
683
683
/// <summary>Get look a head.</summary>
684
- /// <param name="offset "></param>
684
+ /// <param name="idx "></param>
685
685
/// <returns></returns>
686
- public char GetLookAHead ( int offset = 0 )
686
+ public char GetLookAHead ( int idx = 0 )
687
687
{
688
- if ( offset > lookAheadBuffer . Length )
689
- throw new ArgumentOutOfRangeException ( nameof ( offset ) , lookAheadBuffer . Length , "Look a head buffer is to small." ) ;
688
+ if ( idx > lookAheadBuffer . Length )
689
+ throw new ArgumentOutOfRangeException ( nameof ( idx ) , lookAheadBuffer . Length , "Look a head buffer is to small." ) ;
690
690
691
- return lookAheadBuffer [ offset ] ;
691
+ var i = ( lookAheadOffset + idx ) % lookAheadBuffer . Length ;
692
+ return lookAheadBuffer [ i ] ;
692
693
} // func GetLookAHead
693
694
694
695
/// <summary></summary>
You can’t perform that action at this time.
0 commit comments