Source/NFX/CodeAnalysis/PatternSearch.cs
/// <summary>
/// Skips specified number of tokens by returning FSMI.Loop count times
/// </summary>
Skips specified number of tokens by returning FSMI.Loop count times
Skips specified number of tokens by returning FSMI . Loop count times
public static FSMI Skip<TToken>(this LazyFSMState<TToken> state,
                                        int count) where TToken : Token
       {
          if (count==0) return FSMI.Advance;
          if (count<0) throw new CodeAnalysisException("FSMI Skip(count) must be > 0");
          if (state.m_SkipCount>0)
          {
             state.m_SkipCount--;
             if (state.m_SkipCount==0) return FSMI.Advance;
             return FSMI.Loop;
          }
          state.m_SkipCount = count;
          return FSMI.Loop;
       }
public static FSMI Skip < TToken > ( this LazyFSMState < TToken > state , int count ) where TToken : Token { if ( count == 0 ) return FSMI . Advance ; if ( count < 0 ) throw new CodeAnalysisException ( " " ) ; if ( state . m_SkipCount > 0 ) { state . m_SkipCount -- ; if ( state . m_SkipCount == 0 ) return FSMI . Advance ; return FSMI . Loop ; } state . m_SkipCount = count ; return FSMI . Loop ; }
Skips specified number of tokens by returning FSMI.Loop count times
Skips specified number of tokens by returning FSMI . Loop count times
LazyFSMState<TToken>
this
count
int