예제 #1
0
        protected Token?StartOfRecordDelimiter(ITokenizerStateContext stateContext)
        {
            var intermediateState = new StringMatchingState(StateHolder.Default, "\n", context =>
            {
                context.WasLastTokenInRecord = true;
                return(Token.CreateValueToken(stateContext.ResetToken()));
            });

            stateContext.State = intermediateState;
            return(null);
        }
 private Token?TokenFinished(ITokenizerStateContext stateContext)
 {
     stateContext.State = StateHolder.Default;
     return(Token.CreateValueToken(stateContext.ResetToken()));
 }
 public override Token?Finish(ITokenizerStateContext stateContext)
 {
     return(Token.CreateValueToken(stateContext.ResetToken()));
 }
예제 #4
0
 private Token?TokenFinished(ITokenizerStateContext stateContext)
 {
     return(Token.CreateValueToken(stateContext.ResetToken()));
 }
예제 #5
0
 protected void WithCurrentToken(string tokenValue)
 {
     A.CallTo(() => TokenizerStateContext.ResetToken()).Returns(tokenValue);
 }